16 Commits

Author SHA1 Message Date
Amir Bandeali
4dd59a370d Add tests for ERC20 token with no return values 2018-08-16 17:31:21 -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
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
Fabio Berger
7b806fe84d Remove unused variable 2018-07-02 11:18:48 +02:00
Fabio Berger
de9f0732a0 Merge branch 'v2-prototype' into fix/five_decimal_scenario
* v2-prototype: (75 commits)
  Update relayer grid tiles to use Text
  Fix build
  Update file structure
  Update 2.0.0 artifacts
  Move ledgerhq module declarations to typescript-typings
  Export LedgerEthereumClient type in subproviders
  Update artifacts
  Add logging and updated artifacts
  Fix migrations
  Run prettier
  Add Kovan artifacts
  Use ledger subprovider
  Add Kovan migrations
  Remove state variable from Link component in Portal
  Make registerAssetProxy append only
  Update staging api link
  Change getTransactionReceipt to awaitTransactionMined
  Move /docs route to the end
  Remove extra call to scrollIntoView for wallet in onboarding
  Update expectRevertReasonOrAlwaysFailingTransactionAsync to check status codes
  ...
2018-07-02 11:12:01 +02:00
Fabio Berger
018a437d62 Print out entire orderFill scenario 2018-07-02 10:51:28 +02:00
Amir Bandeali
41064adc66 Fix build 2018-06-29 18:20:44 -07:00
Fabio Berger
375d667144 Move combinatorial fillOrder tests into the fill_ordere test file 2018-06-27 10:43:12 +02:00
Fabio Berger
fb03003b3a Fix inconsistency between contract and reference implementation of order validation logic 2018-06-26 07:50:24 +02:00
Fabio Berger
1134ff1075 Fix tslint issues 2018-06-25 20:17:00 +02:00
Fabio Berger
5bfdffda11 Add support for approveAll in assetWrapper and fillOrderScenarios 2018-06-20 19:14:04 +02:00
Fabio Berger
9bc481ff62 Split balance and allowance amount types in prep of adding the "unlimited" allowance enum value 2018-06-20 13:36:57 +02:00
Fabio Berger
fb55def54f Add ability to tweak the relevant balances/allowances for the maker and taker for a fillScenario. Convert more of the core tests to the declarative form. 2018-06-15 00:03:00 +02:00
Fabio Berger
12033abe09 Rename OrderAmountScenario to OrderAssetAmountScenario and convert generateOrderCombinations to generateFillOrderCombinations 2018-06-14 12:07:57 +02:00
Fabio Berger
c232a32991 Use a defaultFillScenario in fillOrder tests 2018-06-14 11:17:13 +02:00
Fabio Berger
d31b051fc5 Replace initial set of legacy manually written fillOrder tests with declarative FillScenario tests 2018-06-14 10:41:04 +02:00