Compare commits
631 Commits
0x.js@3.0.
...
@0x/contra
Author | SHA1 | Date | |
---|---|---|---|
|
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 | ||
|
dbb3c5e32b | ||
|
265df31750 | ||
|
9bbe56df0b | ||
|
879c795fc4 | ||
|
8b5bb97537 | ||
|
3d7a635543 | ||
|
b3ae9e6e25 | ||
|
023ea5b3a1 | ||
|
2ad6bd3945 | ||
|
2326dcdb12 | ||
|
b5eb47f609 | ||
|
af4ed0f39c | ||
|
eac254f925 | ||
|
8246dec843 | ||
|
4514da0646 | ||
|
9abd6f5695 | ||
|
a394967268 | ||
|
c7c4cb9bc6 | ||
|
1ada679663 | ||
|
9552676783 | ||
|
69c7c03fb3 | ||
|
224a58bdf2 | ||
|
98427b715d | ||
|
a8078aa151 | ||
|
7b583cecb2 | ||
|
f3d9520db2 | ||
|
9de4bf1225 | ||
|
3cb6744369 | ||
|
e021460f03 | ||
|
0a93f3346f | ||
|
332cc14dcd | ||
|
52e287fc7d | ||
|
7885b2e3f8 | ||
|
e6683e46cc | ||
|
2447c72a5c | ||
|
4febabd3e7 | ||
|
4b4bfee1bc | ||
|
d7c9d73349 | ||
|
09a5b6e7a3 | ||
|
703aa38a17 | ||
|
b2f35057a5 | ||
|
a3198b7df8 | ||
|
db900d180c | ||
|
3d2ed57c08 | ||
|
d0b0c4a917 | ||
|
a1bf5e8261 | ||
|
74293d5bc8 | ||
|
50cad8d260 | ||
|
52f22aad81 | ||
|
c03e24e10b | ||
|
995a2ef8a0 | ||
|
4d75681357 | ||
|
1a88eac9c7 | ||
|
47357ddec8 | ||
|
129ae3a737 | ||
|
31d1390039 | ||
|
6943bbcacb | ||
|
1d3fff32a2 | ||
|
069c9fd4a6 | ||
|
4f3cab4213 | ||
|
42c13ecafa | ||
|
70158c3a99 | ||
|
ae8d2ae2cb | ||
|
79adf5cec6 | ||
|
26d44a5392 | ||
|
149f8bc9b3 | ||
|
78bdc2d6b4 | ||
|
c9facdf825 | ||
|
4986a2f940 | ||
|
9fd372da51 | ||
|
68194fde0a | ||
|
155e73dc70 | ||
|
76a1ff7c40 | ||
|
da357f7599 | ||
|
4efe941937 | ||
|
612d2dbde1 | ||
|
0c9369bf04 | ||
|
94043380bb | ||
|
96e880d170 | ||
|
3d8caa4694 | ||
|
4996ae8d9d | ||
|
7b4a0d4f8a | ||
|
c2ad95fd94 | ||
|
5ad2e9d6b6 | ||
|
8bac655dc1 | ||
|
e29f130285 | ||
|
f9d4afd713 | ||
|
d6b6f1e7d9 | ||
|
ea5e78b217 | ||
|
c9a7ef18dc | ||
|
e23f90e41c | ||
|
e1244648e0 | ||
|
8d72e253c8 | ||
|
33ed6a7c06 | ||
|
c82a4a5760 | ||
|
445a629016 | ||
|
be7daae91a | ||
|
ba645692b0 | ||
|
08f541535b | ||
|
3520d2584e | ||
|
141ac0ca0b | ||
|
0c12128f64 | ||
|
1e939591ae | ||
|
25e42c0ad4 | ||
|
1c032a103d | ||
|
e0022cd98c | ||
|
68dbf8b2a7 | ||
|
a9ca1f3174 | ||
|
bcff25c996 | ||
|
e272f8e1d9 | ||
|
5b06595a6b | ||
|
44aafe4d78 | ||
|
92cbff67d1 | ||
|
2166f57750 | ||
|
726a52f3ee | ||
|
64424deb41 | ||
|
69025da2dc | ||
|
09cb3b7d50 | ||
|
8566bb551b | ||
|
f631c2da06 | ||
|
19064f8cbb | ||
|
de36670bdc | ||
|
e8d68dc07f | ||
|
f81149ac2b | ||
|
ef928aff31 | ||
|
6f090a2fda | ||
|
c690364ec6 | ||
|
cc48433575 | ||
|
fe1ef930ad | ||
|
8ce885089e | ||
|
3e910c0e03 | ||
|
7c47c52fac | ||
|
744fa22f01 | ||
|
b3f996595f | ||
|
148f12a753 | ||
|
aedd6503d1 | ||
|
c3ecbd3063 | ||
|
3297b5ea34 | ||
|
19f929761b | ||
|
d8890a03bb | ||
|
4a6bdfae23 | ||
|
7015fc4dbc | ||
|
ab4d4a69ec | ||
|
efbfd08aa0 | ||
|
f9c29c3e74 | ||
|
0758f231e2 | ||
|
9fa8619590 | ||
|
174daa97c3 | ||
|
43de20930b | ||
|
4a4c26a2e3 | ||
|
e2fe907de0 | ||
|
f9986a6342 | ||
|
8d367a09fe | ||
|
7e60138e9d | ||
|
e5c4390489 | ||
|
dabcd2cf47 | ||
|
61910f264c | ||
|
ddb0e29253 | ||
|
9d9ab2f1ee | ||
|
ce65ac0c1c | ||
|
98203bcc8c | ||
|
bee48d1d43 | ||
|
ebbb4df227 | ||
|
da7c969eeb | ||
|
310d981990 | ||
|
6275b7ba3b | ||
|
b22a6b4e09 | ||
|
b5fd3c72a0 | ||
|
bf65332763 | ||
|
3973dec994 | ||
|
c8212f1d4d | ||
|
e6fe728bcb | ||
|
bef30e4209 | ||
|
6c7f4c13fa | ||
|
662049914a | ||
|
d7a5190d52 | ||
|
2b64661c61 | ||
|
9c29eecc30 | ||
|
25b58108bc | ||
|
fbde36d27b | ||
|
02b7a43909 | ||
|
e1e531a2a4 | ||
|
f6edf27856 | ||
|
277e09d061 | ||
|
1c9fb5f65f | ||
|
c29539aaf2 | ||
|
4143baa27a | ||
|
5816279d68 | ||
|
0d877a8076 | ||
|
7b266bc762 | ||
|
0e6aea856f | ||
|
e31d17ef79 | ||
|
7b2a9ba698 | ||
|
87d08b0af6 | ||
|
e68c5d5517 | ||
|
c09825660c | ||
|
293e937291 | ||
|
fe2f97dabd | ||
|
0b23aaca26 | ||
|
d92dc47df8 | ||
|
8b69d918a9 | ||
|
3b79754b7a | ||
|
92ec4f5772 | ||
|
8528660f50 | ||
|
edd4370cdb | ||
|
69aa1c2e91 | ||
|
fcdd0de9ee | ||
|
4c5bde1b54 | ||
|
83f77a2d56 | ||
|
cdac2d210e | ||
|
737941e8c7 | ||
|
a873872cc7 | ||
|
56b8fd2074 | ||
|
b2ea4f6aaf | ||
|
ca5b024e03 | ||
|
92f5ad4f15 | ||
|
ff8250cd35 | ||
|
466ec6b22a | ||
|
beaf0a4a8a | ||
|
6871f36dad | ||
|
a587718443 | ||
|
444250520a | ||
|
bd5850f390 | ||
|
ce1c2eeab7 | ||
|
b08d6c3b4d | ||
|
f269bc28cf | ||
|
af63934d2c | ||
|
39816bef8f | ||
|
600b44c962 | ||
|
7a2b312d64 | ||
|
7d166dc7da | ||
|
0720b8487c | ||
|
4404f92b38 | ||
|
0a27979464 | ||
|
a3cb722469 | ||
|
2cca2d70d7 | ||
|
17f313658d | ||
|
d304c062eb | ||
|
3eef888e25 | ||
|
20eab4257a | ||
|
665dd0813e | ||
|
e84232cce8 | ||
|
de78d6a8ad | ||
|
a085654aba | ||
|
61c88455f4 | ||
|
a084bbbed8 | ||
|
eb393f0a66 | ||
|
c3afc13dd6 | ||
|
08b865d25b | ||
|
9932240a4d | ||
|
f570f80674 | ||
|
dbae6ec165 | ||
|
7c37d10d1f | ||
|
ae147e615a | ||
|
18084588ea | ||
|
64d99dc07c | ||
|
91b57793c2 | ||
|
63a63543be | ||
|
75a4bbc5f2 | ||
|
c2ec4174b7 | ||
|
7ea274b731 | ||
|
d9675ad6d3 | ||
|
a8e32d8c87 | ||
|
16a2cf7be6 | ||
|
b4621f6a69 | ||
|
c859788fde | ||
|
1c25d8e997 | ||
|
fc89b97818 | ||
|
b0817854e8 | ||
|
1907ecc02e | ||
|
cf2dee60dc | ||
|
80aa2884a3 | ||
|
3a28eb1c6a | ||
|
82a44559f6 | ||
|
892be49b98 | ||
|
1cbc03ae43 | ||
|
1c9a49cd08 | ||
|
4f53335db0 | ||
|
0b87aec9c6 | ||
|
6892f929fb | ||
|
f39c03191c | ||
|
05adb38a09 | ||
|
f73c68ee61 | ||
|
33f3405226 | ||
|
86caa4a0bb | ||
|
6d832deb62 | ||
|
0b6c9c8468 | ||
|
d1fd4421be | ||
|
b06f8239e1 | ||
|
7991de9ed0 | ||
|
e9a82905e3 | ||
|
f8684d6a77 | ||
|
e4551c8f60 | ||
|
2f1454e90e | ||
|
b89f986949 | ||
|
285fb3dead | ||
|
923234eed1 | ||
|
affd617054 | ||
|
84163517c6 | ||
|
83b46cbf71 | ||
|
4689309857 | ||
|
02543fdd0c | ||
|
1f7179b178 | ||
|
e14f1646d6 | ||
|
caba2faa92 | ||
|
ed3b89f005 | ||
|
1c279f97ce | ||
|
b41bcd80ef | ||
|
45d70dd30b | ||
|
4b9648c7c9 | ||
|
092a851bb3 | ||
|
bd71f4a480 | ||
|
bf183af9a4 | ||
|
2b8f0d887a | ||
|
2581bc93e5 | ||
|
8b62783f48 | ||
|
2345a3bdfe | ||
|
ab5cd8f938 | ||
|
b108b1119a | ||
|
b5420fde52 | ||
|
dc58c60841 | ||
|
043fb3f460 | ||
|
34cce04c43 | ||
|
6aae0c5b78 | ||
|
c15406173a | ||
|
e3b3f82c8c | ||
|
007a2d7deb | ||
|
5da40ab45e | ||
|
54a1fd87db | ||
|
797d7c7878 | ||
|
507c47c42c | ||
|
7fcdfe5de5 | ||
|
22b1c48c89 | ||
|
2197a531e3 | ||
|
4799b68972 | ||
|
500d8fc86b | ||
|
89c5d657a7 | ||
|
bc44774116 | ||
|
8a8a5332d7 | ||
|
943c378309 | ||
|
8d3bbb8213 | ||
|
a5e7ce9e1a | ||
|
64a78149aa | ||
|
cf3787edbb | ||
|
89429c54a7 | ||
|
dbaed69d77 | ||
|
faee751395 | ||
|
742e5e039d | ||
|
98579300c1 | ||
|
96ff5eef64 | ||
|
7f5a2c972b | ||
|
dad6404c7f | ||
|
6dcf40f570 | ||
|
43b0422804 | ||
|
55ce0d9d17 | ||
|
895460aea3 | ||
|
7956127b29 | ||
|
6fb2721294 | ||
|
ebb10e6604 | ||
|
db878f4a7b | ||
|
bb992458a3 | ||
|
66add14ca5 | ||
|
0b38513c3f | ||
|
d9ac5b611a | ||
|
e1b99b5e2f | ||
|
7af0818dff | ||
|
296b3d6311 | ||
|
4d03c3035c | ||
|
27c4d2522b | ||
|
4dbd3ea902 | ||
|
2cf57a48dd | ||
|
a091b2c19d | ||
|
89e398fa39 | ||
|
1192314510 | ||
|
583e690b7a | ||
|
a516b00a03 | ||
|
841ad8757c | ||
|
127bd4bf9d | ||
|
a8c3b4126e | ||
|
2360b8282f | ||
|
0dade8624c | ||
|
a9fad77eb4 | ||
|
a5b7a35160 | ||
|
53fc860d61 | ||
|
dc20429bca | ||
|
749312c0e8 | ||
|
ffd14ab2f2 | ||
|
bf332d578c | ||
|
6c22594882 | ||
|
b8e3829fdb | ||
|
c317a69e7e | ||
|
4c60d59123 | ||
|
cee2954245 | ||
|
a8d9263062 | ||
|
7ae9e79235 | ||
|
15c9479ebe | ||
|
03dea585b4 | ||
|
d7df402c42 | ||
|
052ed21e9c | ||
|
36504646f9 | ||
|
60cdbbccae | ||
|
420333e3c3 | ||
|
b639843115 | ||
|
7a114a6ef1 | ||
|
686f27a96f | ||
|
6487fae113 | ||
|
87c287a5e2 | ||
|
e39ef60775 | ||
|
fb3605026e | ||
|
241be6de30 | ||
|
589b535b91 | ||
|
eb6b07e804 | ||
|
5b8c9122a2 | ||
|
08d0ff48c3 | ||
|
aa5af04447 | ||
|
39786c3ad5 | ||
|
7f2727236d | ||
|
d6644ed035 | ||
|
a2eede2ec9 | ||
|
ea14913b41 | ||
|
5868c91cfb | ||
|
fd034cc1e4 | ||
|
d00dd07435 | ||
|
16fc2c3776 | ||
|
82f29c395a | ||
|
03248244ff | ||
|
f05d2906e8 | ||
|
2c974b5f3f | ||
|
f412c36e23 | ||
|
eae255b0ff | ||
|
1f0f2076a9 | ||
|
80f1fe1373 | ||
|
571bc736e5 | ||
|
99016cc5a6 | ||
|
f1a7efc97e | ||
|
442de09bbe | ||
|
76dde294f1 | ||
|
edb3a61387 | ||
|
89f67b9bec | ||
|
9131ca1562 | ||
|
92d45a19d1 | ||
|
65af195054 | ||
|
9f47f90c6e | ||
|
472f89bd3d | ||
|
f17fe381bf | ||
|
26977f6408 | ||
|
c8c8219c05 | ||
|
e144ebbb93 | ||
|
aa9aa1f58a | ||
|
2e2e157fc8 | ||
|
219902a169 | ||
|
ab10119c5a | ||
|
5981823ac1 | ||
|
69054d85e8 | ||
|
3e596f6a8c | ||
|
c3884dfa32 | ||
|
a3d93d17cd | ||
|
c6c45095a8 | ||
|
21d9783ef8 | ||
|
89ce87f9f1 | ||
|
592e1a3e6f | ||
|
99176c2d54 | ||
|
ad0083dfa0 | ||
|
6919409c2b | ||
|
f360b2edd6 | ||
|
339ec3e8eb | ||
|
b0c22a222e | ||
|
ea18050589 | ||
|
117726c6d8 | ||
|
31d07fdac8 | ||
|
881655bb57 | ||
|
38949f7ea4 | ||
|
8d3e6f77b7 | ||
|
5865d1f62c | ||
|
e2607980eb | ||
|
f519f5744e | ||
|
fa24ec1a04 | ||
|
6e1014a647 | ||
|
0b46f44ad3 | ||
|
b811b51af9 | ||
|
b88e2c5483 | ||
|
cd333e0977 | ||
|
62706d83c4 | ||
|
284252e7a4 | ||
|
3ad857be6c | ||
|
7fec2f630c | ||
|
c081081448 | ||
|
54bd7df900 | ||
|
5afef5fe82 | ||
|
0c222f9890 | ||
|
e43988aa44 | ||
|
ee91f56bbe | ||
|
52b49fee24 | ||
|
31f096248d | ||
|
d91c41b29c | ||
|
c27a2b64ef | ||
|
fdaffb67e8 | ||
|
d32bf15b69 | ||
|
7536648f7a | ||
|
eb2fa8e4af | ||
|
5d3d2736f5 | ||
|
0574794496 | ||
|
3a23e795ac | ||
|
2dfca078fd | ||
|
9006e8fced | ||
|
6b8f8580d8 | ||
|
eb9d802146 | ||
|
6b11ca6c1d | ||
|
4c8178fc30 | ||
|
4616d6f59d | ||
|
5cb944fe1b | ||
|
50c4909f22 | ||
|
dd8b9bf987 | ||
|
0e3cd82348 | ||
|
3d4041ecd3 | ||
|
89e439c521 | ||
|
0f97771d5a | ||
|
74f0515370 | ||
|
f17c7e4a22 | ||
|
5fe98c816d | ||
|
f75cfd8aa4 | ||
|
7577d96671 | ||
|
58f5b6d0ad | ||
|
a11348ce6b | ||
|
a4825d8748 | ||
|
e3c0363db1 | ||
|
3fdc6e5e47 | ||
|
2ef8204ab4 | ||
|
72b4ee76fb | ||
|
3901380ffb | ||
|
fb24a18f3f | ||
|
1899493ca8 | ||
|
1581ced6ec | ||
|
5e8f53c7b7 | ||
|
370d15ed1d | ||
|
43b792f307 | ||
|
b844126516 | ||
|
43e55a963b | ||
|
9cf055c159 | ||
|
16b5157078 | ||
|
1ae9f68db8 | ||
|
e5d3e3b33a | ||
|
1c8ea1336e | ||
|
a4de585feb | ||
|
e624759bc7 | ||
|
0836ab370e | ||
|
66848ef80f | ||
|
f0b9365ca9 | ||
|
614ca51cb1 | ||
|
f31f9eb24e | ||
|
bc029df082 | ||
|
63b53acd48 | ||
|
50eee9a657 | ||
|
917952bc2a | ||
|
00afb2440d | ||
|
8cf720986e | ||
|
97c54f84f0 | ||
|
e485a98143 | ||
|
1e29f2875d | ||
|
61cd36cc96 | ||
|
a9b4c1cba8 | ||
|
5187017f21 | ||
|
73ea2dac6d | ||
|
e9232bf070 | ||
|
ee3538262d | ||
|
47b281b754 | ||
|
dfa03feb43 | ||
|
49beb6b7a3 | ||
|
6066db8f42 | ||
|
68c1818139 | ||
|
12087b6b70 | ||
|
15a3c234c5 | ||
|
bf7443c985 | ||
|
6c39d498c2 | ||
|
cacb8acf76 | ||
|
c1082b9b08 | ||
|
d3c5c68296 | ||
|
39fd3fd866 | ||
|
7ed95d3954 | ||
|
4dc91c86ae | ||
|
7d7f54c751 | ||
|
580e574c84 | ||
|
736e1717fa | ||
|
d6ac1a4f78 | ||
|
8a7c61c6f4 | ||
|
9a024fdacf | ||
|
135a623b1f | ||
|
ba0b9b259f | ||
|
45a24738b5 | ||
|
585ca203b0 | ||
|
561f441a5b | ||
|
30f7f83573 | ||
|
97646571a1 | ||
|
ac60d45969 | ||
|
afa52e280c | ||
|
c57c9752a2 | ||
|
b158a6d722 | ||
|
c616b53c9c |
@@ -4,7 +4,7 @@ jobs:
|
||||
build:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
environment:
|
||||
CONTRACTS_COMMIT_HASH: '9ed05f5'
|
||||
working_directory: ~/repo
|
||||
@@ -16,7 +16,8 @@ jobs:
|
||||
command: sudo npm install --global yarn@1.9.4
|
||||
- run:
|
||||
name: yarn
|
||||
command: yarn --frozen-lockfile install || yarn --frozen-lockfile 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
|
||||
- save_cache:
|
||||
@@ -26,7 +27,7 @@ jobs:
|
||||
build-website:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -35,7 +36,7 @@ jobs:
|
||||
- run: cd packages/website && yarn build:prod
|
||||
test-contracts-ganache:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -43,13 +44,16 @@ jobs:
|
||||
- repo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run: yarn wsrun test:circleci @0x/contracts-multisig
|
||||
- run: yarn wsrun test:circleci @0x/contracts-utils
|
||||
- run: yarn wsrun test:circleci @0x/contracts-libs
|
||||
- run: yarn wsrun test:circleci @0x/contracts-tokens
|
||||
- run: yarn wsrun test:circleci @0x/contracts-exchange-libs
|
||||
- run: yarn wsrun test:circleci @0x/contracts-erc20
|
||||
- run: yarn wsrun test:circleci @0x/contracts-erc721
|
||||
- run: yarn wsrun test:circleci @0x/contracts-extensions
|
||||
- run: yarn wsrun test:circleci @0x/contracts-protocol
|
||||
- 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
|
||||
test-contracts-geth:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
- image: 0xorg/devnet
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
@@ -59,15 +63,18 @@ jobs:
|
||||
# HACK(albrow): we need to sleep 10 seconds to ensure the devnet is
|
||||
# initialized
|
||||
- run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test @0x/contracts-multisig
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-utils
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-libs
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-tokens
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-extensions
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test @0x/contracts-protocol
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-utils
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange-libs
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-erc20
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-erc721
|
||||
- run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-extensions
|
||||
- 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
|
||||
test-publish:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
- image: 0xorg/verdaccio
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
@@ -77,7 +84,7 @@ jobs:
|
||||
- run: yarn test:publish:circleci
|
||||
test-doc-generation:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -100,7 +107,7 @@ jobs:
|
||||
- ~/repo/packages/pipeline/coverage/lcov.info
|
||||
test-rest:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -118,7 +125,7 @@ jobs:
|
||||
- run: yarn wsrun test:circleci @0x/order-utils
|
||||
- run: yarn wsrun test:circleci @0x/order-watcher
|
||||
- run: yarn wsrun test:circleci @0x/sol-compiler
|
||||
- run: yarn wsrun test:circleci @0x/sol-cov
|
||||
- run: yarn wsrun test:circleci @0x/sol-tracing-utils
|
||||
- run: yarn wsrun test:circleci @0x/sol-doc
|
||||
- run: yarn wsrun test:circleci @0x/subproviders
|
||||
- run: yarn wsrun test:circleci @0x/web3-wrapper
|
||||
@@ -169,9 +176,9 @@ jobs:
|
||||
paths:
|
||||
- ~/repo/packages/sol-compiler/coverage/lcov.info
|
||||
- save_cache:
|
||||
key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
|
||||
key: coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- ~/repo/packages/sol-cov/coverage/lcov.info
|
||||
- ~/repo/packages/sol-tracing-utils/coverage/lcov.info
|
||||
- save_cache:
|
||||
key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
@@ -195,51 +202,35 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo chown -R circleci:circleci /usr/local/bin
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7
|
||||
- restore_cache:
|
||||
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/json_schemas
|
||||
cd python-packages
|
||||
python -m ensurepip
|
||||
python -m pip install .[dev]
|
||||
# HACK! installing the package should do the following
|
||||
# copy for us, but it's not working in CircleCI for some
|
||||
# reason. Zendesk support ticket raised (#43979) with
|
||||
# CircleCI.
|
||||
mkdir /usr/local/lib/python3.7/site-packages/zero_ex/json_schemas/schemas
|
||||
cp -R src/zero_ex/json_schemas/schemas/* /usr/local/lib/python3.7/site-packages/zero_ex/json_schemas/schemas
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/order_utils
|
||||
python -m ensurepip
|
||||
python -m pip install .[dev]
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/sra_client
|
||||
python -m ensurepip
|
||||
python -m pip install .[dev]
|
||||
./install
|
||||
- save_cache:
|
||||
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- '/usr/local/bin'
|
||||
- '/usr/local/lib/python3.7/site-packages'
|
||||
- '.eggs'
|
||||
- '.mypy_cache'
|
||||
- '.pytest_cache'
|
||||
- '.tox'
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/json_schemas
|
||||
coverage run setup.py test
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/order_utils
|
||||
coverage run setup.py test
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/sra_client
|
||||
coverage run setup.py test
|
||||
cd python-packages
|
||||
./cmd_pkgs_in_dep_order.py coverage run setup.py test
|
||||
- save_cache:
|
||||
key: coverage-python-contract-addresses-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- ~/repo/python-packages/contract_addresses/.coverage
|
||||
- save_cache:
|
||||
key: coverage-python-contract-artifacts-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- ~/repo/python-packages/contract_artifacts/.coverage
|
||||
- save_cache:
|
||||
key: coverage-python-contract-demo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- ~/repo/python-packages/contract_demo/.coverage
|
||||
- save_cache:
|
||||
key: coverage-python-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
@@ -259,7 +250,7 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo chown -R circleci:circleci /usr/local/bin
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7
|
||||
- restore_cache:
|
||||
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run:
|
||||
@@ -287,47 +278,31 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo chown -R circleci:circleci /usr/local/bin
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
|
||||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7
|
||||
- restore_cache:
|
||||
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/json_schemas
|
||||
python -m ensurepip
|
||||
python -m pip install .[dev]
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/order_utils
|
||||
python -m ensurepip
|
||||
python -m pip install .[dev]
|
||||
- save_cache:
|
||||
key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- '/usr/local/bin'
|
||||
- '/usr/local/lib/python3.7/site-packages'
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/json_schemas
|
||||
python setup.py lint
|
||||
- run:
|
||||
command: |
|
||||
cd python-packages/order_utils
|
||||
python setup.py lint
|
||||
cd python-packages
|
||||
./install
|
||||
./lint
|
||||
static-tests:
|
||||
working_directory: ~/repo
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- repo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run: yarn lerna run lint
|
||||
- run: yarn prettier:ci
|
||||
- run: yarn deps_versions:ci
|
||||
- run: cd packages/0x.js && yarn build:umd:prod
|
||||
- run: yarn bundlewatch
|
||||
submit-coverage:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: circleci/node:9-browsers
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -368,7 +343,7 @@ jobs:
|
||||
- coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }}
|
||||
@@ -384,6 +359,18 @@ jobs:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-contract-addresses-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-contract-artifacts-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-contract-demo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-sra-client-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- restore_cache:
|
||||
keys:
|
||||
- coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }}
|
||||
@@ -421,7 +408,9 @@ workflows:
|
||||
requires:
|
||||
- test-rest
|
||||
- test-python
|
||||
- static-tests-python:
|
||||
requires:
|
||||
- test-python
|
||||
- test-python
|
||||
- static-tests-python
|
||||
# skip python tox run for now, as we don't yet have multiple test environments to support.
|
||||
#- test-rest-python
|
||||
|
6
.github/autolabeler.yml
vendored
6
.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']
|
||||
@@ -13,7 +14,10 @@ instant: ['packages/instant']
|
||||
abi-gen-templates: ['packages/abi-gen-templates']
|
||||
abi-gen: ['packages/abi-gen']
|
||||
website: ['packages/website']
|
||||
sol-cov: ['packages/sol-cov']
|
||||
sol-coverage: ['packages/sol-coverage']
|
||||
sol-profiler: ['packages/sol-profiler']
|
||||
sol-trace: ['packages/sol-trace']
|
||||
sol-tracing-utils: ['packages/sol-tracing-utils']
|
||||
utils: ['packages/utils']
|
||||
tslint-config: ['packages/tslint-config']
|
||||
asset-buyer: ['packages/asset-buyer']
|
||||
|
24
.gitignore
vendored
24
.gitignore
vendored
@@ -83,27 +83,29 @@ packages/react-docs/example/public/bundle*
|
||||
packages/testnet-faucets/server/
|
||||
|
||||
# generated contract artifacts/
|
||||
contracts/protocol/generated-artifacts/
|
||||
contracts/exchange/generated-artifacts/
|
||||
contracts/asset-proxy/generated-artifacts/
|
||||
contracts/multisig/generated-artifacts/
|
||||
contracts/utils/generated-artifacts/
|
||||
contracts/libs/generated-artifacts/
|
||||
contracts/interfaces/generated-artifacts/
|
||||
contracts/tokens/generated-artifacts/
|
||||
contracts/examples/generated-artifacts/
|
||||
contracts/exchange-libs/generated-artifacts/
|
||||
contracts/erc20/generated-artifacts/
|
||||
contracts/erc721/generated-artifacts/
|
||||
contracts/extensions/generated-artifacts/
|
||||
packages/sol-cov/test/fixtures/artifacts/
|
||||
contracts/exchange-forwarder/generated-artifacts/
|
||||
packages/sol-tracing-utils/test/fixtures/artifacts/
|
||||
packages/metacoin/artifacts/
|
||||
|
||||
# generated contract wrappers
|
||||
packages/abi-gen-wrappers/wrappers
|
||||
contracts/protocol/generated-wrappers/
|
||||
contracts/exchange/generated-wrappers/
|
||||
contracts/asset-proxy/generated-wrappers/
|
||||
contracts/multisig/generated-wrappers/
|
||||
contracts/utils/generated-wrappers/
|
||||
contracts/libs/generated-wrappers/
|
||||
contracts/interfaces/generated-wrappers/
|
||||
contracts/tokens/generated-wrappers/
|
||||
contracts/examples/generated-wrappers/
|
||||
contracts/exchange-libs/generated-wrappers/
|
||||
contracts/erc20/generated-wrappers/
|
||||
contracts/erc721/generated-wrappers/
|
||||
contracts/extensions/generated-wrappers/
|
||||
contracts/exchange-forwarder/generated-wrappers/
|
||||
packages/metacoin/src/contract_wrappers
|
||||
|
||||
# solc-bin in sol-compiler
|
||||
|
@@ -1,32 +1,35 @@
|
||||
lib
|
||||
.nyc_output
|
||||
/contracts/protocol/generated-wrappers
|
||||
/contracts/protocol/generated-artifacts
|
||||
/contracts/exchange/generated-wrappers
|
||||
/contracts/exchange/generated-artifacts
|
||||
/contracts/asset-proxy/generated-wrappers
|
||||
/contracts/asset-proxy/generated-artifacts
|
||||
/contracts/multisig/generated-wrappers
|
||||
/contracts/multisig/generated-artifacts
|
||||
/contracts/utils/generated-wrappers
|
||||
/contracts/utils/generated-artifacts
|
||||
/contracts/libs/generated-wrappers
|
||||
/contracts/libs/generated-artifacts
|
||||
/contracts/interfaces/generated-wrappers
|
||||
/contracts/interfaces/generated-artifacts
|
||||
/contracts/tokens/generated-wrappers
|
||||
/contracts/tokens/generated-artifacts
|
||||
/contracts/examples/generated-wrappers
|
||||
/contracts/examples/generated-artifacts
|
||||
/contracts/exchange-libs/generated-wrappers
|
||||
/contracts/exchange-libs/generated-artifacts
|
||||
/contracts/erc20/generated-wrappers
|
||||
/contracts/erc20/generated-artifacts
|
||||
/contracts/erc721/generated-wrappers
|
||||
/contracts/erc721/generated-artifacts
|
||||
/contracts/extensions/generated-wrappers
|
||||
/contracts/extensions/generated-artifacts
|
||||
/contracts/exchange-forwarder/generated-wrappers
|
||||
/contracts/exchange-forwarder/generated-artifacts
|
||||
/packages/abi-gen-wrappers/src/generated-wrappers
|
||||
/packages/contract-artifacts/artifacts
|
||||
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
|
||||
/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts
|
||||
/packages/json-schemas/schemas
|
||||
/python-packages/json_schemas/src/zero_ex/json_schemas/schemas
|
||||
/packages/metacoin/src/contract_wrappers
|
||||
/packages/metacoin/artifacts
|
||||
/packages/sra-spec/public/
|
||||
/packages/dev-tools-pages/ts/**/data.json
|
||||
package.json
|
||||
scripts/postpublish_utils.js
|
||||
packages/sol-cov/test/fixtures/artifacts
|
||||
packages/sol-coverage/test/fixtures/artifacts
|
||||
.pytest_cache
|
||||
.mypy_cache
|
||||
.tox
|
||||
|
@@ -24,7 +24,10 @@ packages/metacoin/ @LogvinovLeon
|
||||
packages/monorepo-scripts/ @fabioberger
|
||||
packages/order-utils/ @fabioberger @LogvinovLeon
|
||||
packages/sol-compiler/ @LogvinovLeon
|
||||
packages/sol-cov/ @LogvinovLeon
|
||||
packages/sol-coverage/ @LogvinovLeon
|
||||
packages/sol-profiler/ @LogvinovLeon
|
||||
packages/sol-trace/ @LogvinovLeon
|
||||
packages/sol-tracing-utils/ @LogvinovLeon
|
||||
packages/sol-resolver/ @LogvinovLeon
|
||||
packages/subproviders/ @fabioberger @dekz
|
||||
packages/verdaccio/ @albrow
|
||||
|
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
|
@@ -12,26 +12,26 @@ We welcome contributions from anyone on the internet and are grateful for even t
|
||||
|
||||
Before removing the `[WIP]` tag and submitting the PR for review, make sure:
|
||||
|
||||
* It passes our linter checks (`yarn lint`)
|
||||
* It is properly formatted with Prettier (`yarn prettier`)
|
||||
* It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks)
|
||||
* You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries.
|
||||
* Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes)
|
||||
- It passes our linter checks (`yarn lint`)
|
||||
- It is properly formatted with Prettier (`yarn prettier`)
|
||||
- It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks)
|
||||
- You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries.
|
||||
- Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes)
|
||||
|
||||
### Branch structure
|
||||
|
||||
We have two main branches:
|
||||
|
||||
* `master` represents the most recently released (published on npm) version of the codebase.
|
||||
* `development` represents the current development state of the codebase.
|
||||
- `master` represents the most recently released (published on npm) version of the codebase.
|
||||
- `development` represents the current development state of the codebase.
|
||||
|
||||
ALL PRs should be opened against `development`.
|
||||
|
||||
Branch names should be prefixed with `fix`, `feature` or `refactor`.
|
||||
|
||||
* e.g `fix/broken-wiki-link`
|
||||
* If the PR only edits a single package, add it's name too
|
||||
* e.g `fix/website/broken-wiki-link`
|
||||
- e.g `fix/broken-wiki-link`
|
||||
- If the PR only edits a single package, add it's name too
|
||||
- e.g `fix/website/broken-wiki-link`
|
||||
|
||||
### CHANGELOGs
|
||||
|
||||
@@ -67,8 +67,8 @@ If you want to change a rule, or add a custom rule, please make these changes to
|
||||
|
||||
Integrate it into your text editor:
|
||||
|
||||
* VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
|
||||
* Atom: [linter-tslint](https://atom.io/packages/linter-tslint)
|
||||
- VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
|
||||
- Atom: [linter-tslint](https://atom.io/packages/linter-tslint)
|
||||
|
||||
#### Auto-formatter
|
||||
|
||||
@@ -76,8 +76,8 @@ We use [Prettier](https://prettier.io/) to auto-format our code. Be sure to eith
|
||||
|
||||
If using the Atom text editor, we recommend you install the following packages:
|
||||
|
||||
* VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
||||
* Atom: [prettier-atom](https://atom.io/packages/prettier-atom)
|
||||
- VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
||||
- Atom: [prettier-atom](https://atom.io/packages/prettier-atom)
|
||||
|
||||
## Unenforced coding conventions
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
<!--- The following points should be used to indicate the progress of your PR. Put an `x` in all the boxes that apply right now, and come back over time and check them off as you make progress. If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
|
||||
* [ ] Prefix PR title with `[WIP]` if necessary.
|
||||
* [ ] Add tests to cover changes as needed.
|
||||
* [ ] Update documentation as needed.
|
||||
* [ ] Add new entries to the relevant CHANGELOG.jsons.
|
||||
- [ ] Prefix PR title with `[WIP]` if necessary.
|
||||
- [ ] Add tests to cover changes as needed.
|
||||
- [ ] Update documentation as needed.
|
||||
- [ ] Add new entries to the relevant CHANGELOG.jsons.
|
||||
|
44
README.md
44
README.md
@@ -24,11 +24,28 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
|
||||
|
||||
### Python Packages
|
||||
|
||||
| Package | Version | Description |
|
||||
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| [`0x-json-schemas`](/python-packages/json_schemas) | [](https://pypi.org/project/0x-json-schemas/) | 0x-related JSON schemas |
|
||||
| [`0x-order-utils`](/python-packages/order_utils) | [](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders |
|
||||
| [`0x-sra-client`](/python-packages/sra_client) | [](https://pypi.org/project/0x-sra-client/) | A Python client for interacting with servers conforming to the Standard Relayer API specification |
|
||||
| Package | Version | Description |
|
||||
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| [`0x-contract-addresses`](/python-packages/contract_addresses) | [](https://pypi.org/project/0x-contract-addresses/) | A tiny utility library for getting known deployed contract addresses for a particular network |
|
||||
| [`0x-contract-artifacts`](/python-packages/contract_artifacts) | [](https://pypi.org/project/0x-contract-artifacts/) | 0x smart contract compilation artifacts |
|
||||
| [`0x-json-schemas`](/python-packages/json_schemas) | [](https://pypi.org/project/0x-json-schemas/) | 0x-related JSON schemas |
|
||||
| [`0x-order-utils`](/python-packages/order_utils) | [](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders |
|
||||
| [`0x-sra-client`](/python-packages/sra_client) | [](https://pypi.org/project/0x-sra-client/) | A Python client for interacting with servers conforming to the Standard Relayer API specification |
|
||||
|
||||
### Solidity Packages
|
||||
|
||||
| Package | Version | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`@0x/contracts-asset-proxy`](/contracts/asset-proxy) | [](https://www.npmjs.com/package/@0x/contracts-asset-proxy) | [`AssetProxy`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy) contracts used within the protocol |
|
||||
| [`@0x/contracts-erc20`](/contracts/erc20) | [](https://www.npmjs.com/package/@0x/contracts-erc20) | Implementations of various ERC20 tokens |
|
||||
| [`@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-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 |
|
||||
|
||||
### Typescript/Javascript Packages
|
||||
|
||||
@@ -55,7 +72,9 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
|
||||
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [](https://www.npmjs.com/package/@0x/web3-wrapper) | An Ethereum JSON RPC client |
|
||||
| [`@0x/sol-compiler`](/packages/sol-compiler) | [](https://www.npmjs.com/package/@0x/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. |
|
||||
| [`@0x/sol-cov`](/packages/sol-cov) | [](https://www.npmjs.com/package/@0x/sol-cov) | A solidity test coverage tool |
|
||||
| [`@0x/sol-coverage`](/packages/sol-coverage) | [](https://www.npmjs.com/package/@0x/sol-coverage) | A solidity test coverage tool |
|
||||
| [`@0x/sol-profiler`](/packages/sol-profiler) | [](https://www.npmjs.com/package/@0x/sol-profiler) | A solidity gas cost profiler |
|
||||
| [`@0x/sol-trace`](/packages/sol-trace) | [](https://www.npmjs.com/package/@0x/sol-trace) | A solidity stack trace tool |
|
||||
| [`@0x/sol-resolver`](/packages/sol-resolver) | [](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies |
|
||||
| [`@0x/subproviders`](/packages/subproviders) | [](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) |
|
||||
| [`@0x/sol-doc`](/packages/sol-doc) | [](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator |
|
||||
@@ -80,7 +99,6 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
|
||||
|
||||
| Package | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| [`@0x/contracts`](/contracts/core) | 0x protocol solidity smart contracts & tests |
|
||||
| [`@0x/instant`](/packages/instant) | A free and flexible way to offer simple crypto purchasing in any app or website. |
|
||||
| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
|
||||
| [`@0x/website`](/packages/website) | 0x website |
|
||||
@@ -130,6 +148,12 @@ To build a specific package:
|
||||
PKG=@0x/web3-wrapper yarn build
|
||||
```
|
||||
|
||||
To build all contracts packages:
|
||||
|
||||
```bash
|
||||
yarn build:contracts
|
||||
```
|
||||
|
||||
### Watch
|
||||
|
||||
To re-build all packages on change:
|
||||
@@ -202,3 +226,9 @@ Run a specific package's test:
|
||||
```bash
|
||||
PKG=@0x/web3-wrapper yarn test
|
||||
```
|
||||
|
||||
Run all contracts packages tests:
|
||||
|
||||
```bash
|
||||
yarn test:contracts
|
||||
```
|
||||
|
@@ -20,7 +20,7 @@ TEST_PROVIDER=geth yarn test
|
||||
|
||||
## Code coverage
|
||||
|
||||
In order to see the Solidity code coverage output generated by `@0x/sol-cov`, run:
|
||||
In order to see the Solidity code coverage output generated by `@0x/sol-coverage`, run:
|
||||
|
||||
```
|
||||
yarn test:coverage
|
||||
|
47
contracts/asset-proxy/CHANGELOG.json
Normal file
47
contracts/asset-proxy/CHANGELOG.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549547375
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fake publish to enable pinning"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549504360
|
||||
},
|
||||
{
|
||||
"timestamp": 1549452781,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549373905,
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Move all AssetProxy contracts out of contracts-protocol to new package",
|
||||
"pr": 1539
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
26
contracts/asset-proxy/CHANGELOG.md
Normal file
26
contracts/asset-proxy/CHANGELOG.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _February 7, 2019_
|
||||
|
||||
* Fake publish to enable pinning
|
||||
|
||||
## v1.0.2 - _February 6, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _February 5, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0 - _Invalid date_
|
||||
|
||||
* Move all AssetProxy contracts out of contracts-protocol to new package (#1539)
|
47
contracts/asset-proxy/DEPLOYS.json
Normal file
47
contracts/asset-proxy/DEPLOYS.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"name": "MultiAssetProxy",
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add MultiAssetProxy implementation",
|
||||
"pr": 1224,
|
||||
"networks": {
|
||||
"3": "0xab8fbd189c569ccdee3a4d929bb7f557be4028f6",
|
||||
"4": "0xb34cde0ad3a83d04abebc0b66e75196f22216621",
|
||||
"42": "0xf6313a772c222f51c28f2304c0703b8cf5428fd8"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ERC20Proxy",
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "protocol v2 deploy",
|
||||
"networks": {
|
||||
"1": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
|
||||
"3": "0xb1408f4c245a23c31b98d2c626777d4c0d766caa",
|
||||
"4": "0x3e809c563c15a295e832e37053798ddc8d6c8dab",
|
||||
"42": "0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ERC721Proxy",
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "protocol v2 deploy",
|
||||
"networks": {
|
||||
"1": "0x208e41fb445f1bb1b6780d58356e81405f3e6127",
|
||||
"3": "0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4",
|
||||
"4": "0x8e1ff02637cb5e39f2fa36c14706aa348b065b09",
|
||||
"42": "0x2a9127c745688a165106c11cd4d647d2220af821"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,15 +1,14 @@
|
||||
## Contracts
|
||||
## AssetProxy
|
||||
|
||||
Smart contracts that implement the 0x protocol. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [CHANGELOG](./CHANGELOG.json) of this package.
|
||||
This package contains the implementations of all of the [`AssetProxy`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy) contracts available within the 0x protocol. These contracts are responsible for decoding the `assetData` sent to them and performing the actual transfer of assets. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [DEPLOYS](./DEPLOYS.json) file within this package.
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
|
||||
**Install**
|
||||
|
||||
* [protocol](./contracts/protocol)
|
||||
* This directory contains the contracts that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
|
||||
* [test](./contracts/test)
|
||||
* This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
|
||||
```bash
|
||||
npm install @0x/contracts-asset-proxy --save
|
||||
```
|
||||
|
||||
## Bug bounty
|
||||
|
||||
@@ -42,13 +41,13 @@ yarn install
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-protocol yarn build
|
||||
PKG=@0x/contracts-asset-proxy yarn build
|
||||
```
|
||||
|
||||
Or continuously rebuild on change:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-protocol yarn watch
|
||||
PKG=@0x/contracts-asset-proxy yarn watch
|
||||
```
|
||||
|
||||
### Clean
|
33
contracts/asset-proxy/compiler.json
Normal file
33
contracts/asset-proxy/compiler.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
"abi",
|
||||
"evm.bytecode.object",
|
||||
"evm.bytecode.sourceMap",
|
||||
"evm.deployedBytecode.object",
|
||||
"evm.deployedBytecode.sourceMap"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"contracts": [
|
||||
"@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"
|
||||
]
|
||||
}
|
@@ -18,9 +18,9 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "./mixins/MAssetProxyDispatcher.sol";
|
||||
import "@0x/contracts-interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol";
|
||||
import "./interfaces/IAssetProxy.sol";
|
||||
|
||||
|
||||
contract MixinAssetProxyDispatcher is
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "./mixins/MAuthorizable.sol";
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../Exchange/MixinAssetProxyDispatcher.sol";
|
||||
import "./MixinAssetProxyDispatcher.sol";
|
||||
import "./MixinAuthorizable.sol";
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/IOwnable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/interfaces/IOwnable.sol";
|
||||
|
||||
|
||||
contract IAuthorizable is
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol";
|
||||
import "../interfaces/IAssetProxyDispatcher.sol";
|
||||
|
||||
|
||||
contract MAssetProxyDispatcher is
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol";
|
||||
import "../interfaces/IAuthorizable.sol";
|
||||
|
||||
|
||||
contract MAuthorizable is
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-protocol",
|
||||
"version": "2.2.0",
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "1.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -29,10 +29,12 @@
|
||||
"profiler:report:html": "istanbul report html && open coverage/index.html",
|
||||
"coverage:report:lcov": "istanbul report lcov",
|
||||
"test:circleci": "yarn test",
|
||||
"contracts:gen": "contracts-gen",
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"abis": "generated-artifacts/@(AssetProxyOwner|ERC20Proxy|ERC721Proxy|Exchange|MixinAuthorizable|MultiAssetProxy|TestSignatureValidator|TestAssetProxyOwner|TestAssetProxyDispatcher|TestExchangeInternals|TestStaticCallReceiver).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,49 +46,38 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^1.0.20",
|
||||
"@0x/dev-utils": "^1.0.22",
|
||||
"@0x/sol-compiler": "^2.0.0",
|
||||
"@0x/sol-cov": "^2.1.17",
|
||||
"@0x/subproviders": "^2.1.9",
|
||||
"@0x/tslint-config": "^2.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@0x/abi-gen": "^2.0.2",
|
||||
"@0x/contracts-gen": "^1.0.1",
|
||||
"@0x/dev-utils": "^2.0.2",
|
||||
"@0x/sol-compiler": "^3.0.2",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^2.0.1",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^4.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"solhint": "^1.4.1",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1",
|
||||
"yargs": "^10.0.3"
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^3.0.11",
|
||||
"@0x/contracts-examples": "^1.0.3",
|
||||
"@0x/contracts-interfaces": "^1.0.3",
|
||||
"@0x/contracts-libs": "^1.0.3",
|
||||
"@0x/contracts-multisig": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^1.0.3",
|
||||
"@0x/contracts-tokens": "^1.0.3",
|
||||
"@0x/contracts-utils": "^1.0.3",
|
||||
"@0x/order-utils": "^3.1.0",
|
||||
"@0x/types": "^1.5.0",
|
||||
"@0x/typescript-typings": "^3.0.6",
|
||||
"@0x/utils": "^2.1.1",
|
||||
"@0x/web3-wrapper": "^3.2.2",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^4.0.2",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/contracts-erc721": "1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.3",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.0.1",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.3",
|
||||
"@0x/web3-wrapper": "^4.0.2",
|
||||
"ethereum-types": "^2.0.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,
|
||||
};
|
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';
|
@@ -12,8 +12,7 @@ import { BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { MixinAuthorizableContract } from '../../generated-wrappers/mixin_authorizable';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { artifacts, MixinAuthorizableContract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
@@ -1,4 +1,3 @@
|
||||
import { artifacts as interfacesArtifacts, IAssetDataContract, IAssetProxyContract } from '@0x/contracts-interfaces';
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
@@ -9,15 +8,6 @@ import {
|
||||
txDefaults,
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import {
|
||||
artifacts as tokensArtifacts,
|
||||
DummyERC20TokenContract,
|
||||
DummyERC20TokenTransferEventArgs,
|
||||
DummyERC721ReceiverContract,
|
||||
DummyERC721TokenContract,
|
||||
DummyMultipleReturnERC20TokenContract,
|
||||
DummyNoReturnERC20TokenContract,
|
||||
} from '@0x/contracts-tokens';
|
||||
import { BlockchainLifecycle } from '@0x/dev-utils';
|
||||
import { assetDataUtils } from '@0x/order-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
@@ -26,23 +16,33 @@ import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
|
||||
import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
|
||||
import { MultiAssetProxyContract } from '../../generated-wrappers/multi_asset_proxy';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { ERC20Wrapper } from '../utils/erc20_wrapper';
|
||||
import { ERC721Wrapper } from '../utils/erc721_wrapper';
|
||||
import {
|
||||
artifacts,
|
||||
DummyERC20TokenContract,
|
||||
DummyERC20TokenTransferEventArgs,
|
||||
DummyERC721ReceiverContract,
|
||||
DummyERC721TokenContract,
|
||||
DummyMultipleReturnERC20TokenContract,
|
||||
DummyNoReturnERC20TokenContract,
|
||||
ERC20ProxyContract,
|
||||
ERC20Wrapper,
|
||||
ERC721ProxyContract,
|
||||
ERC721Wrapper,
|
||||
IAssetDataContract,
|
||||
IAssetProxyContract,
|
||||
MultiAssetProxyContract,
|
||||
} from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
const assetProxyInterface = new IAssetProxyContract(
|
||||
interfacesArtifacts.IAssetProxy.compilerOutput.abi,
|
||||
artifacts.IAssetProxy.compilerOutput.abi,
|
||||
constants.NULL_ADDRESS,
|
||||
provider,
|
||||
);
|
||||
const assetDataInterface = new IAssetDataContract(
|
||||
interfacesArtifacts.IAssetData.compilerOutput.abi,
|
||||
artifacts.IAssetData.compilerOutput.abi,
|
||||
constants.NULL_ADDRESS,
|
||||
provider,
|
||||
);
|
||||
@@ -148,7 +148,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
constants.DUMMY_TOKEN_DECIMALS,
|
||||
);
|
||||
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
tokensArtifacts.DummyNoReturnERC20Token,
|
||||
artifacts.DummyNoReturnERC20Token,
|
||||
provider,
|
||||
txDefaults,
|
||||
constants.DUMMY_TOKEN_NAME,
|
||||
@@ -157,7 +157,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
|
||||
);
|
||||
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
tokensArtifacts.DummyMultipleReturnERC20Token,
|
||||
artifacts.DummyMultipleReturnERC20Token,
|
||||
provider,
|
||||
txDefaults,
|
||||
constants.DUMMY_TOKEN_NAME,
|
||||
@@ -198,7 +198,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
// Deploy and configure ERC721 tokens and receiver
|
||||
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
|
||||
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
|
||||
tokensArtifacts.DummyERC721Receiver,
|
||||
artifacts.DummyERC721Receiver,
|
||||
provider,
|
||||
txDefaults,
|
||||
);
|
||||
@@ -259,7 +259,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(amount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(amount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(amount),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -318,7 +318,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(amount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(amount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(amount),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -562,7 +562,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc721Receiver.address,
|
||||
amount,
|
||||
);
|
||||
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
|
||||
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
|
||||
const tx = await logDecoder.getTxWithDecodedLogsAsync(
|
||||
await web3Wrapper.sendTransactionAsync({
|
||||
to: erc721Proxy.address,
|
||||
@@ -737,7 +737,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
|
||||
);
|
||||
});
|
||||
it('should dispatch an ERC20 transfer when input amount is 0', async () => {
|
||||
@@ -754,7 +754,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
inputAmount,
|
||||
);
|
||||
const erc20Balances = await erc20Wrapper.getBalancesAsync();
|
||||
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
|
||||
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
|
||||
const tx = await logDecoder.getTxWithDecodedLogsAsync(
|
||||
await web3Wrapper.sendTransactionAsync({
|
||||
to: multiAssetProxy.address,
|
||||
@@ -800,7 +800,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
|
||||
);
|
||||
});
|
||||
it('should successfully transfer multiple different ERC20 tokens', async () => {
|
||||
@@ -834,13 +834,13 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalErc20AAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenB.address].add(totalErc20BAmount),
|
||||
erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
|
||||
);
|
||||
});
|
||||
it('should transfer a single ERC721 token', async () => {
|
||||
@@ -970,7 +970,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
|
||||
);
|
||||
const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
|
||||
expect(newOwnerFromAsset).to.be.equal(toAddress);
|
||||
@@ -1008,7 +1008,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
|
||||
);
|
||||
const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
|
||||
expect(newOwnerFromAsset).to.be.equal(toAddress);
|
||||
@@ -1044,13 +1044,13 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalErc20AAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenB.address].add(totalErc20BAmount),
|
||||
erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
|
||||
);
|
||||
});
|
||||
it('should successfully transfer a large amount of tokens', async () => {
|
||||
@@ -1122,13 +1122,13 @@ describe('Asset Transfer Proxies', () => {
|
||||
erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenA.address].add(totalErc20AAmount),
|
||||
erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
|
||||
);
|
||||
expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
|
||||
);
|
||||
expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
|
||||
erc20Balances[toAddress][erc20TokenB.address].add(totalErc20BAmount),
|
||||
erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
|
||||
);
|
||||
});
|
||||
it('should revert if a single transfer fails', async () => {
|
@@ -1,13 +1,11 @@
|
||||
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { artifacts as tokensArtifacts, DummyERC20TokenContract } from '@0x/contracts-tokens';
|
||||
import { assetDataUtils } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
|
||||
|
||||
export class ERC20Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
@@ -38,7 +36,7 @@ export class ERC20Wrapper {
|
||||
for (let i = 0; i < numberToDeploy; i++) {
|
||||
this._dummyTokenContracts.push(
|
||||
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
|
||||
tokensArtifacts.DummyERC20Token,
|
||||
artifacts.DummyERC20Token,
|
||||
this._provider,
|
||||
txDefaults,
|
||||
constants.DUMMY_TOKEN_NAME,
|
@@ -1,13 +1,11 @@
|
||||
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { artifacts as tokensArtifacts, DummyERC721TokenContract } from '@0x/contracts-tokens';
|
||||
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
|
||||
|
||||
export class ERC721Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
@@ -30,7 +28,7 @@ export class ERC721Wrapper {
|
||||
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
|
||||
this._dummyTokenContracts.push(
|
||||
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
|
||||
tokensArtifacts.DummyERC721Token,
|
||||
artifacts.DummyERC721Token,
|
||||
this._provider,
|
||||
txDefaults,
|
||||
constants.DUMMY_TOKEN_NAME,
|
@@ -1,3 +1,2 @@
|
||||
export * from './exchange_wrapper';
|
||||
export * from './erc20_wrapper';
|
||||
export * from './erc721_wrapper';
|
20
contracts/asset-proxy/tsconfig.json
Normal file
20
contracts/asset-proxy/tsconfig.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"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
contracts/erc20/.solhintignore
Normal file
1
contracts/erc20/.solhintignore
Normal file
@@ -0,0 +1 @@
|
||||
contracts/src/ZRXToken.sol
|
47
contracts/erc20/CHANGELOG.json
Normal file
47
contracts/erc20/CHANGELOG.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549547375
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fake publish to enable pinning"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549504360
|
||||
},
|
||||
{
|
||||
"timestamp": 1549452781,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549373905,
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Move all ERC20 contracts out of contracts-tokens to new package",
|
||||
"pr": 1539
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
26
contracts/erc20/CHANGELOG.md
Normal file
26
contracts/erc20/CHANGELOG.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _February 7, 2019_
|
||||
|
||||
* Fake publish to enable pinning
|
||||
|
||||
## v1.0.2 - _February 6, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _February 5, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0 - _Invalid date_
|
||||
|
||||
* Move all ERC20 contracts out of contracts-tokens to new package (#1539)
|
@@ -8,6 +8,7 @@
|
||||
"networks": {
|
||||
"1": "0xe41d2489571d322189246dafa5ebde1f4699f498",
|
||||
"3": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
|
||||
"4": "0x2727e688b8fd40b198cd5fe6e408e00494a06f07",
|
||||
"42": "0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa"
|
||||
}
|
||||
}
|
@@ -1,13 +1,14 @@
|
||||
## Contract interfaces
|
||||
## ERC20 Tokens
|
||||
|
||||
Smart contract interfaces of the 0x protocol.
|
||||
This package contains implementations of various [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md) tokens, including WETH (Wrapped Ether) and ZRX. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [DEPLOYS](./DEPLOYS.json) file within this package.
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
|
||||
**Install**
|
||||
|
||||
* [protocol](./contracts/protocol)
|
||||
* This directory contains the contract interfaces that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
|
||||
```bash
|
||||
npm install @0x/contracts-erc20 --save
|
||||
```
|
||||
|
||||
## Bug bounty
|
||||
|
||||
@@ -40,13 +41,13 @@ yarn install
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-interfaces yarn build
|
||||
PKG=@0x/contracts-erc20 yarn build
|
||||
```
|
||||
|
||||
Or continuously rebuild on change:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-interfaces yarn watch
|
||||
PKG=@0x/contracts-erc20 yarn watch
|
||||
```
|
||||
|
||||
### Clean
|
32
contracts/erc20/compiler.json
Normal file
32
contracts/erc20/compiler.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
"abi",
|
||||
"evm.bytecode.object",
|
||||
"evm.bytecode.sourceMap",
|
||||
"evm.deployedBytecode.object",
|
||||
"evm.deployedBytecode.sourceMap"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"contracts": [
|
||||
"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"
|
||||
]
|
||||
}
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "./IERC20Token.sol";
|
||||
import "./interfaces/IERC20Token.sol";
|
||||
|
||||
|
||||
contract ERC20Token is
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
import "./UnlimitedAllowanceERC20Token.sol";
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "../ERC20Token/ERC20Token.sol";
|
||||
import "./ERC20Token.sol";
|
||||
|
||||
|
||||
contract UnlimitedAllowanceERC20Token is
|
150
contracts/erc20/contracts/src/ZRXToken.sol
Normal file
150
contracts/erc20/contracts/src/ZRXToken.sol
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
|
||||
Copyright 2018 ZeroEx Intl.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.4.11;
|
||||
|
||||
|
||||
contract Token {
|
||||
|
||||
/// @return total amount of tokens
|
||||
function totalSupply() constant returns (uint supply) {}
|
||||
|
||||
/// @param _owner The address from which the balance will be retrieved
|
||||
/// @return The balance
|
||||
function balanceOf(address _owner) constant returns (uint balance) {}
|
||||
|
||||
/// @notice send `_value` token to `_to` from `msg.sender`
|
||||
/// @param _to The address of the recipient
|
||||
/// @param _value The amount of token to be transferred
|
||||
/// @return Whether the transfer was successful or not
|
||||
function transfer(address _to, uint _value) returns (bool success) {}
|
||||
|
||||
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
|
||||
/// @param _from The address of the sender
|
||||
/// @param _to The address of the recipient
|
||||
/// @param _value The amount of token to be transferred
|
||||
/// @return Whether the transfer was successful or not
|
||||
function transferFrom(address _from, address _to, uint _value) returns (bool success) {}
|
||||
|
||||
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
|
||||
/// @param _spender The address of the account able to transfer the tokens
|
||||
/// @param _value The amount of wei to be approved for transfer
|
||||
/// @return Whether the approval was successful or not
|
||||
function approve(address _spender, uint _value) returns (bool success) {}
|
||||
|
||||
/// @param _owner The address of the account owning tokens
|
||||
/// @param _spender The address of the account able to transfer the tokens
|
||||
/// @return Amount of remaining tokens allowed to spent
|
||||
function allowance(address _owner, address _spender) constant returns (uint remaining) {}
|
||||
|
||||
event Transfer(address indexed _from, address indexed _to, uint _value);
|
||||
event Approval(address indexed _owner, address indexed _spender, uint _value);
|
||||
}
|
||||
|
||||
|
||||
contract ERC20Token is Token {
|
||||
|
||||
function transfer(address _to, uint _value) returns (bool) {
|
||||
//Default assumes totalSupply can't be over max (2^256 - 1).
|
||||
if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
|
||||
balances[msg.sender] -= _value;
|
||||
balances[_to] += _value;
|
||||
Transfer(msg.sender, _to, _value);
|
||||
return true;
|
||||
} else { return false; }
|
||||
}
|
||||
|
||||
function transferFrom(address _from, address _to, uint _value) returns (bool) {
|
||||
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
|
||||
balances[_to] += _value;
|
||||
balances[_from] -= _value;
|
||||
allowed[_from][msg.sender] -= _value;
|
||||
Transfer(_from, _to, _value);
|
||||
return true;
|
||||
} else { return false; }
|
||||
}
|
||||
|
||||
function balanceOf(address _owner) constant returns (uint) {
|
||||
return balances[_owner];
|
||||
}
|
||||
|
||||
function approve(address _spender, uint _value) returns (bool) {
|
||||
allowed[msg.sender][_spender] = _value;
|
||||
Approval(msg.sender, _spender, _value);
|
||||
return true;
|
||||
}
|
||||
|
||||
function allowance(address _owner, address _spender) constant returns (uint) {
|
||||
return allowed[_owner][_spender];
|
||||
}
|
||||
|
||||
mapping (address => uint) balances;
|
||||
mapping (address => mapping (address => uint)) allowed;
|
||||
uint public totalSupply;
|
||||
}
|
||||
|
||||
|
||||
contract UnlimitedAllowanceToken is ERC20Token {
|
||||
|
||||
uint constant MAX_UINT = 2**256 - 1;
|
||||
|
||||
/// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.
|
||||
/// @param _from Address to transfer from.
|
||||
/// @param _to Address to transfer to.
|
||||
/// @param _value Amount to transfer.
|
||||
/// @return Success of transfer.
|
||||
function transferFrom(address _from, address _to, uint _value)
|
||||
public
|
||||
returns (bool)
|
||||
{
|
||||
uint allowance = allowed[_from][msg.sender];
|
||||
if (balances[_from] >= _value
|
||||
&& allowance >= _value
|
||||
&& balances[_to] + _value >= balances[_to]
|
||||
) {
|
||||
balances[_to] += _value;
|
||||
balances[_from] -= _value;
|
||||
if (allowance < MAX_UINT) {
|
||||
allowed[_from][msg.sender] -= _value;
|
||||
}
|
||||
Transfer(_from, _to, _value);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
contract ZRXToken is
|
||||
UnlimitedAllowanceToken
|
||||
{
|
||||
|
||||
// solhint-disable const-name-snakecase
|
||||
uint8 constant public decimals = 18;
|
||||
uint256 public totalSupply = 10**27; // 1 billion tokens, 18 decimal places
|
||||
string constant public name = "0x Protocol Token";
|
||||
string constant public symbol = "ZRX";
|
||||
// solhint-enableconst-name-snakecase
|
||||
|
||||
function ZRXToken()
|
||||
public
|
||||
{
|
||||
balances[msg.sender] = totalSupply;
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "../ERC20Token/IERC20Token.sol";
|
||||
import "./IERC20Token.sol";
|
||||
|
||||
|
||||
contract IEtherToken is
|
@@ -18,8 +18,8 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "../../tokens/ERC20Token/MintableERC20Token.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "../src/MintableERC20Token.sol";
|
||||
|
||||
|
||||
contract DummyERC20Token is
|
@@ -19,10 +19,10 @@
|
||||
pragma solidity 0.4.24;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
|
||||
import "../../tokens/ERC20Token/ERC20Token.sol";
|
||||
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
|
||||
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||
import "../src/ERC20Token.sol";
|
||||
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||
|
||||
|
||||
// solhint-disable no-unused-vars
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-tokens",
|
||||
"version": "1.0.3",
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "1.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -29,10 +29,12 @@
|
||||
"profiler:report:html": "istanbul report html && open coverage/index.html",
|
||||
"coverage:report:lcov": "istanbul report lcov",
|
||||
"test:circleci": "yarn test",
|
||||
"contracts:gen": "contracts-gen",
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"abis": "generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|DummyERC721Receiver|InvalidERC721Receiver|DummyERC721Token|ReentrantERC20Token|ERC20Token|IERC20Token|MintableERC20Token|UnlimitedAllowanceERC20Token|ERC721Token|IERC721Receiver|IERC721Token|MintableERC721Token|IEtherToken|WETH9|ERC20Token_v1|Token_v1|UnlimitedAllowanceToken_v1|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,47 +46,36 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^1.0.20",
|
||||
"@0x/contracts-test-utils": "^1.0.3",
|
||||
"@0x/dev-utils": "^1.0.22",
|
||||
"@0x/sol-compiler": "^2.0.0",
|
||||
"@0x/sol-cov": "^2.1.17",
|
||||
"@0x/subproviders": "^2.1.9",
|
||||
"@0x/tslint-config": "^2.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@0x/abi-gen": "^2.0.2",
|
||||
"@0x/contracts-gen": "^1.0.1",
|
||||
"@0x/contracts-test-utils": "^3.0.3",
|
||||
"@0x/dev-utils": "^2.0.2",
|
||||
"@0x/sol-compiler": "^3.0.2",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^2.0.1",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^4.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"solhint": "^1.4.1",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1",
|
||||
"yargs": "^10.0.3"
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^3.0.11",
|
||||
"@0x/contracts-interfaces": "^1.0.3",
|
||||
"@0x/contracts-libs": "^1.0.3",
|
||||
"@0x/contracts-multisig": "^1.0.3",
|
||||
"@0x/contracts-utils": "^1.0.3",
|
||||
"@0x/order-utils": "^3.1.0",
|
||||
"@0x/types": "^1.5.0",
|
||||
"@0x/typescript-typings": "^3.0.6",
|
||||
"@0x/utils": "^2.1.1",
|
||||
"@0x/web3-wrapper": "^3.2.2",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.5"
|
||||
"@0x/base-contract": "^4.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.3",
|
||||
"@0x/web3-wrapper": "^4.0.2",
|
||||
"ethereum-types": "^2.0.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,
|
||||
};
|
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';
|
@@ -109,7 +109,7 @@ describe('UnlimitedAllowanceToken', () => {
|
||||
const amountToTransfer = ownerBalance;
|
||||
|
||||
const spenderAllowance = await token.allowance.callAsync(owner, spender);
|
||||
const isSpenderAllowanceInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
|
||||
const isSpenderAllowanceInsufficient = spenderAllowance.comparedTo(amountToTransfer) < 0;
|
||||
expect(isSpenderAllowanceInsufficient).to.be.true();
|
||||
|
||||
return expectContractCallFailedAsync(
|
@@ -117,7 +117,7 @@ describe('ZRXToken', () => {
|
||||
const amountToTransfer = ownerBalance;
|
||||
|
||||
const spenderAllowance = await zrxToken.allowance.callAsync(owner, spender);
|
||||
const isSpenderAllowanceInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
|
||||
const isSpenderAllowanceInsufficient = spenderAllowance.comparedTo(amountToTransfer) < 0;
|
||||
expect(isSpenderAllowanceInsufficient).to.be.true();
|
||||
|
||||
const didReturnTrue = await zrxToken.transferFrom.callAsync(owner, spender, amountToTransfer, {
|
19
contracts/erc20/tsconfig.json
Normal file
19
contracts/erc20/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"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/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"]
|
||||
}
|
47
contracts/erc721/CHANGELOG.json
Normal file
47
contracts/erc721/CHANGELOG.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549547375
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fake publish to enable pinning"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549504360
|
||||
},
|
||||
{
|
||||
"timestamp": 1549452781,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549373905,
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Move all ERC721 contracts out of contracts-tokens to new package",
|
||||
"pr": 1539
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
26
contracts/erc721/CHANGELOG.md
Normal file
26
contracts/erc721/CHANGELOG.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _February 7, 2019_
|
||||
|
||||
* Fake publish to enable pinning
|
||||
|
||||
## v1.0.2 - _February 6, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _February 5, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0 - _Invalid date_
|
||||
|
||||
* Move all ERC721 contracts out of contracts-tokens to new package (#1539)
|
1
contracts/erc721/DEPLOYS.json
Normal file
1
contracts/erc721/DEPLOYS.json
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
@@ -1,15 +1,18 @@
|
||||
## Contracts libs
|
||||
## ERC721 Tokens
|
||||
|
||||
Smart contracts libs used in the 0x protocol.
|
||||
This package contains implementations of various [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) tokens. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [DEPLOYS](./DEPLOYS.json) file within this package.
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
|
||||
**Install**
|
||||
|
||||
* [libs](./contracts/protocol)
|
||||
* This directory contains the libs.
|
||||
* [test](./contracts/test)
|
||||
* This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
|
||||
```bash
|
||||
npm install @0x/contracts-erc721 --save
|
||||
```
|
||||
|
||||
## Bug bounty
|
||||
|
||||
A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -38,13 +41,13 @@ yarn install
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-libs yarn build
|
||||
PKG=@0x/contracts-erc721 yarn build
|
||||
```
|
||||
|
||||
Or continuously rebuild on change:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-libs yarn watch
|
||||
PKG=@0x/contracts-erc721 yarn watch
|
||||
```
|
||||
|
||||
### Clean
|
@@ -1,11 +1,9 @@
|
||||
{
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -19,17 +17,12 @@
|
||||
}
|
||||
},
|
||||
"contracts": [
|
||||
"IAssetData",
|
||||
"IAssetProxy",
|
||||
"IAuthorizable",
|
||||
"IAssetProxyDispatcher",
|
||||
"IExchange",
|
||||
"IExchangeCore",
|
||||
"IMatchOrders",
|
||||
"ISignatureValidator",
|
||||
"ITransactions",
|
||||
"IValidator",
|
||||
"IWallet",
|
||||
"IWrapperFunctions"
|
||||
"src/ERC721Token.sol",
|
||||
"src/MintableERC721Token.sol",
|
||||
"src/interfaces/IERC721Receiver.sol",
|
||||
"src/interfaces/IERC721Token.sol",
|
||||
"test/DummyERC721Receiver.sol",
|
||||
"test/DummyERC721Token.sol",
|
||||
"test/InvalidERC721Receiver.sol"
|
||||
]
|
||||
}
|
@@ -18,9 +18,9 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "./IERC721Token.sol";
|
||||
import "./IERC721Receiver.sol";
|
||||
import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
|
||||
import "./interfaces/IERC721Token.sol";
|
||||
import "./interfaces/IERC721Receiver.sol";
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
|
||||
|
||||
contract ERC721Token is
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../../tokens/ERC721Token/IERC721Receiver.sol";
|
||||
import "../src/interfaces/IERC721Receiver.sol";
|
||||
|
||||
|
||||
contract DummyERC721Receiver is
|
@@ -18,8 +18,8 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../../tokens/ERC721Token/MintableERC721Token.sol";
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "../src/MintableERC721Token.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
|
||||
|
||||
// solhint-disable no-empty-blocks
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
|
||||
import "../../tokens/ERC721Token/IERC721Receiver.sol";
|
||||
import "../src/interfaces/IERC721Receiver.sol";
|
||||
|
||||
|
||||
contract InvalidERC721Receiver is
|
82
contracts/erc721/package.json
Normal file
82
contracts/erc721/package.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "1.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
"description": "Token contracts used by 0x protocol",
|
||||
"main": "lib/src/index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn pre_build && tsc -b",
|
||||
"build:ci": "yarn build",
|
||||
"pre_build": "run-s compile generate_contract_wrappers",
|
||||
"test": "yarn run_mocha",
|
||||
"rebuild_and_test": "run-s build test",
|
||||
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
|
||||
"test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
|
||||
"test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
|
||||
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
|
||||
"compile": "sol-compiler",
|
||||
"watch": "sol-compiler -w",
|
||||
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
|
||||
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
|
||||
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
|
||||
"coverage:report:text": "istanbul report text",
|
||||
"coverage:report:html": "istanbul report html && open coverage/index.html",
|
||||
"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|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|InvalidERC721Receiver|MintableERC721Token).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/0xProject/0x-monorepo/issues"
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.2",
|
||||
"@0x/contracts-gen": "^1.0.1",
|
||||
"@0x/contracts-test-utils": "^3.0.3",
|
||||
"@0x/dev-utils": "^2.0.2",
|
||||
"@0x/sol-compiler": "^3.0.2",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^4.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"solhint": "^1.4.1",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.0.3",
|
||||
"@0x/web3-wrapper": "^4.0.2",
|
||||
"ethereum-types": "^2.0.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,2 +1,2 @@
|
||||
export * from './artifacts';
|
||||
export * from './wrappers';
|
||||
export * from './artifacts';
|
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';
|
15
contracts/erc721/tsconfig.json
Normal file
15
contracts/erc721/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"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,20 +0,0 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1547040760,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1544741676,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,14 +0,0 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.3 - _January 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.2 - _December 13, 2018_
|
||||
|
||||
* Dependencies updated
|
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
"abi",
|
||||
"evm.bytecode.object",
|
||||
"evm.bytecode.sourceMap",
|
||||
"evm.deployedBytecode.object",
|
||||
"evm.deployedBytecode.sourceMap"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"contracts": ["ExchangeWrapper", "Validator", "Wallet", "Whitelist"]
|
||||
}
|
@@ -1,82 +0,0 @@
|
||||
{
|
||||
"name": "@0x/contracts-examples",
|
||||
"version": "1.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
"description": "Smart contract examples of 0x protocol",
|
||||
"main": "lib/src/index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn pre_build && tsc -b",
|
||||
"build:ci": "yarn build",
|
||||
"pre_build": "run-s compile generate_contract_wrappers",
|
||||
"compile": "sol-compiler",
|
||||
"watch": "sol-compiler -w",
|
||||
"clean": "shx rm -rf lib generated-artifacts generated-wrappers",
|
||||
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
|
||||
"lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"abis": "generated-artifacts/@(ExchangeWrapper|Validator|Wallet|Whitelist).json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/0xProject/0x-monorepo/issues"
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/examples/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^1.0.20",
|
||||
"@0x/contracts-test-utils": "^1.0.3",
|
||||
"@0x/dev-utils": "^1.0.22",
|
||||
"@0x/sol-compiler": "^2.0.0",
|
||||
"@0x/sol-cov": "^2.1.17",
|
||||
"@0x/subproviders": "^2.1.9",
|
||||
"@0x/tslint-config": "^2.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^2.0.1",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^4.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"solhint": "^1.4.1",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1",
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^3.0.11",
|
||||
"@0x/contracts-interfaces": "^1.0.3",
|
||||
"@0x/contracts-libs": "^1.0.3",
|
||||
"@0x/contracts-multisig": "^1.0.3",
|
||||
"@0x/contracts-tokens": "^1.0.3",
|
||||
"@0x/contracts-utils": "^1.0.3",
|
||||
"@0x/order-utils": "^3.1.0",
|
||||
"@0x/types": "^1.5.0",
|
||||
"@0x/typescript-typings": "^3.0.6",
|
||||
"@0x/utils": "^2.1.1",
|
||||
"@0x/web3-wrapper": "^3.2.2",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as ExchangeWrapper from '../../generated-artifacts/ExchangeWrapper.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 = {
|
||||
ExchangeWrapper: ExchangeWrapper as ContractArtifact,
|
||||
Validator: Validator as ContractArtifact,
|
||||
Wallet: Wallet as ContractArtifact,
|
||||
Whitelist: Whitelist as ContractArtifact,
|
||||
};
|
@@ -1,4 +0,0 @@
|
||||
export * from '../../generated-wrappers/exchange_wrapper';
|
||||
export * from '../../generated-wrappers/validator';
|
||||
export * from '../../generated-wrappers/wallet';
|
||||
export * from '../../generated-wrappers/whitelist';
|
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": ".",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"./generated-artifacts/ExchangeWrapper.json",
|
||||
"./generated-artifacts/Validator.json",
|
||||
"./generated-artifacts/Wallet.json",
|
||||
"./generated-artifacts/Whitelist.json"
|
||||
],
|
||||
"exclude": ["./deploy/solc/solc_bin"]
|
||||
}
|
47
contracts/exchange-forwarder/CHANGELOG.json
Normal file
47
contracts/exchange-forwarder/CHANGELOG.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549547375
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fake publish to enable pinning"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549504360
|
||||
},
|
||||
{
|
||||
"timestamp": 1549452781,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549373905,
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Move Forwarder contract out of contracts-extensions into new package",
|
||||
"pr": 1539
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
26
contracts/exchange-forwarder/CHANGELOG.md
Normal file
26
contracts/exchange-forwarder/CHANGELOG.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _February 7, 2019_
|
||||
|
||||
* Fake publish to enable pinning
|
||||
|
||||
## v1.0.2 - _February 6, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _February 5, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0 - _Invalid date_
|
||||
|
||||
* Move Forwarder contract out of contracts-extensions into new package (#1539)
|
32
contracts/exchange-forwarder/DEPLOYS.json
Normal file
32
contracts/exchange-forwarder/DEPLOYS.json
Normal file
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"name": "Forwarder",
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Round up when calculating remaining amounts in marketBuy functions",
|
||||
"pr": 1162,
|
||||
"networks": {
|
||||
"1": "0x5468a1dc173652ee28d249c271fa9933144746b1",
|
||||
"3": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
|
||||
"4": "0xd2dbf3250a764eaaa94fa0c84ed87c0edc8ed04e",
|
||||
"42": "0x17992e4ffb22730138e4b62aaa6367fa9d3699a6"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Forwarder",
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "protocol v2 deploy",
|
||||
"networks": {
|
||||
"1": "0x7afc2d5107af94c462a194d2c21b5bdd238709d6",
|
||||
"3": "0x3983e204b12b3c02fb0638caf2cd406a62e0ead3",
|
||||
"42": "0xd85e2fa7e7e252b27b01bf0d65c946959d2f45b8"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,15 +1,14 @@
|
||||
## Token contracts
|
||||
## Exchange Forwarder
|
||||
|
||||
Token smart contracts that are used in the 0x protocol. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [CHANGELOG](./CHANGELOG.json) of this package.
|
||||
This package contains the implementation of the [`Forwarder`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract. This contract is intended to improve the UX of interacting with the 0x [`Exchange`](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#exchange) contract by abstracting user approvals, converting ETH to WETH, and paying fees. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [DEPLOYS](./DEPLOYS.json) file within this package.
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
Token contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
|
||||
**Install**
|
||||
|
||||
* [tokens](./contracts/tokens)
|
||||
* This directory contains implementations of different tokens and token standards, including [wETH](https://weth.io/), ZRX, [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md), and [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md).
|
||||
* [test](./contracts/test)
|
||||
* This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
|
||||
```bash
|
||||
npm install @0x/contracts-exchange-forwarder --save
|
||||
```
|
||||
|
||||
## Bug bounty
|
||||
|
||||
@@ -42,13 +41,13 @@ yarn install
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-tokens yarn build
|
||||
PKG=@0x/contracts-exchange-forwarder yarn build
|
||||
```
|
||||
|
||||
Or continuously rebuild on change:
|
||||
|
||||
```bash
|
||||
PKG=@0x/contracts-tokens yarn watch
|
||||
PKG=@0x/contracts-exchange-forwarder yarn watch
|
||||
```
|
||||
|
||||
### Clean
|
@@ -1,11 +1,9 @@
|
||||
{
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"compilerSettings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000
|
||||
},
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
@@ -19,16 +17,10 @@
|
||||
}
|
||||
},
|
||||
"contracts": [
|
||||
"AssetProxyOwner",
|
||||
"ERC20Proxy",
|
||||
"ERC721Proxy",
|
||||
"Exchange",
|
||||
"MixinAuthorizable",
|
||||
"MultiAssetProxy",
|
||||
"TestAssetProxyOwner",
|
||||
"TestAssetProxyDispatcher",
|
||||
"TestExchangeInternals",
|
||||
"TestSignatureValidator",
|
||||
"TestStaticCallReceiver"
|
||||
"@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"
|
||||
]
|
||||
}
|
@@ -18,10 +18,10 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
|
||||
import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
|
||||
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
|
||||
import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
|
||||
import "@0x/contracts-erc721/contracts/src/interfaces/IERC721Token.sol";
|
||||
import "./libs/LibConstants.sol";
|
||||
import "./mixins/MAssets.sol";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user