From ca330907930b52ffc590b2a220831739a5c7f595 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Fri, 9 Aug 2019 21:23:57 -0400 Subject: [PATCH] `@0x/contracts-exchange`: Add comments to `LEGACY_WALLET_MAGIC_VALUE` constant in `TestValidatorWallet.sol`. `@0x/contracts-exchange`: Remove references to `LibExchangeSelectors` in the Exchange. --- contracts/exchange/contracts/src/MixinExchangeCore.sol | 2 -- contracts/exchange/contracts/src/MixinWrapperFunctions.sol | 1 - contracts/exchange/contracts/test/TestValidatorWallet.sol | 2 ++ contracts/exchange/contracts/test/TestWrapperFunctions.sol | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/exchange/contracts/src/MixinExchangeCore.sol b/contracts/exchange/contracts/src/MixinExchangeCore.sol index 844419ec70..554390f40d 100644 --- a/contracts/exchange/contracts/src/MixinExchangeCore.sol +++ b/contracts/exchange/contracts/src/MixinExchangeCore.sol @@ -20,7 +20,6 @@ pragma experimental ABIEncoderV2; import "@0x/contracts-utils/contracts/src/LibBytes.sol"; import "@0x/contracts-utils/contracts/src/LibRichErrors.sol"; -import "@0x/contracts-exchange-libs/contracts/src/LibExchangeSelectors.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol"; @@ -34,7 +33,6 @@ import "./MixinSignatureValidator.sol"; contract MixinExchangeCore is IExchangeCore, IExchangeRichErrors, - LibExchangeSelectors, LibMath, LibFillResults, MixinAssetProxyDispatcher, diff --git a/contracts/exchange/contracts/src/MixinWrapperFunctions.sol b/contracts/exchange/contracts/src/MixinWrapperFunctions.sol index 07d57dd40a..0d76f2146d 100644 --- a/contracts/exchange/contracts/src/MixinWrapperFunctions.sol +++ b/contracts/exchange/contracts/src/MixinWrapperFunctions.sol @@ -21,7 +21,6 @@ pragma experimental ABIEncoderV2; import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol"; import "@0x/contracts-utils/contracts/src/LibRichErrors.sol"; -import "@0x/contracts-exchange-libs/contracts/src/LibExchangeSelectors.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol"; import "@0x/contracts-exchange-libs/contracts/src/LibFillResults.sol"; diff --git a/contracts/exchange/contracts/test/TestValidatorWallet.sol b/contracts/exchange/contracts/test/TestValidatorWallet.sol index 40abbbc396..aa7ef503f7 100644 --- a/contracts/exchange/contracts/test/TestValidatorWallet.sol +++ b/contracts/exchange/contracts/test/TestValidatorWallet.sol @@ -45,6 +45,8 @@ contract TestValidatorWallet is { using LibBytes for bytes; + // Magic bytes to be returned by `Wallet` signature type validators. + // bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)")) bytes4 private constant LEGACY_WALLET_MAGIC_VALUE = 0xb0671381; /// @dev Revert reason for `Revert` `ValidatorAction`. diff --git a/contracts/exchange/contracts/test/TestWrapperFunctions.sol b/contracts/exchange/contracts/test/TestWrapperFunctions.sol index 5786dda94b..f360f641a0 100644 --- a/contracts/exchange/contracts/test/TestWrapperFunctions.sol +++ b/contracts/exchange/contracts/test/TestWrapperFunctions.sol @@ -46,6 +46,7 @@ contract TestWrapperFunctions is // solhint-disable no-empty-blocks constructor () public + // Initialize the exchange with a fixed chainId ("test" in hex). Exchange(0x74657374) {}