13220 Commits

Author SHA1 Message Date
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
Lawrence Forman
0cb8586f68 Unpin coordinator deps.
Update coordinator tests for new tooling.
Remove unecessary `chainId` parameter in `eip712_utils.createCoordinatorApprovalTypeData`
2019-07-23 15:21:14 -07:00
Amir Bandeali
e42a0979bc Add return natspec to all MixinTransaction functions 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
Amir Bandeali
ac9247195b Don't use exchangeDataEncoder as default for functions that don't involve orders 2019-07-23 15:21:14 -07:00
Amir Bandeali
fc2a59ceaa Update imports in tests 2019-07-23 15:21:13 -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
d373f5488a Add functions with mutex to ReentrantERC20Token and update IExchange with missing function 2019-07-23 15:19:33 -07:00
Amir Bandeali
24906138c7 Make preSign compatible with executeTransaction 2019-07-23 15:19:33 -07:00
Amir Bandeali
f4b3b69b2f Move constants and exchangeDataEncoder into test-utils package 2019-07-23 15:19:33 -07:00
Amir Bandeali
e80abad19a Add batchExecuteTransaction 2019-07-23 15:18:26 -07:00
Amir Bandeali
c9c228ffdd Add return data to executeTransaction 2019-07-23 15:18:26 -07:00
Amir Bandeali
6fc30d31bf Fix missed conflicts and rebuild 2019-07-23 15:18:26 -07:00
Lawrence Forman
0bcd47b394 Add OrderValidator and WalletOrderValidator signature strategies to Exchange (#1774)
* In `@0x/contracts-exchange`: Add `SignatureType.OrderValidator` support to contracts and refactor signature validation functions.

* In `@0x/types`: Add `SignatureType.OrderValidator` and `RevertReason.InappropriateSignature`.

* In `@0x/contracts-exchange`: Fix contracts and update tests for `SignatureType.OrderValidator`.

* Ran prettier/linter

* Update changelogs

* In `@0x/order-utils`: Add `SignatureOrderValidatorError` to `ExchangeRevertErrors`.

* In `@0x/contracts-exchange`: Add `SignatureOrderValidatorError` rich revert. Fix rebase issues. Rename `IValidator.isValidOrder` to `IValidator.isValidOrderSignature`.

* In `@0x/contracts-exchange`: Add revert test cases for `OrderValidator` signature type.

* In `@0x/order-utils`: Update changelog.

* In `@0x/contracts-exchange`: Split off `SignatureType.OrderValidator` scheme into its own interface and registry.

* In `@0x/types`: Add `SignatureType.WalletOrderValidator`.

* In `@0x/order-utils`: Add `SignatureWalletOrderValidatorError`.

* In `@0x/contracts-exchange`: Add `SignatureType.WalletOrderValidator` support.

* Ran prettier

* In `@0x/types`: Remove `RevertReason.WalletOrderValidator`.

* Update/fix changelogs in `@0x/contracts-exchange`, `@0x/order-utils`, and `@0x/types`.

* In `@0x/contracts-exchange`: Make `isValidOrderSignature` `external` instead of `public`.

* In `@0x/contracts-exchange`: Change `isValidOrderSignature` back to `public` because passing `calldata` to internal functions isn't supported.
2019-07-23 15:18:26 -07:00
Lawrence Forman
c24bb139dd In @0x/contracts-exchange: Change validator/wallet return value test to == 1 instead of != 0. 2019-07-23 15:17:57 -07:00
Lawrence Forman
eb00ff05a8 Ran prettier/linter 2019-07-23 15:17:57 -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
2a6f02c764 In @0x/order-utils: Add SignatureWalletError, SignatureValidatorError to ExchangeRevertErrors. Update AssetProxyTransferError to accept arbitrary errorData bytes instead of a revertReason string. 2019-07-23 15:17:57 -07:00
Amir Bandeali
1b2ff1f9ae Update contracts/exchange/contracts/src/MixinSignatureValidator.sol
Co-Authored-By: dorothy-zbornak <lawrence@0xproject.com>
2019-07-23 15:17:57 -07:00
Lawrence Forman
7de9a36d01 In @0x/contracts-exchange: Fix comments in MixinSignatureValidator.sol. 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
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
Lawrence Forman
8194e3d3c5 In @0x/contracts-exchange: More efficient revert string extraction in MixinAssetProxyDispatcher.sol 2019-07-23 15:17:56 -07:00
Lawrence Forman
440c4fe9b9 In @0x/contracts-utils switch from encodePacked to encodeWithSelector in RichErrors.StandardError 2019-07-23 15:17:56 -07:00
Lawrence Forman
e54f5d563f In @0x/contracts-utils add natspec comments RichErrors.StandardError 2019-07-23 15:17:56 -07:00
Lawrence Forman
5781ab5436 Add PRs to changelogs 2019-07-23 15:17:56 -07:00
Lawrence Forman
f8009dbb27 In @0x/contracts-test-utils: Update CHANGELOG 2019-07-23 15:17:56 -07:00
Lawrence Forman
15efe3ae31 Fix linter errors 2019-07-23 15:17:56 -07:00
Lawrence Forman
991348bbbe In @0x/contracts-extensions: Upgrade tests for rich reverts 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
Lawrence Forman
06499f2155 In @0x/contract-wrappers: Update tests 2019-07-23 15:17:56 -07:00
Lawrence Forman
5b1d9396d7 In @0x/order-utils: Rename Exchange RevertError error codes. 2019-07-23 15:17:56 -07:00
Lawrence Forman
633c5d5938 In @0x/utils add encode() method to RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
2e846159a8 In @0x/dev-utils: swap order of equality check in RevertError chai helper from actual.equals(expected) to expected.equals(actual). 2019-07-23 15:17:56 -07:00
Lawrence Forman
4408604c2d In @0x/contracts-exchange: upgrading tests... 2019-07-23 15:17:56 -07:00
Lawrence Forman
15db5c8059 In @0x/contracts-exchange: Fix busted TestAssetProxyDispatcher.sol 2019-07-23 15:17:56 -07:00
Lawrence Forman
53121b1dd4 In @0x/order-utils: add AssetProxyTransferError Exchange RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
c36dff6354 In @0x/contracts-exchange: Fix dispatchTransferFrom so it preserves the assetData. 2019-07-23 15:17:56 -07:00
Lawrence Forman
94a91ed5c8 In @0x/dev-utils: Tweak equality assertion failure actual and expected rendering to be more readable 2019-07-23 15:17:56 -07:00
Lawrence Forman
162a812189 In @0x/typescript-typings: Add types for @0x/dev-utils chai helpers in types/@0x.
In `@0x/dev-utils`: remove global typescript types for chai helpers in lieu of defining them in `@0x/typescript-typings`
2019-07-23 15:17:56 -07:00
Lawrence Forman
f06f0785f1 In @0x/contracts-test-utils: Inherit OrderStatus from @0x/types 2019-07-23 15:17:28 -07:00
Lawrence Forman
1aae68c614 In @0x/dev-utils: Break out RevertError helper code into a separate file from chai_setup.ts.
In `@0x/dev-utils`: Add chai support for ganache and geth transaction reverts.
2019-07-23 15:17:28 -07:00
Lawrence Forman
703a0fde3c In @0x/utils: Add AnyRevertError type that matches with any revert error 2019-07-23 15:17:28 -07:00