Compare commits

...

73 Commits

Author SHA1 Message Date
Leonid Logvinov
f003298ce4 Publish
- 0x.js@4.0.3
 - @0x/abi-gen@2.0.2
 - @0x/abi-gen-wrappers@3.0.2
 - @0x/assert@2.0.2
 - @0x/asset-buyer@5.0.3
 - @0x/base-contract@4.0.2
 - @0x/connect@4.0.3
 - @0x/contract-wrappers@7.0.2
 - @0x/contracts-gen@1.0.1
 - @0x/dev-tools-pages@0.0.18
 - @0x/dev-utils@2.0.2
 - @0x/fill-scenarios@2.0.3
 - @0x/instant@1.0.12
 - @0x/json-schemas@3.0.2
 - @0x/metacoin@0.0.39
 - @0x/migrations@3.0.3
 - @0x/monorepo-scripts@1.0.23
 - @0x/order-utils@6.0.1
 - @0x/order-watcher@3.0.3
 - @0x/pipeline@1.0.9
 - @0x/react-docs@2.0.3
 - @0x/react-shared@2.0.3
 - @0x/sol-compiler@3.0.2
 - @0x/sol-coverage@2.0.2
 - @0x/sol-doc@2.0.2
 - @0x/sol-profiler@2.0.3
 - @0x/sol-resolver@2.0.2
 - @0x/sol-trace@2.0.3
 - @0x/sol-tracing-utils@6.0.2
 - @0x/sra-spec@2.0.2
 - @0x/subproviders@3.0.2
 - @0x/testnet-faucets@1.0.68
 - @0x/types@2.0.2
 - @0x/utils@4.0.3
 - @0x/web3-wrapper@4.0.2
 - @0x/website@0.0.71
 - @0x/contracts-asset-proxy@1.0.4
 - @0x/contracts-erc20@1.0.4
 - @0x/contracts-erc721@1.0.4
 - @0x/contracts-exchange@1.0.4
 - @0x/contracts-exchange-forwarder@1.0.4
 - @0x/contracts-exchange-libs@1.0.4
 - @0x/contracts-extensions@2.0.3
 - @0x/contracts-multisig@2.0.3
 - @0x/contracts-test-utils@3.0.3
 - @0x/contracts-utils@2.0.3
2019-02-07 15:02:05 +01:00
Leonid Logvinov
5f5ee0041f Updated CHANGELOGS 2019-02-07 15:01:53 +01:00
Leonid Logvinov
88497ddc52 Updated CHANGELOGS 2019-02-07 14:42:20 +01:00
Fabio B
e921d5ec13 Merge pull request #1589 from 0xProject/feat/lock-contract-deps
Lock dep versions in contracts packages (again)
2019-02-07 13:28:57 +00:00
Leonid Logvinov
c55974a485 Merge pull request #1596 from 0xProject/fix/sol-compiler-args
Sol-compiler bug fixes
2019-02-07 14:18:55 +01:00
Fabio B
2ff0f545f5 Update packages/sol-compiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-07 14:17:41 +01:00
Fabio B
7f2a011c3e Update packages/sol-compiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-07 14:17:23 +01:00
Fabio Berger
8af9a38c8e Move from devDep to dep 2019-02-07 13:07:36 +00:00
Leonid Logvinov
b54bafe1c5 Fix linter 2019-02-07 13:35:50 +01:00
Fabio Berger
7a9ff3846e Merge development 2019-02-07 12:33:44 +00:00
Leonid Logvinov
53fe08a348 Update CHANGELOG 2019-02-07 13:30:00 +01:00
Fabio Berger
f118e86cfe Re-run yarn since fails again on first run 2019-02-07 12:29:05 +00:00
Leonid Logvinov
2e60d5341e Add PR numbers 2019-02-07 13:24:57 +01:00
Leonid Logvinov
2ef3af0003 Omit remapping in compiler settings equality checks 2019-02-07 13:20:21 +01:00
Leonid Logvinov
2b7699c26a Omit remapping in compiler settings equality checks 2019-02-07 13:20:03 +01:00
Leonid Logvinov
d567c58d3b Fix a bug when ast and legacyAST were not present in the artifacts even if requested 2019-02-07 13:10:08 +01:00
Fabio Berger
bede3d7e29 Update yarn.lock 2019-02-07 12:01:57 +00:00
Leonid Logvinov
64d6dae672 Remove the bin_paths and fetch the solidity release list from github repo 2019-02-07 12:58:46 +01:00
Fabio Berger
b001fe2b08 Remove postinstall hack 2019-02-07 11:58:06 +00:00
Leonid Logvinov
c20285dd36 Fix the undefined opts bug 2019-02-07 12:30:54 +01:00
Leonid Logvinov
7e19c944b9 Merge pull request #1575 from 0xProject/feature/contracts-gen
Contracts generator
2019-02-07 12:23:00 +01:00
Leonid Logvinov
fd4d3cff88 Fix sol-compiler bug with remappings causing smart recompilation to now work 2019-02-07 12:13:24 +01:00
Fabio Berger
5ff646ca8e re-add postinstall hack 2019-02-07 10:53:14 +00:00
Leonid Logvinov
88432a5e67 Fix deps versions 2019-02-07 11:49:59 +01:00
Leonid Logvinov
7519d60fb7 Fix linter issues 2019-02-07 11:29:04 +01:00
Leonid Logvinov
de23428069 Merge development 2019-02-07 11:15:37 +01:00
Amir Bandeali
9089bf2c5f Lock dep versions in contracts packages 2019-02-06 21:10:35 -08:00
Fabio Berger
2a344e26cc Publish
- 0x.js@4.0.2
 - @0x/asset-buyer@5.0.2
 - @0x/connect@4.0.2
 - @0x/contract-wrappers@7.0.1
 - @0x/dev-tools-pages@0.0.17
 - @0x/fill-scenarios@2.0.2
 - @0x/instant@1.0.11
 - @0x/migrations@3.0.2
 - @0x/monorepo-scripts@1.0.22
 - @0x/order-utils@6.0.0
 - @0x/order-watcher@3.0.2
 - @0x/pipeline@1.0.8
 - @0x/react-docs@2.0.2
 - @0x/react-shared@2.0.2
 - @0x/testnet-faucets@1.0.67
 - @0x/website@0.0.70
 - @0x/contracts-asset-proxy@1.0.3
 - @0x/contracts-erc20@1.0.3
 - @0x/contracts-erc721@1.0.3
 - @0x/contracts-exchange@1.0.3
 - @0x/contracts-exchange-forwarder@1.0.3
 - @0x/contracts-exchange-libs@1.0.3
 - @0x/contracts-extensions@2.0.2
 - @0x/contracts-multisig@2.0.2
 - @0x/contracts-test-utils@3.0.2
 - @0x/contracts-utils@2.0.2
2019-02-07 01:53:15 +00:00
Fabio Berger
af26403a86 Updated CHANGELOGS 2019-02-07 01:53:02 +00:00
Fabio B
3af6c8fe1d Merge pull request #1595 from 0xProject/fix-order-utils-doc-rendering
Stop exporting EIP712 schemas
2019-02-07 01:24:32 +00:00
Fabio Berger
b883b183a6 Stop exporting EIP712 schemas 2019-02-07 01:03:43 +00:00
Fabio Berger
ac58ace8cf Add CHANGELOG entry about faux publish of contract packages 2019-02-07 00:16:39 +00:00
Fabio Berger
a50eefc44e Fix paragraph rendering on wiki 2019-02-06 14:08:45 +00:00
Fabio Berger
dbb3c5e32b Publish
- 0x.js@4.0.1
 - @0x/abi-gen@2.0.1
 - @0x/abi-gen-wrappers@3.0.1
 - @0x/assert@2.0.1
 - @0x/asset-buyer@5.0.1
 - @0x/base-contract@4.0.1
 - @0x/connect@4.0.1
 - @0x/contract-wrappers@7.0.0
 - @0x/dev-tools-pages@0.0.16
 - @0x/dev-utils@2.0.1
 - @0x/fill-scenarios@2.0.1
 - @0x/instant@1.0.10
 - @0x/json-schemas@3.0.1
 - @0x/metacoin@0.0.38
 - @0x/migrations@3.0.1
 - @0x/monorepo-scripts@1.0.21
 - @0x/order-utils@5.0.0
 - @0x/order-watcher@3.0.1
 - @0x/pipeline@1.0.7
 - @0x/react-docs@2.0.1
 - @0x/react-shared@2.0.1
 - @0x/sol-compiler@3.0.1
 - @0x/sol-coverage@2.0.1
 - @0x/sol-doc@2.0.1
 - @0x/sol-profiler@2.0.2
 - @0x/sol-resolver@2.0.1
 - @0x/sol-trace@2.0.2
 - @0x/sol-tracing-utils@6.0.1
 - @0x/sra-spec@2.0.1
 - @0x/subproviders@3.0.1
 - @0x/testnet-faucets@1.0.66
 - @0x/types@2.0.1
 - @0x/utils@4.0.2
 - @0x/web3-wrapper@4.0.1
 - @0x/website@0.0.69
 - @0x/contracts-asset-proxy@1.0.2
 - @0x/contracts-erc20@1.0.2
 - @0x/contracts-erc721@1.0.2
 - @0x/contracts-exchange@1.0.2
 - @0x/contracts-exchange-forwarder@1.0.2
 - @0x/contracts-exchange-libs@1.0.2
 - @0x/contracts-extensions@2.0.1
 - @0x/contracts-multisig@2.0.1
 - @0x/contracts-test-utils@3.0.1
 - @0x/contracts-utils@2.0.1
