44 Commits

Author SHA1 Message Date
Michael Zhu
4663eec950 Add function assertions required for staking rewards fuzzing: withdrawDelegatorRewards, finalizePool, and endEpoch. Also adds payProtocolFee-related assertions to fillOrder 2019-12-09 23:45:37 -08:00
Michael Zhu
d11cdcd5d2 Use seeded rng for simulations 2019-12-09 23:42:32 -08:00
Xianny
fcbcbac889
Remove assetDataUtils everywhere (#2373)
* remove assetDataUtils everywhere

* export IAssetDataContract from @0x/contract-wrappers to allow @0x/instant to decode asset data  synchronously

* export generic function `decodeAssetDataOrThrow` and add ERC20Bridge support

* export `hexUtils` from order-utils instead of contracts-test-utils
2019-12-04 13:08:08 -08: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
15a5bc02ef Fix remaining build issues 2019-11-11 00:13:44 +00:00
Michael Zhu
3d56c06ff3 Move Forwarder test to integrations; update to use new framework 2019-10-29 11:26:56 -07:00
Lawrence Forman
6ee1605a77 @0x/contracts-test-utils: Add verifyEventsFromLogs(). 2019-10-25 10:54:38 -04:00
Michael Zhu
93b02e93b9 juggling some files around 2019-10-21 11:16:14 -07:00
Michael Zhu
cde0169733 Update BlockchainBalanceStore to not rely on erc*_wrappers + better balance equality assertions 2019-10-16 18:46:55 -07:00
Lawrence Forman
cf8d424b9b @0x/contracts-test-utils: Add number_utils.ts and hexSize(). 2019-09-27 19:32:55 -04:00
Lawrence Forman
2bb9b9a8f7 @0x/contracts-test-utils: Ran prettier. 2019-09-22 12:13:24 -04:00
Lawrence Forman
0270777cfc @0x/contracts-test-utils: Add hexHash() to hex_utils. 2019-09-22 12:13:24 -04:00
Lawrence Forman
b4b6d4d969 @0x/contracts-test-utils: Add shortZip(). 2019-09-22 12:11:47 -04:00
Amir Bandeali
6641af2a58 Fix build 2019-09-17 08:48:14 -07:00
Alex Towle
b7f25ee3b6 @0x:contracts-staking Addressed review comments 2019-09-11 17:16:33 -07:00
Lawrence Forman
d37679c129 @0x/contracts-test-utils: Add Numberish type. 2019-09-10 00:30:43 -04:00
Lawrence Forman
0999805b3a @0x/contracts-test-utils: Add toHex(), hexInvert(), hexLeftPad(), and hexRightPad() hex utils. 2019-09-04 20:15:15 -04:00
Alex Towle
dba0d8469d @0x:contracts-exchange Addressed review feedback 2019-08-29 15:20:52 -07:00
Greg Hysen
dd4541c825 Fill Order Assertion Wrapper 2019-08-13 17:51:40 +02:00
Lawrence Forman
0eff19f0ff @0x/contracts-test-utils: Add TransactionHelper class.
`@0x/contracts-test-utils`: Add `decodeReceiptLogs()` to `LogDecoder`
class.
2019-08-06 15:31:30 -04:00
Lawrence Forman
8d26f58dfa @0x/contracts-test-utils: Make testCombinatoriallyWithReferenceFuncAsync not async. 2019-08-06 15:30:30 -04:00
Lawrence Forman
abaa0cf3d0 @0x/contracts-test-utils: Move OrderInfo to @0x/types. 2019-08-06 15:30:30 -04:00
Lawrence Forman
c30d59d5d3 @0x/types: Add FillResults, MatchedFillResults, and
`BatchMatchedFillResults` types.
`@0x/contracts-utils`: Add reference functions for `SafeMath`.
`@0x/contracts-exchange-libs`: Add reference functions for `LibMath` and
`LibFillResults`.
`@0x/contracts-test-utils`: Move `*FillResults` types to `@0x/types`.
`@0x/contracts-test-utils`: Add `log_utils.ts`.
`@0x/contracts-test-utils`: Add `hexRandom()` to `hex_utils.ts`.
`@0x/contracts-test-utils`: Add the contstants: `MAX_UINT256`,
`ADDRESS_LENGTH`.
2019-08-06 15:30:30 -04:00
Lawrence Forman
92d112083e @0x/contracts-test-utils: Add filterLogs() and
`filterLogsToArguments()` helpers.
2019-08-06 15:27:39 -04:00
Lawrence Forman
fc5963fa3d @0x/contracts-test-utils: Add hexRandom() to hex_utils.ts. 2019-08-06 15:27:39 -04:00
Lawrence Forman
3cf48a831b @0x/contracts-test-utils: Export a custom describe() instead of
extending Mocha's ambient declarations.
`@0x/contracts-exchange`: Use `describe.optional` instead of
`blockchainTests.optional` in `test/fill_order.ts`.
2019-07-30 16:59:52 -04:00
Lawrence Forman
e01eadaecd @0x/contracts-exchange: Add tests and run prettier. 2019-07-30 16:59:52 -04:00
Lawrence Forman
7e59110049 @0x/contracts-test-utils: Create blockchainTests mocha fixture directive.
`@0x/contracts-test-utils`: Automatically call `chaiSetup.configure()`.
`@0x/contracts-test-utils`: Export `expect` as an alias for `chai.expect`.
2019-07-30 16:59:52 -04:00
James Towle
0df68a6e06 Added testing for the BatchMatchOrdersError Rich Error 2019-07-23 15:53:26 -07:00
James Towle
9651941cce Added getMatchOrdersResultsAsync and getBatchMatchOrdersResultsAsync 2019-07-23 15:53:25 -07:00
Lawrence Forman
4734acbe61 @0x/contracts-test-utils: Add hexConcat() in hex_utils.ts. 2019-07-23 15:53:24 -07:00
Amir Bandeali
564dbea126 Remove formatters and clarify comments about pointing assetData to the same memory location 2019-07-23 15:46:16 -07:00
Lawrence Forman
57ac0ca6e8 @0x/contracts-test-utils: Reduce number of test token deployments to speed up tests. 2019-07-23 15:46:15 -07:00
Lawrence Forman
f7f55cad43 @0x/contracts-exchange: Removed dependency on OrderValidationUtils. The tests using it didn't really warrant the full validation suite.
`@0x/contracts-test-utils`: Move all the `OrderScenario` related types into the `contracts-exchange` package because no one else is using them.
2019-07-23 15:43:23 -07:00
Lawrence Forman
79b8f85cdf @0x/contracts-test-utils: Remove TransferAmountsByMatchOrders and TransferAmountsLoggedByMatchOrders.
`@0x/contracts-test-utils`: Add `TokenBalancesByOwner` type.
2019-07-23 15:23:40 -07:00
Lawrence Forman
f4bf4ee0f2 @0x/contracts-test-utils: Update types for arbitrary fee tokens. 2019-07-23 15:23:40 -07:00
Amir Bandeali
72f4b216c1 Move exchange specific types. constants, and utils into exchange package 2019-07-23 15:21:13 -07:00
Amir Bandeali
f4b3b69b2f Move constants and exchangeDataEncoder into test-utils package 2019-07-23 15:19:33 -07:00
Greg Hysen
15d9e2d3d5 Split ERC1155 Asset Proxy from ERC1155 POC implementation - squashed 2019-03-15 15:05:02 -07:00
Fabio Berger
1fa82c1077 Fix up missing Provider interfaces and refactor providerUtils.standardizeOrThrow() 2019-02-19 22:34:31 -08:00
Amir Bandeali
a394967268 Use new transaction schema throughout monorepo 2019-02-05 09:23:09 -08:00
Leonid Logvinov
de39ec3c97
Remove duplicates combinatorial utils from core contracts 2018-12-03 12:09:28 +01:00
Leonid Logvinov
0faa8b3231
Refactor contracts-core into contracts-multisig, contracts-core and contracts-test-utils 2018-12-03 12:09:28 +01:00