0

I am trying to follow the truffle pet shop tutorial. But failed to connect metamask with ganache-cli I ran ganache-cli in the console and changed the rpc url to http://127.0.0.1:8545 But the addresses are still not loading and neither the balance is going up.

1

In order to connect metamask to ganache-cli you need:

  1. run ganache-cli (if you run it with parameters, pls provide them, would be better provide execution command)
  2. choose "Localhost 8545" in list of Networks in metamask
  • I tried its not working – Kashish Khullar Sep 29 '18 at 16:13
  • have you connected metamask to "Localhost 8545" or you see loader in metamask? – Aquila Sep 29 '18 at 16:23
  • If metamask connected successfully, but you can’t see accounts, it is normal, you need to import accounts from ganache-cli manually. – Aquila Sep 29 '18 at 17:03
  • How do I do that? – Kashish Khullar Sep 29 '18 at 20:44
  • You need to copy private key in ganache-cli, then open metamask -> click on account -> click on "Import Account" -> put private key into field -> click Import -> switch account (if needed). Imported account should have 100Eth. Do not forget to select network "Localhost 8545" – Aquila Sep 29 '18 at 20:54
0

What i did is go to custom rpc and paste ganache url i.e http://127.0.0.1:7545 to new rpc url and then save it.... worked for me try it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.