Skip to main content

EIP712Utils

Git Source ↗

Includes functionality for calculating EIP712 hashes

State Variables

_domainTypeHash

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

_versionHash

bytes32 private constant _versionHash = keccak256("1")

Functions

computeDomainSeparator

Computes the hash of the EIP712 typed data

This function is used to compute the hash of the EIP712 typed data

function computeDomainSeparator(string memory name, address verifyingContract) external view returns (bytes32);

Parameters

NameTypeDescription
namestringThe name of the domain
verifyingContractaddressThe address of the verifying contract

Returns

NameTypeDescription
<none>bytes32The hash of the EIP712 typed data