Both Metamask and web3.js seems to be enabling a DApp communicates to a remote ethereum node.

There are a few different aspects to developing blockchain applications with Ethereum:

  1. Smart contract development - writing code that gets deployed to the blockchain with the Solidity programming language.

  2. Developing websites or clients that interact with the blockchain - writing code that reads and writes data from the blockchain with smart contracts.

Web3.js enables you to fulfill the second responsibility: developing clients that interact with The Etherem Blockchain. It is a collection of libraries that allow you to perform actions like send Ether from one account to another, read and write data from smart contracts, create smart contracts, and so much more!

From http://www.dappuniversity.com/articles/web3-js-intro

MetaMask is a browser extension that allows web applications to interact with the Ethereum blockchain. For users, it works as an Ethereum wallet, allowing them to store and send any standard Ethereum-compatible tokens

From https://medium.com/crowdbotics/building-ethereum-dapps-with-meta-mask-9bd0685dfd57

These two definitions confuse me a lot.

My question is, in a conncetion, is Metamask sitting between web3.js and Ganache? Who actually talk to the ethereum node?

2 Answers 2


Metamask uses web3 to talk to Ethereum nodes. Metamask also injects the web3 into the browser for any application running to use to connect to a node (selected in metamask by the user).

Metamask has the user generated private keys in browser storage which when the user agrees are used to sign any transaction that can be submitted to the nodes. The signing, sending etc. are done using web3.

  • You can accept and upvote questions. That helps other members of the community to find answers faster
    – Sanjay S B
    Sep 13, 2019 at 8:22

If you use ganache as a development Blockchain, you don't need MetaMask. This makes life much more easier, because you can get 10 addresses from ganache that you can use in your development and test environment. There are no checks, so ganache is nothing for production. Don't even think about it.

But for development is No.1. So just configure truffle-config.js und unload MetaMask from your browser and things should work.

For going production or to an offical test network, you need to adopt some things later. But it's worth because you save a lot of time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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