CRYPTO NEWS

6 Questions for Yat Siu of Animoca Brands

Do we need to set provider when instantiate a Web3 instance?

I am trying to connect Metamask with browser. I am going through some web3.js tutorials and I am trying to understand when we need to set provider when we instantiate a Web3 instance. In some tutorials they say we need to set provider like this const web3 = new Web3("https://cloudflare-eth.com") but in some tutorial I::Listen

I am trying to connect Metamask with browser. I am going through some web3.js tutorials and I am trying to understand when we need to set provider when we instantiate a Web3 instance. In some tutorials they say we need to set provider like this

const web3 = new Web3("https://cloudflare-eth.com") 

but in some tutorial I found we can simply use something like this:

window.web3 = new Web3(ethereum) 

Is it save to always just use ethereum object?

6 Questions for Yat Siu of Animoca Brands

Shopping cart
There are no products in the cart!
Continue shopping
0