Compare commits

...

287 Commits

Author SHA1 Message Date
Fabio Berger
2a344e26cc Publish
- 0x.js@4.0.2
 - @0x/asset-buyer@5.0.2
 - @0x/connect@4.0.2
 - @0x/contract-wrappers@7.0.1
 - @0x/dev-tools-pages@0.0.17
 - @0x/fill-scenarios@2.0.2
 - @0x/instant@1.0.11
 - @0x/migrations@3.0.2
 - @0x/monorepo-scripts@1.0.22
 - @0x/order-utils@6.0.0
 - @0x/order-watcher@3.0.2
 - @0x/pipeline@1.0.8
 - @0x/react-docs@2.0.2
 - @0x/react-shared@2.0.2
 - @0x/testnet-faucets@1.0.67
 - @0x/website@0.0.70
 - @0x/contracts-asset-proxy@1.0.3
 - @0x/contracts-erc20@1.0.3
 - @0x/contracts-erc721@1.0.3
 - @0x/contracts-exchange@1.0.3
 - @0x/contracts-exchange-forwarder@1.0.3
 - @0x/contracts-exchange-libs@1.0.3
 - @0x/contracts-extensions@2.0.2
 - @0x/contracts-multisig@2.0.2
 - @0x/contracts-test-utils@3.0.2
 - @0x/contracts-utils@2.0.2
2019-02-07 01:53:15 +00:00
Fabio Berger
af26403a86 Updated CHANGELOGS 2019-02-07 01:53:02 +00:00
Fabio B
3af6c8fe1d Merge pull request #1595 from 0xProject/fix-order-utils-doc-rendering
Stop exporting EIP712 schemas
2019-02-07 01:24:32 +00:00
Fabio Berger
b883b183a6 Stop exporting EIP712 schemas 2019-02-07 01:03:43 +00:00
Fabio Berger
ac58ace8cf Add CHANGELOG entry about faux publish of contract packages 2019-02-07 00:16:39 +00:00
Fabio Berger
a50eefc44e Fix paragraph rendering on wiki 2019-02-06 14:08:45 +00:00
Fabio Berger
dbb3c5e32b Publish
- 0x.js@4.0.1
 - @0x/abi-gen@2.0.1
 - @0x/abi-gen-wrappers@3.0.1
 - @0x/assert@2.0.1
 - @0x/asset-buyer@5.0.1
 - @0x/base-contract@4.0.1
 - @0x/connect@4.0.1
 - @0x/contract-wrappers@7.0.0
 - @0x/dev-tools-pages@0.0.16
 - @0x/dev-utils@2.0.1
 - @0x/fill-scenarios@2.0.1
 - @0x/instant@1.0.10
 - @0x/json-schemas@3.0.1
 - @0x/metacoin@0.0.38
 - @0x/migrations@3.0.1
 - @0x/monorepo-scripts@1.0.21
 - @0x/order-utils@5.0.0
 - @0x/order-watcher@3.0.1
 - @0x/pipeline@1.0.7
 - @0x/react-docs@2.0.1
 - @0x/react-shared@2.0.1
 - @0x/sol-compiler@3.0.1
 - @0x/sol-coverage@2.0.1
 - @0x/sol-doc@2.0.1
 - @0x/sol-profiler@2.0.2
 - @0x/sol-resolver@2.0.1
 - @0x/sol-trace@2.0.2
 - @0x/sol-tracing-utils@6.0.1
 - @0x/sra-spec@2.0.1
 - @0x/subproviders@3.0.1
 - @0x/testnet-faucets@1.0.66
 - @0x/types@2.0.1
 - @0x/utils@4.0.2
 - @0x/web3-wrapper@4.0.1
 - @0x/website@0.0.69
 - @0x/contracts-asset-proxy@1.0.2
 - @0x/contracts-erc20@1.0.2
 - @0x/contracts-erc721@1.0.2
 - @0x/contracts-exchange@1.0.2
 - @0x/contracts-exchange-forwarder@1.0.2
 - @0x/contracts-exchange-libs@1.0.2
 - @0x/contracts-extensions@2.0.1
 - @0x/contracts-multisig@2.0.1
 - @0x/contracts-test-utils@3.0.1
 - @0x/contracts-utils@2.0.1
2019-02-06 11:41:24 +00:00
Fabio Berger
265df31750 Updated CHANGELOGS 2019-02-06 11:41:12 +00:00
Fabio Berger
9bbe56df0b Fix react-highlight dep 2019-02-06 11:24:40 +00:00
Fabio Berger
879c795fc4 Fix react-highlight dep 2019-02-06 11:07:16 +00:00
Fabio B
8b5bb97537 Merge pull request #1587 from 0xProject/fix/abiEncoder/DefaultTypesOnNullInput
Handle ABI decoding NULL for all data types
2019-02-06 10:23:21 +00:00
Greg Hysen
3d7a635543 Added NULL decoding tests for return values 2019-02-05 21:33:07 -08:00
Greg Hysen
b3ae9e6e25 updated changelog for utils 2019-02-05 19:18:00 -08:00
Greg Hysen
023ea5b3a1 Ran prettier + linter 2019-02-05 18:10:17 -08:00
Greg Hysen
2ad6bd3945 Test cases for handling NULL input for all data types 2019-02-05 18:01:38 -08:00
Greg Hysen
2326dcdb12 Handle NULL input for all data types 2019-02-05 17:30:54 -08:00
Amir Bandeali
b5eb47f609 Merge pull request #1576 from 0xProject/feat/transaction-hash
Add transactionHashUtils to order-utils package
2019-02-05 10:03:30 -08:00
Amir Bandeali
af4ed0f39c Update python JSON schema for 0x transactions 2019-02-05 09:26:03 -08:00
Amir Bandeali
eac254f925 Fix outdated comments and make verifyingContractAddress a required part of the 0x tx schema 2019-02-05 09:26:03 -08:00
Amir Bandeali
8246dec843 Rename getTransactionHex to getTransactionHashHex for clarity 2019-02-05 09:26:03 -08:00
Amir Bandeali
4514da0646 Update CHANGELOGs 2019-02-05 09:26:03 -08:00
Amir Bandeali
9abd6f5695 Allow custom domains in eip712Utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
a394967268 Use new transaction schema throughout monorepo 2019-02-05 09:23:09 -08:00
Amir Bandeali
c7c4cb9bc6 Add transaction hash utils 2019-02-05 09:23:09 -08:00
Amir Bandeali
1ada679663 Update ZeroExTransactionSchema 2019-02-05 09:23:09 -08:00
Amir Bandeali
9552676783 Add schema validation to getOrderHashBuff 2019-02-05 09:23:09 -08:00
Fabio B
69c7c03fb3 Merge pull request #1580 from 0xProject/fix/preSignedSignatureBug
Fix preSigned signature bug in SignatureUtils
2019-02-05 14:36:06 +00:00
Fabio Berger
224a58bdf2 Fix dep version 2019-02-05 14:19:48 +00:00
Fabio Berger
98427b715d Merge branch 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo into fix/preSignedSignatureBug
* 'fix/preSignedSignatureBug' of github.com:0xProject/0x-monorepo:
  Update packages/order-utils/CHANGELOG.json
2019-02-05 13:57:40 +00:00
Fabio Berger
a8078aa151 merge development 2019-02-05 13:55:05 +00:00
Leonid Logvinov
7b583cecb2 Publish
- 0x.js@4.0.0
 - @0x/abi-gen@2.0.0
 - @0x/abi-gen-templates@2.0.0
 - @0x/abi-gen-wrappers@3.0.0
 - @0x/assert@2.0.0
 - @0x/asset-buyer@5.0.0
 - @0x/base-contract@4.0.0
 - @0x/connect@4.0.0
 - @0x/contract-addresses@2.2.1
 - @0x/contract-wrappers@6.0.1
 - @0x/dev-tools-pages@0.0.15
 - @0x/dev-utils@2.0.0
 - ethereum-types@2.0.0
 - @0x/fill-scenarios@2.0.0
 - @0x/instant@1.0.9
 - @0x/json-schemas@3.0.0
 - @0x/metacoin@0.0.37
 - @0x/migrations@3.0.0
 - @0x/monorepo-scripts@1.0.20
 - @0x/order-utils@4.0.0
 - @0x/order-watcher@3.0.0
 - @0x/pipeline@1.0.6
 - @0x/react-docs@2.0.0
 - @0x/react-shared@2.0.0
 - @0x/sol-compiler@3.0.0
 - @0x/sol-coverage@2.0.0
 - @0x/sol-doc@2.0.0
 - @0x/sol-profiler@2.0.1
 - @0x/sol-resolver@2.0.0
 - @0x/sol-trace@2.0.1
 - @0x/sol-tracing-utils@6.0.0
 - @0x/sra-spec@2.0.0
 - @0x/subproviders@3.0.0
 - @0x/testnet-faucets@1.0.65
 - @0x/tslint-config@3.0.0
 - @0x/types@2.0.0
 - @0x/typescript-typings@4.0.0
 - @0x/utils@4.0.1
 - @0x/web3-wrapper@4.0.0
 - @0x/website@0.0.68
 - @0x/contracts-asset-proxy@1.0.1
 - @0x/contracts-erc20@1.0.1
 - @0x/contracts-erc721@1.0.1
 - @0x/contracts-exchange@1.0.1
 - @0x/contracts-exchange-forwarder@1.0.1
 - @0x/contracts-exchange-libs@1.0.1
 - @0x/contracts-extensions@2.0.0
 - @0x/contracts-multisig@2.0.0
 - @0x/contracts-test-utils@3.0.0
 - @0x/contracts-utils@2.0.0
