ERC1271Signature
Inherits: IERC1271
Title: ERC1271Signature
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/draft-ERC7739Utils.sol)
ERC-1271 contract-signature facet. Lets the Diamond declare a signature valid (for permits,
Seaport orders, Permit2) when it is a valid signature from the configured AccountSigner owner.
Stateless delegator — logic lives in ERC1271SignatureLib. Implements ERC-7739 defensive rehashing:
accepts only nested TypedDataSign / PersonalSign envelopes bound to this account's EIP-712 domain
(a plain signature over the raw hash is rejected), defeating cross-account replay.
Notes:
- lattice-version: 0.1.0
- lattice-source: ERC-7739
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 calldata signature) external view virtual returns (bytes4);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 |
|---|---|---|
| <none> | bytes4 | 0x1626ba7e if valid, any other value otherwise. |
exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect ERC1271Signature methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
isValidSignature(bytes32,bytes) 0x1626ba7e
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |