diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-08-24 15:19:06 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-25 04:19:07 +0800 |
commit | 0a1ae2c31139e446b2fb3b7f03caf371c6668ae2 (patch) | |
tree | 3408f2db59daf3762dcb4244f52e3389c97849df /packages/contracts/src/2.0.0/protocol/Exchange/mixins | |
parent | c5f8b9c2d2b1eed5789b40c4df07e98afe0431ab (diff) | |
download | dexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.tar.gz dexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.tar.zst dexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.zip |
Remove pragma experimental v0.5.0 and use staticcall is assembly
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/mixins')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/mixins/MSignatureValidator.sol | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MSignatureValidator.sol b/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MSignatureValidator.sol index f14f2ba00..75fe9ec46 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MSignatureValidator.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MSignatureValidator.sol @@ -43,4 +43,35 @@ contract MSignatureValidator is Trezor, // 0x08 NSignatureTypes // 0x09, number of signature types. Always leave at end. } + + /// @dev Verifies signature using logic defined by Wallet contract. + /// @param hash Any 32 byte hash. + /// @param walletAddress Address that should have signed the given hash + /// and defines its own signature verification method. + /// @param signature Proof that the hash has been signed by signer. + /// @return True if the address recovered from the provided signature matches the input signer address. + function isValidWalletSignature( + bytes32 hash, + address walletAddress, + bytes signature + ) + internal + view + returns (bool isValid); + + /// @dev Verifies signature using logic defined by Validator contract. + /// @param validatorAddress Address of validator contract. + /// @param hash Any 32 byte hash. + /// @param signerAddress Address that should have signed the given hash. + /// @param signature Proof that the hash has been signed by signer. + /// @return True if the address recovered from the provided signature matches the input signer address. + function isValidValidatorSignature( + address validatorAddress, + bytes32 hash, + address signerAddress, + bytes signature + ) + internal + view + returns (bool isValid); } |