New answers tagged


With const web3 = new Web3("ws://localhost:8545"); you are trying to connect to a local provider. For this you must set up your own node using for exemple the Geth or Parity clients. However, running its own node is very expensive on the mainnet. You could instead use Infura which is a blockchain provider, that means they provide public remote ...

Top 50 recent answers are included