I am working through the Read the Docs examples for the beta version of Web3.js. Specifically, I'm trying to get the example provided for web3.eth.ens.getAddress() working. I'm using INFURA.

All in all, this should be rather trivial, but I'm just running into errors that Googling isn't helping with.

Here is the code:

const Web3 = require('web3');
const web3 = new Web3('https://mainnet.infura.io/v3/MY_INFURA_PROJECT_ID');

web3.eth.ens.getAddress('ethereum.eth').then((thing) => {

The error I encounter is:

Error: This contract object doesn't have address set yet, please set an address first.

I'd appreciate any insight into what the issues is here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.