unshETH - Dependencies
draft-IERC20Permit.sol
The file defines the interface for the ERC20 Permit extension allowing approvals to be made via signatures, as defined in EIP-2612. It provides a permit method to change an account's ERC20 allowance by presenting a message signed by the account. It also includes methods to get the current nonce for an account and the domain separator used in the encoding of the signature for permit.
IERC20Permit
Interface for the ERC20 Permit extension allowing approvals to be made via signatures.
permit
permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
Sets value
as the allowance of spender
over owner
's tokens, given owner
's signed approval.
Parameters
- owner address: The owner of the tokens.
- spender address: The account that will spend the tokens.
- value uint256: The number of tokens to be allowed.
- deadline uint256: The deadline for the permit to be valid.
- v uint8: The recovery id of the signature.
- r bytes32: The r part of the signature.
- s bytes32: The s part of the signature.
nonces
nonces(address owner) external view returns (uint256);
Returns the current nonce for owner
.
Parameters
- owner address: The owner of the tokens.
Return Values
- uint256: The current nonce for the owner.
DOMAIN_SEPARATOR
DOMAIN_SEPARATOR() external view returns (bytes32);
Returns the domain separator used in the encoding of the signature for permit.
Return Values
- bytes32: The domain separator for the permit.