17 lines
857 B
Solidity
17 lines
857 B
Solidity
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
pragma solidity >=0.5.0;
|
||
|
|
||
|
/// @title Interface for verifying contract-based account signatures
|
||
|
/// @notice Interface that verifies provided signature for the data
|
||
|
/// @dev Interface defined by EIP-1271
|
||
|
interface IERC1271 {
|
||
|
/// @notice Returns whether the provided signature is valid for the provided data
|
||
|
/// @dev 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.
|
||
|
/// @param hash Hash of the data to be signed
|
||
|
/// @param signature Signature byte array associated with _data
|
||
|
/// @return magicValue The bytes4 magic value 0x1626ba7e
|
||
|
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
|
||
|
}
|