IERC1271
Title: IERC1271 — Standard signature validation for contracts
Author: Vendored from OpenZeppelin Contracts contracts/interfaces/IERC1271.sol (MIT). Vendored subset —
do not add an openzeppelin-contracts dependency.
ERC-1271: lets a contract declare a signature valid. dapps (permits, Seaport, Permit2) call this.
Functions
isValidSignature
Returns 0x1626ba7e when signature is a valid signature over hash for this contract.
The magic value is bytes4(keccak256("isValidSignature(bytes32,bytes)")). Any other return
(or a revert) means invalid.
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);Parameters
| Name | Type | Description |
|---|---|---|
| hash | bytes32 | The hash of the signed data. |
| signature | bytes | The signature bytes (opaque; format is account-defined). |
Returns
| Name | Type | Description |
|---|---|---|
| magicValue | bytes4 | 0x1626ba7e if valid, any other value otherwise. |