Truffle – How to Use Ganache with MetaMask

metamasktestrpctruffle

Currently I'm using Ganache desktop application for ether transactions and I'm able to view transaction log details in it. But I need to connect it with metamask so that while an ether is transferred, details could be seen account wise. I passed the url and mnemonic.

Account address in metamask were same as it is in ganache desktop application. When ether is transferred, account balance is reduced but no details are shown.

I tried by importing account in metamask using private keys…still the same result…

Help will be greatly appreciated.

Best Answer

If I understand correctly, you want your transactions made in truffle to appear in metamask. This is not possible, though. Metamask only shows transactions made with the application itself.

We also only show transactions sent from metamask right now. We need to make some serious decisions about how we distribute that knowledge if we start adding indexes to the blockchain, like transaction histories.

https://github.com/MetaMask/metamask-extension/issues/133#issuecomment-213544766

You have no other choice than to stick with the ganache block explorer in the desktop application.

Related Topic