Appearance
Solidity API
ERC20Metadata
_This contract implements the metadata extension functions for ERC20 tokens as defined in the EIP-20 standard. It provides external view functions to access token metadata such as name, symbol, and decimals.
The contract is abstract and relies on internal implementations provided by ERC20MetadataInternal for the actual storage and management of metadata values._
name
solidity
function name() external view returns (string)Returns the name of the token
_Returns the name of the token. This is typically a descriptive name like "MyToken" or "Decentralized Token". Delegates to the internal name() function for implementation.
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | string | The name of the token as a string |
symbol
solidity
function symbol() external view returns (string)Returns the symbol of the token
_Returns the symbol of the token. This is typically a shorter version of the name, like "MTK" or "DTKN". Delegates to the internal symbol() function for implementation.
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | string | The symbol of the token as a string |
decimals
solidity
function decimals() external view returns (uint8)Returns the number of decimals used for display purposes
_Returns the number of decimals used for token amounts. Most ERC20 tokens use 18 decimals to be compatible with ETH's smallest unit (wei). Delegates to the internal decimals() function for implementation.
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint8 | The number of decimals as a uint8 |