51 Commits

Author SHA1 Message Date
Jacob Evans
ad8caa2b51
Remove moved RevertErrors 2019-11-27 11:52:14 +11:00
F. Eugene Aumson
f11d8a5bd8
@0x/order-utils refactors for v3: orderParsingUtils, signatureUtils, orderHashUtils, RevertErrors, transactionHashUtils (#2321)
* move orderParsingUtils from order-utils to connect

* Remove many functions from signatureUtils

Removed from the exported object, that is.  All of them are used in
other existing code, so they were all moved to be as local to their
usage as possible.

* remove orderHashUtils.isValidOrderHash()

* Move all *RevertErrors from order-utils...

...into their respective @0x/contracts- packages.

* Refactor @0x/order-utils' orderHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed getOrderHash()
method in DevUtils.

* Move all *RevertErrors from @0x/utils...

...into their respective @0x/contracts- packages.

* rm transactionHashUtils.isValidTransactionHash()

* DevUtils.sol: Fail yarn test if too big to deploy

* Refactor @0x/order-utils transactionHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed
getTransactionHash() method in DevUtils.

* Consolidate `Removed export...` CHANGELOG entries

* Rm EthBalanceChecker from devutils wrapper exports

* Stop importing from '.' or '.../src'

* fix builds

* fix prettier; dangling promise

* increase max bundle size
2019-11-14 17:14:24 -05:00
Xianny
f0d7d10fe7
update abi-gen with new method interfaces (#2325)
* update abi-gen with new method interfaces

* wip: get all packages to build

* wip: get all packages to build

* Fix two contract wrapper calls

* Export necessary types part of the contract wrapper public interfaces

* Revive and fix wrapper_unit_tests

* Remove duplicate type

* Fix lib_exchange_rich_error_decoder tests

* Fix remaining test failures in contracts-* packages

* Prettier fixes

* remove transactionHelper

* lint and update changelogs

* Fix prettier

* Revert changes to reference docs

* Add back changelog already published and add revert changelog entry

* Add missing CHANGELOG entries

* Add missing comma

* Update mesh-rpc-client dep

* Update Mesh RPC logic in @0x/orderbook to v6.0.1-beta

* Align package versions
2019-11-14 11:22:29 -05:00
fabioberger
86b76a3e75 Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages 2019-11-11 15:10:15 +00:00
fabioberger
f011be9347 Update all contracts-*is package.json, tsconfig.json, compiler.json, artifacts/ts and wrappers.js 2019-11-10 23:41:56 +00:00
fragosti
88dcf6350d Fix exchange-libs test 2019-09-27 13:20:09 -07:00
fragosti
8ba38b9b29 Remove the OrderWithoutDomain type 2019-09-25 18:44:19 -07:00
fragosti
9870f55d24 Remove domain from Order type 2019-09-25 18:44:19 -07:00
Amir Bandeali
ae75aed55e Change verifyingContractAddress -> verifyingContract everywhere 2019-09-23 16:00:37 -07:00
Amir Bandeali
bb46f184ed Remove use of generatePseudoRandomAddress in favor of randomAddress 2019-09-17 10:46:58 -07:00
Amir Bandeali
75a8b1c081 Use same taker numerator/denominator for all math in calculateFillResults 2019-09-03 09:48:16 -07:00
Alex Towle
dba0d8469d @0x:contracts-exchange Addressed review feedback 2019-08-29 15:20:52 -07:00
Alex Towle
df4282fb34 Fixed issues after rebase 2019-08-28 15:50:23 -07:00
Alex Towle
3a4e72bb08 @0x:contracts-exchange-libs Added protocol fees to LibFillResults
* This commit also squashed some bugs in the reference functions.
Thankfully, combinatorial testing had our back!
2019-08-28 15:03:32 -07:00
Alex Towle
c688b11c86 @0x:contracts-exchange-libs Added protocol fees to LibFillResults
* This commit also squashed some bugs in the reference functions.
Thankfully, combinatorial testing had our back!
2019-08-28 15:01:30 -07:00
Michael Zhu
078b1af04e Binop -> BinOp 2019-08-26 16:06:31 -07:00
Michael Zhu
98e5b26eb7 refactor SafeMath rich errors and use them in staking libs 2019-08-26 15:49:09 -07:00
Amir Bandeali
23dd711396 Update ZeroExTransaction tests 2019-08-22 17:04:15 -07:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07:00
Amir Bandeali
cc3be9448a Move MatchedFillResults constants closer to tests where they are utilized 2019-08-15 16:51:40 -07:00
Amir Bandeali
7ac30c5153 Merge branch '3.0' into feat/3.0/optimizeConstants 2019-08-15 15:20:48 -07:00
Amir Bandeali
1dae1d244c Rename hashing functions in LibOrder and LibZeroExTransaction 2019-08-14 13:38:12 -07:00
Amir Bandeali
2da996f493 Hard code chainId in tests 2019-08-14 11:07:28 -07:00
James Towle
f66212ce23
Merge pull request #2051 from jalextowle/feature/3.0/exchange-libs/unit-tests
`@0x:contracts-exchange-libs` Added unit tests to exchange-libs
2019-08-14 10:52:10 -07:00
Amir Bandeali
45f229c531 Move LibEIP712ExchangeDomain tests to own file 2019-08-13 16:11:57 -07:00
Amir Bandeali
24eaf93db8 Move all exchange-libs tests to separate files 2019-08-13 16:11:09 -07:00
Alex Towle
e4257fb6c7 Addressed review comments and prettified code 2019-08-13 11:06:41 -07:00
James Towle
6e1fdda182
Update contracts/exchange-libs/test/lib_zero_ex_transaction.ts
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
2019-08-12 11:06:01 -07:00
Lawrence Forman
18485dd456 @0x/contracts-exchange-libs: Add complementary tests when rounding up and down behavior with isRoundingErrorFloor() and isRoundingerrorCeil(). 2019-08-09 21:07:23 -04:00
Alex Towle
c318b849fe @0x:contracts-exchange-libs Added unit tests to exchange-libs 2019-08-09 17:28:36 -07:00
Lawrence Forman
08118ec36f @0x/contracts-exchange-libs: Fix coverage hooks.
`@0x/contracts-exchange-libs`: Add explicit tests for
`*getPartialAmount*()` for rounding modes.
2019-08-08 11:41:51 -04:00
Lawrence Forman
6345faa4a9 `@0x/contracts-exchange-libs: Appease the linter and prettier gods. 2019-08-06 15:30:59 -04:00
Lawrence Forman
293510c087 @0x/contracts-exchange-libs: Add explicit tests for LibMath and LibFillResults functions.
`@0x/contracts-exchange-libs`: Add tests for `ReferenceFunctions`.
2019-08-06 15:30:59 -04:00
Lawrence Forman
51391b7f0e @0x/contracts-exchange-libs: Correct internal variable naming in src/index.ts.
`@0x/contracts-utils`: Correct internal variable naming in `src/index.ts`.
`@0x/contracts-exchange`: Remove functions from `TestExchangeInternals.sol` that are now in other packages.
`@0x/contracts-exchange`: Remove `TestExchangeMath.sol`. Exchange math functions are now tested in `@0x/contracts-exchange-libs`.
`@0x/contracts-exchange`: Move `ReferenceFunctions` to default package export.
`@0x/contracts-exchange`: Update `match_order.ts` tests to use reference math functions instead of `TestExchangeMath`.
`@0x/contracts-exchange`: Remove `_updateFilledState()` combinatorial tests in favor of normal unit testing. Combinatorial testing was overkill.
`@0x/contracts-exchange`: Update/refactor `calculateFillResults()` combinatorial tests to use the reference functions and hide them behind `TEST_ALL`.
2019-08-06 15:30:59 -04:00
Lawrence Forman
884b1add8e @0x/contracts-exchange-libs: Move in revamped LibFillResults tests from @0x/contracts-exchange. 2019-08-06 15:30:59 -04:00
Lawrence Forman
f791cd3a37 @0x/contracts-exchange-libs: Remove unecessary checks for zero
denominator.
`@0x/contracts-exchange-libs`: `LibMath` tests from `@0x/contracts-exchange` into this package.
`@0x/contracts-exchange-libs`: Adjust logic in reference functions to be
closer to solidity implementation.
2019-08-06 15:30:30 -04:00
Greg Hysen
d8cf9d54aa Updated all instances of deployFrom0xArtifactAsync 2019-07-29 12:07:28 +02:00
James Towle
4e6dd1b213 Updated the style 2019-07-23 15:51:43 -07:00
Amir Bandeali
7cff9ba86a Refactor tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
6ddaa6f52a Add expirationTimeSeconds to ZeroExTransaction schema throughout codebase 2019-07-23 15:46:15 -07:00
Amir Bandeali
64c596c922 temp 2019-07-23 15:23:40 -07:00
Amir Bandeali
3e461ac2e5 Rename internal and private functions 2019-07-23 15:21:14 -07:00
Lawrence Forman
b8f056b82f Update coordinator, exchange-forwarder, exchange-libs, exchange, and extensions contract tests to use new order and transaction structure 2019-07-23 15:08:00 -07:00
Lawrence Forman
a0b1f3efa2 Fix typo in exchange-libs test. 2019-07-23 15:04:46 -07:00
Lawrence Forman
f7fb1225d2 Add more LibEIP712 tests to exchange-libs 2019-07-23 15:04:46 -07:00
Lawrence Forman
b380952ff9 Add test to exchange-libs to ensure that a different chainId results in a different order hash. 2019-07-23 15:04:46 -07:00
Lawrence Forman
2d28fde24d Migrate all contract-related tooling and tests to accept a chain ID in domain separators. 2019-07-23 14:58:00 -07:00
Amir Bandeali
f68b8d82e0 Move LibTransactionDecoder to dev-utils package 2019-06-07 08:46:20 -07:00
F. Eugene Aumson
741a731ecb
Transaction decoder for Coordinator (#1802)
* Remove unused dependency from erc20/package.json

* Add LibTransactionDecoder

Yet unsupported functions include:
    cancelOrdersUpTo
    executeTransaction
2019-05-24 11:27:53 -04:00
Jacob Evans
548089888d
Remove excess web3providernegine polling from contracts 2019-03-21 11:50:19 +01:00