Skip to main content

IERC721Permit

IERC721Permit

An interface for the ERC721 permit extension

InvalidSignature

error InvalidSignature()

PermitExpired

error PermitExpired()

PERMIT_TYPEHASH

function PERMIT_TYPEHASH() external pure returns (bytes32)

The EIP-712 typehash for the permit struct used by the contract

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

The EIP-712 domain separator for this contract

permit

function permit(address spender, uint256 tokenId, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external

Approve the spender to transfer the given tokenId

Parameters

NameTypeDescription
spenderaddressThe address to approve
tokenIduint256The tokenId to approve
deadlineuint256The deadline for the signature
vuint8The recovery id of the signature
rbytes32The r value of the signature
sbytes32The s value of the signature

nonces

function nonces(uint256 tokenId) external view returns (uint256)

Get the current nonce for a token

Parameters

NameTypeDescription
tokenIduint256The tokenId to get the nonce for

Return Values

NameTypeDescription
[0]uint256The current nonce