IERC20
Author: M^0 Labs
The interface as defined by EIP-20: https://eips.ethereum.org/EIPS/eip-20
Functions
approve
Allows a calling account to approve spender
to spend up to amount
of its token balance.
MUST emit an Approval
event.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account being allowed to spend up to the allowed amount. |
|
| The amount of the allowance being approved. |
Returns
Name | Type | Description |
---|---|---|
|
| Whether or not the approval was successful. |
transfer
Allows a calling account to transfer amount
tokens to recipient
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the recipient who's token balance will be incremented. |
|
| The amount of tokens being transferred. |
Returns
Name | Type | Description |
---|---|---|
|
| Whether or not the transfer was successful. |
transferFrom
Allows a calling account to transfer amount
tokens from sender
, with allowance, to a recipient
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the sender who's token balance will be decremented. |
|
| The address of the recipient who's token balance will be incremented. |
|
| The amount of tokens being transferred. |
Returns
Name | Type | Description |
---|---|---|
|
| Whether or not the transfer was successful. |
allowance
Returns the allowance spender
is allowed to spend on behalf of account
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account who's token balance |
|
| The address of an account allowed to spend on behalf of |
Returns
Name | Type | Description |
---|---|---|
|
| The amount |
balanceOf
Returns the token balance of account
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of some account. |
Returns
Name | Type | Description |
---|---|---|
|
| The token balance of |
decimals
Returns the number of decimals UIs should assume all amounts have.
name
Returns the name of the contract/token.
symbol
Returns the symbol of the token.
totalSupply
Returns the current total supply of the token.
Events
Approval
Emitted when spender
has been approved for amount
of the token balance of account
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account. |
|
| The address of the spender being approved for the allowance. |
|
| The amount of the allowance being approved. |
Transfer
Emitted when amount
tokens is transferred from sender
to recipient
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the sender who's token balance is decremented. |
|
| The address of the recipient who's token balance is incremented. |
|
| The amount of tokens being transferred. |