68 Commits

Author SHA1 Message Date
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
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
b45ec47eee address comments 2019-10-17 19:53:43 -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
Amir Bandeali
8b695f9b98 Fix race condition in tests 2019-10-08 09:12:37 +09:00
Amir Bandeali
d914f6fce9 Test for failure with bad signature after partial fill 2019-10-08 09:12:37 +09:00
Michael Zhu
e954e9ca20 update tests 2019-09-30 21:51:34 -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
c156bfc534 Remove TestValidatorWallet DataType 2019-08-30 11:39:28 -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
71acf2bfa7 Remove hard coded gas limits in all tests 2019-08-25 19:00:50 -07:00
Michael Zhu
00e87864b1 remove from != to check and update tests 2019-08-21 13:07:59 -07:00
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -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
Greg Hysen
09b5018e65 Readability improvements 2019-08-14 23:45:07 +02:00
Greg Hysen
dd4541c825 Fill Order Assertion Wrapper 2019-08-13 17:51:40 +02: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
Amir Bandeali
e7df9d1754 Update cancelOrder and batchCancelOrders tests 2019-08-05 10:35:25 -07:00
Alex Towle
8c5c81fe70 Change all instances of throw to revert in it tests 2019-08-01 15:13:16 -07:00
Greg Hysen
d8cf9d54aa Updated all instances of deployFrom0xArtifactAsync 2019-07-29 12:07:28 +02:00
Greg Hysen
df746c5ff4 Decode log arguments in awaitTransactionSuccessAsync, when ABI is recognized. 2019-07-29 12:04:37 +02:00
Xianny
46384ce80d
Allow generated wrappers to subscribe/unsubscribe to events (#1970)
* Define SubscriptionManager and instantiate in generated wrappers

* expose subscribe/unsubscribe in generated wrappers

* update changelogs

* use SubscriptionManager in `@0x/contract-wrappers`
2019-07-26 16:54:31 -07:00
James Towle
f937a0b038 @0x:contracts-utils Added RichErrors to ReentrancyGuard 2019-07-23 15:53:25 -07: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
Lawrence Forman
2ff3735adc Rebase against 3.0 2019-07-23 15:53:24 -07:00
Lawrence Forman
309dd7f300 Run prettier/linter 2019-07-23 15:53:24 -07:00
Lawrence Forman
33df11b755 @0x/contracts-exchange: Rename WalletOrderValidator to OrderWallet signature type
`@0x/contracts-exchange`: Rename `SignatureWalletOrderValidatorError` to `SignatureOrderWalletError`
`@0x/contracts-exchange`: Add `IEIP1271Wallet` interface
`@0x/contracts-exchange`: Add `EIP1271Wallet` and `EIP1271OrderWallet` to `SignatureType`
`@0x/contracts-exchange`: Always check `OrderValidator`, `OrderWallet`, `EIP1271OrderWallet` signature types on every fill
`@0x/contracts-exchange`: Add tests for EIP1271 signature types.
`@0x/contracts-exchange`: Update `LibExchangeRichErrorDecoder` for new/renamed Error types.
2019-07-23 15:53:24 -07:00
Lawrence Forman
dee5ff852d @0x/contracts-exchange: Have TestValidatorWallet always accept WalletOrderValidator if makerAddress == this.
`@0x/contracts-exchange`: Update tests for repeatable signature validation.
2019-07-23 15:53:24 -07:00
Lawrence Forman
42f7b7cc19 @0x/contracts-exchange: Always check OrderValidator and WalletOrderValidator signature types on every fill
`@0x/contracts-exchange`: Add `validatorAddress` field to `SignatureValidatorError` and `SignatureOrderValidatorError` rich reverts
`@0x/contracts-exchange`: Add separate `SignatureOrderValidatorNotApprovedError` for `OrderValidator` signatures
`@0x/contracts-exchange`: Consolidate Wallet and Validator test contracts into a single configurable `TestValidatorWallet` contract.
`@0x/contracts-exchange`: Rewrite many tests in `signature_validator.ts` for brevity.
2019-07-23 15:53:24 -07:00
Amir Bandeali
d73f7beb2f Fix StaticCallProxy Exchange integration tests 2019-07-23 15:52:20 -07:00
Amir Bandeali
4f6f126952 Fix build 2019-07-23 15:52:20 -07:00
Amir Bandeali
2041d0d000 Add fillOrder transfer ordering tests 2019-07-23 15:52:20 -07:00
James Towle
e229d2d59f Updated tests to work with LibMathRichErrors 2019-07-23 15:52:20 -07:00
Lawrence Forman
aebb923c2d @0x/contracts-exchange: Major rework of fill_order_combinatorial_utils.
`@0x/contracts-exchange`: Add more arbitrary fee token tests.
`@0x/contracts-exchange`: Fix broken tests.
2019-07-23 15:43:23 -07:00
Lawrence Forman
aecb2efad9 @0x/contracts-exchange: Fix combinatorial fillOrder test bugs.
`@0x/contracts-exchange`: Fix emit `Fill` event code.
2019-07-23 15:23:40 -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
Lawrence Forman
61bdbd2d74 Rebased against 3.0.
Run prettier/linter.
2019-07-23 15:21:14 -07:00
Lawrence Forman
fdb6bee65f In @0x/contracts-exchange: Add tests for LibExchangeRichErrorDecoder. 2019-07-23 15:21:14 -07:00
Lawrence Forman
d942c47f08 In @0x/contracts-exchange: Change parameter order and naming of some rich revert errors.
In `@0x/order-utils`: Change parameter order for `OrderStatusError`.
2019-07-23 15:21:14 -07:00
Lawrence Forman
fdaee1375c In @0x/contracts-exchange: Update tests for rich reverts 2019-07-23 15:21:14 -07:00
Lawrence Forman
d25a510291 In @0x/contracts-exchange: upgrading tests... 2019-07-23 15:21:14 -07:00
Amir Bandeali
fc2a59ceaa Update imports in tests 2019-07-23 15:21:13 -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
a0223835b8 In @0x/order-utils: Add signerAddress and signature to ExchangeRevertErrors.SignatureError.
In `@0x/contracts-exchange`: Add `signerAddress` and `signature` to `SignatureError` reverts.
2019-07-23 15:17:56 -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