web3cheatsheet.xyz by D_D
/
GitHubDiscordDiscord
/
  • Introduction
  • Frontend
    • web3/blockchain basics
    • Project setup
    • Wallet connections
    • ENS
    • Interacting with a contract
    • Reading from a contract
    • Writing to a contract
    • Signing a message
    • Sign in with Ethereum
    • Detecting if the user is on the wrong network
    • Switching networks
  • Thanks
  • Introduction
  • Frontend
    • web3/blockchain basics
    • Project setup
    • Wallet connections
    • ENS
    • Interacting with a contract
    • Reading from a contract
    • Writing to a contract
    • Signing a message
    • Sign in with Ethereum
    • Detecting if the user is on the wrong network
    • Switching networks
  • Thanks
Frontend
/
ENS

ENS (.eth domains)

💡

To learn more about ENS: https://www.youtube.com/watch?v=jssRnV5Ob6A

Resolving any valid Ethereum address's ENS name#

For this, we make use of the useEnsName hook from wagmi.

import { useEnsName } from 'wagmi'

const Page = () => {
  const { data: ens } = useEnsName({
    address: '0xD933A3Ec19065dfAEc5CCaA4bfD6cd1dd370D9F3',
  })

  return <div>Resolved ENS: {ens}</div>
}
Last updated on June 1, 2022
Wallet connections
Interacting with a contract

    On This Page

  • Resolving any valid Ethereum address's ENS name
Question? Give us feedback →Edit this page on GitHub
MIT 2023 © Developer DAO