Expand description
@dev Interface combining the ERC-20 standard, its metadata extension, and EIP-2612 permit. Note: Due to ABI generation constraints, all interfaces are merged into a single contract.
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
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);
}Structs§
- Approval
- @dev Emitted when the allowance of a
spenderfor anowneris set by a call to {approve}.valueis the new allowance. Event with signatureApproval(address,address,uint256)and selector0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. - DOMAIN_
SEPARATOR Call - @dev Returns the domain separator used in the encoding of the signature for {permit},
as defined by {EIP712}.
Function with signature
DOMAIN_SEPARATOR()and selector0x3644e515. - DOMAIN_
SEPARATOR Return - @dev Returns the domain separator used in the encoding of the signature for {permit},
as defined by {EIP712}.
Container type for the return parameters of the
DOMAIN_SEPARATOR()function. - Transfer
- @dev Emitted when
valuetokens are moved from one account (from) to another (to). - allowance
Call - @dev Returns the remaining number of tokens that
spenderwill be allowed to spend on behalf ofownerthrough {transferFrom}. This is zero by default. - allowance
Return - @dev Returns the remaining number of tokens that
spenderwill be allowed to spend on behalf ofownerthrough {transferFrom}. This is zero by default. - approve
Call - @dev Sets a
valueamount of tokens as the allowance ofspenderover the caller’s tokens. - approve
Return - @dev Sets a
valueamount of tokens as the allowance ofspenderover the caller’s tokens. - balance
OfCall - @dev Returns the value of tokens owned by
account. Function with signaturebalanceOf(address)and selector0x70a08231. - balance
OfReturn - @dev Returns the value of tokens owned by
account. Container type for the return parameters of thebalanceOf(address)function. - decimals
Call - @dev Returns the decimals places of the token.
Function with signature
decimals()and selector0x313ce567. - decimals
Return - @dev Returns the decimals places of the token.
Container type for the return parameters of the
decimals()function. - name
Call - @dev Returns the name of the token.
Function with signature
name()and selector0x06fdde03. - name
Return - @dev Returns the name of the token.
Container type for the return parameters of the
name()function. - nonces
Call - @dev Returns the current nonce for
owner. This value must be included whenever a signature is generated for {permit}. - nonces
Return - @dev Returns the current nonce for
owner. This value must be included whenever a signature is generated for {permit}. - permit
Call - @dev Sets
valueas the allowance ofspenderoverowner’s tokens, givenowner’s signed approval. - permit
Return - @dev Sets
valueas the allowance ofspenderoverowner’s tokens, givenowner’s signed approval. - symbol
Call - @dev Returns the symbol of the token.
Function with signature
symbol()and selector0x95d89b41. - symbol
Return - @dev Returns the symbol of the token.
Container type for the return parameters of the
symbol()function. - total
Supply Call - @dev Returns the value of tokens in existence.
Function with signature
totalSupply()and selector0x18160ddd. - total
Supply Return - @dev Returns the value of tokens in existence.
Container type for the return parameters of the
totalSupply()function. - transfer
Call - @dev Moves a
valueamount of tokens from the caller’s account toto. - transfer
From Call - @dev Moves a
valueamount of tokens fromfromtotousing the allowance mechanism.valueis then deducted from the caller’s allowance. - transfer
From Return - @dev Moves a
valueamount of tokens fromfromtotousing the allowance mechanism.valueis then deducted from the caller’s allowance. - transfer
Return - @dev Moves a
valueamount of tokens from the caller’s account toto.
Enums§
- IERC20
Calls - Container for all the
IERC20function calls. - IERC20
Events - Container for all the
IERC20events.