62 Commits

Author SHA1 Message Date
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
6324a92ec5 Refactor contracts-* exports so none in test dir so npmignore works as intended 2019-11-11 21:49:29 +00:00
fabioberger
15a5bc02ef Fix remaining build issues 2019-11-11 00:13:44 +00:00
Xianny
6a852ab0ed
Replace assetDataUtils with DevUtilsContract wherever possible (#2304)
* Replace assetDataUtils with DevUtilsContract wherever possible

Does not replace from @0x/instant and some @0x/order-utils uses

* Add revertIfInvalidAssetData to LibAssetData

This is needed to replace `assetDataUtils.decodeAssetDataOrThrow`.
Because it's used in packages and not only contracts, we should wait
to deploy the updated contract so we can update `@0x/contract-artifacts`,
`@0x/abi-gen-wrappers`, and `@0x/contract-wrappers` first.

* remove usages of signatureUtils

* fix test for  optimised encoding

* refactor @0x/contracts-integrations

* update changelogs

* Move @0x/contracts-dev-utils from devDependencies to dependencies
It is exported as part of the package
2019-11-06 19:40:20 -08:00
Michael Zhu
e954e9ca20 update tests 2019-09-30 21:51:34 -07:00
fragosti
f0e0f08e0c Run linter and prettier 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
67ef17f929 Consolidate TransactionSignatureError with SignatureError 2019-09-08 18:55:42 -07:00
Amir Bandeali
90ac5ec577 Fix tests 2019-09-03 20:11:48 -07:00
Amir Bandeali
ea8669439f Minor styling and naming changes 2019-09-03 09:48:21 -07:00
Amir Bandeali
d0869a8840 Fix linting errors 2019-08-30 11:39:28 -07:00
Amir Bandeali
87c9f9af71 Remove example contracts 2019-08-30 11:37:40 -07:00
Alex Towle
2c1393fb09 @0x:contracts-exchange Addressed lingering review comments 2019-08-29 23:50:48 -07:00
Alex Towle
7f17033ce3 @0x:contracts-exchange Added protocol fees to fillOrders and matchOrders 2019-08-28 15:05:13 -07:00
Amir Bandeali
5e51233b49 Address PR feedback 2019-08-22 17:11:50 -07:00
Amir Bandeali
890bfd18fa Update tests to use new TransactionInvalidContextError 2019-08-22 17:04:15 -07:00
Amir Bandeali
9d38bf731f Add transaction gasPrice tests 2019-08-22 17:04:15 -07:00
Alex Towle
4b970905cf @0x:contracts-exchange Removed code written to transactions 2019-08-22 17:01:49 -07:00
Alex Towle
74b9ad5536 @0x:contracts-exchange Added unit tests for getCurrentContextAddress 2019-08-22 17:01:48 -07:00
Lawrence Forman
96bef08ac2 @0x/contracts-exchange: Rename marketSellOrders and marketBuyOrders back to marketSellOrdersNoThrow and marketBuyOrdersNoThrow.
`@0x/contracts-exchange`: Introduce new `marketSellOrdersFillOrKill` and `marketBuyOrdersFillOrKill` functions.
`@0x/contracts-exchange`: Add new rich error types: `IncompleteMarketBuyError` and `IncompleteMarketSellError`.
`@0x/contracts-exchange`: Use `abi.decode()` in `LibExchangeRichErrorDecoder` over `LibBytes`.
2019-08-21 10:59:34 -04:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07: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
a2234b745c @0x/contracts-exchange: Create semi-automated reentrancy testing.
`@0x/contracts-exchange`: Remove old reentrancy tests.
`@0x/contracts-exchange`: Remove `ReentrantERC20Token` contract.
2019-08-09 22:15:33 -04:00
Lawrence Forman
898213bb85 @0x/contracts-exchange: Update tests for moved types. 2019-08-06 15:30:30 -04:00
Greg Hysen
df746c5ff4 Decode log arguments in awaitTransactionSuccessAsync, when ABI is recognized. 2019-07-29 12:04:37 +02:00
Lawrence Forman
d6ba03916a @0x/contracts-exchange: Update tests for new/consolidated signature types.
`@0x/contracts-exchange`: Update `Whitelist` example for new signature types.
2019-07-23 15:53:24 -07:00
Lawrence Forman
7a0dc7a364 @0x/contracts-exchange: Add isValidHashSignature() back.
`@0x/contracts-exchange`: Remove references to removed signature types and associated functions.
2019-07-23 15:53:24 -07:00
Amir Bandeali
589b791cd7 Add names to return values and fix breaking transactions tests 2019-07-23 15:46:16 -07:00
Lawrence Forman
d6c1bf691c Reorder event assertions in transactions tests. 2019-07-23 15:46:16 -07:00
Amir Bandeali
d79714a3cf Fix merge conflict remnant 2019-07-23 15:46:15 -07:00
Amir Bandeali
4e2abcaefa Fix linting errors 2019-07-23 15:46:15 -07:00
Amir Bandeali
d463d4c46b Add transaction expiration tests 2019-07-23 15:46:15 -07:00
Amir Bandeali
4f818d55fa Add TransactionExecution log 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
d11444b983 @0x/contracts-exchange: Fix Exchange Wrappers tests. 2019-07-23 15:26:59 -07:00
Lawrence Forman
0508a45681 @0x/contracts-echange: Fix transactions test bug with ExchangeWrapper example due to deduping. 2019-07-23 15:26:59 -07:00
Lawrence Forman
8aa3b535f0 @0x/contracts-exchange: Update fill order tests for arbitrary fee tokens. (Still more to do) 2019-07-23 15:23:40 -07:00
Amir Bandeali
6b40812e6d Fix incorrect CancelUpTo event args 2019-07-23 15:21:14 -07:00
Lawrence Forman
46af2ffcea In @0x/contracts-exchange: Merge new transaction tests from rebase. 2019-07-23 15:21:14 -07:00
Amir Bandeali
f1a78682aa Add batch fill method tests 2019-07-23 15:21:14 -07:00
Amir Bandeali
dc4bfde76d Fix linting errors 2019-07-23 15:21:14 -07:00
Amir Bandeali
e717625f86 Add batchExecuteTransactions tests 2019-07-23 15:21:14 -07:00
Amir Bandeali
41444e7ede Refactor transaction tests to iclude more combinations and to cover all revert cases 2019-07-23 15:21:14 -07:00
Lawrence Forman
a7fe47f295 In @0x/contracts-exchange: Add SignatureWalletError and SignatureValidatorError rich reverts.
In `@0x/contracts-exchange`: Change `AssetProxyTransferError` to accept a `revertData` bytes instead of a `revertReason` string.
In `@0x/contracts-exchange`: Aadd `contracts/test/TestRevertReceiver.sol` for testing that validator/wallet reverts are properly wrapped.
2019-07-23 15:17:57 -07:00
Lawrence Forman
cfa8796b18 In @0x/contracts-exchange: Fix line count linter error. 2019-07-23 15:17:57 -07:00
Lawrence Forman
3c88ede02c In @0x/order-utils: Add TransactionSignatureError to ExchangeRevertErrors.
In `@0x/contracts-exchange`: Add `TransactionSignatureError`, supplanting `TransactionErrorCodes.BAD_SIGNATURE`, and associated test.
2019-07-23 15:17:57 -07:00
Lawrence Forman
ac18359410 Switch order of parameters in some rich reverts for easier dirty parsing. 2019-07-23 15:17:56 -07:00
Lawrence Forman
233336ea16 Ran prettier and linter 2019-07-23 15:17:56 -07:00
Lawrence Forman
20d8c1b51a In @0x/contracts-exchange: Update tests for rich reverts 2019-07-23 15:17:56 -07:00