fetchEnsAddress
Action for fetching address for ENS name.
import { fetchEnsAddress } from '@wagmi/core'
Usage
import { fetchEnsAddress } from '@wagmi/core'
const address = await fetchEnsAddress({
name: 'awkweb.eth',
})
Return Value
string
Configuration
name
ENS name to fetch address for.
import { fetchEnsAddress } from '@wagmi/core'
const address = await fetchEnsAddress({
name: 'moxey.eth',
})
chainId (optional)
Force a specific chain id for the request. The wagmi Client
's ethers provider
must be set up as a chain-aware function for this to work correctly.
import { fetchEnsAddress } from '@wagmi/core'
const address = await fetchEnsAddress({
name: 'awkweb.eth',
chainId: 1,
})