2019-02-05 14:50:16 +01:00
Leonid Logvinov
f3d9520db2 Updated CHANGELOGS 2019-02-05 14:50:02 +01:00
Leonid Logvinov
9de4bf1225 Fix contracts-utils versions 2019-02-05 14:29:17 +01:00
Leonid Logvinov
3cb6744369 Update packages/order-utils/CHANGELOG.json
Co-Authored-By: fabioberger <kandinsky454@protonmail.ch>
2019-02-05 13:14:31 +00:00
Fabio Berger
e021460f03 Remove .only 2019-02-05 13:09:23 +00:00
Fabio Berger
0a93f3346f All CHANGELOG entry 2019-02-05 13:07:50 +00:00
Fabio Berger
332cc14dcd Add preSigned isValidSignature test for success case using smart contract & TS implementation 2019-02-05 13:07:40 +00:00
Leonid Logvinov
52e287fc7d Fix CHANGELOGs 2019-02-05 13:57:38 +01:00
Fabio Berger
7885b2e3f8 Fix test 2019-02-05 12:56:04 +00:00
Leonid Logvinov
e6683e46cc Add CHANGELOG entries to sol-tracing-utils 2019-02-05 13:47:27 +01:00
Fabio Berger
2447c72a5c Fix heap out of memory issue 2019-02-05 12:09:13 +00:00
Leonid Logvinov
4febabd3e7 Merge pull request #1583 from reserve-protocol/development
Fix default gas limit for fake txs in TraceCollectionSubprovider
2019-02-05 12:28:05 +01:00
Leonid Logvinov
4b4bfee1bc Merge pull request #1584 from reserve-protocol/patch
Hook eth_sendRawTransaction in addition to eth_sendTransaction
2019-02-05 12:26:58 +01:00
Fabio Berger
d7c9d73349 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  update error msg for dependency version check
  CI test for dependencies to have the same version (#1556)
  Add missing comma
  Decode NULL as false
  Update blog link to not be /latest, and use constant in mobile nav
2019-02-05 11:16:45 +00:00
xianny
09a5b6e7a3 update error msg for dependency version check 2019-02-05 19:05:45 +08:00
Xianny
703aa38a17 CI test for dependencies to have the same version (#1556)
* add failing CI for dependencies with multiple versions

* update dependencies

* increase bundlewatch maxsize for 0x.js
2019-02-05 18:58:30 +08:00
Fabio B
b2f35057a5 Merge pull request #1582 from 0xProject/fix/utils/abiDecodeNullAsFalse
Decode NULL as False in Abi Encoder
2019-02-05 10:32:00 +00:00
Fabio Berger
a3198b7df8 Add missing comma 2019-02-05 09:33:16 +00:00
Greg Hysen
db900d180c Decode NULL as false 2019-02-04 16:32:14 -08:00
Jeremy Schlatter
3d2ed57c08 Hook eth_sendRawTransaction in addition to eth_sendTransaction 2019-02-04 14:33:13 -08:00
Jeremy Schlatter
d0b0c4a917 Fix default gas limit for fake txs in TraceCollectionSubprovider
This hex string is required to be prefixed with '0x'. If it does not have that
prefix, then the call to unmarshalTxData below will fail with:

	BigNumber Error: new BigNumber() not a number: 5b8d80

This default value is overridden if the incoming call already has a gas
estimate, in which case the parse error above does not happen. This is probably
why the error wasn't previously noticed.
2019-02-04 13:22:36 -08:00
Fabio Berger
a1bf5e8261 Merge branch 'development' into fix/preSignedSignatureBug
* development:
  Nit fixes to pipeline README
  fix typo
2019-02-04 19:33:08 +00:00
Steve Klebanoff
74293d5bc8 Merge pull request #1536 from 0xProject/fix/website/blog-link
[website] Change blog link
2019-02-04 08:59:03 -08:00
Fabio Berger
50cad8d260 Nit fixes to pipeline README 2019-02-04 16:04:19 +00:00
Fabio Berger
52f22aad81 Write failing preSign unit test 2019-02-04 16:03:48 +00:00
Fabio Berger
c03e24e10b Fix bug where passing in signerAddress instead of exchangeAddress 2019-02-04 16:03:25 +00:00
Fabio B
995a2ef8a0 Merge pull request #1567 from jeremyschlatter/patch-1
fix typo
2019-02-04 14:30:45 +00:00
Francesco Agosti
1d3fff32a2 Merge pull request #1559 from 0xProject/feature/pipeline/fix-missing-dex-trades
[pipeline] Fix missing DEX Trades from Bloxy
2019-02-01 18:30:57 -08:00
Amir Bandeali
069c9fd4a6 Merge pull request #1568 from smithki/fix/contract-wrappers/wrong-default-address-for-order-validator-wrapper
Use correct "orderValidator" address in OrderValidatorWrapper constructor
2019-02-01 16:04:30 -08:00
fragosti
4f3cab4213 add row deletion step to migration 2019-02-01 15:50:04 -08:00
Fabio Berger
42c13ecafa Remove DDEX library from developer tools list 2019-02-01 20:12:43 +00:00
dave4506
70158c3a99 Merge pull request #1572 from dave4506/fix/instant/input-bug-firefox
Removed number selector for firefox inputs
2019-02-01 14:15:21 -05:00
Leonid Logvinov
ae8d2ae2cb Merge pull request #1542 from 0xProject/feature/solc-docker
Implement docker as another backend for sol-compiler
2019-02-01 19:58:29 +01:00
Leonid Logvinov
79adf5cec6 Merge development 2019-02-01 19:08:56 +01:00
David Sun
26d44a5392 ran prettier on codebase 2019-02-01 12:07:21 -05:00
David Sun
149f8bc9b3 removed number selector for firefox inputs 2019-01-31 21:12:13 -05:00
dave4506
78bdc2d6b4 Merge pull request #1552 from dave4506/feature/portal/fix-highlight-state-back-to-relayers
Added a highlight state to back button
2019-01-31 19:23:49 -05:00
David Sun
c9facdf825 changed button to medium blue 2019-01-31 18:56:31 -05:00
dave4506
4986a2f940 Merge pull request #1548 from dave4506/fix/website/market-making-svg-consistency
Fixed market making website svg consistency issues
2019-01-31 17:45:10 -05:00
Ian K Smith
9fd372da51 Add CHANGELOG.json entry 2019-01-31 15:04:22 -07:00
Ian K Smith
68194fde0a Use correct "orderValidator" address in order_validator_wrapper ctor 2019-01-31 14:55:06 -07:00
dave4506
155e73dc70 Merge pull request #1551 from dave4506/feature/instant/add-usdc
Added USDC support to instant
2019-01-31 16:37:14 -05:00
Jeremy Schlatter
76a1ff7c40 fix typo 2019-01-31 12:35:26 -08:00
Jacob Evans
da357f7599 Merge pull request #1533 from 0xProject/migrations/consolidate-owner-default
Remove owner from migrations
2019-01-31 16:24:11 +10:00
fragosti
4efe941937 remove extra quotes from google-site-verification 2019-01-30 17:22:33 -08:00
Francesco Agosti
612d2dbde1 Merge pull request #1563 from 0xProject/feature/website/fix-typos-add-metatag
[website] Fix website typos and add metatag
2019-01-30 16:24:57 -08:00
fragosti
0c9369bf04 fix typo 2019-01-30 15:31:34 -08:00
fragosti
94043380bb add site verification tag 2019-01-30 15:29:42 -08:00
fragosti
96e880d170 fix typos on landing 2019-01-30 15:28:55 -08:00
F. Eugene Aumson
3d8caa4694 Fix hang in Python CI test runs (#1560) 2019-01-30 15:51:59 -05:00
fragosti
4996ae8d9d run linter 2019-01-30 10:30:50 -08:00
fragosti
7b4a0d4f8a fix bloxy datasource getDexTradesAsync to allow for tx_hash repetitions in dedupe logic 2019-01-30 10:28:06 -08:00
fragosti
c2ad95fd94 update types to adhere to new dex trades and bloxy api format 2019-01-30 10:12:15 -08:00
fragosti
5ad2e9d6b6 write migration to add trade_index primary key to dex_trades 2019-01-30 10:06:04 -08:00
fragosti
8bac655dc1 Stop omitting trades because of duplicate tx hashes 2019-01-30 09:39:59 -08:00
Francesco Agosti
e29f130285 Merge pull request #1546 from dave4506/fix/change-asset-unavail-tokens-unavail
Changed error message from "Assets Unavailable" to "Tokens Unavailable"
2019-01-30 09:23:25 -08:00
Leonid Logvinov
f9d4afd713 Merge pull request #1558 from 0xProject/fix/sol-tracing-errors
Improve error messages when unable to find bytecode
2019-01-30 14:25:50 +01:00
Fabio B
d6b6f1e7d9 Update packages/sol-trace/src/revert_trace_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 14:25:43 +01:00
Leonid Logvinov
ea5e78b217 Improve error messages when unable to find bytecode 2019-01-30 14:12:31 +01:00
Leonid Logvinov
c9a7ef18dc Merge pull request #1557 from 0xProject/fix/sol-cov/property-range-of-null
Fix the `cannot read property range of null` bug
2019-01-30 14:11:53 +01:00
Leonid Logvinov
e23f90e41c Fix the cannot read property range of null bug 2019-01-30 14:04:19 +01:00
Leonid Logvinov
e1244648e0 Rename dependencyNameToPackagePath to dependencyNameToPath 2019-01-30 13:11:18 +01:00
Leonid Logvinov
8d72e253c8 Add a comment 2019-01-30 13:11:18 +01:00
Leonid Logvinov
33ed6a7c06 Remove + concatenation 2019-01-30 13:11:18 +01:00
Leonid Logvinov
c82a4a5760 Fail fast 2019-01-30 13:11:18 +01:00
Fabio B
445a629016 Update packages/sol-compiler/src/utils/compiler.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 13:08:10 +01:00
Fabio B
be7daae91a Update packages/ethereum-types/src/index.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-30 13:03:30 +01:00
David Sun
ba645692b0 updated svg asset 2019-01-29 16:19:00 -05:00
Leonid Logvinov
08f541535b Fix naming 2019-01-28 17:37:15 +01:00
Leonid Logvinov
3520d2584e Add 'useDockerisedSolc' to new packages 2019-01-28 17:27:53 +01:00
Leonid Logvinov
141ac0ca0b Merge development 2019-01-28 17:26:13 +01:00
Leonid Logvinov
0c12128f64 Temp CI 2019-01-28 17:24:44 +01:00
David Sun
1e939591ae added USDC as an option 2019-01-26 19:26:40 -05:00
Francesco Agosti
25e42c0ad4 Merge pull request #1549 from 0xProject/justinbarry-0x-monorepo-mirror
[instant] [mirror] Output Chrome 41 compatible version of 0x instant
2019-01-25 09:22:11 -08:00
Francesco Agosti
1c032a103d Merge pull request #1508 from justinbarry/development
Output Chrome 41 compatible version of 0x instant
2019-01-25 08:51:33 -08:00
Amir Bandeali
e0022cd98c Merge pull request #1547 from 0xProject/feat/contracts/lock-dependencies
Lock versions of all dependencies that are contracts packages
2019-01-24 19:47:56 -08:00
David Sun
68dbf8b2a7 added new svg assets and modified svg code to fix transparency 2019-01-24 22:31:16 -05:00
fragosti
a9ca1f3174 Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2019-01-24 17:35:25 -08:00
Amir Bandeali
bcff25c996 Lock versions of all dependencies that are contracts packages 2019-01-24 13:47:02 -08:00
David Sun
e272f8e1d9 changed error message 2019-01-24 15:44:42 -05:00
fragosti
5b06595a6b Merge branch 'development' of https://github.com/0xProject/0x-monorepo into development 2019-01-24 12:05:44 -08:00
fragosti
44aafe4d78 feat: add Marc to website 2019-01-24 12:05:22 -08:00
Steve Klebanoff
92cbff67d1 Merge pull request #1543 from 0xProject/fix/asset-buyer-test
[asset-buyer] Fix test (assetData string)
2019-01-23 15:33:05 -08:00
Steve Klebanoff
2166f57750 Assert that assetData is a string before we try to decode it 2019-01-23 12:51:26 -08:00
Francesco Agosti
726a52f3ee 0xproject -> 0x.org 2019-01-23 12:35:00 -08:00
Francesco Agosti
64424deb41 Update README.md 2019-01-23 12:33:10 -08:00
Amir Bandeali
69025da2dc Merge pull request #1539 from 0xProject/feat/contracts/split-packages
Split/rename/combine packages
2019-01-23 12:22:26 -08:00
Amir Bandeali
09cb3b7d50 Merge branch 'development' into feat/contracts/split-packages 2019-01-23 10:49:10 -08:00
Amir Bandeali
8566bb551b Fix geth tests in circleci config 2019-01-23 09:51:02 -08:00
Amir Bandeali
f631c2da06 Update package.json versions 2019-01-23 09:49:02 -08:00
Leonid Logvinov
19064f8cbb Add -setup_remote_docker to CI build steps 2019-01-23 17:09:54 +01:00
Leonid Logvinov
de36670bdc Make workspace path in NPMResolver optional 2019-01-23 17:02:02 +01:00
Leonid Logvinov
e8d68dc07f Implement docker as another backend for sol-compiler 2019-01-23 16:54:27 +01:00
Amir Bandeali
f81149ac2b Update all contract CHANGELOGs 2019-01-22 18:06:26 -08:00
Alex Browne
ef928aff31 Merge pull request #1537 from nitper/patch-1
[fix] allow devnet rpc to listen on any vhost
2019-01-22 16:24:29 -08:00
Jacob Evans
6f090a2fda Improve CHANGELOG 2019-01-23 11:11:32 +11:00
Benjamin
c690364ec6 Add docker-compose basic config (#1538)
Add docker-compose.yml config for 0x-devnet package. This can be expanded upon in future if necessary.
2019-01-22 15:23:11 -08:00
Leonid Logvinov
cc48433575 Merge pull request #1535 from 0xProject/feature/sol-tracing-monorepo-fixes
Sol tracing fixes
2019-01-22 23:35:31 +01:00
Amir Bandeali
fe1ef930ad Update DEPLOYS and READMEs within each package 2019-01-22 13:37:14 -08:00
Leonid Logvinov
8ce885089e Change strings to numbers in CHANGELOGs 2019-01-22 21:23:58 +01:00
Leonid Logvinov
3e910c0e03 Refactor out isInterfaceContract 2019-01-22 21:20:02 +01:00
Leonid Logvinov
7c47c52fac Fix a typo 2019-01-22 21:11:55 +01:00
nitper
744fa22f01 allow devnet rpc to listen on any vhost
geth's default value for `--rpcvhosts` is `localhost`, which does not work when trying to use the devnet in certain environments such as `docker-compose` or `gitlab-ci`
2019-01-22 14:14:12 -05:00
Steve Klebanoff
b3f996595f Update blog link to not be /latest, and use constant in mobile nav 2019-01-22 08:48:05 -08:00
Fabio B
148f12a753 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:37 +01:00
Fabio B
aedd6503d1 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:32 +01:00
Fabio B
c3ecbd3063 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:24 +01:00
Fabio B
3297b5ea34 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:17 +01:00
Fabio B
19f929761b Update packages/sol-tracing-utils/src/collect_coverage_entries.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 15:10:05 +01:00
Fabio B
d8890a03bb Update packages/sol-profiler/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 13:29:22 +01:00
Fabio B
4a6bdfae23 Update contracts/utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-22 13:29:07 +01:00
Leonid Logvinov
7015fc4dbc Fix tests 2019-01-22 13:02:16 +01:00
Amir Bandeali
ab4d4a69ec Update root tsconfig packages 2019-01-21 22:39:51 -08:00
Amir Bandeali
efbfd08aa0 Separate forwarder into own package 2019-01-21 21:41:22 -08:00
Amir Bandeali
f9c29c3e74 Cleanup package.json files 2019-01-21 21:41:21 -08:00
Amir Bandeali
0758f231e2 Split tokens package into erc20 and erc721 2019-01-21 21:41:21 -08:00
Amir Bandeali
9fa8619590 Move contents of examples and interfaces packages into corresponding packages 2019-01-21 21:41:21 -08:00
Amir Bandeali
174daa97c3 Add commands for building and testing all contracts 2019-01-21 21:41:21 -08:00
Amir Bandeali
43de20930b Update remaining pachages 2019-01-21 21:41:21 -08:00
Amir Bandeali
4a4c26a2e3 Split protocol package into exchange, asset-proxy, and multisig 2019-01-21 21:41:21 -08:00
Amir Bandeali
e2fe907de0 Rename libs to exchange-libs 2019-01-21 21:41:21 -08:00
Amir Bandeali
f9986a6342 Move LibAddressArray to utils package 2019-01-21 21:41:21 -08:00
Fabio B
8d367a09fe Merge pull request #1527 from 0xProject/improvements/website/dev_home
Add Python tools section to Dev Home and add missing Python packages
2019-01-21 18:26:23 +01:00
Leonid Logvinov
7e60138e9d Fix imports in TestContracts and testLibBytes to be relative. This way they show up correctly in coverage reports 2019-01-21 16:37:50 +01:00
Leonid Logvinov
e5c4390489 Fix a bug when some parts of the profiling report were missing because of the coverage ignore lines 2019-01-21 16:32:12 +01:00
Fabio Berger
dabcd2cf47 Fix linter issue 2019-01-21 16:14:17 +01:00
Leonid Logvinov
61910f264c Print reasonable warnings on bytecode collisions 2019-01-21 15:55:06 +01:00
Leonid Logvinov
ddb0e29253 SolCompilerArtifactAdapter now doesn't return the ContractData for interfaces 2019-01-21 15:52:37 +01:00
Leonid Logvinov
9d9ab2f1ee Cache bytecode lookup 2019-01-21 15:44:08 +01:00
Leonid Logvinov
ce65ac0c1c SolCompilerArtifactsAdapter now uses SolResolver under the hood which allows to resolve NPM dependencies properly 2019-01-21 15:28:39 +01:00
Jacob Evans
98203bcc8c Convert from to lower case.
fixes #1490
2019-01-21 16:02:20 +11:00
Jacob Evans
bee48d1d43 Remove partial type for TxData txDefaults 2019-01-21 15:52:39 +11:00
Jacob Evans
ebbb4df227 Remove owner from migrations 2019-01-21 15:16:16 +11:00
Fabio Berger
da7c969eeb Add entry for contract demo package 2019-01-18 22:41:55 +01:00
Fabio Berger
310d981990 Link all Python packages to Pypi 2019-01-18 22:37:13 +01:00
Fabio Berger
6275b7ba3b Remove .py suffix 2019-01-18 22:35:04 +01:00
Fabio Berger
b22a6b4e09 Create Python tools section and add missing Python packages to it 2019-01-18 13:12:19 +01:00
Leonid Logvinov
b5fd3c72a0 Merge pull request #1518 from 0xProject/feature/new-ganache
Update ganache version
2019-01-18 13:07:32 +01:00
Leonid Logvinov
bf65332763 Merge branch 'development' into feature/new-ganache 2019-01-18 13:07:19 +01:00
Leonid Logvinov
3973dec994 Merge pull request #1517 from 0xProject/feature/bignumber-8.0
Bignumber 8.0
2019-01-18 13:06:08 +01:00
Leonid Logvinov
c8212f1d4d Merge branch 'development' into feature/bignumber-8.0 2019-01-18 12:53:04 +01:00
Leonid Logvinov
e6fe728bcb Merge development 2019-01-18 12:46:16 +01:00
Fabio Berger
bef30e4209 Update footer 2019-01-18 12:36:48 +01:00
Fabio B
6c7f4c13fa Update packages/web3-wrapper/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-18 12:32:49 +01:00
Fabio B
662049914a Update packages/subproviders/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-18 12:32:41 +01:00
Greg Hysen
d7a5190d52 Merge pull request #1519 from hosyvietanh/patch-1
Allow matching of uint80 in evm_data_type
2019-01-18 01:07:28 -08:00
Steve Klebanoff
2b64661c61 Merge pull request #1512 from 0xProject/feature/instant/asset-buyer-check-liquidity
[instant] [asset-buyer] Helper methods for checking liquidity
2019-01-17 16:01:36 -08:00
Steve Klebanoff
9c29eecc30 Merge pull request #1525 from 0xProject/fix/dev-tools-pages-package
[dev-tools-pages] Remove dangling comma from package.json
2019-01-17 15:27:43 -08:00
Steve Klebanoff
25b58108bc remove dangling comma 2019-01-17 15:00:12 -08:00
Steve Klebanoff
fbde36d27b remove dangling comma 2019-01-17 14:56:44 -08:00
Steve Klebanoff
02b7a43909 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-17 13:29:46 -08:00
Fabio Berger
e1e531a2a4 Remove react-snap from dev-tools-pages since it was messing up links on rendering pages 2019-01-17 20:59:39 +01:00
Fabio Berger
f6edf27856 Add hiring pitch to footer 2019-01-17 20:12:33 +01:00
Leonid Logvinov
277e09d061 Merge pull request #1524 from 0xProject/feature/istanbul-geth
Add notes about istanbul and Geth to website docs
2019-01-17 20:00:28 +01:00
Leonid Logvinov
1c9fb5f65f Add notes about istanbul and Geth to website docs 2019-01-17 19:59:35 +01:00
Fabio Berger
c29539aaf2 Add missing .png 2019-01-17 19:43:20 +01:00
Brandon Millman
4143baa27a Merge pull request #1523 from 0xProject/fix/react-shared/react-highlight-dep
[react-shared] Change react-highlight dep to reference fork by branch instead of commit
2019-01-17 10:26:26 -08:00
Leonid Logvinov
5816279d68 Publish
- 0x.js@3.0.3
 - @0x/asset-buyer@4.0.2
 - @0x/contract-wrappers@5.0.1
 - @0x/dev-tools-pages@0.0.14
 - @0x/instant@1.0.8
 - @0x/metacoin@0.0.36
 - @0x/monorepo-scripts@1.0.19
 - @0x/order-watcher@2.4.3
 - @0x/sol-coverage@1.0.3
 - @0x/sol-profiler@1.0.3
 - @0x/sol-trace@1.0.3
 - @0x/sol-tracing-utils@4.0.1
 - @0x/testnet-faucets@1.0.64
 - @0x/website@0.0.67
 - @0x/contracts-examples@1.0.6
 - @0x/contracts-extensions@1.2.3
 - @0x/contracts-interfaces@1.0.6
 - @0x/contracts-libs@1.0.6
 - @0x/contracts-multisig@1.0.6
 - @0x/contracts-protocol@2.2.3
 - @0x/contracts-test-utils@2.0.1
 - @0x/contracts-tokens@1.0.6
 - @0x/contracts-utils@1.0.6
2019-01-17 19:07:37 +01:00
Leonid Logvinov
0d877a8076 Updated CHANGELOGS 2019-01-17 19:07:25 +01:00
Brandon Millman
7b266bc762 Change react-highlight dep to reference fork by branch instead of commit 2019-01-17 10:03:23 -08:00
Fabio Berger
0e6aea856f http to https 2019-01-17 16:58:15 +01:00
Fabio B
e31d17ef79 Merge pull request #1509 from 0xProject/fix/dev-tools-pages/finalTouches
Dev Tools Pages - Final Touches
2019-01-17 16:56:01 +01:00
Fabio Berger
7b2a9ba698 Fix linter errors 2019-01-17 16:38:30 +01:00
Fabio Berger
87d08b0af6 Update yarn.lock 2019-01-17 16:24:11 +01:00
Fabio Berger
e68c5d5517 Enable "copy" button on all code snippets that should be copy-able 2019-01-17 16:24:03 +01:00
Leonid Logvinov
c09825660c Increase the Buffer size when fetching tags 2019-01-17 16:14:19 +01:00
Fabio Berger
293e937291 Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (22 commits)
  Fix linter
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Update packages/sol-tracing-utils/CHANGELOG.json
  Update packages/sol-tracing-utils/CHANGELOG.json
  Add PR numbers
  Fix/simplify handling of revert trace snippets
  Fix a bug when TraceCollectionSubprovider was hanging on the fake Geth snapshot transaction
  Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL
  Revert devnet mining period from 1 to 0
  update team info, add brent
  Publish
  Updated CHANGELOGS
  Add commented-out pre-publish checks
  Add additional check to make sure user was added to our DockerHub org
  Update test for required amountAvailableToFill
  Add actual error message thrown
  Flag order-watcher as having a Docker image to publish
  Add publish to DockerHub step to publish flow
  Flesh out postpublish configs in packageJSON type
  Add pre-publish check to ensure publisher is logged in to docker cmdline
  ...
2019-01-17 15:59:00 +01:00
Fabio Berger
fe2f97dabd Add link to Truffle starter project 2019-01-17 15:58:41 +01:00
Leonid Logvinov
0b23aaca26 Merge pull request #1521 from 0xProject/feature/dev-tools-pre-release-fixes
0x Dev tools pre-release fixes
2019-01-17 15:53:17 +01:00
Leonid Logvinov
d92dc47df8 Last touches 2019-01-17 15:44:34 +01:00
Leonid Logvinov
8b69d918a9 Fix linter 2019-01-17 15:38:09 +01:00
Fabio Berger
3b79754b7a Remove incorrect section of docs 2019-01-17 15:37:43 +01:00
Fabio B
92ec4f5772 Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:42 +01:00
Fabio B
8528660f50 Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:35 +01:00
Fabio B
edd4370cdb Update packages/sol-tracing-utils/CHANGELOG.json
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
2019-01-17 15:06:29 +01:00
Leonid Logvinov
69aa1c2e91 Add PR numbers 2019-01-17 14:40:11 +01:00
Leonid Logvinov
fcdd0de9ee Fix/simplify handling of revert trace snippets 2019-01-17 14:37:15 +01:00
Leonid Logvinov
4c5bde1b54 Fix a bug when TraceCollectionSubprovider was hanging on the fake Geth snapshot transaction 2019-01-17 14:36:23 +01:00
Leonid Logvinov
83f77a2d56 Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL 2019-01-17 14:28:16 +01:00
Leonid Logvinov
cdac2d210e Revert devnet mining period from 1 to 0 2019-01-17 14:23:03 +01:00
Fabio Berger
737941e8c7 Add call-to-action docs button at end of instructions again 2019-01-17 13:29:47 +01:00
Fabio Berger
a873872cc7 Open 0x.org on different tab 2019-01-17 13:03:18 +01:00
Fabio Berger
56b8fd2074 Add fonts 2019-01-17 12:55:14 +01:00
Fabio Berger
b2ea4f6aaf Update requirement sections 2019-01-17 12:53:09 +01:00
hosyvietanh
ca5b024e03 Allow matching of uint80 in evm_data_type 2019-01-17 11:07:50 +07:00
Steve Klebanoff
92f5ad4f15 Use more specific helper method decodeAssetDataOrThrow 2019-01-16 17:12:08 -08:00
Steve Klebanoff
ff8250cd35 change helper method to return a boolean 2019-01-16 15:45:01 -08:00
Steve Klebanoff
466ec6b22a Change LiquidityForAssetData to return a BigNumber instead of a number to avoid losing precision 2019-01-16 14:16:49 -08:00
fragosti
beaf0a4a8a update team info, add brent 2019-01-16 11:33:57 -08:00
Fabio Berger
6871f36dad Update 0x url 2019-01-16 18:44:52 +01:00
Steve Klebanoff
a587718443 export type instead of interface for more succinct syntax 2019-01-16 09:41:12 -08:00
Steve Klebanoff
444250520a Clarify boolean variable name 2019-01-16 09:40:36 -08:00
Steve Klebanoff
bd5850f390 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-16 09:38:38 -08:00
Steve Klebanoff
ce1c2eeab7 Remove accidental import 2019-01-16 09:37:10 -08:00
Fabio B
b08d6c3b4d Merge pull request #1510 from 0xProject/feature/monorepo-scripts/publishToDockerHub
Add DockerHub Publishing Step to Publish Flow
2019-01-16 18:35:55 +01:00
Steve Klebanoff
f269bc28cf Add PR number and fix description 2019-01-15 14:00:00 -08:00
Steve Klebanoff
af63934d2c Export types and add additional documentation 2019-01-15 13:57:31 -08:00
Steve Klebanoff
39816bef8f Merge pull request #1511 from 0xProject/fix/asset-buyer/zero-amount-available-test
Fix expectedAmountAvailableToFill  test
2019-01-15 13:04:55 -08:00
Steve Klebanoff
600b44c962 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-15 10:43:55 -08:00
Steve Klebanoff
7a2b312d64 Merge branch 'development' into fix/asset-buyer/zero-amount-available-test 2019-01-15 10:38:23 -08:00
Leonid Logvinov
7d166dc7da Fix prettier 2019-01-15 17:34:44 +01:00
Leonid Logvinov
0720b8487c Fix a build issue 2019-01-15 17:13:20 +01:00
Leonid Logvinov
4404f92b38 Add CHANGELOG entries 2019-01-15 17:05:51 +01:00
Leonid Logvinov
0a27979464 Convert address strings to lower case before parsing them as BigNumbers 2019-01-15 16:25:26 +01:00
Leonid Logvinov
a3cb722469 Fix a bug when we didn't call isNaN function and assumed it's a property 2019-01-15 16:25:26 +01:00
Leonid Logvinov
2cca2d70d7 Add a throw reason in tests 2019-01-15 16:25:26 +01:00
Leonid Logvinov
17f313658d Add a NAN check when parsing BigNumber candidate 2019-01-15 16:25:26 +01:00
Leonid Logvinov
d304c062eb Convert address strings to lower case before parsing them as BigNumbers 2019-01-15 16:25:26 +01:00
Leonid Logvinov
3eef888e25 Update yarn.lock 2019-01-15 16:25:26 +01:00
Leonid Logvinov
20eab4257a Upgrade chai-bignumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
665dd0813e Remove unused imports 2019-01-15 16:25:25 +01:00
Leonid Logvinov
e84232cce8 Use new check for isBigNumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
de78d6a8ad Fix isBigNumber check for the new version 2019-01-15 16:25:25 +01:00
Leonid Logvinov
a085654aba Fix linting error 2019-01-15 16:25:25 +01:00
Leonid Logvinov
61c88455f4 Apply prettier 2019-01-15 16:25:25 +01:00
Leonid Logvinov
a084bbbed8 Rename cmp to comparedTo 2019-01-15 16:25:25 +01:00
Leonid Logvinov
eb393f0a66 Upgrade chai-bignumber 2019-01-15 16:25:25 +01:00
Leonid Logvinov
c3afc13dd6 Upgrade bignumber.js version 2019-01-15 16:25:24 +01:00
Leonid Logvinov
08b865d25b Add CHANGELOG entries 2019-01-15 16:19:28 +01:00
Leonid Logvinov
9932240a4d Merge branch 'development' into feature/new-ganache 2019-01-15 15:33:55 +01:00
Fabio Berger
7c37d10d1f Merge branch 'development' into feature/monorepo-scripts/publishToDockerHub
* development: (87 commits)
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Make mapping namings direct
  Remove unused tslint disable
  Revert "Remove logAsyncErrors hack"
  Remove logAsyncErrors hack
  Refactor logAsyncErrors to follow our conventions
  Export Sources and SourceCodes out of tracing utils
  Replace console.log with logUtils.log (#1515)
  strict decoding of return values using generics
  makerAssetFillAmount -> takerAssetFillAmount
  Ran prettier
  Linter
  Fix build after rebase
  Style cleanup for Compressed Calldata in Contract Wrappers PR
  Use simpler `_.find` to locate fillOrderBai
  Updated dutch auction wrapper
  Added back abi-gen-wrappers
  Renamed signatureParser.ts to signature_parser.ts
  Renamed decode rule `structsAsObjects` to `shouldConvertStructsToObjects`
  circle build failed. New commit to resubmit job.
  ...
2019-01-15 15:13:24 +01:00
Fabio Berger
ae147e615a Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (87 commits)
  Update packages/sol-tracing-utils/src/trace_collection_subprovider.ts
  Make mapping namings direct
  Remove unused tslint disable
  Revert "Remove logAsyncErrors hack"
  Remove logAsyncErrors hack
  Refactor logAsyncErrors to follow our conventions
  Export Sources and SourceCodes out of tracing utils
  Replace console.log with logUtils.log (#1515)
  strict decoding of return values using generics
  makerAssetFillAmount -> takerAssetFillAmount
  Ran prettier
  Linter
  Fix build after rebase
  Style cleanup for Compressed Calldata in Contract Wrappers PR
  Use simpler `_.find` to locate fillOrderBai
  Updated dutch auction wrapper
  Added back abi-gen-wrappers
  Renamed signatureParser.ts to signature_parser.ts
  Renamed decode rule `structsAsObjects` to `shouldConvertStructsToObjects`
  circle build failed. New commit to resubmit job.
  ...
2019-01-15 15:10:50 +01:00
Leonid Logvinov
91b57793c2 Update ganache version 2019-01-15 14:44:43 +01:00
Fabio Berger
affd617054 Add commented-out pre-publish checks 2019-01-14 16:05:56 +01:00
Fabio Berger
84163517c6 Add additional check to make sure user was added to our DockerHub org 2019-01-14 15:24:00 +01:00
Steve Klebanoff
8a8a5332d7 prettier changelog 2019-01-11 10:38:52 -08:00
Steve Klebanoff
8d3bbb8213 Disable promise-function-async for mocking async functions 2019-01-11 09:32:28 -08:00
Steve Klebanoff
a5e7ce9e1a Move calculateLiquidity to helper function 2019-01-11 09:28:51 -08:00
Steve Klebanoff
64a78149aa Update test for required amountAvailableToFill 2019-01-11 09:20:59 -08:00
Steve Klebanoff
dbaed69d77 Add new version to CHANGELOG 2019-01-11 08:59:07 -08:00
Steve Klebanoff
faee751395 Merge branch 'development' into feature/instant/asset-buyer-check-liquidity 2019-01-11 08:53:15 -08:00
Steve Klebanoff
742e5e039d getLiquidityForAssetDataAsync helper method, and fix to assetBuyer to check for eth token in asset pairs 2019-01-11 08:14:57 -08:00
Fabio Berger
98579300c1 merge development 2019-01-11 17:14:12 +01:00
Fabio Berger
96ff5eef64 merge development 2019-01-11 17:12:55 +01:00
Fabio Berger
7f5a2c972b Add actual error message thrown 2019-01-11 16:55:37 +01:00
Fabio Berger
dad6404c7f Flag order-watcher as having a Docker image to publish 2019-01-11 16:52:28 +01:00
Fabio Berger
6dcf40f570 Add publish to DockerHub step to publish flow 2019-01-11 16:52:15 +01:00
Fabio Berger
43b0422804 Flesh out postpublish configs in packageJSON type 2019-01-11 16:51:54 +01:00
Fabio Berger
55ce0d9d17 Add pre-publish check to ensure publisher is logged in to docker cmdline 2019-01-11 16:50:41 +01:00
Fabio Berger
895460aea3 Update yarn.lock 2019-01-11 14:29:09 +01:00
Fabio Berger
7956127b29 Ensure the process exits 2019-01-11 14:29:02 +01:00
Fabio Berger
6fb2721294 Fix copy and links 2019-01-11 14:20:56 +01:00
Fabio Berger
ebb10e6604 Remove unused import 2019-01-11 14:15:24 +01:00
Fabio Berger
db878f4a7b Fix title and og tags for sol-coverage 2019-01-11 14:15:15 +01:00
Steve Klebanoff
1192314510 Add helper functions and expose to umd object 2019-01-10 16:13:16 -08:00
Fabio Berger
583e690b7a Merge branch 'development' into fix/dev-tools-pages/finalTouches
* development: (49 commits)
  upgrade to ddex api v3 (#1507)
  Add new deployment related instructions to pipeline README (#1499)
  feature: implement logging and friendly wallet name for Opera
  Fix prettier
  Add missing dependencies
  Remove second yarn call
  Add .gitkeep
  Rename sol-trace-based-tools-common to sol-tracing-utils
  Update packages/sol-trace/README.md
  Update packages/sol-trace/CHANGELOG.json
  Update packages/sol-trace-based-tools-common/src/source_maps.ts
  Update packages/sol-trace-based-tools-common/CHANGELOG.json
  Update packages/sol-profiler/CHANGELOG.json
  Update packages/sol-coverage/CHANGELOG.json
  Update packages/monorepo-scripts/src/test_installation.ts
  chore: changelog update
  fix: account for undefined errors in promisify, not only null
  Clean up docs before publish
  In README's, don't mention non-existent tests (#1497)
  fix: use getBackendBaseUrl instead of hardcoded string
  ...
2019-01-11 00:47:57 +01:00
Fabio Berger
a516b00a03 Fix footer links 2019-01-11 00:45:26 +01:00
Steve Klebanoff
841ad8757c Add LiquidityRequestOpts type 2019-01-10 15:40:55 -08:00
Steve Klebanoff
127bd4bf9d Getting rid of unused params and adding documentation 2019-01-10 15:38:41 -08:00
Justin Barry
a8c3b4126e Output Chrome 41 compatible version of 0x instant
This is important for SEO as Googlebot is still using Chrome 41 to crawl
thick clients.
2019-01-10 14:25:50 -08:00
Steve Klebanoff
2360b8282f rename tokensAvailableInUnitAmount to tokensAvailableInBaseUnits and use test helpers 2019-01-10 14:00:16 -08:00
Steve Klebanoff
0dade8624c Adding more test coverage 2019-01-10 13:51:02 -08:00
Steve Klebanoff
a9fad77eb4 Implement liquidity checking w/ testing 2019-01-10 13:41:28 -08:00
Fabio Berger
dc20429bca Add deployment commands for the Dev tools pages 2019-01-10 20:14:51 +01:00
Fabio Berger
241be6de30 Rename sol-cov to sol-coverage, fix links 2019-01-09 17:30:34 +01:00
Fabio Berger
589b535b91 Add docLink 2019-01-09 17:30:01 +01:00
Fabio Berger
eb6b07e804 Update yarn.lock 2019-01-09 17:29:13 +01:00
568 changed files with 7152 additions and 3931 deletions

View File

@@ -17,6 +17,7 @@ jobs:
- run:
name: yarn
command: yarn --frozen-lockfile --ignore-engines install
- setup_remote_docker
- run: yarn build:ci:no_website
- run: yarn build:ts
- save_cache:
@@ -43,10 +44,13 @@ 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-browsers
@@ -59,11 +63,14 @@ 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:
@@ -195,7 +202,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:
@@ -243,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:
@@ -271,7 +278,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:
@@ -290,6 +297,7 @@ jobs:
- 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:

22
.gitignore vendored
View File

@@ -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/
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

View File

@@ -1,21 +1,23 @@
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/contract_artifacts/src/zero_ex/contract_artifacts/artifacts

View File

@@ -32,6 +32,21 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
| [`0x-order-utils`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](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) | [![PyPI](https://img.shields.io/pypi/v/0x-sra-client.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-asset-proxy.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-erc20.svg)](https://www.npmjs.com/package/@0x/contracts-erc20) | Implementations of various ERC20 tokens |
| [`@0x/contracts-erc721`](/contracts/erc721) | [![npm](https://img.shields.io/npm/v/@0x/contracts-erc721.svg)](https://www.npmjs.com/package/@0x/contracts-erc721) | Implementations of various ERC721 tokens |
| [`@0x/contracts-exchange`](/contracts/exchange) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange-forwarder.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-exchange-libs.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-extensions.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-multisig.svg)](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) | [![npm](https://img.shields.io/npm/v/@0x/contracts-test-utils.svg)](https://www.npmjs.com/package/@0x/contracts-test-utils) | Typescript/Javascript shared utilities used for testing contracts |
| [`@0x/contracts-utils`](/contracts/utils) | [![npm](https://img.shields.io/npm/v/@0x/contracts-utils.svg)](https://www.npmjs.com/package/@0x/contracts-utils) | Generic libraries and utilities used throughout all of the contracts |
### Typescript/Javascript Packages
#### 0x-specific packages
@@ -84,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 |
@@ -134,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:
@@ -206,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
```

View File

@@ -1,38 +1,38 @@
[
{
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547225310,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547040760,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
"note": "Fake publish to enable pinning"
}
]
],
"timestamp": 1549504360
},
{
"timestamp": 1544741676,
"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
}
]
}
]

View File

@@ -0,0 +1,22 @@
<!--
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 - _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)

View 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"
}
}
]
}
]

View File

@@ -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

View File

@@ -1,6 +1,7 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
@@ -22,14 +23,9 @@
"IAssetData",
"IAssetProxy",
"IAuthorizable",
"IAssetProxyDispatcher",
"IExchange",
"IExchangeCore",
"IMatchOrders",
"ISignatureValidator",
"ITransactions",
"IValidator",
"IWallet",
"IWrapperFunctions"
"ERC20Proxy",
"ERC721Proxy",
"MixinAuthorizable",
"MultiAssetProxy"
]
}

View File

@@ -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

View File

@@ -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";

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../Exchange/MixinAssetProxyDispatcher.sol";
import "./MixinAssetProxyDispatcher.sol";
import "./MixinAuthorizable.sol";

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,82 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract components 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",
"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",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(ERC20Proxy|ERC721Proxy|IAssetData|IAssetProxy|IAuthorizable|MixinAuthorizable|MultiAssetProxy).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/protocol/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.1",
"@0x/dev-utils": "^2.0.1",
"@0x/sol-compiler": "^3.0.1",
"@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.1",
"@0x/contracts-erc20": "^1.0.3",
"@0x/contracts-erc721": "^1.0.3",
"@0x/contracts-test-utils": "^3.0.2",
"@0x/contracts-utils": "^2.0.2",
"@0x/order-utils": "^6.0.0",
"@0x/types": "^2.0.1",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.2",
"@0x/web3-wrapper": "^4.0.1",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
},
"publishConfig": {
"access": "public"
}
}

View File

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

View File

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

View File

@@ -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;

View File

@@ -1,4 +1,15 @@
import { artifacts as interfacesArtifacts, IAssetDataContract, IAssetProxyContract } from '@0x/contracts-interfaces';
import {
artifacts as erc20Artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyMultipleReturnERC20TokenContract,
DummyNoReturnERC20TokenContract,
} from '@0x/contracts-erc20';
import {
artifacts as erc721Artifacts,
DummyERC721ReceiverContract,
DummyERC721TokenContract,
} from '@0x/contracts-erc721';
import {
chaiSetup,
constants,
@@ -9,15 +20,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 +28,27 @@ 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,
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 +154,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_DECIMALS,
);
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
tokensArtifacts.DummyNoReturnERC20Token,
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -157,7 +163,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
tokensArtifacts.DummyMultipleReturnERC20Token,
erc20Artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -198,7 +204,7 @@ describe('Asset Transfer Proxies', () => {
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
tokensArtifacts.DummyERC721Receiver,
erc721Artifacts.DummyERC721Receiver,
provider,
txDefaults,
);
@@ -259,7 +265,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 +324,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 +568,7 @@ describe('Asset Transfer Proxies', () => {
erc721Receiver.address,
amount,
);
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc721Artifacts });
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: erc721Proxy.address,
@@ -737,7 +743,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 +760,7 @@ describe('Asset Transfer Proxies', () => {
inputAmount,
);
const erc20Balances = await erc20Wrapper.getBalancesAsync();
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: multiAssetProxy.address,
@@ -800,7 +806,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 +840,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 +976,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 +1014,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 +1050,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 +1128,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 () => {

View File

@@ -1,5 +1,5 @@
import { artifacts as tokensArtifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
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';

View File

@@ -1,5 +1,5 @@
import { artifacts as tokensArtifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
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';

View File

@@ -1,3 +1,2 @@
export * from './exchange_wrapper';
export * from './erc20_wrapper';
export * from './erc721_wrapper';

View File

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

View File

@@ -0,0 +1 @@
contracts/src/ZRXToken.sol

View File

@@ -1,38 +1,38 @@
[
{
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547225310,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547040760,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
"note": "Fake publish to enable pinning"
}
]
],
"timestamp": 1549504360
},
{
"timestamp": 1544741676,
"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
}
]
}
]

View File

@@ -0,0 +1,22 @@
<!--
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 - _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)

View File

@@ -8,6 +8,7 @@
"networks": {
"1": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"3": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
"4": "0x2727e688b8fd40b198cd5fe6e408e00494a06f07",
"42": "0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa"
}
}

View File

@@ -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

View File

@@ -1,6 +1,7 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
@@ -22,23 +23,13 @@
"DummyERC20Token",
"DummyMultipleReturnERC20Token",
"DummyNoReturnERC20Token",
"DummyERC721Receiver",
"InvalidERC721Receiver",
"DummyERC721Token",
"ReentrantERC20Token",
"ERC20Token",
"IERC20Token",
"MintableERC20Token",
"UnlimitedAllowanceERC20Token",
"ERC721Token",
"IERC721Receiver",
"IERC721Token",
"MintableERC721Token",
"IEtherToken",
"WETH9",
"ERC20Token_v1",
"Token_v1",
"UnlimitedAllowanceToken_v1",
"ZRXToken"
]
}

View File

@@ -18,7 +18,7 @@
pragma solidity ^0.4.24;
import "./IERC20Token.sol";
import "./interfaces/IERC20Token.sol";
contract ERC20Token is

View File

@@ -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";

View File

@@ -18,7 +18,7 @@
pragma solidity ^0.4.24;
import "../ERC20Token/ERC20Token.sol";
import "./ERC20Token.sol";
contract UnlimitedAllowanceERC20Token is

View 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;
}
}

View File

@@ -18,7 +18,7 @@
pragma solidity ^0.4.24;
import "../ERC20Token/IERC20Token.sol";
import "./IERC20Token.sol";
contract IEtherToken is

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-tokens",
"version": "1.0.5",
"name": "@0x/contracts-erc20",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -32,7 +32,7 @@
"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|ReentrantERC20Token|ERC20Token|IERC20Token|MintableERC20Token|UnlimitedAllowanceERC20Token|IEtherToken|WETH9|ZRXToken).json"
},
"repository": {
"type": "git",
@@ -44,45 +44,34 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
"@0x/contracts-test-utils": "^2.0.0",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
"@0x/tslint-config": "^2.0.2",
"@types/bn.js": "^4.11.0",
"@0x/abi-gen": "^2.0.1",
"@0x/contracts-test-utils": "^3.0.2",
"@0x/dev-utils": "^2.0.1",
"@0x/sol-compiler": "^3.0.1",
"@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.13",
"@0x/contracts-interfaces": "^1.0.5",
"@0x/contracts-libs": "^1.0.5",
"@0x/contracts-multisig": "^1.0.5",
"@0x/contracts-utils": "^1.0.5",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"@0x/web3-wrapper": "^3.2.4",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.6",
"ethereumjs-util": "^5.1.1",
"@0x/base-contract": "^4.0.1",
"@0x/contracts-exchange-libs": "^1.0.3",
"@0x/contracts-utils": "^2.0.2",
"@0x/types": "^2.0.1",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.2",
"@0x/web3-wrapper": "^4.0.1",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
},
"publishConfig": {

View File

@@ -1,24 +1,14 @@
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 ERC20Token from '../../generated-artifacts/ERC20Token.json';
import * as ERC20Token_v1 from '../../generated-artifacts/ERC20Token_v1.json';
import * as ERC721Token from '../../generated-artifacts/ERC721Token.json';
import * as IERC20Token from '../../generated-artifacts/IERC20Token.json';
import * as IERC721Receiver from '../../generated-artifacts/IERC721Receiver.json';
import * as IERC721Token from '../../generated-artifacts/IERC721Token.json';
import * as IEtherToken from '../../generated-artifacts/IEtherToken.json';
import * as InvalidERC721Receiver from '../../generated-artifacts/InvalidERC721Receiver.json';
import * as MintableERC20Token from '../../generated-artifacts/MintableERC20Token.json';
import * as MintableERC721Token from '../../generated-artifacts/MintableERC721Token.json';
import * as ReentrantERC20Token from '../../generated-artifacts/ReentrantERC20Token.json';
import * as Token_v1 from '../../generated-artifacts/Token_v1.json';
import * as UnlimitedAllowanceERC20Token from '../../generated-artifacts/UnlimitedAllowanceERC20Token.json';
import * as UnlimitedAllowanceToken_v1 from '../../generated-artifacts/UnlimitedAllowanceToken_v1.json';
import * as WETH9 from '../../generated-artifacts/WETH9.json';
import * as ZRXToken from '../../generated-artifacts/ZRXToken.json';
@@ -27,23 +17,13 @@ export const artifacts = {
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
ERC20Token: ERC20Token as ContractArtifact,
IERC20Token: IERC20Token as ContractArtifact,
MintableERC20Token: MintableERC20Token as ContractArtifact,
UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
ERC721Token: ERC721Token as ContractArtifact,
IERC721Receiver: IERC721Receiver as ContractArtifact,
IERC721Token: IERC721Token as ContractArtifact,
MintableERC721Token: MintableERC721Token as ContractArtifact,
IEtherToken: IEtherToken as ContractArtifact,
WETH9: WETH9 as ContractArtifact,
ERC20Token_v1: ERC20Token_v1 as ContractArtifact,
Token_v1: Token_v1 as ContractArtifact,
UnlimitedAllowanceToken_v1: UnlimitedAllowanceToken_v1 as ContractArtifact,
// Note(albrow): "as any" hack still required here because ZRXToken does not
// conform to the v2 artifact type.
ZRXToken: (ZRXToken as any) as ContractArtifact,

View File

@@ -1,21 +1,11 @@
export * from '../../generated-wrappers/zrx_token';
export * from '../../generated-wrappers/weth9';
export * from '../../generated-wrappers/unlimitedallowancetoken_v1';
export * from '../../generated-wrappers/unlimited_allowance_erc20_token';
export * from '../../generated-wrappers/token_v1';
export * from '../../generated-wrappers/reentrant_erc20_token';
export * from '../../generated-wrappers/mintable_erc721_token';
export * from '../../generated-wrappers/mintable_erc20_token';
export * from '../../generated-wrappers/invalid_erc721_receiver';
export * from '../../generated-wrappers/i_ether_token';
export * from '../../generated-wrappers/i_erc721_token';
export * from '../../generated-wrappers/i_erc721_receiver';
export * from '../../generated-wrappers/i_erc20_token';
export * from '../../generated-wrappers/erc721_token';
export * from '../../generated-wrappers/erc20token_v1';
export * from '../../generated-wrappers/erc20_token';
export * from '../../generated-wrappers/dummy_no_return_erc20_token';
export * from '../../generated-wrappers/dummy_multiple_return_erc20_token';
export * from '../../generated-wrappers/dummy_erc721_token';
export * from '../../generated-wrappers/dummy_erc721_receiver';
export * from '../../generated-wrappers/dummy_erc20_token';

View File

@@ -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(

View File

@@ -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, {

View File

@@ -10,23 +10,13 @@
"./generated-artifacts/DummyERC20Token.json",
"./generated-artifacts/DummyMultipleReturnERC20Token.json",
"./generated-artifacts/DummyNoReturnERC20Token.json",
"./generated-artifacts/DummyERC721Receiver.json",
"./generated-artifacts/InvalidERC721Receiver.json",
"./generated-artifacts/DummyERC721Token.json",
"./generated-artifacts/ReentrantERC20Token.json",
"./generated-artifacts/ERC20Token.json",
"./generated-artifacts/IERC20Token.json",
"./generated-artifacts/MintableERC20Token.json",
"./generated-artifacts/UnlimitedAllowanceERC20Token.json",
"./generated-artifacts/ERC721Token.json",
"./generated-artifacts/IERC721Receiver.json",
"./generated-artifacts/IERC721Token.json",
"./generated-artifacts/MintableERC721Token.json",
"./generated-artifacts/IEtherToken.json",
"./generated-artifacts/WETH9.json",
"./generated-artifacts/ERC20Token_v1.json",
"./generated-artifacts/Token_v1.json",
"./generated-artifacts/UnlimitedAllowanceToken_v1.json",
"./generated-artifacts/ZRXToken.json"
],
"exclude": ["./deploy/solc/solc_bin"]

View File

@@ -1,38 +1,38 @@
[
{
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547225310,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547040760,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
"note": "Fake publish to enable pinning"
}
]
],
"timestamp": 1549504360
},
{
"timestamp": 1544741676,
"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
}
]
}
]

View File

@@ -0,0 +1,22 @@
<!--
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 - _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)

View File

@@ -0,0 +1 @@
[]

View File

@@ -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

View File

@@ -0,0 +1,31 @@
{
"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": [
"DummyERC721Receiver",
"InvalidERC721Receiver",
"DummyERC721Token",
"ERC721Token",
"IERC721Receiver",
"IERC721Token",
"MintableERC721Token"
]
}

View File

@@ -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

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../tokens/ERC721Token/IERC721Receiver.sol";
import "../src/interfaces/IERC721Receiver.sol";
contract DummyERC721Receiver is

View File

@@ -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

View File

@@ -18,7 +18,7 @@
pragma solidity 0.4.24;
import "../../tokens/ERC721Token/IERC721Receiver.sol";
import "../src/interfaces/IERC721Receiver.sol";
contract InvalidERC721Receiver is

View File

@@ -1,10 +1,10 @@
{
"name": "@0x/contracts-examples",
"version": "1.0.5",
"name": "@0x/contracts-erc721",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
"description": "Smart contract examples of 0x protocol",
"description": "Token contracts used by 0x protocol",
"main": "lib/src/index.js",
"directories": {
"test": "test"
@@ -13,15 +13,26 @@
"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",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "generated-artifacts/@(ExchangeWrapper|Validator|Wallet|Whitelist).json"
"abis": "generated-artifacts/@(DummyERC721Receiver|InvalidERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|MintableERC721Token).json"
},
"repository": {
"type": "git",
@@ -31,48 +42,35 @@
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/examples/README.md",
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
"@0x/contracts-test-utils": "^2.0.0",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
"@0x/tslint-config": "^2.0.2",
"@types/bn.js": "^4.11.0",
"@0x/abi-gen": "^2.0.1",
"@0x/contracts-test-utils": "^3.0.2",
"@0x/dev-utils": "^2.0.1",
"@0x/sol-compiler": "^3.0.1",
"@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.13",
"@0x/contracts-interfaces": "^1.0.5",
"@0x/contracts-libs": "^1.0.5",
"@0x/contracts-multisig": "^1.0.5",
"@0x/contracts-tokens": "^1.0.5",
"@0x/contracts-utils": "^1.0.5",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"@0x/web3-wrapper": "^3.2.4",
"@types/js-combinatorics": "^0.5.29",
"bn.js": "^4.11.8",
"ethereum-types": "^1.1.6",
"ethereumjs-util": "^5.1.1",
"@0x/base-contract": "^4.0.1",
"@0x/contracts-utils": "^2.0.2",
"@0x/types": "^2.0.1",
"@0x/typescript-typings": "^4.0.0",
"@0x/utils": "^4.0.2",
"@0x/web3-wrapper": "^4.0.1",
"ethereum-types": "^2.0.0",
"lodash": "^4.17.5"
},
"publishConfig": {

View File

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

View File

@@ -1,2 +1,2 @@
export * from './artifacts';
export * from './wrappers';
export * from './artifacts';

View File

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

View File

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

View File

@@ -1,22 +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.5 - _January 15, 2019_
* Dependencies updated
## v1.0.4 - _January 11, 2019_
* Dependencies updated
## v1.0.3 - _January 9, 2019_
* Dependencies updated
## v1.0.2 - _December 13, 2018_
* Dependencies updated

View File

@@ -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,
};

View File

@@ -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';

View File

@@ -1,38 +1,38 @@
[
{
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547225310,
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1547040760,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
"note": "Fake publish to enable pinning"
}
]
],
"timestamp": 1549504360
},
{
"timestamp": 1544741676,
"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
}
]
}
]

View File

@@ -0,0 +1,22 @@
<!--
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 - _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)

View 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"
}
}
]
}
]

View File

@@ -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

View File

@@ -1,6 +1,7 @@
{
"artifactsDir": "./generated-artifacts",
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
"optimizer": {
"enabled": true,
@@ -18,5 +19,5 @@
}
}
},
"contracts": ["ExchangeWrapper", "Validator", "Wallet", "Whitelist"]
"contracts": ["Forwarder"]
}

View File

@@ -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";

View File

@@ -21,10 +21,10 @@ pragma experimental ABIEncoderV2;
import "./libs/LibConstants.sol";
import "./mixins/MExchangeWrapper.sol";
import "@0x/contracts-libs/contracts/libs/LibAbiEncoder.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibAbiEncoder.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
contract MixinExchangeWrapper is

View File

@@ -24,10 +24,10 @@ import "./mixins/MWeth.sol";
import "./mixins/MAssets.sol";
import "./mixins/MExchangeWrapper.sol";
import "./interfaces/IForwarderCore.sol";
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
contract MixinForwarderCore is

View File

@@ -18,7 +18,7 @@
pragma solidity ^0.4.24;
import "@0x/contracts-libs/contracts/libs/LibMath.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
import "./libs/LibConstants.sol";
import "./mixins/MWeth.sol";

View File

@@ -19,8 +19,8 @@
pragma solidity ^0.4.24;
pragma experimental ABIEncoderV2;
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol";
contract IForwarderCore {

View File

@@ -18,10 +18,10 @@
pragma solidity ^0.4.24;
import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
import "@0x/contracts-tokens/contracts/tokens/EtherToken/IEtherToken.sol";
import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
contract LibConstants {

View File

@@ -19,8 +19,8 @@
pragma solidity ^0.4.24;
pragma experimental ABIEncoderV2;
import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol";
contract MExchangeWrapper {

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