[Ethereum] How to connect your react ethereum project with MetaMask wallet

ethereumjsreactweb3js

I am developing a ReactJs blockchain application on ethereum network. How can I use MetaMask Wallet instead of local ganache account.

import web3 from 'Web3';
const web3 = new Web3("localurl"); 

Best Answer

Check out this guide. To summarize: first check whether web3 already exists. If it does, initialize a Web3 object with web3.currentProvider. Otherwise, use your node's URL

Related Topic