Hot answers tagged


Ok, I got the issue, According to the docs of Web3-docs-link (web3), setProvider() is used to change the provider of the web3, if you are setting the provider for the first time you have to use in this way: var Web3 = require('web3'); var web3 = new Web3('http://localhost:8545'); // or var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:...

Only top voted, non community-wiki answers of a minimum length are eligible