SignatureValidator
This contract validates the signatures associated with EIP-712 typed structures.
DOMAIN_SEPARATOR
DOMAIN_TYPEHASH
__SignatureValidator_init
Initializes the DOMAIN_SEPARATOR
value.
The function is meant to be called in the constructor of the contract implementing this logic.
isValidSignature
Validates a signature.
This modifier checks if the signature associated with a _permitHash
is valid.
Parameters
_signature
struct Signature
The signer struct containing the signature, signer and deadline.
_permitHash
bytes32
The EIP-712 permit hash.
validateSignatureAndUpdateNonce
Validates a signature.
This function checks if the signature associated with a _permitHash
is valid.
Parameters
_signature
struct Signature
The signer struct containing the signature, signer and deadline.
_permitHash
bytes32
The EIP-712 permit hash.
nonces
Returns the nonce associated with a user.
The nonce is incremented after each use.
Parameters
_user
address
The user's address.
Return Values
[0]
uint256
Returns the current nonce value.
eip712Domain
Returns the EIP712 domain separator components.
This can be used to verify the domain of the EIP712 signature.
Return Values
name
string
The domain name.
version
string
The domain version.
chainId
uint256
The current chain ID.
verifyingContract
address
The address of the verifying contract.
Last updated