What are What is ERC-20? “Ethereum Request for Comments 20,” more... More tokens?
ERC-20 tokens are tokens designed and used solely on the Ethereum platform and follow the ERC-20 token standard. What are smart contracts? A smart contract is a computer pro... More are responsible for creating the tokens, handling transactions, and keeping track of the balances. There are six mandatory functions that an ERC-20 token smart contract must implement, including:
- Creating a method that defines the total supply of tokens, which will allow the smart contract to refuse new tokens once the cap is met.
- Creating a method to show the balance of tokens in each respective address.
- Creating a transfer method to take tokens from the total supply and giving them to a user.
- Creating a transfer method to allow users to transfer tokens between themselves.
- Creating a method to approve transactions from user to user, ensuring that the total supply has a greater balance than or equal to the amount being sent (if sending tokens from a non-personal balance).
- Creating a method to approve transactions from user to user, ensuring that the user has a balance greater than or equal to the amount being sent.
Optionally, the ERC-20 standard also allow developers to give their tokens a name, symbol, and determine how dividable their token is by specifying the number of decimals that the token can support.
Common ERC-20 tokens include Tether (USDT), BNB, LEO, DAI, and more.