Compare commits
358 Commits
@0x/web3-w
...
@0x/sol-co
Author | SHA1 | Date | |
---|---|---|---|
|
ec24c79da1 | ||
|
f5fffbea04 | ||
|
fb0a2ef248 | ||
|
240f482e8e | ||
|
885031d3ce | ||
|
68323d6def | ||
|
7c492071f1 | ||
|
8f64784781 | ||
|
1bd6095c60 | ||
|
e133a5f0f3 | ||
|
b47886416e | ||
|
c522d611d1 | ||
|
f6d9b6b7aa | ||
|
1de6bca12d | ||
|
2de9b862d8 | ||
|
3c649df3df | ||
|
9bf38d9e4d | ||
|
dee40f038d | ||
|
d0aa907418 | ||
|
8dbdffc9b4 | ||
|
f409780455 | ||
|
bebcd99b3b | ||
|
99aeaddf42 | ||
|
793398216f | ||
|
b353ed3157 | ||
|
8637212a17 | ||
|
c42ce38e1c | ||
|
76d228a603 | ||
|
5cb52faa10 | ||
|
e67e822845 | ||
|
a52686ca3b | ||
|
7a1e6cccfd | ||
|
1166b6c2fb | ||
|
7a6693694c | ||
|
6ed423d1af | ||
|
8b69444602 | ||
|
7de5e8d9c8 | ||
|
844e3d1934 | ||
|
9eafbbc0ae | ||
|
74677e3d54 | ||
|
57f4638742 | ||
|
c7a32f2d56 | ||
|
d2dc64aa2d | ||
|
edb2a34c51 | ||
|
dbd9b1c5c4 | ||
|
c3b758845d | ||
|
4d770549fc | ||
|
a67674bae1 | ||
|
462a61da73 | ||
|
ae8a7f6320 | ||
|
a23c6a0996 | ||
|
63a098d757 | ||
|
b68d9ed672 | ||
|
5934eb0559 | ||
|
b998d719a6 | ||
|
33832244cf | ||
|
df8ea3b65c | ||
|
7067d4a499 | ||
|
3e764eafd9 | ||
|
4169a41eda | ||
|
379eab19ad | ||
|
6cba1f3b61 | ||
|
5dad2404d3 | ||
|
a1b20eea2c | ||
|
af075e7b8b | ||
|
ef0a699919 | ||
|
8279ef0e05 | ||
|
c1cee8e951 | ||
|
4c17373311 | ||
|
c20972de3f | ||
|
64401f1031 | ||
|
1f895d0f27 | ||
|
5aa8ea10c3 | ||
|
b1fd3429ae | ||
|
dc161ef08d | ||
|
9502e789b3 | ||
|
a71aed0233 | ||
|
eda8dc278b | ||
|
23a7ffb167 | ||
|
ab11aaa694 | ||
|
83b5a2709d | ||
|
f67f94fd6b | ||
|
4e8ae037bb | ||
|
04d8f46ff3 | ||
|
047de370d6 | ||
|
e21dc5f026 | ||
|
78da033441 | ||
|
b51038b9e7 | ||
|
44e0b58c66 | ||
|
3f7d5274a2 | ||
|
c8f5f6045e | ||
|
6bcc2064a2 | ||
|
3f9872d8b3 | ||
|
5814cd5fae | ||
|
44f8c7c548 | ||
|
c2549308fe | ||
|
cf1a3bf4e7 | ||
|
b7bd4e5c51 | ||
|
ceb651fdd1 | ||
|
8fa0f4a232 | ||
|
297f3da5db | ||
|
ec4d634677 | ||
|
0ddec99704 | ||
|
64cec1de3b | ||
|
fdaf5d1fc8 | ||
|
6baf71dca5 | ||
|
9d75a72a02 | ||
|
4bf66d6a63 | ||
|
8d9a550107 | ||
|
a076278026 | ||
|
998dac44ee | ||
|
871e81bd71 | ||
|
d892d16b51 | ||
|
4cbf2781e5 | ||
|
69653b1c7c | ||
|
39390865da | ||
|
4952cd5afb | ||
|
e86df96bfe | ||
|
ef5195db90 | ||
|
bc7e62db9f | ||
|
154e7a6a8a | ||
|
ba56019f2d | ||
|
31d289c504 | ||
|
a42b22966a | ||
|
17db62d463 | ||
|
d6d40ea839 | ||
|
eca8410dbb | ||
|
eb3a530e6c | ||
|
26e17074c2 | ||
|
6b775628d5 | ||
|
13eb9103a7 | ||
|
1fa82c1077 | ||
|
426190181b | ||
|
1232a9a03d | ||
|
e643c13292 | ||
|
522736e367 | ||
|
12fd9c29f0 | ||
|
0c871b67ca | ||
|
379e828fc1 | ||
|
fe1e8575ea | ||
|
8f14099adc | ||
|
852c1396ae | ||
|
b0f9195b57 | ||
|
98236736e0 | ||
|
8b93a2816c | ||
|
76d8a991c0 | ||
|
9186af1433 | ||
|
6a473f4c57 | ||
|
42224ab534 | ||
|
20bcf09459 | ||
|
5d1dd536e9 | ||
|
169b8807f7 | ||
|
5acdab849e | ||
|
2417084145 | ||
|
c16e62b5bf | ||
|
6fa7d90f1f | ||
|
1a3fd0227d | ||
|
2259b7dfcf | ||
|
33fd70d0e1 | ||
|
fc906bcaae | ||
|
184e111e39 | ||
|
ab62f50f5c | ||
|
3eac854356 | ||
|
f7892cd86b | ||
|
6e0260385c | ||
|
44300dabb0 | ||
|
580c3038c8 | ||
|
2a9175e964 | ||
|
5db20bbbe8 | ||
|
ae144dff39 | ||
|
9f533efc92 | ||
|
76e15c4166 | ||
|
62bb2daf16 | ||
|
59e292030a | ||
|
533fc7e444 | ||
|
e5c5338eb6 | ||
|
9463acb131 | ||
|
e69749350b | ||
|
42749187ff | ||
|
d5c2038d58 | ||
|
5843a61c9f | ||
|
ecde2c9d7f | ||
|
abd597c7a6 | ||
|
b35e1d350b | ||
|
918399458d | ||
|
72d9b7028b | ||
|
ed9790c840 | ||
|
fd04bc4820 | ||
|
58a213b7f9 | ||
|
7f8bbfb4bd | ||
|
8a3e64b3cd | ||
|
572de86d06 | ||
|
88c33fa4d4 | ||
|
ee1c6a1ce1 | ||
|
09e90bea8b | ||
|
bf758412c1 | ||
|
0bbbf5b431 | ||
|
87b2236cfb | ||
|
855d2bb87f | ||
|
13b54a3b4d | ||
|
5d24ef4849 | ||
|
b2da451e8d | ||
|
139b66fa76 | ||
|
390ed5d7f1 | ||
|
16b5fb6b56 | ||
|
6205d6c885 | ||
|
e5ea65da82 | ||
|
9caa5feff5 | ||
|
7f616356d2 | ||
|
155b5dd42f | ||
|
41aaf428bf | ||
|
a17cdf33ea | ||
|
3d5e879d5f | ||
|
1a73ad3a32 | ||
|
abb5e7cd39 | ||
|
cdae6de52e | ||
|
910fe77ca3 | ||
|
b9a93c82d7 | ||
|
1c040bd616 | ||
|
166c537938 | ||
|
79c8de5fd0 | ||
|
7e6d2102a5 | ||
|
4f7d6132fc | ||
|
b7fcc70cd9 | ||
|
43ad27931c | ||
|
68dc3f75eb | ||
|
e67eb6d5b4 | ||
|
2e060bc85f | ||
|
22f80e4b19 | ||
|
1ef434f95e | ||
|
5676702da6 | ||
|
2fe0539600 | ||
|
13df5adecd | ||
|
f33f808dc7 | ||
|
82ed9ef25e | ||
|
0aa26d791d | ||
|
255f278f5e | ||
|
1c76f9a0ff | ||
|
9a308e25a3 | ||
|
4b52f8c823 | ||
|
8f7145f80a | ||
|
eb17f053f7 | ||
|
304e714331 | ||
|
525685f942 | ||
|
e2477b66c6 | ||
|
58d51e039c | ||
|
cb5b5167fc | ||
|
7d68378c3c | ||
|
87da6a947d | ||
|
0e644da6ac | ||
|
d61a7c360e | ||
|
ab286d851d | ||
|
e8b60ab292 | ||
|
1cb7e70b42 | ||
|
25b9c22845 | ||
|
47166104fa | ||
|
d0e0622058 | ||
|
87c75a1e43 | ||
|
d1cc08f1d9 | ||
|
6619626486 | ||
|
1681ba090c | ||
|
c36e1ad056 | ||
|
d79c7f70be | ||
|
b7eb2e4746 | ||
|
4db9b8b0e3 | ||
|
f3a537d5c2 | ||
|
6a704b8a77 | ||
|
df896877f8 | ||
|
3cb2d3dfff | ||
|
d5f5e79661 | ||
|
82dffe9d0e | ||
|
d7825dd7db | ||
|
c0a2f429b6 | ||
|
e909faa3ef | ||
|
28d9fdf798 | ||
|
e9bfc44b90 | ||
|
2a772b71f1 | ||
|
233869ed80 | ||
|
a9aaae7f97 | ||
|
500b4940a3 | ||
|
6d0dc47157 | ||
|
56e7e7d644 | ||
|
93c128ee21 | ||
|
c72e3667b8 | ||
|
6406126ae3 | ||
|
6bde77bb57 | ||
|
831a628379 | ||
|
3d2babd059 | ||
|
d9c4c74a56 | ||
|
5a231fb057 | ||
|
63f41df327 | ||
|
171618d32b | ||
|
f7b58e7f64 | ||
|
436d87da98 | ||
|
896874fb99 | ||
|
a9f8e80b1c | ||
|
f93cd1bb48 | ||
|
8fc3a6b828 | ||
|
100840b743 | ||
|
8c8cab9309 | ||
|
629a8d6328 | ||
|
ffdaec9f9f | ||
|
c794153221 | ||
|
d01837f42c | ||
|
7ad4cb0078 | ||
|
ffd8349889 | ||
|
f3716fd813 | ||
|
1170cf1896 | ||
|
b9ee9d2bd5 | ||
|
21c3f75efc | ||
|
eb5f7e36e9 | ||
|
4079563f5d | ||
|
6dabed5938 | ||
|
3939d516e6 | ||
|
5aba9d698b | ||
|
3dd652e7cf | ||
|
f003298ce4 | ||
|
5f5ee0041f | ||
|
88497ddc52 | ||
|
e921d5ec13 | ||
|
c55974a485 | ||
|
2ff0f545f5 | ||
|
7f2a011c3e | ||
|
8af9a38c8e | ||
|
b54bafe1c5 | ||
|
7a9ff3846e | ||
|
53fe08a348 | ||
|
f118e86cfe | ||
|
2e60d5341e | ||
|
2ef3af0003 | ||
|
2b7699c26a | ||
|
d567c58d3b | ||
|
bede3d7e29 | ||
|
64d6dae672 | ||
|
b001fe2b08 | ||
|
c20285dd36 | ||
|
7e19c944b9 | ||
|
fd4d3cff88 | ||
|
5ff646ca8e | ||
|
88432a5e67 | ||
|
7519d60fb7 | ||
|
de23428069 | ||
|
9089bf2c5f | ||
|
2a344e26cc | ||
|
af26403a86 | ||
|
3af6c8fe1d | ||
|
b883b183a6 | ||
|
ac58ace8cf | ||
|
a50eefc44e | ||
|
d95af455f1 | ||
|
8de955f3d8 | ||
|
59f48d6d57 | ||
|
4d75681357 | ||
|
1a88eac9c7 | ||
|
47357ddec8 | ||
|
129ae3a737 | ||
|
31d1390039 | ||
|
6943bbcacb |
@@ -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
|
||||
@@ -51,6 +51,7 @@ jobs:
|
||||
- run: yarn wsrun test:circleci @0x/contracts-asset-proxy
|
||||
- run: yarn wsrun test:circleci @0x/contracts-exchange
|
||||
- run: yarn wsrun test:circleci @0x/contracts-exchange-forwarder
|
||||
- run: yarn wsrun test:circleci @0x/contracts-tec
|
||||
test-contracts-geth:
|
||||
docker:
|
||||
- image: circleci/node:9-browsers
|
||||
@@ -71,6 +72,7 @@ jobs:
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-asset-proxy
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange-forwarder
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-tec
|
||||
test-publish:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
|
1
.github/autolabeler.yml
vendored
1
.github/autolabeler.yml
vendored
@@ -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']
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -83,6 +83,7 @@ packages/react-docs/example/public/bundle*
|
||||
packages/testnet-faucets/server/
|
||||
|
||||
# generated contract artifacts/
|
||||
contracts/tec/generated-artifacts/
|
||||
contracts/exchange/generated-artifacts/
|
||||
contracts/asset-proxy/generated-artifacts/
|
||||
contracts/multisig/generated-artifacts/
|
||||
@@ -97,6 +98,7 @@ packages/metacoin/artifacts/
|
||||
|
||||
# generated contract wrappers
|
||||
packages/abi-gen-wrappers/wrappers
|
||||
contracts/tec/generated-wrappers/
|
||||
contracts/exchange/generated-wrappers/
|
||||
contracts/asset-proxy/generated-wrappers/
|
||||
contracts/multisig/generated-wrappers/
|
||||
|
@@ -1,5 +1,7 @@
|
||||
lib
|
||||
.nyc_output
|
||||
/contracts/tec/generated-wrappers
|
||||
/contracts/tec/generated-artifacts
|
||||
/contracts/exchange/generated-wrappers
|
||||
/contracts/exchange/generated-artifacts
|
||||
/contracts/asset-proxy/generated-wrappers
|
||||
|
@@ -41,11 +41,12 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
|
||||
| [`@0x/contracts-erc721`](/contracts/erc721) | [](https://www.npmjs.com/package/@0x/contracts-erc721) | Implementations of various ERC721 tokens |
|
||||
| [`@0x/contracts-exchange`](/contracts/exchange) | [](https://www.npmjs.com/package/@0x/contracts-exchange) | The [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract used for settling trades within the protocol |
|
||||
| [`@0x/contracts-exchange-forwarder`](/contracts/exchange-forwarder) | [](https://www.npmjs.com/package/@0x/contracts-exchange-forwarder) | A [`Forwarder`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract used to simplify UX for interacting with the protocol |
|
||||
| [`@0x/contracts-exchange-libs`](/contracts/exchange-libs) | [](https://www.npmjs.com/package/@0x/contracts-exchange-libs) | Protocol specific Llbraries used within the [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract |
|
||||
| [`@0x/contracts-exchange-libs`](/contracts/exchange-libs) | [](https://www.npmjs.com/package/@0x/contracts-exchange-libs) | Protocol specific libraries used within the [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract |
|
||||
| [`@0x/contracts-extensions`](/contracts/extensions) | [](https://www.npmjs.com/package/@0x/contracts-extensions) | Contracts that interact with and extend the functionality of the core protocol |
|
||||
| [`@0x/contracts-multisig`](/contracts/multisig) | [](https://www.npmjs.com/package/@0x/contracts-multisig) | Various implementations of multisignature wallets, including the [`AssetProxyOwner`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxyowner) contract that has permissions to upgrade the protocol |
|
||||
| [`@0x/contracts-test-utils`](/contracts/test-utils) | [](https://www.npmjs.com/package/@0x/contracts-test-utils) | Typescript/Javascript shared utilities used for testing contracts |
|
||||
| [`@0x/contracts-utils`](/contracts/utils) | [](https://www.npmjs.com/package/@0x/contracts-utils) | Generic libraries and utilities used throughout all of the contracts |
|
||||
| [`@0x/contracts-tec`](/contracts/tec) | [](https://www.npmjs.com/package/@0x/contracts-tec) | A contract that allows users to execute 0x transactions with permission from a TEC (Trade Execution Coordinator) |
|
||||
|
||||
### Typescript/Javascript Packages
|
||||
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,12 +18,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.7",
|
||||
"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,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -63,18 +67,17 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.1",
|
||||
"@0x/contracts-erc20": "^1.0.2",
|
||||
"@0x/contracts-erc721": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/contracts-utils": "^2.0.1",
|
||||
"@0x/order-utils": "^5.0.0",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-erc20": "^1.0.7",
|
||||
"@0x/contracts-erc721": "^1.0.7",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^7.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
33
contracts/asset-proxy/src/artifacts.ts
Normal file
33
contracts/asset-proxy/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
17
contracts/asset-proxy/src/wrappers.ts
Normal file
17
contracts/asset-proxy/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -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,
|
||||
|
@@ -1,19 +1,17 @@
|
||||
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';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import { ZeroExProvider } 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[];
|
||||
private readonly _contractOwnerAddress: string;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _provider: Provider;
|
||||
private readonly _provider: ZeroExProvider;
|
||||
private readonly _dummyTokenContracts: DummyERC20TokenContract[];
|
||||
private _proxyContract?: ERC20ProxyContract;
|
||||
private _proxyIdIfExists?: string;
|
||||
@@ -24,7 +22,7 @@ export class ERC20Wrapper {
|
||||
* @param contractOwnerAddress Desired owner of the contract
|
||||
* Instance of ERC20Wrapper
|
||||
*/
|
||||
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
constructor(provider: ZeroExProvider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
this._dummyTokenContracts = [];
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._provider = provider;
|
||||
@@ -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,
|
||||
|
@@ -1,24 +1,22 @@
|
||||
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';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import { ZeroExProvider } 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[];
|
||||
private readonly _contractOwnerAddress: string;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _provider: Provider;
|
||||
private readonly _provider: ZeroExProvider;
|
||||
private readonly _dummyTokenContracts: DummyERC721TokenContract[];
|
||||
private _proxyContract?: ERC721ProxyContract;
|
||||
private _proxyIdIfExists?: string;
|
||||
private _initialTokenIdsByOwner: ERC721TokenIdsByOwner = {};
|
||||
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
constructor(provider: ZeroExProvider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._provider = provider;
|
||||
this._dummyTokenContracts = [];
|
||||
@@ -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,
|
||||
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,16 +18,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.7",
|
||||
"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.1",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@0x/contracts-exchange-libs": "^1.0.2",
|
||||
"@0x/contracts-utils": "^2.0.1",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
31
contracts/erc20/src/artifacts.ts
Normal file
31
contracts/erc20/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
16
contracts/erc20/src/wrappers.ts
Normal file
16
contracts/erc20/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,12 +18,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.7",
|
||||
"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.1",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@0x/contracts-utils": "^2.0.1",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
23
contracts/erc721/src/artifacts.ts
Normal file
23
contracts/erc721/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
12
contracts/erc721/src/wrappers.ts
Normal file
12
contracts/erc721/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -19,5 +17,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-forwarder",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.7",
|
||||
"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.1",
|
||||
"@0x/contract-wrappers": "^7.0.0",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contract-wrappers": "^8.0.1",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@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": "^5.0.0",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-asset-proxy": "^1.0.7",
|
||||
"@0x/contracts-erc20": "^1.0.7",
|
||||
"@0x/contracts-erc721": "^1.0.7",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^7.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
19
contracts/exchange-forwarder/src/artifacts.ts
Normal file
19
contracts/exchange-forwarder/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -1,7 +0,0 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as Forwarder from '../../generated-artifacts/Forwarder.json';
|
||||
|
||||
export const artifacts = {
|
||||
Forwarder: Forwarder as ContractArtifact,
|
||||
};
|
10
contracts/exchange-forwarder/src/wrappers.ts
Normal file
10
contracts/exchange-forwarder/src/wrappers.ts
Normal 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';
|
@@ -1 +0,0 @@
|
||||
export * from '../../generated-wrappers/forwarder';
|
@@ -1,7 +1,10 @@
|
||||
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 {
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
ERC20Wrapper,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -23,7 +26,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { artifacts, ForwarderContract, ForwarderWrapper } from '../src';
|
||||
import { artifacts, ForwarderContract, ForwarderWrapper, WETH9Contract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@@ -88,14 +91,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 +169,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,
|
||||
|
@@ -1,11 +1,8 @@
|
||||
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 { constants, formatters, LogDecoder, MarketSellOrders, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ForwarderContract } from '../../generated-wrappers/forwarder';
|
||||
@@ -58,15 +55,10 @@ export class ForwarderWrapper {
|
||||
const params = formatters.createMarketSellOrders(signedOrders, constants.ZERO_AMOUNT);
|
||||
return params;
|
||||
}
|
||||
constructor(contractInstance: ForwarderContract, provider: Provider) {
|
||||
constructor(contractInstance: ForwarderContract, provider: Web3ProviderEngine) {
|
||||
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[],
|
||||
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,54 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.1.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Upgrade contracts to Solidity 0.5.3",
|
||||
"pr": 1604
|
||||
},
|
||||
{
|
||||
"note": "Make constants internal",
|
||||
"pr": 1604
|
||||
}
|
||||
],
|
||||
"timestamp": 1551130135
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,27 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.1 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.0 - _February 25, 2019_
|
||||
|
||||
* Upgrade contracts to Solidity 0.5.3 (#1604)
|
||||
* Make constants internal (#1604)
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,13 +18,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"
|
||||
]
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./LibOrder.sol";
|
||||
|
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
// solhint-disable
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
|
||||
@@ -25,14 +25,14 @@ pragma solidity ^0.4.24;
|
||||
contract LibAssetProxyErrors {
|
||||
|
||||
/// Authorizable errors ///
|
||||
string constant SENDER_NOT_AUTHORIZED = "SENDER_NOT_AUTHORIZED"; // Sender not authorized to call this method.
|
||||
string constant TARGET_NOT_AUTHORIZED = "TARGET_NOT_AUTHORIZED"; // Target address not authorized to call this method.
|
||||
string constant TARGET_ALREADY_AUTHORIZED = "TARGET_ALREADY_AUTHORIZED"; // Target address must not already be authorized.
|
||||
string constant INDEX_OUT_OF_BOUNDS = "INDEX_OUT_OF_BOUNDS"; // Specified array index is out of bounds.
|
||||
string constant AUTHORIZED_ADDRESS_MISMATCH = "AUTHORIZED_ADDRESS_MISMATCH"; // Address at index does not match given target address.
|
||||
string constant internal SENDER_NOT_AUTHORIZED = "SENDER_NOT_AUTHORIZED"; // Sender not authorized to call this method.
|
||||
string constant internal TARGET_NOT_AUTHORIZED = "TARGET_NOT_AUTHORIZED"; // Target address not authorized to call this method.
|
||||
string constant internal TARGET_ALREADY_AUTHORIZED = "TARGET_ALREADY_AUTHORIZED"; // Target address must not already be authorized.
|
||||
string constant internal INDEX_OUT_OF_BOUNDS = "INDEX_OUT_OF_BOUNDS"; // Specified array index is out of bounds.
|
||||
string constant internal AUTHORIZED_ADDRESS_MISMATCH = "AUTHORIZED_ADDRESS_MISMATCH"; // Address at index does not match given target address.
|
||||
|
||||
/// Transfer errors ///
|
||||
string constant INVALID_AMOUNT = "INVALID_AMOUNT"; // Transfer amount must equal 1.
|
||||
string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Transfer failed.
|
||||
string constant LENGTH_GREATER_THAN_131_REQUIRED = "LENGTH_GREATER_THAN_131_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant internal INVALID_AMOUNT = "INVALID_AMOUNT"; // Transfer amount must equal 1.
|
||||
string constant internal TRANSFER_FAILED = "TRANSFER_FAILED"; // Transfer failed.
|
||||
string constant internal LENGTH_GREATER_THAN_131_REQUIRED = "LENGTH_GREATER_THAN_131_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
// solhint-disable max-line-length
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract LibEIP712 {
|
||||
@@ -50,7 +50,7 @@ contract LibEIP712 {
|
||||
EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH,
|
||||
keccak256(bytes(EIP712_DOMAIN_NAME)),
|
||||
keccak256(bytes(EIP712_DOMAIN_VERSION)),
|
||||
bytes32(address(this))
|
||||
uint256(address(this))
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
// solhint-disable
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the Exchange contract.
|
||||
@@ -25,46 +25,46 @@ pragma solidity ^0.4.24;
|
||||
contract LibExchangeErrors {
|
||||
|
||||
/// Order validation errors ///
|
||||
string constant ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled.
|
||||
string constant INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress.
|
||||
string constant INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress.
|
||||
string constant INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`.
|
||||
string constant INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled.
|
||||
string constant internal INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress.
|
||||
string constant internal INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress.
|
||||
string constant internal INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`.
|
||||
string constant internal INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed.
|
||||
|
||||
/// fillOrder validation errors ///
|
||||
string constant INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0.
|
||||
string constant ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount.
|
||||
string constant internal INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0.
|
||||
string constant internal ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount.
|
||||
|
||||
/// Signature validation errors ///
|
||||
string constant INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed.
|
||||
string constant SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal.
|
||||
string constant SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported.
|
||||
string constant internal INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal.
|
||||
string constant internal SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported.
|
||||
|
||||
/// cancelOrdersUptTo errors ///
|
||||
string constant INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch.
|
||||
string constant internal INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch.
|
||||
|
||||
/// fillOrKillOrder errors ///
|
||||
string constant COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled.
|
||||
string constant internal COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled.
|
||||
|
||||
/// matchOrders errors ///
|
||||
string constant NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread.
|
||||
string constant internal NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread.
|
||||
|
||||
/// Transaction errors ///
|
||||
string constant REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed.
|
||||
string constant INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed.
|
||||
string constant INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed.
|
||||
string constant FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed.
|
||||
string constant internal REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed.
|
||||
string constant internal INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed.
|
||||
string constant internal INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed.
|
||||
|
||||
/// registerAssetProxy errors ///
|
||||
string constant ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists.
|
||||
string constant internal ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists.
|
||||
|
||||
/// dispatchTransferFrom errors ///
|
||||
string constant ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id.
|
||||
string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful.
|
||||
string constant internal ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id.
|
||||
string constant internal TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful.
|
||||
|
||||
/// Length validation errors ///
|
||||
string constant LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3.
|
||||
string constant LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0.
|
||||
string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65.
|
||||
string constant internal LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant internal LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3.
|
||||
string constant internal LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0.
|
||||
string constant internal LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65.
|
||||
}
|
||||
|
@@ -16,137 +16,137 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract LibExchangeSelectors {
|
||||
|
||||
// solhint-disable max-line-length
|
||||
// allowedValidators
|
||||
bytes4 constant public ALLOWED_VALIDATORS_SELECTOR = 0x7b8e3514;
|
||||
bytes4 constant public ALLOWED_VALIDATORS_SELECTOR_GENERATOR = bytes4(keccak256("allowedValidators(address,address)"));
|
||||
bytes4 constant internal ALLOWED_VALIDATORS_SELECTOR = 0x7b8e3514;
|
||||
bytes4 constant internal ALLOWED_VALIDATORS_SELECTOR_GENERATOR = bytes4(keccak256("allowedValidators(address,address)"));
|
||||
|
||||
// assetProxies
|
||||
bytes4 constant public ASSET_PROXIES_SELECTOR = 0x3fd3c997;
|
||||
bytes4 constant public ASSET_PROXIES_SELECTOR_GENERATOR = bytes4(keccak256("assetProxies(bytes4)"));
|
||||
bytes4 constant internal ASSET_PROXIES_SELECTOR = 0x3fd3c997;
|
||||
bytes4 constant internal ASSET_PROXIES_SELECTOR_GENERATOR = bytes4(keccak256("assetProxies(bytes4)"));
|
||||
|
||||
// batchCancelOrders
|
||||
bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR = 0x4ac14782;
|
||||
bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
bytes4 constant internal BATCH_CANCEL_ORDERS_SELECTOR = 0x4ac14782;
|
||||
bytes4 constant internal BATCH_CANCEL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
|
||||
// batchFillOrKillOrders
|
||||
bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR = 0x4d0ae546;
|
||||
bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_OR_KILL_ORDERS_SELECTOR = 0x4d0ae546;
|
||||
bytes4 constant internal BATCH_FILL_OR_KILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// batchFillOrders
|
||||
bytes4 constant public BATCH_FILL_ORDERS_SELECTOR = 0x297bb70b;
|
||||
bytes4 constant public BATCH_FILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_SELECTOR = 0x297bb70b;
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// batchFillOrdersNoThrow
|
||||
bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR = 0x50dde190;
|
||||
bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_NO_THROW_SELECTOR = 0x50dde190;
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// cancelOrder
|
||||
bytes4 constant public CANCEL_ORDER_SELECTOR = 0xd46b02c3;
|
||||
bytes4 constant public CANCEL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
bytes4 constant internal CANCEL_ORDER_SELECTOR = 0xd46b02c3;
|
||||
bytes4 constant internal CANCEL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
|
||||
// cancelOrdersUpTo
|
||||
bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR = 0x4f9559b1;
|
||||
bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrdersUpTo(uint256)"));
|
||||
bytes4 constant internal CANCEL_ORDERS_UP_TO_SELECTOR = 0x4f9559b1;
|
||||
bytes4 constant internal CANCEL_ORDERS_UP_TO_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrdersUpTo(uint256)"));
|
||||
|
||||
// cancelled
|
||||
bytes4 constant public CANCELLED_SELECTOR = 0x2ac12622;
|
||||
bytes4 constant public CANCELLED_SELECTOR_GENERATOR = bytes4(keccak256("cancelled(bytes32)"));
|
||||
bytes4 constant internal CANCELLED_SELECTOR = 0x2ac12622;
|
||||
bytes4 constant internal CANCELLED_SELECTOR_GENERATOR = bytes4(keccak256("cancelled(bytes32)"));
|
||||
|
||||
// currentContextAddress
|
||||
bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR = 0xeea086ba;
|
||||
bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR_GENERATOR = bytes4(keccak256("currentContextAddress()"));
|
||||
bytes4 constant internal CURRENT_CONTEXT_ADDRESS_SELECTOR = 0xeea086ba;
|
||||
bytes4 constant internal CURRENT_CONTEXT_ADDRESS_SELECTOR_GENERATOR = bytes4(keccak256("currentContextAddress()"));
|
||||
|
||||
// executeTransaction
|
||||
bytes4 constant public EXECUTE_TRANSACTION_SELECTOR = 0xbfc8bfce;
|
||||
bytes4 constant public EXECUTE_TRANSACTION_SELECTOR_GENERATOR = bytes4(keccak256("executeTransaction(uint256,address,bytes,bytes)"));
|
||||
bytes4 constant internal EXECUTE_TRANSACTION_SELECTOR = 0xbfc8bfce;
|
||||
bytes4 constant internal EXECUTE_TRANSACTION_SELECTOR_GENERATOR = bytes4(keccak256("executeTransaction(uint256,address,bytes,bytes)"));
|
||||
|
||||
// fillOrKillOrder
|
||||
bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR = 0x64a3bc15;
|
||||
bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_OR_KILL_ORDER_SELECTOR = 0x64a3bc15;
|
||||
bytes4 constant internal FILL_OR_KILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// fillOrder
|
||||
bytes4 constant public FILL_ORDER_SELECTOR = 0xb4be83d5;
|
||||
bytes4 constant public FILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_ORDER_SELECTOR = 0xb4be83d5;
|
||||
bytes4 constant internal FILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// fillOrderNoThrow
|
||||
bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR = 0x3e228bae;
|
||||
bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_ORDER_NO_THROW_SELECTOR = 0x3e228bae;
|
||||
bytes4 constant internal FILL_ORDER_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// filled
|
||||
bytes4 constant public FILLED_SELECTOR = 0x288cdc91;
|
||||
bytes4 constant public FILLED_SELECTOR_GENERATOR = bytes4(keccak256("filled(bytes32)"));
|
||||
bytes4 constant internal FILLED_SELECTOR = 0x288cdc91;
|
||||
bytes4 constant internal FILLED_SELECTOR_GENERATOR = bytes4(keccak256("filled(bytes32)"));
|
||||
|
||||
// getAssetProxy
|
||||
bytes4 constant public GET_ASSET_PROXY_SELECTOR = 0x60704108;
|
||||
bytes4 constant public GET_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("getAssetProxy(bytes4)"));
|
||||
bytes4 constant internal GET_ASSET_PROXY_SELECTOR = 0x60704108;
|
||||
bytes4 constant internal GET_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("getAssetProxy(bytes4)"));
|
||||
|
||||
// getOrderInfo
|
||||
bytes4 constant public GET_ORDER_INFO_SELECTOR = 0xc75e0a81;
|
||||
bytes4 constant public GET_ORDER_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
bytes4 constant internal GET_ORDER_INFO_SELECTOR = 0xc75e0a81;
|
||||
bytes4 constant internal GET_ORDER_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
|
||||
// getOrdersInfo
|
||||
bytes4 constant public GET_ORDERS_INFO_SELECTOR = 0x7e9d74dc;
|
||||
bytes4 constant public GET_ORDERS_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
bytes4 constant internal GET_ORDERS_INFO_SELECTOR = 0x7e9d74dc;
|
||||
bytes4 constant internal GET_ORDERS_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
|
||||
// isValidSignature
|
||||
bytes4 constant public IS_VALID_SIGNATURE_SELECTOR = 0x93634702;
|
||||
bytes4 constant public IS_VALID_SIGNATURE_SELECTOR_GENERATOR = bytes4(keccak256("isValidSignature(bytes32,address,bytes)"));
|
||||
bytes4 constant internal IS_VALID_SIGNATURE_SELECTOR = 0x93634702;
|
||||
bytes4 constant internal IS_VALID_SIGNATURE_SELECTOR_GENERATOR = bytes4(keccak256("isValidSignature(bytes32,address,bytes)"));
|
||||
|
||||
// marketBuyOrders
|
||||
bytes4 constant public MARKET_BUY_ORDERS_SELECTOR = 0xe5fa431b;
|
||||
bytes4 constant public MARKET_BUY_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_SELECTOR = 0xe5fa431b;
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketBuyOrdersNoThrow
|
||||
bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR = 0xa3e20380;
|
||||
bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_NO_THROW_SELECTOR = 0xa3e20380;
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketSellOrders
|
||||
bytes4 constant public MARKET_SELL_ORDERS_SELECTOR = 0x7e1d9808;
|
||||
bytes4 constant public MARKET_SELL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_SELECTOR = 0x7e1d9808;
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketSellOrdersNoThrow
|
||||
bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR = 0xdd1c7d18;
|
||||
bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_NO_THROW_SELECTOR = 0xdd1c7d18;
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// matchOrders
|
||||
bytes4 constant public MATCH_ORDERS_SELECTOR = 0x3c28d861;
|
||||
bytes4 constant public MATCH_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)"));
|
||||
bytes4 constant internal MATCH_ORDERS_SELECTOR = 0x3c28d861;
|
||||
bytes4 constant internal MATCH_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)"));
|
||||
|
||||
// orderEpoch
|
||||
bytes4 constant public ORDER_EPOCH_SELECTOR = 0xd9bfa73e;
|
||||
bytes4 constant public ORDER_EPOCH_SELECTOR_GENERATOR = bytes4(keccak256("orderEpoch(address,address)"));
|
||||
bytes4 constant internal ORDER_EPOCH_SELECTOR = 0xd9bfa73e;
|
||||
bytes4 constant internal ORDER_EPOCH_SELECTOR_GENERATOR = bytes4(keccak256("orderEpoch(address,address)"));
|
||||
|
||||
// owner
|
||||
bytes4 constant public OWNER_SELECTOR = 0x8da5cb5b;
|
||||
bytes4 constant public OWNER_SELECTOR_GENERATOR = bytes4(keccak256("owner()"));
|
||||
bytes4 constant internal OWNER_SELECTOR = 0x8da5cb5b;
|
||||
bytes4 constant internal OWNER_SELECTOR_GENERATOR = bytes4(keccak256("owner()"));
|
||||
|
||||
// preSign
|
||||
bytes4 constant public PRE_SIGN_SELECTOR = 0x3683ef8e;
|
||||
bytes4 constant public PRE_SIGN_SELECTOR_GENERATOR = bytes4(keccak256("preSign(bytes32,address,bytes)"));
|
||||
bytes4 constant internal PRE_SIGN_SELECTOR = 0x3683ef8e;
|
||||
bytes4 constant internal PRE_SIGN_SELECTOR_GENERATOR = bytes4(keccak256("preSign(bytes32,address,bytes)"));
|
||||
|
||||
// preSigned
|
||||
bytes4 constant public PRE_SIGNED_SELECTOR = 0x82c174d0;
|
||||
bytes4 constant public PRE_SIGNED_SELECTOR_GENERATOR = bytes4(keccak256("preSigned(bytes32,address)"));
|
||||
bytes4 constant internal PRE_SIGNED_SELECTOR = 0x82c174d0;
|
||||
bytes4 constant internal PRE_SIGNED_SELECTOR_GENERATOR = bytes4(keccak256("preSigned(bytes32,address)"));
|
||||
|
||||
// registerAssetProxy
|
||||
bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR = 0xc585bb93;
|
||||
bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("registerAssetProxy(address)"));
|
||||
bytes4 constant internal REGISTER_ASSET_PROXY_SELECTOR = 0xc585bb93;
|
||||
bytes4 constant internal REGISTER_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("registerAssetProxy(address)"));
|
||||
|
||||
// setSignatureValidatorApproval
|
||||
bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR = 0x77fcce68;
|
||||
bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR_GENERATOR = bytes4(keccak256("setSignatureValidatorApproval(address,bool)"));
|
||||
bytes4 constant internal SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR = 0x77fcce68;
|
||||
bytes4 constant internal SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR_GENERATOR = bytes4(keccak256("setSignatureValidatorApproval(address,bool)"));
|
||||
|
||||
// transactions
|
||||
bytes4 constant public TRANSACTIONS_SELECTOR = 0x642f2eaf;
|
||||
bytes4 constant public TRANSACTIONS_SELECTOR_GENERATOR = bytes4(keccak256("transactions(bytes32)"));
|
||||
bytes4 constant internal TRANSACTIONS_SELECTOR = 0x642f2eaf;
|
||||
bytes4 constant internal TRANSACTIONS_SELECTOR_GENERATOR = bytes4(keccak256("transactions(bytes32)"));
|
||||
|
||||
// transferOwnership
|
||||
bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR = 0xf2fde38b;
|
||||
bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR_GENERATOR = bytes4(keccak256("transferOwnership(address)"));
|
||||
bytes4 constant internal TRANSFER_OWNERSHIP_SELECTOR = 0xf2fde38b;
|
||||
bytes4 constant internal TRANSFER_OWNERSHIP_SELECTOR_GENERATOR = bytes4(keccak256("transferOwnership(address)"));
|
||||
}
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "./LibEIP712.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
pragma solidity 0.5.3;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../src/LibMath.sol";
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-libs",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.1",
|
||||
"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.1",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@0x/contracts-utils": "^2.0.1",
|
||||
"@0x/order-utils": "^5.0.0",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-utils": "^2.0.6",
|
||||
"@0x/order-utils": "^7.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
25
contracts/exchange-libs/src/artifacts.ts
Normal file
25
contracts/exchange-libs/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
13
contracts/exchange-libs/src/wrappers.ts
Normal file
13
contracts/exchange-libs/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,23 +18,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.7",
|
||||
"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.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@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-test-utils": "^3.0.1",
|
||||
"@0x/contracts-utils": "^2.0.1",
|
||||
"@0x/order-utils": "^5.0.0",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-asset-proxy": "^1.0.7",
|
||||
"@0x/contracts-erc20": "^1.0.7",
|
||||
"@0x/contracts-erc721": "^1.0.7",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^7.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.5"
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
61
contracts/exchange/src/artifacts.ts
Normal file
61
contracts/exchange/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
31
contracts/exchange/src/wrappers.ts
Normal file
31
contracts/exchange/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -1,19 +1,14 @@
|
||||
import {
|
||||
artifacts as proxyArtifacts,
|
||||
DummyERC20TokenContract,
|
||||
DummyERC20TokenTransferEventArgs,
|
||||
DummyERC721TokenContract,
|
||||
DummyNoReturnERC20TokenContract,
|
||||
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 {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -42,6 +37,7 @@ import {
|
||||
ExchangeCancelEventArgs,
|
||||
ExchangeContract,
|
||||
ExchangeWrapper,
|
||||
ReentrantERC20TokenContract,
|
||||
TestStaticCallReceiverContract,
|
||||
} from '../src';
|
||||
|
||||
@@ -98,7 +94,7 @@ describe('Exchange core', () => {
|
||||
erc20Proxy = await erc20Wrapper.deployProxyAsync();
|
||||
erc721Proxy = await erc721Wrapper.deployProxyAsync();
|
||||
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
|
||||
proxyArtifacts.MultiAssetProxy,
|
||||
artifacts.MultiAssetProxy,
|
||||
provider,
|
||||
txDefaults,
|
||||
);
|
||||
@@ -120,7 +116,7 @@ describe('Exchange core', () => {
|
||||
txDefaults,
|
||||
);
|
||||
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
erc20Artifacts.ReentrantERC20Token,
|
||||
artifacts.ReentrantERC20Token,
|
||||
provider,
|
||||
txDefaults,
|
||||
exchange.address,
|
||||
@@ -345,7 +341,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,
|
||||
|
@@ -1,11 +1,10 @@
|
||||
import {
|
||||
artifacts as proxyArtifacts,
|
||||
DummyERC20TokenContract,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -131,7 +130,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,
|
||||
);
|
||||
|
@@ -1,6 +1,11 @@
|
||||
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 {
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -20,7 +25,14 @@ 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,
|
||||
ExchangeContract,
|
||||
ExchangeWrapper,
|
||||
MatchOrderTester,
|
||||
ReentrantERC20TokenContract,
|
||||
TestExchangeInternalsContract,
|
||||
} from '../src';
|
||||
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
chaiSetup.configure();
|
||||
@@ -131,7 +143,7 @@ describe('matchOrders', () => {
|
||||
);
|
||||
|
||||
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
erc20Artifacts.ReentrantERC20Token,
|
||||
artifacts.ReentrantERC20Token,
|
||||
provider,
|
||||
txDefaults,
|
||||
exchange.address,
|
||||
|
@@ -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,
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { ERC20ProxyContract, ERC20Wrapper } from '@0x/contracts-asset-proxy';
|
||||
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||
import { DummyERC20TokenContract, ERC20ProxyContract, ERC20Wrapper } from '@0x/contracts-asset-proxy';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
|
@@ -1,10 +1,15 @@
|
||||
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
|
||||
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
|
||||
import { FillResults, formatters, LogDecoder, OrderInfo, orderUtils } from '@0x/contracts-test-utils';
|
||||
import {
|
||||
FillResults,
|
||||
formatters,
|
||||
LogDecoder,
|
||||
OrderInfo,
|
||||
orderUtils,
|
||||
Web3ProviderEngine,
|
||||
} 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';
|
||||
import { MethodAbi, TransactionReceiptWithDecodedLogs, ZeroExProvider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ExchangeContract } from '../../src';
|
||||
@@ -15,10 +20,10 @@ export class ExchangeWrapper {
|
||||
private readonly _exchange: ExchangeContract;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
constructor(exchangeContract: ExchangeContract, provider: Provider) {
|
||||
constructor(exchangeContract: ExchangeContract, provider: Web3ProviderEngine | ZeroExProvider) {
|
||||
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,
|
||||
|
@@ -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,
|
||||
@@ -16,6 +15,7 @@ import {
|
||||
TakerAssetFillAmountScenario,
|
||||
TakerScenario,
|
||||
TraderStateScenario,
|
||||
Web3ProviderEngine,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import {
|
||||
assetDataUtils,
|
||||
@@ -26,14 +26,14 @@ import {
|
||||
OrderValidationUtils,
|
||||
} from '@0x/order-utils';
|
||||
import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0x/types';
|
||||
import { BigNumber, errorUtils, logUtils } from '@0x/utils';
|
||||
import { BigNumber, errorUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
|
||||
import { LogWithDecodedArgs, 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';
|
||||
@@ -60,7 +60,8 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
|
||||
const [ownerAddress, makerAddress, takerAddress] = userAddresses;
|
||||
const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
|
||||
|
||||
const provider = web3Wrapper.getProvider();
|
||||
const supportedProvider = web3Wrapper.getProvider();
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const erc20Wrapper = new ERC20Wrapper(provider, userAddresses, ownerAddress);
|
||||
const erc721Wrapper = new ERC721Wrapper(provider, userAddresses, ownerAddress);
|
||||
|
||||
@@ -129,11 +130,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,
|
||||
@@ -356,7 +353,7 @@ export class FillOrderCombinatorialUtils {
|
||||
this.testLibsContract = testLibsContract;
|
||||
}
|
||||
public async testFillOrderScenarioAsync(
|
||||
provider: Provider,
|
||||
provider: Web3ProviderEngine,
|
||||
fillScenario: FillScenario,
|
||||
isVerbose: boolean = false,
|
||||
): Promise<void> {
|
||||
|
@@ -1,6 +1,11 @@
|
||||
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 {
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -22,7 +27,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ExchangeContract, ExchangeWrapper } from '../src';
|
||||
import { artifacts, ExchangeContract, ExchangeWrapper, ReentrantERC20TokenContract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@@ -107,7 +112,7 @@ describe('Exchange wrappers', () => {
|
||||
);
|
||||
|
||||
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
erc20Artifacts.ReentrantERC20Token,
|
||||
artifacts.ReentrantERC20Token,
|
||||
provider,
|
||||
txDefaults,
|
||||
exchange.address,
|
||||
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "2.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.6 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -19,5 +17,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"
|
||||
]
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-extensions",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.6",
|
||||
"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.1",
|
||||
"@0x/contract-wrappers": "^7.0.0",
|
||||
"@0x/contracts-test-utils": "^3.0.1",
|
||||
"@0x/dev-utils": "^2.0.1",
|
||||
"@0x/sol-compiler": "^3.0.1",
|
||||
"@0x/abi-gen": "^2.0.5",
|
||||
"@0x/contract-wrappers": "^8.0.1",
|
||||
"@0x/contracts-gen": "^1.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.6",
|
||||
"@0x/dev-utils": "^2.1.2",
|
||||
"@0x/sol-compiler": "^3.1.1",
|
||||
"@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.1",
|
||||
"@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": "^5.0.0",
|
||||
"@0x/types": "^2.0.1",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.2",
|
||||
"@0x/web3-wrapper": "^4.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^5.0.1",
|
||||
"@0x/contracts-asset-proxy": "^1.0.7",
|
||||
"@0x/contracts-erc20": "^1.0.7",
|
||||
"@0x/contracts-erc721": "^1.0.7",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^7.0.1",
|
||||
"@0x/types": "^2.1.1",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.1",
|
||||
"@0x/web3-wrapper": "^6.0.1",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
31
contracts/extensions/src/artifacts.ts
Normal file
31
contracts/extensions/src/artifacts.ts
Normal 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,
|
||||
};
|
@@ -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,
|
||||
};
|
16
contracts/extensions/src/wrappers.ts
Normal file
16
contracts/extensions/src/wrappers.ts
Normal 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';
|
@@ -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';
|
@@ -1,3 +1,4 @@
|
||||
import { ExchangeContract, 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,
|
||||
@@ -127,7 +127,7 @@ describe(ContractName.BalanceThresholdFilter, () => {
|
||||
await erc20Wrapper.setBalancesAndAllowancesAsync();
|
||||
// Deploy Exchange contract
|
||||
exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
|
||||
exchangeArtifacts.Exchange,
|
||||
artifacts.Exchange,
|
||||
provider,
|
||||
txDefaults,
|
||||
zrxAssetData,
|
||||
|
@@ -1,8 +1,11 @@
|
||||
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 {
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
ERC20Wrapper,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -23,7 +26,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, DutchAuctionContract, DutchAuctionTestWrapper } from '../src';
|
||||
import { artifacts, DutchAuctionContract, DutchAuctionTestWrapper, WETH9Contract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@@ -82,12 +85,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,
|
||||
|
@@ -1,17 +1,11 @@
|
||||
import {
|
||||
artifacts as proxyArtifacts,
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
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 { ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -34,7 +28,7 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, OrderMatcherContract } from '../src';
|
||||
import { artifacts, ExchangeFillEventArgs, OrderMatcherContract } from '../src';
|
||||
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
chaiSetup.configure();
|
||||
@@ -104,14 +98,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 +190,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 +444,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 +482,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 +719,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 +764,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 +781,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,
|
||||
|
@@ -1,7 +1,12 @@
|
||||
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 {
|
||||
DummyERC20TokenContract,
|
||||
DummyERC721TokenContract,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -74,7 +79,7 @@ describe('OrderValidator', () => {
|
||||
|
||||
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
|
||||
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
|
||||
exchangeArtifacts.Exchange,
|
||||
artifacts.Exchange,
|
||||
provider,
|
||||
txDefaults,
|
||||
zrxAssetData,
|
||||
|
@@ -1,6 +1,4 @@
|
||||
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 { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import {
|
||||
FillResults,
|
||||
formatters,
|
||||
@@ -8,15 +6,15 @@ import {
|
||||
OrderInfo,
|
||||
orderUtils,
|
||||
TransactionFactory,
|
||||
Web3ProviderEngine,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { BalanceThresholdFilterContract } from '../../generated-wrappers/balance_threshold_filter';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { artifacts, BalanceThresholdFilterContract } from '../../src';
|
||||
|
||||
export class BalanceThresholdWrapper {
|
||||
private readonly _balanceThresholdFilter: BalanceThresholdFilterContract;
|
||||
@@ -28,18 +26,13 @@ export class BalanceThresholdWrapper {
|
||||
balanceThresholdFilter: BalanceThresholdFilterContract,
|
||||
exchangeContract: ExchangeContract,
|
||||
signerTransactionFactory: TransactionFactory,
|
||||
provider: Provider,
|
||||
provider: Web3ProviderEngine,
|
||||
) {
|
||||
this._balanceThresholdFilter = balanceThresholdFilter;
|
||||
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 +220,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,
|
||||
|
@@ -1,10 +1,7 @@
|
||||
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 { LogDecoder, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { DutchAuctionDetails, SignedOrder } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { DutchAuctionContract } from '../../generated-wrappers/dutch_auction';
|
||||
@@ -15,15 +12,10 @@ export class DutchAuctionTestWrapper {
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
|
||||
constructor(contractInstance: DutchAuctionContract, provider: Provider) {
|
||||
constructor(contractInstance: DutchAuctionContract, provider: Web3ProviderEngine) {
|
||||
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
|
||||
|
@@ -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"]
|
||||
}
|
||||
|
@@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "2.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,26 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.6 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -2,11 +2,9 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -20,10 +18,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"
|
||||
]
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user