diff --git a/contracts/exchange-libs/CHANGELOG.json b/contracts/exchange-libs/CHANGELOG.json index 9fd46bc262..4059813c1e 100644 --- a/contracts/exchange-libs/CHANGELOG.json +++ b/contracts/exchange-libs/CHANGELOG.json @@ -105,6 +105,10 @@ { "note": "Update `IncompleteFillError` to take an `errorCode`, `expectedAssetFillAmount`, and `actualAssetFillAmount` fields.", "pr": 2075 + }, + { + "note": "Move `IWallet.sol` from `asset-proxy` and `exchange` packages to here.", + "pr": 2233 } ], "timestamp": 1570135330 diff --git a/contracts/exchange-libs/contracts/src/IWallet.sol b/contracts/exchange-libs/contracts/src/IWallet.sol new file mode 100644 index 0000000000..2bb323e578 --- /dev/null +++ b/contracts/exchange-libs/contracts/src/IWallet.sol @@ -0,0 +1,38 @@ +/* + + Copyright 2019 ZeroEx Intl. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +pragma solidity ^0.5.9; +pragma experimental ABIEncoderV2; + + +contract IWallet { + + bytes4 internal constant LEGACY_WALLET_MAGIC_VALUE = 0xb0671381; + + /// @dev Validates a hash with the `Wallet` signature type. + /// @param hash Message hash that is signed. + /// @param signature Proof of signing. + /// @return magicValue `bytes4(0xb0671381)` if the signature check succeeds. + function isValidSignature( + bytes32 hash, + bytes calldata signature + ) + external + view + returns (bytes4 magicValue); +}