2019-02-06 11:41:24 +00:00
Fabio Berger
265df31750 Updated CHANGELOGS 2019-02-06 11:41:12 +00:00
Fabio Berger
9bbe56df0b Fix react-highlight dep 2019-02-06 11:24:40 +00:00
Fabio Berger
879c795fc4 Fix react-highlight dep 2019-02-06 11:07:16 +00:00
Fabio B
8b5bb97537 Merge pull request #1587 from 0xProject/fix/abiEncoder/DefaultTypesOnNullInput
Handle ABI decoding NULL for all data types
2019-02-06 10:23:21 +00:00
Greg Hysen
3d7a635543 Added NULL decoding tests for return values 2019-02-05 21:33:07 -08:00
Greg Hysen
b3ae9e6e25 updated changelog for utils 2019-02-05 19:18:00 -08:00
Greg Hysen
023ea5b3a1 Ran prettier + linter 2019-02-05 18:10:17 -08:00
Greg Hysen
2ad6bd3945 Test cases for handling NULL input for all data types 2019-02-05 18:01:38 -08:00
Greg Hysen
2326dcdb12 Handle NULL input for all data types 2019-02-05 17:30:54 -08:00
Amir Bandeali
b5eb47f609 Merge pull request #1576 from 0xProject/feat/transaction-hash
Add transactionHashUtils to order-utils package
2019-02-05 10:03:30 -08:00
Amir Bandeali
af4ed0f39c Update python JSON schema for 0x transactions 2019-02-05 09:26:03 -08:00
Amir Bandeali
eac254f925 Fix outdated comments and make verifyingContractAddress a required part of the 0x tx schema 2019-02-05 09:26:03 -08:00
Amir Bandeali
8246dec843 Rename getTransactionHex to getTransactionHashHex for clarity 2019-02-05 09:26:03 -08:00
Amir Bandeali
4514da0646 Update CHANGELOGs 2019-02-05 09:26:03 -08:00
Amir Bandeali
9abd6f5695 Allow custom domains in eip712Utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
a394967268 Use new transaction schema throughout monorepo 2019-02-05 09:23:09 -08:00
Amir Bandeali
c7c4cb9bc6 Add transaction hash utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
1ada679663 Update ZeroExTransactionSchema 2019-02-05 09:23:09 -08:00
Amir Bandeali
9552676783 Add schema validation to getOrderHashBuff 2019-02-05 09:23:09 -08:00
Fabio B
69c7c03fb3 Merge pull request #1580 from 0xProject/fix/preSignedSignatureBug
Fix preSigned signature bug in SignatureUtils
2019-02-05 14:36:06 +00:00
Fabio Berger
224a58bdf2 Fix dep version 2019-02-05 14:19:48 +00:00
Fabio Berger
98427b715d Merge branch 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo into fix/preSignedSignatureBug
* 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo:
  Update packages/order-utils/CHANGELOG.json
2019-02-05 13:57:40 +00:00
Fabio Berger
a8078aa151 merge development 2019-02-05 13:55:05 +00:00
Leonid Logvinov
3cb6744369 Update packages/order-utils/CHANGELOG.json
Co-Authored-By: fabioberger <kandinsky454@protonmail.ch>
2019-02-05 13:14:31 +00:00
Fabio Berger
e021460f03 Remove .only 2019-02-05 13:09:23 +00:00
Fabio Berger
0a93f3346f All CHANGELOG entry 2019-02-05 13:07:50 +00:00
Fabio Berger
332cc14dcd Add preSigned isValidSignature test for success case using smart contract & TS implementation 2019-02-05 13:07:40 +00:00
Fabio Berger
7885b2e3f8 Fix test 2019-02-05 12:56:04 +00:00
Fabio Berger
2447c72a5c Fix heap out of memory issue 2019-02-05 12:09:13 +00:00
Fabio Berger
d7c9d73349 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  update error msg for dependency version check
  CI test for dependencies to have the same version (#1556)
  Add missing comma
  Decode NULL as false
  Update blog link to not be /latest, and use constant in mobile nav
2019-02-05 11:16:45 +00:00
Fabio Berger
a1bf5e8261 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  Nit fixes to pipeline README
  fix typo
2019-02-04 19:33:08 +00:00
Fabio Berger
52f22aad81 Write failing preSign unit test 2019-02-04 16:03:48 +00:00
Fabio Berger
c03e24e10b Fix bug where passing in signerAddress instead of exchangeAddress 2019-02-04 16:03:25 +00:00
Leonid Logvinov
4d75681357 Add @0x/types dependency 2019-02-04 13:11:20 +01:00
Leonid Logvinov
1a88eac9c7 Make the banner more visible 2019-02-04 13:00:15 +01:00
Leonid Logvinov
47357ddec8 Remove redundant dependencies 2019-02-04 12:58:19 +01:00
Fabio B
129ae3a737 Update packages/contracts-gen/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-04 12:56:18 +01:00
Fabio B
31d1390039 Update packages/contracts-gen/README.md
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-02-04 12:52:36 +01:00
Leonid Logvinov
6943bbcacb Temp 2019-02-04 10:38:02 +01:00
258 changed files with 3753 additions and 1267 deletions

View File

@@ -16,7 +16,7 @@ jobs:
command: sudo npm install --global yarn@1.9.4
- run:
name: yarn
command: yarn --frozen-lockfile --ignore-engines install
command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install
- setup_remote_docker
- run: yarn build:ci:no_website
- run: yarn build:ts

View File

@@ -2,6 +2,7 @@ python: ['python-packages']
contracts: ['contracts']
sol-doc: ['packages/sol-doc']
sol-resolver: ['packages/sol-resolver']
contracts-gen: ['packages/contracts-gen']
sra-spec: ['packages/sra-spec']
subproviders: ['packages/subproviders']
contract-addresses: ['packages/contract-addresses']

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,12 +17,17 @@
}
},
"contracts": [
"IAssetData",
"IAssetProxy",
"IAuthorizable",
"ERC20Proxy",
"ERC721Proxy",
"MixinAuthorizable",
"MultiAssetProxy"
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
"@0x/contracts-erc20/contracts/test/DummyMultipleReturnERC20Token.sol",
"@0x/contracts-erc20/contracts/test/DummyNoReturnERC20Token.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Receiver.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
"src/ERC20Proxy.sol",
"src/ERC721Proxy.sol",
"src/MixinAuthorizable.sol",
"src/MultiAssetProxy.sol",
"src/interfaces/IAssetData.sol",
"src/interfaces/IAssetProxy.sol",
"src/interfaces/IAuthorizable.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(ERC20Proxy|ERC721Proxy|IAssetData|IAssetProxy|IAuthorizable|MixinAuthorizable|MultiAssetProxy).json"
"abis": "./generated-artifacts/@(DummyERC20Token|DummyERC721Receiver|DummyERC721Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ERC20Proxy|ERC721Proxy|IAssetData|IAssetProxy|IAuthorizable|MixinAuthorizable|MultiAssetProxy).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,9 +46,10 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -63,18 +66,18 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-erc20": "^1.0.1",
"@0x/contracts-erc721": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/contracts-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-erc20": "1.0.2",
"@0x/contracts-erc721": "1.0.2",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/contracts-utils": "2.0.1",
"@0x/order-utils": "^6.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,33 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyERC721Receiver from '../generated-artifacts/DummyERC721Receiver.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as DummyMultipleReturnERC20Token from '../generated-artifacts/DummyMultipleReturnERC20Token.json';
import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
import * as IAssetData from '../generated-artifacts/IAssetData.json';
import * as IAssetProxy from '../generated-artifacts/IAssetProxy.json';
import * as IAuthorizable from '../generated-artifacts/IAuthorizable.json';
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
export const artifacts = {
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
IAssetData: IAssetData as ContractArtifact,
IAssetProxy: IAssetProxy as ContractArtifact,
IAuthorizable: IAuthorizable as ContractArtifact,
};

View File

@@ -1,19 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as ERC20Proxy from '../../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../../generated-artifacts/ERC721Proxy.json';
import * as IAssetData from '../../generated-artifacts/IAssetData.json';
import * as IAssetProxy from '../../generated-artifacts/IAssetProxy.json';
import * as IAuthorizable from '../../generated-artifacts/IAuthorizable.json';
import * as MixinAuthorizable from '../../generated-artifacts/MixinAuthorizable.json';
import * as MultiAssetProxy from '../../generated-artifacts/MultiAssetProxy.json';
export const artifacts = {
IAuthorizable: IAuthorizable as ContractArtifact,
IAssetData: IAssetData as ContractArtifact,
IAssetProxy: IAssetProxy as ContractArtifact,
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
};

View File

@@ -0,0 +1,17 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_erc721_receiver';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/dummy_multiple_return_erc20_token';
export * from '../generated-wrappers/dummy_no_return_erc20_token';
export * from '../generated-wrappers/erc20_proxy';
export * from '../generated-wrappers/erc721_proxy';
export * from '../generated-wrappers/i_asset_data';
export * from '../generated-wrappers/i_asset_proxy';
export * from '../generated-wrappers/i_authorizable';
export * from '../generated-wrappers/mixin_authorizable';
export * from '../generated-wrappers/multi_asset_proxy';

View File

@@ -1,7 +0,0 @@
export * from '../../generated-wrappers/i_asset_data';
export * from '../../generated-wrappers/i_asset_proxy';
export * from '../../generated-wrappers/erc20_proxy';
export * from '../../generated-wrappers/erc721_proxy';
export * from '../../generated-wrappers/mixin_authorizable';
export * from '../../generated-wrappers/multi_asset_proxy';
export * from '../../generated-wrappers/i_authorizable';

View File

@@ -1,15 +1,3 @@
import {
artifacts as erc20Artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyMultipleReturnERC20TokenContract,
DummyNoReturnERC20TokenContract,
} from '@0x/contracts-erc20';
import {
artifacts as erc721Artifacts,
DummyERC721ReceiverContract,
DummyERC721TokenContract,
} from '@0x/contracts-erc721';
import {
chaiSetup,
constants,
@@ -30,6 +18,12 @@ import * as _ from 'lodash';
import {
artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyERC721ReceiverContract,
DummyERC721TokenContract,
DummyMultipleReturnERC20TokenContract,
DummyNoReturnERC20TokenContract,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
@@ -154,7 +148,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_DECIMALS,
);
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.DummyNoReturnERC20Token,
artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -163,7 +157,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.DummyMultipleReturnERC20Token,
artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -204,7 +198,7 @@ describe('Asset Transfer Proxies', () => {
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
erc721Artifacts.DummyERC721Receiver,
artifacts.DummyERC721Receiver,
provider,
txDefaults,
);
@@ -568,7 +562,7 @@ describe('Asset Transfer Proxies', () => {
erc721Receiver.address,
amount,
);
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc721Artifacts });
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: erc721Proxy.address,
@@ -760,7 +754,7 @@ describe('Asset Transfer Proxies', () => {
inputAmount,
);
const erc20Balances = await erc20Wrapper.getBalancesAsync();
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: multiAssetProxy.address,

View File

@@ -1,4 +1,3 @@
import { artifacts as tokensArtifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
import { assetDataUtils } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
@@ -6,8 +5,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as _ from 'lodash';
import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
import { artifacts } from '../../src/artifacts';
import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
export class ERC20Wrapper {
private readonly _tokenOwnerAddresses: string[];
@@ -38,7 +36,7 @@ export class ERC20Wrapper {
for (let i = 0; i < numberToDeploy; i++) {
this._dummyTokenContracts.push(
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
tokensArtifacts.DummyERC20Token,
artifacts.DummyERC20Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,

View File

@@ -1,4 +1,3 @@
import { artifacts as tokensArtifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
import { generatePseudoRandomSalt } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
@@ -6,8 +5,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as _ from 'lodash';
import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
import { artifacts } from '../../src/artifacts';
import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
export class ERC721Wrapper {
private readonly _tokenOwnerAddresses: string[];
@@ -30,7 +28,7 @@ export class ERC721Wrapper {
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
this._dummyTokenContracts.push(
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
tokensArtifacts.DummyERC721Token,
artifacts.DummyERC721Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,

View File

@@ -1,19 +1,20 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/IAssetData.json",
"./generated-artifacts/IAssetProxy.json",
"./generated-artifacts/IAuthorizable.json",
"./generated-artifacts/ERC20Proxy.json",
"./generated-artifacts/ERC721Proxy.json",
"./generated-artifacts/MixinAuthorizable.json",
"./generated-artifacts/MultiAssetProxy.json"
"generated-artifacts/DummyERC20Token.json",
"generated-artifacts/DummyERC721Receiver.json",
"generated-artifacts/DummyERC721Token.json",
"generated-artifacts/DummyMultipleReturnERC20Token.json",
"generated-artifacts/DummyNoReturnERC20Token.json",
"generated-artifacts/ERC20Proxy.json",
"generated-artifacts/ERC721Proxy.json",
"generated-artifacts/IAssetData.json",
"generated-artifacts/IAssetProxy.json",
"generated-artifacts/IAuthorizable.json",
"generated-artifacts/MixinAuthorizable.json",
"generated-artifacts/MultiAssetProxy.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,16 +17,16 @@
}
},
"contracts": [
"DummyERC20Token",
"DummyMultipleReturnERC20Token",
"DummyNoReturnERC20Token",
"ReentrantERC20Token",
"ERC20Token",
"IERC20Token",
"MintableERC20Token",
"UnlimitedAllowanceERC20Token",
"IEtherToken",
"WETH9",
"ZRXToken"
"src/ERC20Token.sol",
"src/MintableERC20Token.sol",
"src/UnlimitedAllowanceERC20Token.sol",
"src/WETH9.sol",
"src/ZRXToken.sol",
"src/interfaces/IERC20Token.sol",
"src/interfaces/IEtherToken.sol",
"test/DummyERC20Token.sol",
"test/DummyMultipleReturnERC20Token.sol",
"test/DummyNoReturnERC20Token.sol",
"test/ReentrantERC20Token.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ReentrantERC20Token|ERC20Token|IERC20Token|MintableERC20Token|UnlimitedAllowanceERC20Token|IEtherToken|WETH9|ZRXToken).json"
"abis": "./generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ERC20Token|IERC20Token|IEtherToken|MintableERC20Token|ReentrantERC20Token|UnlimitedAllowanceERC20Token|WETH9|ZRXToken).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,10 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -64,15 +67,15 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-exchange-libs": "^1.0.1",
"@0x/contracts-utils": "^2.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-exchange-libs": "1.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,31 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyMultipleReturnERC20Token from '../generated-artifacts/DummyMultipleReturnERC20Token.json';
import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
import * as ERC20Token from '../generated-artifacts/ERC20Token.json';
import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
import * as MintableERC20Token from '../generated-artifacts/MintableERC20Token.json';
import * as ReentrantERC20Token from '../generated-artifacts/ReentrantERC20Token.json';
import * as UnlimitedAllowanceERC20Token from '../generated-artifacts/UnlimitedAllowanceERC20Token.json';
import * as WETH9 from '../generated-artifacts/WETH9.json';
import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
export const artifacts = {
ERC20Token: ERC20Token as ContractArtifact,
MintableERC20Token: MintableERC20Token as ContractArtifact,
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
WETH9: WETH9 as ContractArtifact,
ZRXToken: (ZRXToken as any) as ContractArtifact,
IERC20Token: IERC20Token as ContractArtifact,
IEtherToken: IEtherToken as ContractArtifact,
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
};

View File

@@ -1,30 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from '../../generated-artifacts/DummyERC20Token.json';
import * as DummyMultipleReturnERC20Token from '../../generated-artifacts/DummyMultipleReturnERC20Token.json';
import * as DummyNoReturnERC20Token from '../../generated-artifacts/DummyNoReturnERC20Token.json';
import * as ERC20Token from '../../generated-artifacts/ERC20Token.json';
import * as IERC20Token from '../../generated-artifacts/IERC20Token.json';
import * as IEtherToken from '../../generated-artifacts/IEtherToken.json';
import * as MintableERC20Token from '../../generated-artifacts/MintableERC20Token.json';
import * as ReentrantERC20Token from '../../generated-artifacts/ReentrantERC20Token.json';
import * as UnlimitedAllowanceERC20Token from '../../generated-artifacts/UnlimitedAllowanceERC20Token.json';
import * as WETH9 from '../../generated-artifacts/WETH9.json';
import * as ZRXToken from '../../generated-artifacts/ZRXToken.json';
// tslint:disable:no-unnecessary-type-assertion
export const artifacts = {
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
ERC20Token: ERC20Token as ContractArtifact,
IERC20Token: IERC20Token as ContractArtifact,
MintableERC20Token: MintableERC20Token as ContractArtifact,
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
IEtherToken: IEtherToken as ContractArtifact,
WETH9: WETH9 as ContractArtifact,
// Note(albrow): "as any" hack still required here because ZRXToken does not
// conform to the v2 artifact type.
ZRXToken: (ZRXToken as any) as ContractArtifact,
};

View File

@@ -0,0 +1,16 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_multiple_return_erc20_token';
export * from '../generated-wrappers/dummy_no_return_erc20_token';
export * from '../generated-wrappers/erc20_token';
export * from '../generated-wrappers/i_erc20_token';
export * from '../generated-wrappers/i_ether_token';
export * from '../generated-wrappers/mintable_erc20_token';
export * from '../generated-wrappers/reentrant_erc20_token';
export * from '../generated-wrappers/unlimited_allowance_erc20_token';
export * from '../generated-wrappers/weth9';
export * from '../generated-wrappers/zrx_token';

View File

@@ -1,11 +0,0 @@
export * from '../../generated-wrappers/zrx_token';
export * from '../../generated-wrappers/weth9';
export * from '../../generated-wrappers/unlimited_allowance_erc20_token';
export * from '../../generated-wrappers/reentrant_erc20_token';
export * from '../../generated-wrappers/mintable_erc20_token';
export * from '../../generated-wrappers/i_ether_token';
export * from '../../generated-wrappers/i_erc20_token';
export * from '../../generated-wrappers/erc20_token';
export * from '../../generated-wrappers/dummy_no_return_erc20_token';
export * from '../../generated-wrappers/dummy_multiple_return_erc20_token';
export * from '../../generated-wrappers/dummy_erc20_token';

View File

@@ -1,23 +1,19 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/DummyERC20Token.json",
"./generated-artifacts/DummyMultipleReturnERC20Token.json",
"./generated-artifacts/DummyNoReturnERC20Token.json",
"./generated-artifacts/ReentrantERC20Token.json",
"./generated-artifacts/ERC20Token.json",
"./generated-artifacts/IERC20Token.json",
"./generated-artifacts/MintableERC20Token.json",
"./generated-artifacts/UnlimitedAllowanceERC20Token.json",
"./generated-artifacts/IEtherToken.json",
"./generated-artifacts/WETH9.json",
"./generated-artifacts/ZRXToken.json"
"generated-artifacts/DummyERC20Token.json",
"generated-artifacts/DummyMultipleReturnERC20Token.json",
"generated-artifacts/DummyNoReturnERC20Token.json",
"generated-artifacts/ERC20Token.json",
"generated-artifacts/IERC20Token.json",
"generated-artifacts/IEtherToken.json",
"generated-artifacts/MintableERC20Token.json",
"generated-artifacts/ReentrantERC20Token.json",
"generated-artifacts/UnlimitedAllowanceERC20Token.json",
"generated-artifacts/WETH9.json",
"generated-artifacts/ZRXToken.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,12 +17,12 @@
}
},
"contracts": [
"DummyERC721Receiver",
"InvalidERC721Receiver",
"DummyERC721Token",
"ERC721Token",
"IERC721Receiver",
"IERC721Token",
"MintableERC721Token"
"src/ERC721Token.sol",
"src/MintableERC721Token.sol",
"src/interfaces/IERC721Receiver.sol",
"src/interfaces/IERC721Token.sol",
"test/DummyERC721Receiver.sol",
"test/DummyERC721Token.sol",
"test/InvalidERC721Receiver.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(DummyERC721Receiver|InvalidERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|MintableERC721Token).json"
"abis": "./generated-artifacts/@(DummyERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|InvalidERC721Receiver|MintableERC721Token).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,10 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -64,14 +67,14 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-utils": "^2.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,23 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC721Receiver from '../generated-artifacts/DummyERC721Receiver.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as ERC721Token from '../generated-artifacts/ERC721Token.json';
import * as IERC721Receiver from '../generated-artifacts/IERC721Receiver.json';
import * as IERC721Token from '../generated-artifacts/IERC721Token.json';
import * as InvalidERC721Receiver from '../generated-artifacts/InvalidERC721Receiver.json';
import * as MintableERC721Token from '../generated-artifacts/MintableERC721Token.json';
export const artifacts = {
ERC721Token: ERC721Token as ContractArtifact,
MintableERC721Token: MintableERC721Token as ContractArtifact,
IERC721Receiver: IERC721Receiver as ContractArtifact,
IERC721Token: IERC721Token as ContractArtifact,
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
};

View File

@@ -1,20 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC721Receiver from '../../generated-artifacts/DummyERC721Receiver.json';
import * as DummyERC721Token from '../../generated-artifacts/DummyERC721Token.json';
import * as ERC721Token from '../../generated-artifacts/ERC721Token.json';
import * as IERC721Receiver from '../../generated-artifacts/IERC721Receiver.json';
import * as IERC721Token from '../../generated-artifacts/IERC721Token.json';
import * as InvalidERC721Receiver from '../../generated-artifacts/InvalidERC721Receiver.json';
import * as MintableERC721Token from '../../generated-artifacts/MintableERC721Token.json';
// tslint:disable:no-unnecessary-type-assertion
export const artifacts = {
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
ERC721Token: ERC721Token as ContractArtifact,
IERC721Receiver: IERC721Receiver as ContractArtifact,
IERC721Token: IERC721Token as ContractArtifact,
MintableERC721Token: MintableERC721Token as ContractArtifact,
};

View File

@@ -0,0 +1,12 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc721_receiver';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/erc721_token';
export * from '../generated-wrappers/i_erc721_receiver';
export * from '../generated-wrappers/i_erc721_token';
export * from '../generated-wrappers/invalid_erc721_receiver';
export * from '../generated-wrappers/mintable_erc721_token';

View File

@@ -1,7 +0,0 @@
export * from '../../generated-wrappers/mintable_erc721_token';
export * from '../../generated-wrappers/invalid_erc721_receiver';
export * from '../../generated-wrappers/i_erc721_token';
export * from '../../generated-wrappers/i_erc721_receiver';
export * from '../../generated-wrappers/erc721_token';
export * from '../../generated-wrappers/dummy_erc721_token';
export * from '../../generated-wrappers/dummy_erc721_receiver';

View File

@@ -1,19 +1,15 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/DummyERC721Receiver.json",
"./generated-artifacts/InvalidERC721Receiver.json",
"./generated-artifacts/DummyERC721Token.json",
"./generated-artifacts/ERC721Token.json",
"./generated-artifacts/IERC721Receiver.json",
"./generated-artifacts/IERC721Token.json",
"./generated-artifacts/MintableERC721Token.json"
"generated-artifacts/DummyERC721Receiver.json",
"generated-artifacts/DummyERC721Token.json",
"generated-artifacts/ERC721Token.json",
"generated-artifacts/IERC721Receiver.json",
"generated-artifacts/IERC721Token.json",
"generated-artifacts/InvalidERC721Receiver.json",
"generated-artifacts/MintableERC721Token.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -19,5 +16,11 @@
}
}
},
"contracts": ["Forwarder"]
"contracts": [
"@0x/contracts-erc20/contracts/src/WETH9.sol",
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
"@0x/contracts-exchange/contracts/src/Exchange.sol",
"src/Forwarder.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(Forwarder).json"
"abis": "./generated-artifacts/@(DummyERC20Token|DummyERC721Token|Exchange|Forwarder|WETH9).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,11 +46,12 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contract-wrappers": "^6.0.1",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contract-wrappers": "^7.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -65,20 +68,20 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-asset-proxy": "^1.0.1",
"@0x/contracts-erc20": "^1.0.1",
"@0x/contracts-erc721": "^1.0.1",
"@0x/contracts-exchange": "^1.0.1",
"@0x/contracts-exchange-libs": "^1.0.1",
"@0x/contracts-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-asset-proxy": "1.0.2",
"@0x/contracts-erc20": "1.0.2",
"@0x/contracts-erc721": "1.0.2",
"@0x/contracts-exchange": "1.0.2",
"@0x/contracts-exchange-libs": "1.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/order-utils": "^6.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,19 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as Exchange from '../generated-artifacts/Exchange.json';
import * as Forwarder from '../generated-artifacts/Forwarder.json';
import * as WETH9 from '../generated-artifacts/WETH9.json';
export const artifacts = {
WETH9: WETH9 as ContractArtifact,
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
Exchange: Exchange as ContractArtifact,
Forwarder: Forwarder as ContractArtifact,
};

View File

@@ -1,7 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as Forwarder from '../../generated-artifacts/Forwarder.json';
export const artifacts = {
Forwarder: Forwarder as ContractArtifact,
};

View File

@@ -0,0 +1,10 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/exchange';
export * from '../generated-wrappers/forwarder';
export * from '../generated-wrappers/weth9';

View File

@@ -1 +0,0 @@
export * from '../../generated-wrappers/forwarder';

View File

@@ -1,7 +1,5 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts, DummyERC20TokenContract, WETH9Contract } from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
import { ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -23,7 +21,15 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { artifacts, ForwarderContract, ForwarderWrapper } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
ExchangeContract,
ForwarderContract,
ForwarderWrapper,
WETH9Contract,
} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -88,14 +94,14 @@ describe(ContractName.Forwarder, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(erc20Artifacts.WETH9, provider, txDefaults);
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
erc20Wrapper.addDummyTokenContract(weth);
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
@@ -166,7 +172,7 @@ describe(ContractName.Forwarder, () => {
describe('constructor', () => {
it('should revert if assetProxy is unregistered', async () => {
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,6 +1,3 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
@@ -61,12 +58,7 @@ export class ForwarderWrapper {
constructor(contractInstance: ForwarderContract, provider: Provider) {
this._forwarderContract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...erc20Artifacts,
...erc721Artifacts,
...exchangeArtifacts,
});
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async marketSellOrdersWithEthAsync(
orders: SignedOrder[],

View File

@@ -1,11 +1,13 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": ["./generated-artifacts/Forwarder.json"],
"files": [
"generated-artifacts/DummyERC20Token.json",
"generated-artifacts/DummyERC721Token.json",
"generated-artifacts/Exchange.json",
"generated-artifacts/Forwarder.json",
"generated-artifacts/WETH9.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,13 +17,13 @@
}
},
"contracts": [
"TestLibs",
"LibOrder",
"LibMath",
"LibFillResults",
"LibAbiEncoder",
"LibEIP712",
"LibAssetProxyErrors",
"LibConstants"
"src/LibAbiEncoder.sol",
"src/LibAssetProxyErrors.sol",
"src/LibConstants.sol",
"src/LibEIP712.sol",
"src/LibFillResults.sol",
"src/LibMath.sol",
"src/LibOrder.sol",
"test/TestLibs.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-libs",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(LibMath|LibOrder|LibFillResults|LibAbiEncoder|TestLibs|LibEIP712).json"
"abis": "./generated-artifacts/@(LibAbiEncoder|LibAssetProxyErrors|LibConstants|LibEIP712|LibFillResults|LibMath|LibOrder|TestLibs).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,10 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -64,15 +67,15 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/order-utils": "^6.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,25 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as LibAbiEncoder from '../generated-artifacts/LibAbiEncoder.json';
import * as LibAssetProxyErrors from '../generated-artifacts/LibAssetProxyErrors.json';
import * as LibConstants from '../generated-artifacts/LibConstants.json';
import * as LibEIP712 from '../generated-artifacts/LibEIP712.json';
import * as LibFillResults from '../generated-artifacts/LibFillResults.json';
import * as LibMath from '../generated-artifacts/LibMath.json';
import * as LibOrder from '../generated-artifacts/LibOrder.json';
import * as TestLibs from '../generated-artifacts/TestLibs.json';
export const artifacts = {
LibAbiEncoder: LibAbiEncoder as ContractArtifact,
LibAssetProxyErrors: LibAssetProxyErrors as ContractArtifact,
LibConstants: LibConstants as ContractArtifact,
LibEIP712: LibEIP712 as ContractArtifact,
LibFillResults: LibFillResults as ContractArtifact,
LibMath: LibMath as ContractArtifact,
LibOrder: LibOrder as ContractArtifact,
TestLibs: TestLibs as ContractArtifact,
};

View File

@@ -1,17 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as LibAbiEncoder from '../../generated-artifacts/LibAbiEncoder.json';
import * as LibEIP721 from '../../generated-artifacts/LibEIP712.json';
import * as LibFillResults from '../../generated-artifacts/LibFillResults.json';
import * as LibMath from '../../generated-artifacts/LibMath.json';
import * as LibOrder from '../../generated-artifacts/LibOrder.json';
import * as TestLibs from '../../generated-artifacts/TestLibs.json';
export const artifacts = {
TestLibs: TestLibs as ContractArtifact,
LibAbiEncoder: LibAbiEncoder as ContractArtifact,
LibFillResults: LibFillResults as ContractArtifact,
LibMath: LibMath as ContractArtifact,
LibOrder: LibOrder as ContractArtifact,
LibEIP721: LibEIP721 as ContractArtifact,
};

View File

@@ -0,0 +1,13 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/lib_abi_encoder';
export * from '../generated-wrappers/lib_asset_proxy_errors';
export * from '../generated-wrappers/lib_constants';
export * from '../generated-wrappers/lib_e_i_p712';
export * from '../generated-wrappers/lib_fill_results';
export * from '../generated-wrappers/lib_math';
export * from '../generated-wrappers/lib_order';
export * from '../generated-wrappers/test_libs';

View File

@@ -1,6 +0,0 @@
export * from '../../generated-wrappers/test_libs';
export * from '../../generated-wrappers/lib_abi_encoder';
export * from '../../generated-wrappers/lib_fill_results';
export * from '../../generated-wrappers/lib_math';
export * from '../../generated-wrappers/lib_order';
export * from '../../generated-wrappers/lib_e_i_p712';

View File

@@ -1,18 +1,16 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/TestLibs.json",
"./generated-artifacts/LibOrder.json",
"./generated-artifacts/LibFillResults.json",
"./generated-artifacts/LibAbiEncoder.json",
"./generated-artifacts/LibEIP712.json",
"./generated-artifacts/LibMath.json"
"generated-artifacts/LibAbiEncoder.json",
"generated-artifacts/LibAssetProxyErrors.json",
"generated-artifacts/LibConstants.json",
"generated-artifacts/LibEIP712.json",
"generated-artifacts/LibFillResults.json",
"generated-artifacts/LibMath.json",
"generated-artifacts/LibOrder.json",
"generated-artifacts/TestLibs.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "1.0.3",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1549373905,
"version": "1.0.1",

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.4 - _February 7, 2019_
* Dependencies updated
## v1.0.3 - _February 7, 2019_
* Fake publish to enable pinning
## v1.0.2 - _February 6, 2019_
* Dependencies updated
## v1.0.1 - _February 5, 2019_
* Dependencies updated

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,23 +17,31 @@
}
},
"contracts": [
"Exchange",
"IAssetProxyDispatcher",
"IExchange",
"IExchangeCore",
"IMatchOrders",
"ISignatureValidator",
"ITransactions",
"IValidator",
"IWallet",
"IWrapperFunctions",
"TestAssetProxyDispatcher",
"TestExchangeInternals",
"TestSignatureValidator",
"TestStaticCallReceiver",
"ExchangeWrapper",
"Validator",
"Wallet",
"Whitelist"
"@0x/contracts-asset-proxy/contracts/src/ERC20Proxy.sol",
"@0x/contracts-asset-proxy/contracts/src/ERC721Proxy.sol",
"@0x/contracts-asset-proxy/contracts/src/MultiAssetProxy.sol",
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
"@0x/contracts-erc20/contracts/test/DummyNoReturnERC20Token.sol",
"@0x/contracts-erc20/contracts/test/ReentrantERC20Token.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
"@0x/contracts-exchange-libs/contracts/test/TestLibs.sol",
"examples/ExchangeWrapper.sol",
"examples/Validator.sol",
"examples/Wallet.sol",
"examples/Whitelist.sol",
"src/Exchange.sol",
"src/interfaces/IAssetProxyDispatcher.sol",
"src/interfaces/IExchange.sol",
"src/interfaces/IExchangeCore.sol",
"src/interfaces/IMatchOrders.sol",
"src/interfaces/ISignatureValidator.sol",
"src/interfaces/ITransactions.sol",
"src/interfaces/IValidator.sol",
"src/interfaces/IWallet.sol",
"src/interfaces/IWrapperFunctions.sol",
"test/TestAssetProxyDispatcher.sol",
"test/TestExchangeInternals.sol",
"test/TestSignatureValidator.sol",
"test/TestStaticCallReceiver.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "1.0.1",
"version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(ERC20Proxy|ERC721Proxy|Exchange|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IWrapperFunctions|IValidator|IWallet|MixinAuthorizable|MultiAssetProxy|TestSignatureValidator|TestAssetProxyDispatcher|TestExchangeInternals|TestStaticCallReceiver|ExchangeWrapper|Validator|Wallet|Whitelist).json"
"abis": "./generated-artifacts/@(DummyERC20Token|DummyERC721Token|DummyNoReturnERC20Token|ERC20Proxy|ERC721Proxy|Exchange|ExchangeWrapper|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IValidator|IWallet|IWrapperFunctions|MultiAssetProxy|ReentrantERC20Token|TestAssetProxyDispatcher|TestExchangeInternals|TestLibs|TestSignatureValidator|TestStaticCallReceiver|Validator|Wallet|Whitelist).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,9 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -63,21 +67,20 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-asset-proxy": "^1.0.1",
"@0x/contracts-erc20": "^1.0.1",
"@0x/contracts-erc721": "^1.0.1",
"@0x/contracts-exchange-libs": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/contracts-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-asset-proxy": "1.0.2",
"@0x/contracts-erc20": "1.0.2",
"@0x/contracts-erc721": "1.0.2",
"@0x/contracts-exchange-libs": "1.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/order-utils": "^6.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,61 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
import * as Exchange from '../generated-artifacts/Exchange.json';
import * as ExchangeWrapper from '../generated-artifacts/ExchangeWrapper.json';
import * as IAssetProxyDispatcher from '../generated-artifacts/IAssetProxyDispatcher.json';
import * as IExchange from '../generated-artifacts/IExchange.json';
import * as IExchangeCore from '../generated-artifacts/IExchangeCore.json';
import * as IMatchOrders from '../generated-artifacts/IMatchOrders.json';
import * as ISignatureValidator from '../generated-artifacts/ISignatureValidator.json';
import * as ITransactions from '../generated-artifacts/ITransactions.json';
import * as IValidator from '../generated-artifacts/IValidator.json';
import * as IWallet from '../generated-artifacts/IWallet.json';
import * as IWrapperFunctions from '../generated-artifacts/IWrapperFunctions.json';
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
import * as ReentrantERC20Token from '../generated-artifacts/ReentrantERC20Token.json';
import * as TestAssetProxyDispatcher from '../generated-artifacts/TestAssetProxyDispatcher.json';
import * as TestExchangeInternals from '../generated-artifacts/TestExchangeInternals.json';
import * as TestLibs from '../generated-artifacts/TestLibs.json';
import * as TestSignatureValidator from '../generated-artifacts/TestSignatureValidator.json';
import * as TestStaticCallReceiver from '../generated-artifacts/TestStaticCallReceiver.json';
import * as Validator from '../generated-artifacts/Validator.json';
import * as Wallet from '../generated-artifacts/Wallet.json';
import * as Whitelist from '../generated-artifacts/Whitelist.json';
export const artifacts = {
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MultiAssetProxy: MultiAssetProxy as ContractArtifact,
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
TestLibs: TestLibs as ContractArtifact,
ExchangeWrapper: ExchangeWrapper as ContractArtifact,
Validator: Validator as ContractArtifact,
Wallet: Wallet as ContractArtifact,
Whitelist: Whitelist as ContractArtifact,
Exchange: Exchange as ContractArtifact,
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
IExchange: IExchange as ContractArtifact,
IExchangeCore: IExchangeCore as ContractArtifact,
IMatchOrders: IMatchOrders as ContractArtifact,
ISignatureValidator: ISignatureValidator as ContractArtifact,
ITransactions: ITransactions as ContractArtifact,
IValidator: IValidator as ContractArtifact,
IWallet: IWallet as ContractArtifact,
IWrapperFunctions: IWrapperFunctions as ContractArtifact,
TestAssetProxyDispatcher: TestAssetProxyDispatcher as ContractArtifact,
TestExchangeInternals: TestExchangeInternals as ContractArtifact,
TestSignatureValidator: TestSignatureValidator as ContractArtifact,
TestStaticCallReceiver: TestStaticCallReceiver as ContractArtifact,
};

View File

@@ -1,41 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as Exchange from '../../generated-artifacts/Exchange.json';
import * as ExchangeWrapper from '../../generated-artifacts/ExchangeWrapper.json';
import * as IAssetProxyDispatcher from '../../generated-artifacts/IAssetProxyDispatcher.json';
import * as IExchange from '../../generated-artifacts/IExchange.json';
import * as IExchangeCore from '../../generated-artifacts/IExchangeCore.json';
import * as IMatchOrders from '../../generated-artifacts/IMatchOrders.json';
import * as ISignatureValidator from '../../generated-artifacts/ISignatureValidator.json';
import * as ITransactions from '../../generated-artifacts/ITransactions.json';
import * as IValidator from '../../generated-artifacts/IValidator.json';
import * as IWallet from '../../generated-artifacts/IWallet.json';
import * as IWrapperFunctions from '../../generated-artifacts/IWrapperFunctions.json';
import * as TestAssetProxyDispatcher from '../../generated-artifacts/TestAssetProxyDispatcher.json';
import * as TestExchangeInternals from '../../generated-artifacts/TestExchangeInternals.json';
import * as TestSignatureValidator from '../../generated-artifacts/TestSignatureValidator.json';
import * as TestStaticCallReceiver from '../../generated-artifacts/TestStaticCallReceiver.json';
import * as Validator from '../../generated-artifacts/Validator.json';
import * as Wallet from '../../generated-artifacts/Wallet.json';
import * as Whitelist from '../../generated-artifacts/Whitelist.json';
export const artifacts = {
Exchange: Exchange as ContractArtifact,
TestAssetProxyDispatcher: TestAssetProxyDispatcher as ContractArtifact,
TestExchangeInternals: TestExchangeInternals as ContractArtifact,
TestSignatureValidator: TestSignatureValidator as ContractArtifact,
TestStaticCallReceiver: TestStaticCallReceiver as ContractArtifact,
IExchange: IExchange as ContractArtifact,
IExchangeCore: IExchangeCore as ContractArtifact,
IMatchOrders: IMatchOrders as ContractArtifact,
ISignatureValidator: ISignatureValidator as ContractArtifact,
ITransactions: ITransactions as ContractArtifact,
IWrapperFunctions: IWrapperFunctions as ContractArtifact,
IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
IValidator: IValidator as ContractArtifact,
IWallet: IWallet as ContractArtifact,
ExchangeWrapper: ExchangeWrapper as ContractArtifact,
Validator: Validator as ContractArtifact,
Wallet: Wallet as ContractArtifact,
Whitelist: Whitelist as ContractArtifact,
};

View File

@@ -0,0 +1,31 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/dummy_no_return_erc20_token';
export * from '../generated-wrappers/erc20_proxy';
export * from '../generated-wrappers/erc721_proxy';
export * from '../generated-wrappers/exchange';
export * from '../generated-wrappers/exchange_wrapper';
export * from '../generated-wrappers/i_asset_proxy_dispatcher';
export * from '../generated-wrappers/i_exchange';
export * from '../generated-wrappers/i_exchange_core';
export * from '../generated-wrappers/i_match_orders';
export * from '../generated-wrappers/i_signature_validator';
export * from '../generated-wrappers/i_transactions';
export * from '../generated-wrappers/i_validator';
export * from '../generated-wrappers/i_wallet';
export * from '../generated-wrappers/i_wrapper_functions';
export * from '../generated-wrappers/multi_asset_proxy';
export * from '../generated-wrappers/reentrant_erc20_token';
export * from '../generated-wrappers/test_asset_proxy_dispatcher';
export * from '../generated-wrappers/test_exchange_internals';
export * from '../generated-wrappers/test_libs';
export * from '../generated-wrappers/test_signature_validator';
export * from '../generated-wrappers/test_static_call_receiver';
export * from '../generated-wrappers/validator';
export * from '../generated-wrappers/wallet';
export * from '../generated-wrappers/whitelist';

View File

@@ -1,18 +0,0 @@
export * from '../../generated-wrappers/exchange';
export * from '../../generated-wrappers/test_asset_proxy_dispatcher';
export * from '../../generated-wrappers/test_exchange_internals';
export * from '../../generated-wrappers/test_signature_validator';
export * from '../../generated-wrappers/test_static_call_receiver';
export * from '../../generated-wrappers/i_asset_proxy_dispatcher';
export * from '../../generated-wrappers/i_exchange';
export * from '../../generated-wrappers/i_exchange_core';
export * from '../../generated-wrappers/i_match_orders';
export * from '../../generated-wrappers/i_signature_validator';
export * from '../../generated-wrappers/i_transactions';
export * from '../../generated-wrappers/i_wrapper_functions';
export * from '../../generated-wrappers/i_validator';
export * from '../../generated-wrappers/i_wallet';
export * from '../../generated-wrappers/exchange_wrapper';
export * from '../../generated-wrappers/validator';
export * from '../../generated-wrappers/wallet';
export * from '../../generated-wrappers/whitelist';

View File

@@ -1,19 +1,4 @@
import {
artifacts as proxyArtifacts,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
ERC721Wrapper,
MultiAssetProxyContract,
} from '@0x/contracts-asset-proxy';
import {
artifacts as erc20Artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyNoReturnERC20TokenContract,
ReentrantERC20TokenContract,
} from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -39,9 +24,17 @@ import * as _ from 'lodash';
import {
artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyERC721TokenContract,
DummyNoReturnERC20TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeCancelEventArgs,
ExchangeContract,
ExchangeWrapper,
MultiAssetProxyContract,
ReentrantERC20TokenContract,
TestStaticCallReceiverContract,
} from '../src';
@@ -98,7 +91,7 @@ describe('Exchange core', () => {
erc20Proxy = await erc20Wrapper.deployProxyAsync();
erc721Proxy = await erc721Wrapper.deployProxyAsync();
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.MultiAssetProxy,
artifacts.MultiAssetProxy,
provider,
txDefaults,
);
@@ -120,7 +113,7 @@ describe('Exchange core', () => {
txDefaults,
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.ReentrantERC20Token,
artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
@@ -345,7 +338,7 @@ describe('Exchange core', () => {
describe('Testing exchange of ERC20 tokens with no return values', () => {
before(async () => {
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.DummyNoReturnERC20Token,
artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,

View File

@@ -1,11 +1,4 @@
import {
artifacts as proxyArtifacts,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
ERC721Wrapper,
} from '@0x/contracts-asset-proxy';
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -25,6 +18,9 @@ import * as _ from 'lodash';
import {
artifacts,
DummyERC20TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
TestAssetProxyDispatcherAssetProxyRegisteredEventArgs,
TestAssetProxyDispatcherContract,
} from '../src';
@@ -131,7 +127,7 @@ describe('AssetProxyDispatcher', () => {
expect(proxyAddress).to.be.equal(erc20Proxy.address);
// Deploy a new version of the ERC20 Transfer Proxy contract
const newErc20TransferProxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC20Proxy,
artifacts.ERC20Proxy,
provider,
txDefaults,
);

View File

@@ -1,6 +1,4 @@
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -20,7 +18,18 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
import { artifacts, ExchangeContract, ExchangeWrapper, MatchOrderTester, TestExchangeInternalsContract } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeContract,
ExchangeWrapper,
MatchOrderTester,
ReentrantERC20TokenContract,
TestExchangeInternalsContract,
} from '../src';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
@@ -131,7 +140,7 @@ describe('matchOrders', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.ReentrantERC20Token,
artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,

View File

@@ -1,4 +1,3 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import {
addressUtils,
chaiSetup,
@@ -78,7 +77,7 @@ describe('MixinSignatureValidator', () => {
provider,
txDefaults,
);
signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, artifacts);
await web3Wrapper.awaitTransactionSuccessAsync(
await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(testValidator.address, true, {
from: signerAddress,

View File

@@ -8,14 +8,13 @@ import {
OrderFactory,
orderUtils,
provider,
SignedTransaction,
TransactionFactory,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0x/types';
import { OrderWithoutExchangeAddress, RevertReason, SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import * as _ from 'lodash';
@@ -41,7 +40,7 @@ describe('Exchange transactions', () => {
let erc20Balances: ERC20BalancesByOwner;
let signedOrder: SignedOrder;
let signedTx: SignedTransaction;
let signedTx: SignedZeroExTransaction;
let orderWithoutExchangeAddress: OrderWithoutExchangeAddress;
let orderFactory: OrderFactory;
let makerTransactionFactory: TransactionFactory;

View File

@@ -1,14 +1,5 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import {
FillResults,
formatters,
LogDecoder,
OrderInfo,
orderUtils,
SignedTransaction,
} from '@0x/contracts-test-utils';
import { SignedOrder } from '@0x/types';
import { FillResults, formatters, LogDecoder, OrderInfo, orderUtils } from '@0x/contracts-test-utils';
import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { MethodAbi, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
@@ -25,7 +16,7 @@ export class ExchangeWrapper {
constructor(exchangeContract: ExchangeContract, provider: Provider) {
this._exchange = exchangeContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...erc721Artifacts });
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async fillOrderAsync(
signedOrder: SignedOrder,
@@ -206,7 +197,7 @@ export class ExchangeWrapper {
return tx;
}
public async executeTransactionAsync(
signedTx: SignedTransaction,
signedTx: SignedZeroExTransaction,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.executeTransaction.sendTransactionAsync(

View File

@@ -1,5 +1,4 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as libsArtifacts, TestLibsContract } from '@0x/contracts-exchange-libs';
import {
AllowanceAmountScenario,
AssetDataScenario,
@@ -33,7 +32,7 @@ import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
import * as _ from 'lodash';
import 'make-promises-safe';
import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
import { artifacts, ExchangeContract, ExchangeFillEventArgs, TestLibsContract } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { ExchangeWrapper } from './exchange_wrapper';
@@ -129,11 +128,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
exchangeContract.address,
);
const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(
libsArtifacts.TestLibs,
provider,
txDefaults,
);
const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
orderFactory,

View File

@@ -1,6 +1,4 @@
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -22,7 +20,16 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
import { artifacts, ExchangeContract, ExchangeWrapper } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeContract,
ExchangeWrapper,
ReentrantERC20TokenContract,
} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -107,7 +114,7 @@ describe('Exchange wrappers', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
erc20Artifacts.ReentrantERC20Token,
artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,

View File

@@ -1,30 +1,34 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/IAssetProxyDispatcher.json",
"./generated-artifacts/IExchange.json",
"./generated-artifacts/IExchangeCore.json",
"./generated-artifacts/IMatchOrders.json",
"./generated-artifacts/ISignatureValidator.json",
"./generated-artifacts/ITransactions.json",
"./generated-artifacts/IValidator.json",
"./generated-artifacts/IWallet.json",
"./generated-artifacts/IWrapperFunctions.json",
"./generated-artifacts/Exchange.json",
"./generated-artifacts/TestAssetProxyDispatcher.json",
"./generated-artifacts/TestExchangeInternals.json",
"./generated-artifacts/TestSignatureValidator.json",
"./generated-artifacts/TestStaticCallReceiver.json",
"./generated-artifacts/ExchangeWrapper.json",
"./generated-artifacts/Validator.json",
"./generated-artifacts/Wallet.json",
"./generated-artifacts/Whitelist.json"
"generated-artifacts/DummyERC20Token.json",
"generated-artifacts/DummyERC721Token.json",
"generated-artifacts/DummyNoReturnERC20Token.json",
"generated-artifacts/ERC20Proxy.json",
"generated-artifacts/ERC721Proxy.json",
"generated-artifacts/Exchange.json",
"generated-artifacts/ExchangeWrapper.json",
"generated-artifacts/IAssetProxyDispatcher.json",
"generated-artifacts/IExchange.json",
"generated-artifacts/IExchangeCore.json",
"generated-artifacts/IMatchOrders.json",
"generated-artifacts/ISignatureValidator.json",
"generated-artifacts/ITransactions.json",
"generated-artifacts/IValidator.json",
"generated-artifacts/IWallet.json",
"generated-artifacts/IWrapperFunctions.json",
"generated-artifacts/MultiAssetProxy.json",
"generated-artifacts/ReentrantERC20Token.json",
"generated-artifacts/TestAssetProxyDispatcher.json",
"generated-artifacts/TestExchangeInternals.json",
"generated-artifacts/TestLibs.json",
"generated-artifacts/TestSignatureValidator.json",
"generated-artifacts/TestStaticCallReceiver.json",
"generated-artifacts/Validator.json",
"generated-artifacts/Wallet.json",
"generated-artifacts/Whitelist.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "2.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "2.0.2",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "2.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.0",
"changes": [

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.3 - _February 7, 2019_
* Dependencies updated
## v2.0.2 - _February 7, 2019_
* Fake publish to enable pinning
## v2.0.1 - _February 6, 2019_
* Dependencies updated
## v2.0.0 - _February 5, 2019_
* Upgrade the bignumber.js to v8.0.2 (#1517)

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -19,5 +16,17 @@
}
}
},
"contracts": ["BalanceThresholdFilter", "DutchAuction", "OrderMatcher", "OrderValidator"]
"contracts": [
"@0x/contracts-asset-proxy/contracts/src/ERC20Proxy.sol",
"@0x/contracts-asset-proxy/contracts/src/ERC721Proxy.sol",
"@0x/contracts-erc20/contracts/src/WETH9.sol",
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
"@0x/contracts-exchange/contracts/examples/ExchangeWrapper.sol",
"@0x/contracts-exchange/contracts/src/Exchange.sol",
"src/BalanceThresholdFilter/BalanceThresholdFilter.sol",
"src/DutchAuction/DutchAuction.sol",
"src/OrderMatcher/OrderMatcher.sol",
"src/OrderValidator/OrderValidator.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "2.0.0",
"version": "2.0.3",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(BalanceThresholdFilter|DutchAuction|OrderMatcher|OrderValidator).json"
"abis": "./generated-artifacts/@(BalanceThresholdFilter|DummyERC20Token|DummyERC721Token|DutchAuction|ERC20Proxy|ERC721Proxy|Exchange|ExchangeWrapper|OrderMatcher|OrderValidator|WETH9).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,11 +46,12 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contract-wrappers": "^6.0.1",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contract-wrappers": "^7.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -65,20 +68,20 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-asset-proxy": "^1.0.1",
"@0x/contracts-erc20": "^1.0.1",
"@0x/contracts-erc721": "^1.0.1",
"@0x/contracts-exchange": "^1.0.1",
"@0x/contracts-exchange-libs": "^1.0.1",
"@0x/contracts-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-asset-proxy": "1.0.2",
"@0x/contracts-erc20": "1.0.2",
"@0x/contracts-erc721": "1.0.2",
"@0x/contracts-exchange": "1.0.2",
"@0x/contracts-exchange-libs": "1.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/order-utils": "^6.0.1",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,31 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as BalanceThresholdFilter from '../generated-artifacts/BalanceThresholdFilter.json';
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as DutchAuction from '../generated-artifacts/DutchAuction.json';
import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
import * as Exchange from '../generated-artifacts/Exchange.json';
import * as ExchangeWrapper from '../generated-artifacts/ExchangeWrapper.json';
import * as OrderMatcher from '../generated-artifacts/OrderMatcher.json';
import * as OrderValidator from '../generated-artifacts/OrderValidator.json';
import * as WETH9 from '../generated-artifacts/WETH9.json';
export const artifacts = {
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
WETH9: WETH9 as ContractArtifact,
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
ExchangeWrapper: ExchangeWrapper as ContractArtifact,
Exchange: Exchange as ContractArtifact,
BalanceThresholdFilter: BalanceThresholdFilter as ContractArtifact,
DutchAuction: DutchAuction as ContractArtifact,
OrderMatcher: OrderMatcher as ContractArtifact,
OrderValidator: OrderValidator as ContractArtifact,
};

View File

@@ -1,13 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as BalanceThresholdFilter from '../../generated-artifacts/BalanceThresholdFilter.json';
import * as DutchAuction from '../../generated-artifacts/DutchAuction.json';
import * as OrderMatcher from '../../generated-artifacts/OrderMatcher.json';
import * as OrderValidator from '../../generated-artifacts/OrderValidator.json';
export const artifacts = {
BalanceThresholdFilter: BalanceThresholdFilter as ContractArtifact,
DutchAuction: DutchAuction as ContractArtifact,
OrderMatcher: OrderMatcher as ContractArtifact,
OrderValidator: OrderValidator as ContractArtifact,
};

View File

@@ -0,0 +1,16 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/balance_threshold_filter';
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/dutch_auction';
export * from '../generated-wrappers/erc20_proxy';
export * from '../generated-wrappers/erc721_proxy';
export * from '../generated-wrappers/exchange';
export * from '../generated-wrappers/exchange_wrapper';
export * from '../generated-wrappers/order_matcher';
export * from '../generated-wrappers/order_validator';
export * from '../generated-wrappers/weth9';

View File

@@ -1,4 +0,0 @@
export * from '../../generated-wrappers/balance_threshold_filter';
export * from '../../generated-wrappers/dutch_auction';
export * from '../../generated-wrappers/order_matcher';
export * from '../../generated-wrappers/order_validator';

View File

@@ -1,3 +1,4 @@
import { ExchangeWrapper } from '@0x/contracts-exchange';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils } from '@0x/order-utils';
import { Order, RevertReason, SignedOrder } from '@0x/types';
@@ -9,7 +10,6 @@ import * as _ from 'lodash';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -24,7 +24,7 @@ import {
web3Wrapper,
} from '@0x/contracts-test-utils';
import { artifacts, BalanceThresholdFilterContract, BalanceThresholdWrapper } from '../src';
import { artifacts, BalanceThresholdFilterContract, BalanceThresholdWrapper, ExchangeContract } from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -127,7 +127,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
await erc20Wrapper.setBalancesAndAllowancesAsync();
// Deploy Exchange contract
exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,8 +1,6 @@
import { DutchAuctionWrapper } from '@0x/contract-wrappers';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts, DummyERC20TokenContract, WETH9Contract } from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
import { ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -23,7 +21,15 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
import { artifacts, DutchAuctionContract, DutchAuctionTestWrapper } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
DutchAuctionContract,
DutchAuctionTestWrapper,
ExchangeContract,
WETH9Contract,
} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -82,12 +88,12 @@ describe(ContractName.DutchAuction, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(erc20Artifacts.WETH9, provider, txDefaults);
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
erc20Wrapper.addDummyTokenContract(wethContract as any);
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,17 +1,5 @@
import {
artifacts as proxyArtifacts,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
} from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
import {
artifacts as exchangeArtifacts,
ExchangeContract,
ExchangeFillEventArgs,
ExchangeWrapper,
} from '@0x/contracts-exchange';
import { ERC20Wrapper } from '@0x/contracts-asset-proxy';
import { ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -34,7 +22,16 @@ import * as chai from 'chai';
import { LogWithDecodedArgs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts, OrderMatcherContract } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeContract,
ExchangeFillEventArgs,
OrderMatcherContract,
} from '../src';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
@@ -104,14 +101,10 @@ describe('OrderMatcher', () => {
erc20Proxy = await erc20Wrapper.deployProxyAsync();
await erc20Wrapper.setBalancesAndAllowancesAsync();
// Deploy ERC721 proxy
erc721Proxy = await ERC721ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC721Proxy,
provider,
txDefaults,
);
erc721Proxy = await ERC721ProxyContract.deployFrom0xArtifactAsync(artifacts.ERC721Proxy, provider, txDefaults);
// Depoy exchange
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
@@ -200,7 +193,7 @@ describe('OrderMatcher', () => {
describe('constructor', () => {
it('should revert if assetProxy is unregistered', async () => {
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
constants.NULL_BYTES,
@@ -454,7 +447,7 @@ describe('OrderMatcher', () => {
signedOrderLeft.signature,
signedOrderRight.signature,
);
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts, ...exchangeArtifacts });
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
data,
@@ -492,7 +485,7 @@ describe('OrderMatcher', () => {
signedOrderLeft.signature,
signedOrderRight.signature,
);
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts, ...exchangeArtifacts });
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
data,
@@ -729,7 +722,7 @@ describe('OrderMatcher', () => {
});
it('should allow owner to withdraw ERC721 tokens', async () => {
const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
erc721Artifacts.DummyERC721Token,
artifacts.DummyERC721Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -774,7 +767,7 @@ describe('OrderMatcher', () => {
});
it('should be able to approve an ERC721 token by passing in allowance = 1', async () => {
const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
erc721Artifacts.DummyERC721Token,
artifacts.DummyERC721Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -791,7 +784,7 @@ describe('OrderMatcher', () => {
});
it('should be able to approve an ERC721 token by passing in allowance > 1', async () => {
const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
erc721Artifacts.DummyERC721Token,
artifacts.DummyERC721Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,

View File

@@ -1,7 +1,5 @@
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -18,7 +16,15 @@ import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import * as _ from 'lodash';
import { artifacts, OrderValidatorContract } from '../src';
import {
artifacts,
DummyERC20TokenContract,
DummyERC721TokenContract,
ERC20ProxyContract,
ERC721ProxyContract,
ExchangeContract,
OrderValidatorContract,
} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -74,7 +80,7 @@ describe('OrderValidator', () => {
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
exchangeArtifacts.Exchange,
artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,6 +1,3 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts, ExchangeContract } from '@0x/contracts-exchange';
import {
FillResults,
formatters,
@@ -15,8 +12,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { BalanceThresholdFilterContract } from '../../generated-wrappers/balance_threshold_filter';
import { artifacts } from '../../src/artifacts';
import { artifacts, BalanceThresholdFilterContract, ExchangeContract } from '../../src';
export class BalanceThresholdWrapper {
private readonly _balanceThresholdFilter: BalanceThresholdFilterContract;
@@ -34,12 +30,7 @@ export class BalanceThresholdWrapper {
this._exchange = exchangeContract;
this._signerTransactionFactory = signerTransactionFactory;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...erc20Artifacts,
...erc721Artifacts,
...exchangeArtifacts,
});
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async fillOrderAsync(
signedOrder: SignedOrder,
@@ -227,7 +218,7 @@ export class BalanceThresholdWrapper {
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const params = orderUtils.createMatchOrders(signedOrderLeft, signedOrderRight);
const data = await this._exchange.matchOrders.getABIEncodedTransactionData(
const data = this._exchange.matchOrders.getABIEncodedTransactionData(
params.left,
params.right,
params.leftSignature,

View File

@@ -1,6 +1,3 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
import { LogDecoder } from '@0x/contracts-test-utils';
import { DutchAuctionDetails, SignedOrder } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
@@ -18,12 +15,7 @@ export class DutchAuctionTestWrapper {
constructor(contractInstance: DutchAuctionContract, provider: Provider) {
this._dutchAuctionContract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...erc20Artifacts,
...erc721Artifacts,
...exchangeArtifacts,
});
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
/**
* Matches the buy and sell orders at an amount given the following: the current block time, the auction

View File

@@ -1,16 +1,19 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/BalanceThresholdFilter.json",
"./generated-artifacts/DutchAuction.json",
"./generated-artifacts/OrderMatcher.json",
"./generated-artifacts/OrderValidator.json"
"generated-artifacts/BalanceThresholdFilter.json",
"generated-artifacts/DummyERC20Token.json",
"generated-artifacts/DummyERC721Token.json",
"generated-artifacts/DutchAuction.json",
"generated-artifacts/ERC20Proxy.json",
"generated-artifacts/ERC721Proxy.json",
"generated-artifacts/Exchange.json",
"generated-artifacts/ExchangeWrapper.json",
"generated-artifacts/OrderMatcher.json",
"generated-artifacts/OrderValidator.json",
"generated-artifacts/WETH9.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,4 +1,31 @@
[
{
"version": "2.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "2.0.2",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "2.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.0",
"changes": [

View File

@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.3 - _February 7, 2019_
* Dependencies updated
## v2.0.2 - _February 7, 2019_
* Fake publish to enable pinning
## v2.0.1 - _February 6, 2019_
* Dependencies updated
## v2.0.0 - _February 5, 2019_
* Upgrade the bignumber.js to v8.0.2 (#1517)

View File

@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 1000000
},
"optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,10 +17,11 @@
}
},
"contracts": [
"AssetProxyOwner",
"MultiSigWallet",
"MultiSigWalletWithTimeLock",
"TestAssetProxyOwner",
"TestRejectEther"
"@0x/contracts-asset-proxy/contracts/src/MixinAuthorizable.sol",
"src/AssetProxyOwner.sol",
"src/MultiSigWallet.sol",
"src/MultiSigWalletWithTimeLock.sol",
"test/TestAssetProxyOwner.sol",
"test/TestRejectEther.sol"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "2.0.0",
"version": "2.0.3",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
"contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(AssetProxyOwner|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestRejectEther).json"
"abis": "./generated-artifacts/@(AssetProxyOwner|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestRejectEther).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,10 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/contracts-test-utils": "^3.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/contracts-gen": "^1.0.1",
"@0x/contracts-test-utils": "^3.0.3",
"@0x/dev-utils": "^2.0.2",
"@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -64,15 +67,15 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^4.0.0",
"@0x/contracts-asset-proxy": "^1.0.1",
"@0x/contracts-erc20": "^1.0.1",
"@0x/types": "^2.0.0",
"@0x/base-contract": "^4.0.2",
"@0x/contracts-asset-proxy": "1.0.2",
"@0x/contracts-erc20": "1.0.2",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
"lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"

View File

@@ -0,0 +1,21 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
import { ContractArtifact } from 'ethereum-types';
import * as AssetProxyOwner from '../generated-artifacts/AssetProxyOwner.json';
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
import * as MultiSigWallet from '../generated-artifacts/MultiSigWallet.json';
import * as MultiSigWalletWithTimeLock from '../generated-artifacts/MultiSigWalletWithTimeLock.json';
import * as TestAssetProxyOwner from '../generated-artifacts/TestAssetProxyOwner.json';
import * as TestRejectEther from '../generated-artifacts/TestRejectEther.json';
export const artifacts = {
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
AssetProxyOwner: AssetProxyOwner as ContractArtifact,
MultiSigWallet: MultiSigWallet as ContractArtifact,
MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact,
TestAssetProxyOwner: TestAssetProxyOwner as ContractArtifact,
TestRejectEther: TestRejectEther as ContractArtifact,
};

View File

@@ -1,15 +0,0 @@
import { ContractArtifact } from 'ethereum-types';
import * as AssetProxyOwner from '../../generated-artifacts/AssetProxyOwner.json';
import * as MultiSigWallet from '../../generated-artifacts/MultiSigWallet.json';
import * as MultiSigWalletWithTimeLock from '../../generated-artifacts/MultiSigWalletWithTimeLock.json';
import * as TestAssetProxyOwner from '../../generated-artifacts/TestAssetProxyOwner.json';
import * as TestRejectEther from '../../generated-artifacts/TestRejectEther.json';
export const artifacts = {
AssetProxyOwner: AssetProxyOwner as ContractArtifact,
MultiSigWallet: MultiSigWallet as ContractArtifact,
MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact,
TestAssetProxyOwner: TestAssetProxyOwner as ContractArtifact,
TestRejectEther: TestRejectEther as ContractArtifact,
};

View File

@@ -0,0 +1,11 @@
/*
* -----------------------------------------------------------------------------
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/asset_proxy_owner';
export * from '../generated-wrappers/mixin_authorizable';
export * from '../generated-wrappers/multi_sig_wallet';
export * from '../generated-wrappers/multi_sig_wallet_with_time_lock';
export * from '../generated-wrappers/test_asset_proxy_owner';
export * from '../generated-wrappers/test_reject_ether';

View File

@@ -1,5 +0,0 @@
export * from '../../generated-wrappers/asset_proxy_owner';
export * from '../../generated-wrappers/multi_sig_wallet';
export * from '../../generated-wrappers/multi_sig_wallet_with_time_lock';
export * from '../../generated-wrappers/test_asset_proxy_owner';
export * from '../../generated-wrappers/test_reject_ether';

View File

@@ -1,4 +1,3 @@
import { artifacts as proxyArtifacts, MixinAuthorizableContract } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -26,6 +25,7 @@ import {
AssetProxyOwnerExecutionFailureEventArgs,
AssetProxyOwnerSubmissionEventArgs,
AssetProxyOwnerWrapper,
MixinAuthorizableContract,
TestAssetProxyOwnerContract,
} from '../src';
@@ -58,12 +58,12 @@ describe('AssetProxyOwner', () => {
notOwner = accounts[3];
const initialOwner = accounts[0];
erc20Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
proxyArtifacts.MixinAuthorizable,
artifacts.MixinAuthorizable,
provider,
txDefaults,
);
erc721Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
proxyArtifacts.MixinAuthorizable,
artifacts.MixinAuthorizable,
provider,
txDefaults,
);

View File

@@ -1,5 +1,3 @@
import { artifacts as proxyArtifacts } from '@0x/contracts-asset-proxy';
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { LogDecoder } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
@@ -16,7 +14,7 @@ export class AssetProxyOwnerWrapper {
constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Provider) {
this._assetProxyOwner = assetproxyOwnerContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...proxyArtifacts });
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async submitTransactionAsync(
destination: string,

View File

@@ -1,17 +1,14 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"resolveJsonModule": true
},
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
"./generated-artifacts/AssetProxyOwner.json",
"./generated-artifacts/MultiSigWallet.json",
"./generated-artifacts/MultiSigWalletWithTimeLock.json",
"./generated-artifacts/TestAssetProxyOwner.json",
"./generated-artifacts/TestRejectEther.json"
"generated-artifacts/AssetProxyOwner.json",
"generated-artifacts/MixinAuthorizable.json",
"generated-artifacts/MultiSigWallet.json",
"generated-artifacts/MultiSigWalletWithTimeLock.json",
"generated-artifacts/TestAssetProxyOwner.json",
"generated-artifacts/TestRejectEther.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}

View File

@@ -1,10 +1,41 @@
[
{
"version": "3.0.3",
"changes": [
{
"note": "Dependencies updated"
}
],
"timestamp": 1549547375
},
{
"version": "3.0.2",
"changes": [
{
"note": "Fake publish to enable pinning"
}
],
"timestamp": 1549504360
},
{
"timestamp": 1549452781,
"version": "3.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "3.0.0",
"changes": [
{
"note": "Upgrade the bignumber.js to v8.0.2",
"pr": 1517
},
{
"note": "Import `ZeroExTransaction` type instead of using type defined in this package",
"pr": 1576
}
],
"timestamp": 1549373905

View File

@@ -5,9 +5,22 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.3 - _February 7, 2019_
* Dependencies updated
## v3.0.2 - _February 7, 2019_
* Fake publish to enable pinning
## v3.0.1 - _February 6, 2019_
* Dependencies updated
## v3.0.0 - _February 5, 2019_
* Upgrade the bignumber.js to v8.0.2 (#1517)
* Import `ZeroExTransaction` type instead of using type defined in this package (#1576)
## v2.0.1 - _January 17, 2019_

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
"version": "3.0.0",
"version": "3.0.3",
"engines": {
"node": ">=6.12"
},
@@ -40,19 +40,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/abi-gen": "^2.0.0",
"@0x/dev-utils": "^2.0.0",
"@0x/order-utils": "^4.0.0",
"@0x/sol-compiler": "^3.0.0",
"@0x/sol-coverage": "^2.0.0",
"@0x/sol-profiler": "^2.0.1",
"@0x/sol-trace": "^2.0.1",
"@0x/subproviders": "^3.0.0",
"@0x/abi-gen": "^2.0.2",
"@0x/dev-utils": "^2.0.2",
"@0x/order-utils": "^6.0.1",
"@0x/sol-compiler": "^3.0.2",
"@0x/sol-coverage": "^2.0.2",
"@0x/sol-profiler": "^2.0.3",
"@0x/sol-trace": "^2.0.3",
"@0x/subproviders": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@0x/types": "^2.0.0",
"@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.1",
"@0x/web3-wrapper": "^4.0.0",
"@0x/utils": "^4.0.3",
"@0x/web3-wrapper": "^4.0.2",
"@types/bn.js": "^4.11.0",
"@types/js-combinatorics": "^0.5.29",
"@types/lodash": "4.14.104",
@@ -66,7 +66,7 @@
"ethereumjs-util": "^5.1.1",
"ethers": "~4.0.4",
"js-combinatorics": "^0.5.3",
"lodash": "^4.17.5",
"lodash": "^4.17.11",
"make-promises-safe": "^1.1.0"
},
"publishConfig": {

View File

@@ -31,7 +31,6 @@ export {
MarketBuyOrders,
MarketSellOrders,
ERC721TokenIdsByOwner,
SignedTransaction,
OrderStatus,
AllowanceAmountScenario,
AssetDataScenario,

View File

@@ -1,10 +1,8 @@
import { eip712Utils, generatePseudoRandomSalt } from '@0x/order-utils';
import { SignatureType } from '@0x/types';
import { signTypedDataUtils } from '@0x/utils';
import { generatePseudoRandomSalt, transactionHashUtils } from '@0x/order-utils';
import { SignatureType, SignedZeroExTransaction } from '@0x/types';
import * as ethUtil from 'ethereumjs-util';
import { signingUtils } from './signing_utils';
import { SignedTransaction } from './types';
export class TransactionFactory {
private readonly _signerBuff: Buffer;
@@ -15,23 +13,25 @@ export class TransactionFactory {
this._exchangeAddress = exchangeAddress;
this._signerBuff = ethUtil.privateToAddress(this._privateKey);
}
public newSignedTransaction(data: string, signatureType: SignatureType = SignatureType.EthSign): SignedTransaction {
public newSignedTransaction(
data: string,
signatureType: SignatureType = SignatureType.EthSign,
): SignedZeroExTransaction {
const salt = generatePseudoRandomSalt();
const signerAddress = `0x${this._signerBuff.toString('hex')}`;
const executeTransactionData = {
const transaction = {
salt,
signerAddress,
data,
verifyingContractAddress: this._exchangeAddress,
};
const typedData = eip712Utils.createZeroExTransactionTypedData(executeTransactionData, this._exchangeAddress);
const eip712MessageBuffer = signTypedDataUtils.generateTypedDataHash(typedData);
const signature = signingUtils.signMessage(eip712MessageBuffer, this._privateKey, signatureType);
const signedTx = {
exchangeAddress: this._exchangeAddress,
const transactionHashBuffer = transactionHashUtils.getTransactionHashBuffer(transaction);
const signature = signingUtils.signMessage(transactionHashBuffer, this._privateKey, signatureType);
const signedTransaction = {
...transaction,
signature: `0x${signature.toString('hex')}`,
...executeTransactionData,
};
return signedTx;
return signedTransaction;
}
}

Some files were not shown because too many files have changed in this diff Show More