IEIP712
Title: IEIP712
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol)
Interface for EIP-712 typed structured data hashing and signing, including ERC-5267 domain discovery.
Functions
eip712Domain
Returns the fields and values that describe the domain separator used for signing.
Implements ERC-5267.
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);Returns
| Name | Type | Description |
|---|---|---|
| fields | bytes1 | A bitmask where bit i indicates that field i is active in the domain. Bit 0 = name, bit 1 = version, bit 2 = chainId, bit 3 = verifyingContract, bit 4 = salt. |
| name | string | The user-readable name of the signing domain. |
| version | string | The current major version of the signing domain. |
| chainId | uint256 | The EIP-155 chain ID. |
| verifyingContract | address | The address of the contract that will verify the signature. |
| salt | bytes32 | An optional disambiguating salt. |
| extensions | uint256[] | An array of EIP-7702 extensions (empty for this implementation). |
Errors
EIP712InvalidName
Thrown when the provided name is invalid (empty).
error EIP712InvalidName();EIP712InvalidVersion
Thrown when the provided version is invalid (empty).
error EIP712InvalidVersion();