545 Commits

Author SHA1 Message Date
Amir Bandeali
0b9a9d92af Add tests for ERC721Token 2018-08-16 17:31:21 -07:00
Amir Bandeali
4dd59a370d Add tests for ERC20 token with no return values 2018-08-16 17:31:21 -07:00
Amir Bandeali
7a6e647386 Add constructor back to DummyERC721Token 2018-08-16 17:31:21 -07:00
Amir Bandeali
2743eee044 Update checking for erc721 existence 2018-08-16 17:31:21 -07:00
Fabio Berger
68d7eb5712 Fix comment 2018-08-16 17:02:47 -07:00
Fabio Berger
0337b5a401 Merge development 2018-08-16 15:10:12 -07:00
Jacob Evans
622509c508
[Order-utils] Order is valid when maker amount is very small
Previously our min fillable calculation would throw a rounding error
when encountering a valid order (with a small maker amount). This was
inconsistent with the on-chain logic which allowed this order to be
filled.
2018-08-15 13:06:32 +10:00
Fabio Berger
2f2582a0da Merge development 2018-08-14 14:21:47 -07:00
Jacob Evans
e51deb93ee
Merge pull request #914 from 0xProject/feature/0x.js/ec-signature-string
0x.js Return signature as a hex encoded string
2018-08-14 09:36:11 +10:00
Jacob Evans
ca4905c343
Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +10:00
Amir Bandeali
1b5c5e7a3b Change withdrawERC20 => withdrawAsset, reuse transfer logic 2018-08-09 14:07:27 -07:00
Amir Bandeali
b9d8d2d5e3 Make marketBuy functions revert if entire amount not filled 2018-08-09 11:26:32 -07:00
Amir Bandeali
b60a74c8bc
Merge pull request #941 from 0xProject/feature/contracts/returnValuesTests
[contracts] Test fillOrder return values and abiEncodeFillOrder
2018-08-09 10:39:14 -07:00
Jacob Evans
45e9fbe8f9
Introduce SignerProviderType
This allows the developer to indicate the nuanced signer provider. Some have different implementations (trezor, ledger) and others have different implementations (metamask). Breaking the abstraction of eth_sign. EthSign assumes a spec compliant implementation and can be used as a default
2018-08-09 12:02:12 +10:00
Amir Bandeali
9a5d7b7635 Test abiEncodeFillOrder as part of combinatorial follOrder tests 2018-08-08 15:44:43 -07:00
Amir Bandeali
970bef717e Add return values to combinatorial fillOrder tests 2018-08-08 15:44:43 -07:00
Alex Browne
6a5965d73b
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates 2018-08-08 14:27:30 -07:00
Alex Browne
6e2e658162
Update TypeScript to version 2.9.2 2018-08-08 11:27:38 -07:00
Fabio Berger
7759e67a5a Rename EIP712Utils to eip712Utils since objectLiterals shouldn't start with caps 2018-08-04 10:09:08 +02:00
Fabio Berger
1588f4ac39 Stop exporting crypto 2018-08-03 17:51:58 +02:00
Fabio Berger
d85ce6ac75 Make signature_util into an object literal so related functions are rendered together in the docs 2018-08-03 17:15:14 +02:00
Fabio Berger
3ee3fc2fb3 Add missing doc comments 2018-08-03 17:13:10 +02:00
Alex Browne
554d5f97df
Add combinatorial tests for internal Exchange functions (#807)
* WIP add combinatorial tests for internal Exchange functions

* Change combinitorial testing strategy based on feedback

* Check value of filled[orderHash] in updateFilledState tests

* Add combinatorial tests for addFillResults

* Add combinatorial tests for getPartialAmount

* Implement generic `testWithReferenceFuncAsync`

* Implement generic `testCombinatoriallyWithReferenceFuncAsync`

* Add combinatorial tests for isRoundingError

* Add combinatorial tests for calculateFillResults

* Add support for Geth in internal contract tests

* Fix contract artifacts

* Change DECIMAL_PLACES to 78 and add a note.

* Document new functions in utils

* Optimize tests by only reseting state when needed

* Rename/move some files

* Print parameter names on failure in testWithReferenceFuncAsync

* Add to changelog for utils package

* Appease various linters

* Rename some more things related to FillOrderCombinatorialUtils

* Remove .only from test/exchange/internal.ts

* Remove old test for isRoundingError and getPartialAmount

* Appease linters again

* Remove old todos

* Fix typos, add comments, rename some things

* Re-add some LibMath tests

* Update contract internal tests to use new SafeMath revert reasons

* Apply PR feedback from Amir

* Apply PR feedback from Remco

* Re-add networks to ZRXToken artifact

* Remove duplicate Whitelist in compiler.json
2018-07-26 22:09:55 -07:00
Amir Bandeali
e5e68de2d7 Use != instead of > in loops, add sanity checks to market fill functions 2018-07-23 10:02:51 -05:00
Amir Bandeali
dcc0908617 Add more tests and fixes 2018-07-23 10:02:51 -05:00
Amir Bandeali
0a976a3fb8 Get actual gasPrice from transaction instead of setting default 2018-07-23 10:00:23 -05:00
Amir Bandeali
3506ec1caa Use transferFrom instead of safeTransferFrom 2018-07-23 10:00:23 -05:00
Amir Bandeali
1f0e819756 Fix minimal tests 2018-07-23 10:00:23 -05:00
Amir Bandeali
c2ae9f62a4 Add tests to verify ZRX_ASSET_DATA 2018-07-23 09:34:47 -05:00
Amir Bandeali
d8b44283a2 Move example contracts into new examples dir 2018-07-23 09:34:47 -05:00
Amir Bandeali
195d11f9d0
Merge pull request #877 from 0xProject/feature/contracts/removeERC721Callback
Removed receiverData and `onReceive` callback from ERC721 proxy.
2018-07-22 18:14:09 -05:00
Greg Hysen
9aa49e59d0 Fixed merge errors 2018-07-18 16:44:24 +02:00
Greg Hysen
86328af6b7 Fixed merge error 2018-07-18 16:27:26 +02:00
Greg Hysen
36c27bdbf8 Ran prettier 2018-07-18 16:18:54 +02:00
Greg Hysen
e1a9f3435f Removed receiverData from ERC721 Proxy Id generation 2018-07-18 15:52:14 +02:00
Greg Hysen
9f74feb347 Removed receiverData and onReceive callback from ERC721 proxy. 2018-07-18 15:50:58 +02:00
Leonid Logvinov
5044fe4fe4
Merge branch 'v2-prototype' into feature/order-watcher-v2 2018-07-18 15:40:45 +02:00
Leonid Logvinov
c71781d9ab
Merge 2018-07-18 15:38:10 +02:00
Fabio Berger
e2fb49a8f8
Merge pull request #884 from 0xProject/export-more-0x.js
Export missing V2 pieces from 0x.js
2018-07-18 15:18:54 +02:00
Leonid Logvinov
f3241ff86a
Merge pull request #883 from 0xProject/feature/tslint-improvements
New tslint rules
2018-07-18 14:54:47 +02:00
Fabio Berger
004b1f5288 Fix prettier 2018-07-18 14:53:31 +02:00
Fabio Berger
83747934ad Fix linter 2018-07-18 12:11:11 +02:00
Fabio Berger
7f90f5ecd4 merge v2-prototype 2018-07-18 12:04:57 +02:00
Fabio Berger
12f02b9814 Rename decodeAssetDataId to decodeAssetProxyId for consistency 2018-07-18 11:49:30 +02:00
Fabio Berger
25160d7344 Move encodeUint256 & decodeUint256 out of assetDataUtils since we don't want them exported 2018-07-18 11:32:01 +02:00
Amir Bandeali
caa5b4e342 Add tests for getOrderInfo and getOrdersInfo 2018-07-17 13:59:14 -07:00
Fabio Berger
f8dbf57582 Rename assetProxyUtils to assetDataUtils 2018-07-17 15:26:55 +02:00
Leonid Logvinov
bf8ac3b9e6
Fix tslint issues 2018-07-17 12:59:02 +02:00
Alex Browne
9828fa335e
Fix bugs having to do with block timestamps and order expirationTimes 2018-07-16 18:41:37 -07:00
Jacob Evans
81b4f4928d
Remove extra ERC20ProxyId from Forwarder constructor 2018-07-11 20:16:59 +10:00