Request form
EIP712
  • Utility
  • Audited
Docs
Source
ChefGPT

EIP712

This contract implements the EIP-712 standard for typed structured data hashing and signing. It provides functions to calculate the domain separator, hash typed data, and retrieve the EIP-712 domain information. The contract allows for caching of domain-related values to optimize gas costs.

EIP712 :
Note, this implementation: - Uses `address(this)` for the `verifyingContract` field. - Does NOT use the optional EIP-712 salt. - Does NOT use any EIP-712 extensions. This is for simplicity and to save gas. If you need to customize, please fork / modify accordingly.
constructor :
Cache the hashes for cheaper runtime gas costs. In the case of upgradeable contracts (i.e. proxies), or if the chain id changes due to a hard fork, the domain separator will be seamlessly calculated on-the-fly.
eip712Domain() :
See: https://eips.ethereum.org/EIPS/eip-5267
EIP712.sol

6 downloads

Solidity Version

0.8.15

Creator

Solady
Solady / EIP712
  • Utility
  • Audited
Docs
Source
ChefGPT
Expand
Share

Get Cookin'
star icon6

6 downloads

Solidity Version

0.8.15

Creator

Solady

EIP712

This contract implements the EIP-712 standard for typed structured data hashing and signing. It provides functions to calculate the domain separator, hash typed data, and retrieve the EIP-712 domain information. The contract allows for caching of domain-related values to optimize gas costs.

EIP712 :
Note, this implementation: - Uses `address(this)` for the `verifyingContract` field. - Does NOT use the optional EIP-712 salt. - Does NOT use any EIP-712 extensions. This is for simplicity and to save gas. If you need to customize, please fork / modify accordingly.
constructor :
Cache the hashes for cheaper runtime gas costs. In the case of upgradeable contracts (i.e. proxies), or if the chain id changes due to a hard fork, the domain separator will be seamlessly calculated on-the-fly.
eip712Domain() :
See: https://eips.ethereum.org/EIPS/eip-5267
EIP712.sol