Commit Graph

76 Commits

Author SHA1 Message Date
Amir Bandeali
633e6c38c8 Fix linting errors 2018-08-16 17:31:21 -07:00
Amir Bandeali
a4d6bc3190 Fix tests that assumed logs were being filtered 2018-08-16 17:31:21 -07:00
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
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
Amir Bandeali
1b5c5e7a3b Change withdrawERC20 => withdrawAsset, reuse transfer logic 2018-08-09 14:07:27 -07: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
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
dcc0908617 Add more tests and fixes 2018-07-23 10:02:51 -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
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
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
Amir Bandeali
092ca6bcf5 Use 0.4.10 in AssetProxyOwner, add readBytes4 to contract and remove LibBytes 2018-07-10 11:24:22 -07:00
Leonid Logvinov
b21f6e4d86 Merge pull request #822 from 0xProject/v2-contract-wrappers-WIP
V2 contract wrappers
2018-07-06 12:10:55 +03:00
Jacob Evans
03b3d74748 Merge pull request #522 from 0xProject/feature/contracts/forwarder
Forwarding contract
2018-07-06 16:29:56 +10:00
Jacob Evans
0557d6a9bf Forwarding contract (squashed commits) 2018-07-06 15:30:07 +10:00
Leonid Logvinov
ba9d3cbdb8 Make it possible to configure block polling interval in base contract wrapper 2018-07-05 15:56:31 +02:00
Alex Browne
dc956020ef Move NodeType caching out of web3-wrapper and into our internal code 2018-07-03 12:57:11 -07:00
Alex Browne
d2ebf4a777 Add TransactionReceiptStatus type to ethereum-types 2018-07-03 10:49:35 -07:00
Alex Browne
5b64b3ea93 Improve robustness of revert reason assertions 2018-07-02 18:57:33 -07:00
Fabio Berger
d861caca23 Fix bug where 18 decimal tokens instead of 5 decimal tokens created 2018-07-02 12:31:02 +02:00
Fabio Berger
af1e4574a8 Disable custom-no-magic-number for block 2018-07-02 11:39:07 +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
Amir Bandeali
41064adc66 Fix build 2018-06-29 18:20:44 -07:00
Amir Bandeali
2fcc36bbad Update file structure 2018-06-29 18:05:40 -07:00
Leonid Logvinov
6a77e0fe56 Move contract utils 2018-05-23 10:32:14 -07:00
Leonid Logvinov
0a725415a4 Merge branch 'v2-prototype' into feature/truffle-sol-cov 2018-05-23 10:19:10 -07:00
Leonid Logvinov
d49f2c40ae Parse compiler.json in SolCompilerArtifactsAdapter 2018-05-22 16:41:50 -07:00
Leonid Logvinov
06be580d2c Fix a bug in CALL-like opcode handling 2018-05-22 15:27:17 -07:00
Leonid Logvinov
86f17fb466 Rename ZeroExArtifactAdapter to SolCompilerArtifactAdapter 2018-05-22 15:20:34 -07:00
Leonid Logvinov
8267950dbc Assign then return 2018-05-22 15:20:34 -07:00
Leonid Logvinov
56d1b0103f Introduce CONFIG_FILE 2018-05-22 15:20:34 -07:00
Leonid Logvinov
1ff34bd0f4 Remove web3Factory.create and remove dev-tools dependency on sol-cov 2018-05-22 15:20:34 -07:00
Fabio Berger
2b793f372a Merge branch 'v2-prototype' into refactor/contracts/remove0xjsDep
* v2-prototype:
  Fix tslint issues
  Add `are` to boolean naming conventions
  Fix tslint
  Fix the tsutils version, fixing ts typings issue
  Rename some variables in multi_sig_with_time_lock.ts
  Remove extra awaitTransactionMinedAsync calls
  Update artifacts
  Update yarn.lock
  Fix warnings in Metacoin
  Upgrade UglifyJS to include ES6 support
  Add CancelOrder and MatchOrder types
  Add missing return types
  Ignore classnames linter rule
  Apply changes to test/exchange/match_orders.ts
  Fix some unhandled promise rejections
  Add awaitTransactionMinedAsync after every sent transaction
  Add missing blockchainLifecycle calls to contracts tests

# Conflicts:
#	packages/contracts/src/utils/exchange_wrapper.ts
#	packages/contracts/test/asset_proxy/proxies.ts
#	packages/contracts/test/exchange/dispatcher.ts
#	packages/contracts/test/multi_sig_with_time_lock.ts
2018-05-22 13:02:21 -07:00
Fabio Berger
9373451ca8 Fix tslint issues 2018-05-22 11:58:42 -07:00