• Core
  • Actions
  • fetchEnsResolver

fetchEnsResolver

Action for fetching the resolver for ENS name.

This is a wrapper around viem's getEnsResolver.

import { fetchEnsResolver } from '@wagmi/core'

Usage

import { fetchEnsResolver } from '@wagmi/core'
 
const resolver = await fetchEnsResolver({
  name: 'awkweb.eth',
})

Return Value

EnsResolver

Configuration

name

ENS name to fetch resolver for.

import { fetchEnsResolver } from '@wagmi/core'
 
const resolver = await fetchEnsResolver({
  name: 'moxey.eth',
})

chainId (optional)

Force a specific chain id for the request. The wagmi Client's publicClient must be set up as a chain-aware function for this to work correctly.

import { fetchEnsResolver } from '@wagmi/core'
 
const resolver = await fetchEnsResolver({
  name: 'awkweb.eth',
  chainId: 1,
})