ERC20
ERC20 is the standard for representing fungible tokens; where each token is of equal valuable and interchangeable.
Base Contracts Implementing This Feature
Unlocked Features
By implementing the ERC20
standard, you unlock the following features in the SDK and dashboard:
SDK Feature | Description |
---|---|
Metadata | View the metadata (name, symbol, etc.) of the token. |
View Total Supply | View the total supply of the token. |
View Balance | View how many tokens a wallet address has. |
Transfer | Transfer a specified amount of this token between wallets. |
Batch Transfer | View the total supply of the token. |
Allowance | Permit other addresses to transfer a specified amount of tokens from your wallet. |
Implementing It Yourself
This section is meant for advanced users who want to write the functionality from scratch.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@thirdweb-dev/contracts/openzeppelin-presets/token/ERC20/ERC20.sol";
contract Contract is ERC20 {
constructor(
string memory _name,
string memory _symbol
)
ERC20(
_name,
_symbol
)
{}
}