IERC20Full Interface
The IERC20Full
interface aggregates standard ERC20 functionality with additional extensions for metadata and permit operations. It combines OpenZeppelin's IERC20
, IERC20Metadata
, IERC20Errors
, and IERC20Permit
interfaces.
Interface Inheritance
interface IERC20Full is IERC20, IERC20Metadata, IERC20Errors, IERC20Permit
Standard ERC20 Functions
Inherits all standard ERC20 functions from OpenZeppelin's implementation:
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
Metadata Functions
Includes token metadata functions:
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
Permit Functions
Implements EIP-2612 permit functionality:
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
Custom Errors
ERC2612ExpiredSignature
error ERC2612ExpiredSignature(uint256 deadline);
Thrown when attempting to use a permit after its deadline.
Parameters
Name | Type | Description |
---|---|---|
deadline | uint256 | The timestamp when the permit expired |
ERC2612InvalidSigner
error ERC2612InvalidSigner(address signer, address owner);
Thrown when the recovered signer doesn't match the token owner.
Parameters
Name | Type | Description |
---|---|---|
signer | address | The address recovered from the signature |
owner | address | The expected owner address |
Standard ERC20 Errors
Inherits standard OpenZeppelin ERC20 errors:
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
error ERC20InvalidSender(address sender);
error ERC20InvalidReceiver(address receiver);
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);