140 Commits

Author SHA1 Message Date
Amir Bandeali
2b1e0be4fc Add default gasPrice to web3Wrapper instance and TransactionFactory 2019-08-22 17:04:15 -07:00
Lawrence Forman
6b8bc55c74 @0x/contracts-test-utils: web3Wrapper is created with shouldAllowUnlimitedContractSize if UNLIMITED_CONTRACT_SIZE environment variable is set. 2019-08-21 10:59:34 -04:00
Amir Bandeali
4c78b7d4bb
Merge pull request #2055 from 0xProject/feat/3.0/optimizeConstants
Refactor library usage
2019-08-16 07:40:54 -07:00
Greg Hysz
64bc99101c
Merge pull request #2059 from 0xProject/feature/contracts/3.0/fillOrderAssertionWrapper
Fill Order Assertion Wrapper
2019-08-15 00:12:40 +02:00
Amir Bandeali
24eaf93db8 Move all exchange-libs tests to separate files 2019-08-13 16:11:09 -07:00
Greg Hysen
dd4541c825 Fill Order Assertion Wrapper 2019-08-13 17:51:40 +02:00
Lawrence Forman
370df0d495 @0x/contracts-dev-utils: Prettier.
`@0x/contracts-exchange`: Update reentrancy tests.
`@0x/contracts-exchange`: Add all mutator functions to
`ExchangeFunctions` type.
`@0x/contracts-tes-utils`: Remove unused import.
2019-08-09 22:15:33 -04:00
Lawrence Forman
c83864af9c @0x/contracts-exchange: Fix broken tests.
`@0x/contracts-test-utils`: Remove unecessary wait timeout in
`LogDecoder`.
2019-08-09 22:15:33 -04:00
Lawrence Forman
de897d2ebf @0x/contracts-test-utils: Refactor LogDecoder slightly. 2019-08-08 11:43:20 -04: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
3156f602dd Fix rebase errors 2019-08-06 15:31:30 -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
a179a6892c @0x/contracts-test-utils: Add ONE_ETHER and MAX_UINT256_ROOT constants. 2019-08-06 15:30:59 -04:00
Lawrence Forman
4600a656d1 @0x/contracts-test-utils: Update testWithReferenceFunctionAsync() to
support `RevertError`s.
2019-08-06 15:30: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
38a1f08413 @0x/contracts-test-utils: Add MAX_UINT256 constant. 2019-08-06 15:27:39 -04:00
Lawrence Forman
92d112083e @0x/contracts-test-utils: Add filterLogs() and
`filterLogsToArguments()` helpers.
2019-08-06 15:27:39 -04:00
Lawrence Forman
1e462f5cc0 @0x/contracts-test-utils: Add ADDRESS_LENGTH constant. 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
James Towle
bd42c33daa
Merge pull request #2014 from jalextowle/feature/contracts/3.0/utils-unit-tests
Added Unit Tests to Utils
2019-08-02 13:42:14 -07:00
Lawrence Forman
9f4933e33d @0x/contracts-test-utils: Make BlockchainContextDefinition interface
more concise.
2019-07-30 16:59:52 -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
930b742663 @0x/contracts-test-utils: Fix blockchain environment not being created
with top-level `blockchainTests.resets()` directive.
2019-07-30 16:59:52 -04:00
Lawrence Forman
99e242affd @0x/contracts-test-utils: Make blockchainTests() automatically call blockchainLifecycle.startAsync() and blockchainLifecycle.revertAsync() in a before() and after() directive. 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
61fc32b7c0 @0x/contracts-test-utils: Add optional modifier to blockchainTests(). 2019-07-30 16:59:52 -04:00
Lawrence Forman
a9c8207bb0 @0x/contracts-test-utils: Pass a more robust BlockchainTestsEnvironment object to blockchainTests() callback. 2019-07-30 16:59:52 -04:00
Lawrence Forman
eac4f172fe @0x/contracts-test-utils: Just do a naked mocha import in mocha_blockchain. 2019-07-30 16:59:52 -04:00
Lawrence Forman
d6271426fd @0x/contracts-test-utils: Rename blockchainTests.reset to blockchainTests.resets. 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
Alex Towle
f9292a8fb8 Added unit tests for LibEIP712 2019-07-30 12:06:35 -07:00
James Towle
e0cff4b74e Updated batchMatchOrders to fix an edge case and added tests 2019-07-23 15:53:26 -07:00
James Towle
416b1aee98 Improved the testing for matchOrders and batchMatchOrders 2019-07-23 15:53:26 -07: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
James Towle
6cf11554de Created tests for batchMatchOrders 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
4f6f126952 Fix build 2019-07-23 15:52:20 -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
Amir Bandeali
d463d4c46b Add transaction expiration tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
c96a81e319 Fix exchange package build 2019-07-23 15:46:15 -07:00
Lawrence Forman
9cc8933eec @0x/contracs-test-utils: Increase number of deployed ERC721 and ERC1155 tokens to 2 to fix broken asset-proxy tests. 2019-07-23 15:46:15 -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
76d577a08d @0x/contracts-test-utils: Add more OrderScenario related types. 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
d8fd61955c @0x/contracts-test-utils: Increase deployment numbers for dummy tokens. 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