129 Commits

Author SHA1 Message Date
Jacob Evans
ad8caa2b51
Remove moved RevertErrors 2019-11-27 11:52:14 +11:00
Alex Towle
2a6ea74be7 @0x:contracts-integrations Moved matchOrders into integrations 2019-11-18 17:56:06 -08:00
Michael Zhu
7f4cbba076 Refactor integrations directory structure; move core.ts, balance stores, and FillOrderWrapper to integrations 2019-11-15 09:49:20 -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
fc824b8d06 Fix prettier issues 2019-11-12 11:35:34 +00: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
67e7b5c124 Merge branch 'development' into refactor/reduceContractPkgBundle 2019-11-11 21:00:36 +00:00
fabioberger
90640a4fcf Fix linter 2019-11-11 17:53:07 +00:00
fabioberger
0142d07f10 Fix linter 2019-11-11 17:53:07 +00:00
fabioberger
993adc3578 Pass down DevUtils to fillOrder combinatorial tests 2019-11-11 17:53:07 +00:00
fabioberger
8813bd26f6 Pass around DevUtilsContract so it's only instantiated once 2019-11-11 17:53:07 +00:00
fabioberger
ba0f07e3b2 Fix prettier issues 2019-11-11 17:52:32 +00:00
fabioberger
8614475324 Move TradeSide and TransferType types to contract-exchange package 2019-11-11 17:52:32 +00:00
fabioberger
fba3870ef1 Move ExchangeTransferSimulator into contract-exchange tests since that's the only place it's still used and we no longer want to expose it to external developers 2019-11-11 17:50:48 +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
Amir Bandeali
cdfd62a296 Fix reentrancy tests 2019-10-27 14:23:19 -07:00
Xianny
0e90b0e7d0
Make wrappers small again (#2243)
* introduce --debug option to abi-gen and remove debug functions from @0x/abi-gen-wrappers
* make evmExecAsync protected; ignore deployedBytecode in doc comment
* trim deployedBytecode so it's undefined unless a contract has pure functions
* remove validateAndSendTransactionAsync
* Create `AwaitTransactionSuccessOpts` and `SendTransactionOpts` types 
* Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback` from `@0x/base-contract`
2019-10-16 09:38:34 -07:00
Michael Zhu
cf517b1459 appease static tests 2019-10-06 12:44:58 -07:00
Michael Zhu
c17984b74f Refactor integration tests (CoordinatorTestFactory) 2019-10-06 12:44:58 -07: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
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
90ac5ec577 Fix tests 2019-09-03 20:11:48 -07:00
Amir Bandeali
cb8cf1f107 Add back batchFillOrders 2019-09-03 11:06:45 -07:00
Amir Bandeali
18b65a61ff Fix build 2019-09-01 19:14:16 -07:00
Amir Bandeali
c0f1e5f17f Make fillOrderNoThrow internal only, remove batchFillOrders 2019-09-01 12:22:00 -07:00
Amir Bandeali
b888e48a30 Remove getOrdersInfo 2019-09-01 11:24:16 -07:00
Amir Bandeali
c156bfc534 Remove TestValidatorWallet DataType 2019-08-30 11:39:28 -07:00
Alex Towle
dba0d8469d @0x:contracts-exchange Addressed review feedback 2019-08-29 15:20:52 -07:00
Alex Towle
e64e0d7421 @0x:contracts-exchange Added getOrdersInfo back into the exchange 2019-08-28 16:42:29 -07:00
Alex Towle
861aebb2e3 @0x:contracts-exchange Refactored the protocol fee tests and added tests for batchFillOrders 2019-08-28 15:08:40 -07:00
Alex Towle
7f17033ce3 @0x:contracts-exchange Added protocol fees to fillOrders and matchOrders 2019-08-28 15:05:13 -07:00
Alex Towle
bf3751fd9e @0x:contracts-exchange Added the MixinProtocolFees contract 2019-08-28 15:03:32 -07:00
Alex Towle
415af90ae7 @0x:contracts-exchange Added the MixinStakingManager contract 2019-08-28 14:53:45 -07:00
Lawrence Forman
e9a4b0758b @0x/contracts-exchange: Remove log decoding in ExchangeWrapper test class in favor of awaitTransactionSuccessAsync. 2019-08-21 10:59:34 -04:00
Lawrence Forman
748566b4fb @0x/contracts-exchange: Tweak exchangeDataEncoder test utility to work with marketBuy/SellFillOrKill() functions. 2019-08-21 10:59:34 -04: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
fc18db10be @0x/contracts-exchange: Add tests for when callback signature types return incorrect data. 2019-08-12 19:10:24 -04:00
Lawrence Forman
6df190edbb @0x/contracts-exchange: Light changes to address PR comments. 2019-08-12 18:20:50 -04: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
d4e300d0a4 @0x/contracts-dev-util: Remove references to marketXOrdersNoThrow.
`@0x/contracts-exchange`: Remove references to `marketXOrdersNoThrow`.
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
ca28b8f93e @0x/contracts-exchange: Make marketBuy/SellNoThrow the default.
`@0x/contracts-exchange`: Add more `wrapper_unit_tests` tests.
2019-08-09 22:15:33 -04:00
Lawrence Forman
e3aa76cd09 @0x/contracts-exchange: Light refactoring in
`isolated_fill_order.ts` and `isolated_exchange_wrapper.ts`.
2019-08-08 11:43:55 -04:00
Lawrence Forman
6d502b6898 @0x/contracts-exchange: Use TransactionHelper to call and execute
contract functions.
2019-08-06 15:31:30 -04:00