Skip to content

Instantly share code, notes, and snippets.

@andreafspeziale
Created January 5, 2020 22:03
Show Gist options
  • Save andreafspeziale/e71ddb5def61ba2cd08ff288abeedd98 to your computer and use it in GitHub Desktop.
Save andreafspeziale/e71ddb5def61ba2cd08ff288abeedd98 to your computer and use it in GitHub Desktop.
const ENS = require('ethereum-ens')
const Web3 = require('web3')

const web3 = new Web3('https://mainnet.infura.io/v3/eedd5af85a6d4029934132713f40e6fd')
const ens = new ENS(web3);

(async () => {
    console.log('start')
    const address = await ens.resolver('megan.eth').addr();
    console.log('address', address)
    console.log('end')
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment