TransWikia.com

Using Ganache with an existing MetaMask account

Ethereum Asked by Kuyler007 on August 26, 2021

I am attempting the Truffle “Ethereum pet-shop tutorial”:

http://truffleframework.com/tutorials/pet-shop

I am in the stage where I am attempting to implement the smart contract on the local Ganache block chain, where I have to use the Ganache seed phrase to import the applicable Ganache den. However, I have an existing MetaMask den with some tokens and real ETH in it.

My question is: How can I import the Ganache den for local testing?

I have tried disabling and re-enabling the extension, but upon entering my password, it takes me to my existing den with the multiple tokens and ETH in it.

Help will be greatly appreciated.

3 Answers

To see the ether 0 to 100 you have to connect the specific address from Ganache. Open the ganache you will see 10 address. To use any address press the key symbol and copy the address. After that go to the metamask and press the 3 dots. You will find an option import. Then paste the address which you copied from ganache. You will able to see the ether.

Answered by tithidey on August 26, 2021

You can import a new account from the private key of a Ganache's test address, not the seed phrase.

The private key can be seen by clicking the key icon on the right of an account row in Ganache.

enter image description here

Answered by A. Mitani on August 26, 2021

Ok so the solution I found for this:

You do not need to use the Ganache seed phrase and therefore neither the specific Ganache MetaMask den.

You can use your existing den with your own unique seed phrase. Even if you have other accounts with real value tokens in them, these existing accounts and the tokens in them will not be influenced.

To connect to the local Ganache block chain:

Click on the three horizontal bars in the top-right corner of the MetaMask interface in your existing den, select settings, and then paste the URL in the Ganache interface into the test RPC URL box.

This is all you need to do to connect to the local Ganache block chain and your existing accounts will remain uninfluenced. Note that if you follow the above steps, MetaMask will indicate that you are connected to a testnet where it usually says Main Ethereum Network.

Hope this helps somebody.

Answered by Kuyler007 on August 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP