0

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?

0

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.

  • Thanks, that helps a lot! – Mob Squad Sep 12 at 14:14
  • You can accept and upvote questions. That helps other members of the community to find answers faster – Sanjay S B Sep 13 at 8:22

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.