mirror of
https://github.com/luxfi/eoa-contracts.git
synced 2026-10-30 16:58:32 +00:00
24 lines
900 B
Solidity
24 lines
900 B
Solidity
// SPDX-License-Identifier: LGPL-3.0-only
|
|
pragma solidity 0.8.17;
|
|
|
|
contract ISignatureValidatorConstants {
|
|
// bytes4(keccak256("isValidSignature(bytes32,bytes)")
|
|
bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;
|
|
}
|
|
|
|
abstract contract ISignatureValidator is ISignatureValidatorConstants {
|
|
/**
|
|
* @dev Should return whether the signature provided is valid for the provided data
|
|
* @param _dataHash Arbitrary length data signed on behalf of address(this)
|
|
* @param _signature Signature byte array associated with _data
|
|
*
|
|
* MUST return the bytes4 magic value 0x1626ba7e when function passes.
|
|
* MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)
|
|
* MUST allow external calls
|
|
*/
|
|
function isValidSignature(
|
|
bytes32 _dataHash,
|
|
bytes memory _signature
|
|
) public view virtual returns (bytes4);
|
|
}
|