0

Help with the solution

  1. Installed the web3.js-1.0.0-beta.36 package on the hosting server.
  2. Register and receive from Infura https://mainnet.infura.io/v3/myadress 3.Where and what should I register to properly connect web3 to Infura

I would be grateful for any help.

enter image description here enter image description here

In the Index.js file I change and line 55 gives me an error, what did I do wrong?

1 Answer 1

1

You need to create a web3.js object like described here:

var Web3 = require('web3');

// "Web3.providers.givenProvider" will be set if in an Ethereum supported browser.
var web3 = new Web3(Web3.givenProvider || 'https://mainnet.infura.io/v3/myadress');

After that, it should all work :) You can call subsequent functions like web3.version, etc...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.