Here you will find a step-by-step gide and a sample code with which you can import an ERC20 token to Metamask with Ganache:
Important: Before you continue, make sure that Ganache and the Metamask was a core of Ben. Also ensure that you are created using the Themssary Metamasts.
Step 1: Prepare your contract
Discover your ERC20 contract with a tool like remix or truffle on ganache.
Step 2: Set up metamask
Create a new metamask letter bag and establish a connection to your local ganache network. You can do this in your following steps:
- Open the metamask in your browser.
- Click the window in the lower lines of the lower edge and select “Connect Metamask Connection”.
- Enter your metamask seed -phrase or password (make SOVE, you have backup!).
Step 3: Set up ganache
Create a new ganache network with a single knot.
- Open Ganache and click on the “Add knot” button.
- Select a place for your knot and click on “Next”.
- Create a new walled Singmetamask or another compatible wall (e.g. Infura letter pocket).
- Click “Start”.
Step 4: Import ERC20 token in Metamask **
Open Ganache and make a connection to the Netork so that you have provided your contract.
- Open a new terminal or an input request.
- They are contractually contractually located.
3 .. Proceedings for importing the ERC20 token:
`Bash
Ganache-Cli-Network = Mainkter-Port = 8545-Chain-ID = 0-Network = Memask Password> -St Localhost: 8
Re
Replacein the seeds or the passage.
Correctly set up ice cream on the Nationals, you can see the metamask. Search for the ERC20 token name in this list to find it.
Step 5: Check the balance of the token
As soon as the token is the source in your list, click on it so as not to find details. You will do how you are able to have token's balance:
Bash
Ganache-Cli-Network = Mainnet-Port = 8545-Chain-ID = 0-Network-Memask-Password>-Host Slots: 8545-Acccounts 1--from Accounts Balance
Re
Replace
If everything is, you can see that you have balanced the token in the command output.
Problems having tips
- Make sure that your metamast pocket is properly furnished and that you are backups.
- Make sure it is.
- The settings for the contract provision of Checks to Schargie are correct to the token of the token.
I jump that helps! If you allow problems, feel.