Creating an ERC-20 token – MyERC20Token
Now that we have set up our working environment, we can now start to add code as we walk through the explanation. In this section, we will create our cryptocurrency, called MyERC20Token
. For this project, we will use the Truffle framework and Solidity language. The idea of MyERC20Token
is to use the ERC-20 token standard and issue our token.
Here is a list of token features we are going to build:
- The token name is
MyERC20Token
, with the symbol MTK. - The token must follow the ERC-20 standard.
- The token must specify the initial supply during its creation.
- The token owner can assign someone to the admin role.
- The admin can add an account to a whitelist and remove the account from the whitelist.
- The admin can lock or unlock the coins of anyone’s account through a whitelist.
- The admin can transfer the administrator role to any other address.
- Anyone who is on the whitelist must be able to buy or sell...