Skip to content
Lattice

EIP712Lib Constants

Git Source

EIP712_STORAGE_SLOT

keccak256(abi.encode(uint256(keccak256("lattice.storage.EIP712")) - 1)) & ~bytes32(uint256(0xff)).

bytes32 constant EIP712_STORAGE_SLOT = 0x20a66479672b0fb14805a3bad8d1d6c2fa26c98d9118036fcaf73a0900bc5a00;

EIP712_ERC165_STORAGE_LOCATION

ERC-165 storage location (same across all Lattice modules). keccak256(abi.encode(uint256(keccak256("diamond.lib.storage.ERC165")) - 1)) & ~bytes32(uint256(0xff)).

bytes32 constant EIP712_ERC165_STORAGE_LOCATION = 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200;

ERC165_MAP_IEIP712_SLOT

0x84b0196e is type(IEIP712).interfaceId. keccak256(abi.encode(bytes4(0x84b0196e), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_IEIP712_SLOT = 0xce8419fc9d1331d080c55682cb17490a04c7d4f800e9d81986c2db7a5e912f84;

EIP712_DOMAIN_TYPE_HASH

EIP-712 type hash for the domain struct.

bytes32 constant EIP712_DOMAIN_TYPE_HASH =
    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");