SlideShare a Scribd company logo
1 of 14
Download to read offline
11. Access Token using Metamask
KC Tam
Reach KC on LinkedIn: https://www.linkedin.com/in/ktam1/
Objective
We have deployed an ERC20 Token Contract in TestRPC. In
this section we access this token using Metamask wallet.
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
Run TestRPC
Keep a copy of a private key on accounts[0] as
we import accounts[0] to Metamask for
processing token (e1bd5b…).
As before, paste Contract in Remix Editor
and select Web3 Provider environment
(http://localhost:8545). Now the contract is
ready to deploy.
This is the deployed token contract address.
We copy this address for later use.
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.
Paste the private key of accounts[0] from
TestRPC (e1bd5b…)
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.
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.
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).
We transfer from this account 1,000 token to
another account.
Now in Metamask wallet, only 9,000
POPCOINs remains in this account.
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.

More Related Content

Similar to Access Tokens from Metamask

A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...
A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...
A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...Crypto in California
 
Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainEarn.World
 
Features to required create erc 20
Features to required create erc 20 Features to required create erc 20
Features to required create erc 20 Alladin Nasir
 
Use TestRPC in Remix
Use TestRPC in RemixUse TestRPC in Remix
Use TestRPC in RemixKC Tam
 
ERC20 Token Development: Everything You Need Know.pdf
ERC20 Token Development: Everything You Need Know.pdfERC20 Token Development: Everything You Need Know.pdf
ERC20 Token Development: Everything You Need Know.pdfblockchainX
 
Starkware: Account Abstraction
Starkware: Account AbstractionStarkware: Account Abstraction
Starkware: Account AbstractionTinaBregovi
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdfBlockchain Chapter #4.pdf
Blockchain Chapter #4.pdfssuser79c46d1
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumTomoaki Sato
 
Ethereum: Native Currency and Token
Ethereum: Native Currency and TokenEthereum: Native Currency and Token
Ethereum: Native Currency and TokenKC Tam
 
What is an erc 20 token
What is an erc 20 tokenWhat is an erc 20 token
What is an erc 20 tokenAlladin Nasir
 
Can you help me create an ERC20 or BSC token_.pptx
Can you help me create an ERC20 or BSC token_.pptxCan you help me create an ERC20 or BSC token_.pptx
Can you help me create an ERC20 or BSC token_.pptxBlockchainX
 
1)Building a MultiThreaded Web ServerIn this lab we will devel
1)Building a MultiThreaded Web ServerIn this lab we will devel1)Building a MultiThreaded Web ServerIn this lab we will devel
1)Building a MultiThreaded Web ServerIn this lab we will develAgripinaBeaulieuyw
 
Create and Deploy your ERC20 token with Ethereum
Create and Deploy your ERC20 token with EthereumCreate and Deploy your ERC20 token with Ethereum
Create and Deploy your ERC20 token with EthereumMurughan Palaniachari
 
29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract
29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract
29회 이더리움 밋업 - Ethereum 2.0 and Deposit ContractBenjamin Oh
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12Aludirk Wong
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackersgavofyork
 

Similar to Access Tokens from Metamask (20)

Origin og erc 20
Origin og erc 20Origin og erc 20
Origin og erc 20
 
Blockchain
BlockchainBlockchain
Blockchain
 
A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...
A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...
A Comprehensive Guide - Buying ETH in Canada with MetaMask and Staking for ET...
 
Build on Streakk Chain - Blockchain
Build on Streakk Chain - BlockchainBuild on Streakk Chain - Blockchain
Build on Streakk Chain - Blockchain
 
Features to required create erc 20
Features to required create erc 20 Features to required create erc 20
Features to required create erc 20
 
Use TestRPC in Remix
Use TestRPC in RemixUse TestRPC in Remix
Use TestRPC in Remix
 
ERC20 Token Development: Everything You Need Know.pdf
ERC20 Token Development: Everything You Need Know.pdfERC20 Token Development: Everything You Need Know.pdf
ERC20 Token Development: Everything You Need Know.pdf
 
Starkware: Account Abstraction
Starkware: Account AbstractionStarkware: Account Abstraction
Starkware: Account Abstraction
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdfBlockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
 
Ethereum: Native Currency and Token
Ethereum: Native Currency and TokenEthereum: Native Currency and Token
Ethereum: Native Currency and Token
 
What is an erc 20 token
What is an erc 20 tokenWhat is an erc 20 token
What is an erc 20 token
 
Can you help me create an ERC20 or BSC token_.pptx
Can you help me create an ERC20 or BSC token_.pptxCan you help me create an ERC20 or BSC token_.pptx
Can you help me create an ERC20 or BSC token_.pptx
 
1)Building a MultiThreaded Web ServerIn this lab we will devel
1)Building a MultiThreaded Web ServerIn this lab we will devel1)Building a MultiThreaded Web ServerIn this lab we will devel
1)Building a MultiThreaded Web ServerIn this lab we will devel
 
Create and Deploy your ERC20 token with Ethereum
Create and Deploy your ERC20 token with EthereumCreate and Deploy your ERC20 token with Ethereum
Create and Deploy your ERC20 token with Ethereum
 
29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract
29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract
29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract
 
Erc20
Erc20Erc20
Erc20
 
Ethereum Live Demo
Ethereum Live DemoEthereum Live Demo
Ethereum Live Demo
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackers
 

More from KC Tam

ERC20 Token Contract
ERC20 Token ContractERC20 Token Contract
ERC20 Token ContractKC Tam
 
Use Geth to Deploy Contract
Use Geth to Deploy ContractUse Geth to Deploy Contract
Use Geth to Deploy ContractKC Tam
 
Use Geth to Access a Deployed Contract
Use Geth to Access a Deployed ContractUse Geth to Access a Deployed Contract
Use Geth to Access a Deployed ContractKC Tam
 
Contract Practice with Remix
Contract Practice with RemixContract Practice with Remix
Contract Practice with RemixKC Tam
 
Solidity Contract: the code, compilation, deployment and accessing
Solidity Contract: the code, compilation, deployment and accessing Solidity Contract: the code, compilation, deployment and accessing
Solidity Contract: the code, compilation, deployment and accessing KC Tam
 
Access a Simple DApp
Access a Simple DAppAccess a Simple DApp
Access a Simple DAppKC Tam
 
Essential Ethereum
Essential EthereumEssential Ethereum
Essential EthereumKC Tam
 

More from KC Tam (7)

ERC20 Token Contract
ERC20 Token ContractERC20 Token Contract
ERC20 Token Contract
 
Use Geth to Deploy Contract
Use Geth to Deploy ContractUse Geth to Deploy Contract
Use Geth to Deploy Contract
 
Use Geth to Access a Deployed Contract
Use Geth to Access a Deployed ContractUse Geth to Access a Deployed Contract
Use Geth to Access a Deployed Contract
 
Contract Practice with Remix
Contract Practice with RemixContract Practice with Remix
Contract Practice with Remix
 
Solidity Contract: the code, compilation, deployment and accessing
Solidity Contract: the code, compilation, deployment and accessing Solidity Contract: the code, compilation, deployment and accessing
Solidity Contract: the code, compilation, deployment and accessing
 
Access a Simple DApp
Access a Simple DAppAccess a Simple DApp
Access a Simple DApp
 
Essential Ethereum
Essential EthereumEssential Ethereum
Essential Ethereum
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Access Tokens from 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.
  • 8. Paste the private key of accounts[0] from TestRPC (e1bd5b…)
  • 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).
  • 12. We transfer from this account 1,000 token to another 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.