Deploy and Transfer an ERC-20 Token
Transfer an ERC-20 token between accounts
Deploy ERC-20
Let's deploy a basic demo ERC20 contract that comes integrated with the CLI on our Avalanche L1.
and follow this configuration:
Transfer ERC20 from your account to another.
Before transfering the assets you need to nake sure you have at least one extra account created so you can transfer funds to it:
you will get an output like this:
Now, lets transfer some TOK from the ewoq address to the myKey address.
Notice how we are setting the value to 0 since the --value command works for sending the native token, and in this case we are really interacting with a function of the ERC20 standard called transfer
and will be the one in charge of modifying the balances mapping in the TOK state. Notice the amount that transfer receives needs to be set in wei, except if you use the word ether to convert units automatically.