Metamask is a browser-based Ethereum wallet. Beside showing ether the native currency, Metamask can also show information about deployed Token. In this deck we will demonstrate how to add token in Metamask
1. 11. Access Token using Metamask
KC Tam
Reach KC on LinkedIn: https://www.linkedin.com/in/ktam1/
2. Objective
We have deployed an ERC20 Token Contract in TestRPC. In
this section we access this token using Metamask wallet.
3. Metamask Wallet
An Ethereum wallet in browser plug-in form factor
We can create new addresses or import existing accounts
into Metamask
Beside native ethers, Metamask supports displaying
ERC20 tokens and get the balance of that account
What we need is to set the right Ethereum environment
and deployed token contract address
4. Run TestRPC
Keep a copy of a private key on accounts[0] as
we import accounts[0] to Metamask for
processing token (e1bd5b…).
5. As before, paste Contract in Remix Editor
and select Web3 Provider environment
(http://localhost:8545). Now the contract is
ready to deploy.
6. This is the deployed token contract address.
We copy this address for later use.
7. Before login Metamask, choose Localhost:8545,
which is our TestRPC ethereum network.
The first account is created when metamask is
first launched.
We are importing the account created from
TestRPC.
9. Upon successful import, we now have a new
account.
The ethers shown is slightly less than 100 ethers.
Remember every account created in TestRPC
comes with 100 ethers. The difference is used
when deploying the Token Contract.
10. Go to TOKENS tag, and we see no tokens
found currently.
Press ADD TOKEN
We paste the deployed Token Contract
Address. The token symbol and decimals
are immediately and correctly shown. This is
taken from the deployed Token Contract
Address.
11. Now in Metamask wallet, we see 10,000
POPCOINs in this account 0x0B2F…
Remember all the 10,000 tokens is owned
by the deployer (this account).
13. Now in Metamask wallet, only 9,000
POPCOINs remains in this account.
14. Summary
In this section we see how to use Metamask to get deployed
token information. Metamask can correctly display the token
information as the token provides ERC20 interface.