IERC20Permit
Title: IERC20Permit
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Permit.sol)
Interface for ERC-2612 permit-based approvals (EIP-20 + EIP-712 signed approvals).
Functions
permit
Sets value as the allowance of spender over owner's tokens,
given a signed approval.
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| spender | address | |
| value | uint256 | |
| deadline | uint256 | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
nonces
Returns the current nonce for owner (for use in permit signatures).
function nonces(address owner) external view returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
DOMAIN_SEPARATOR
Returns the domain separator used in the encoding of permit signatures.
function DOMAIN_SEPARATOR() external view returns (bytes32);Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes32 |
Errors
ERC2612ExpiredSignature
The signature's deadline has expired.
error ERC2612ExpiredSignature(uint256 deadline);Parameters
| Name | Type | Description |
|---|---|---|
| deadline | uint256 |
ERC2612InvalidSigner
The recovered signer does not match the expected owner.
error ERC2612InvalidSigner(address signer, address owner);Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | |
| owner | address |