Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

resolver.get

Reads the resolver of an ENS name: its address, what kind of resolver it is, who may write to it and which record profiles it supports.

ReadBatchablestable
Since v1.0.0View source

Reads the resolver of an ENS name: its address, what kind of resolver it is, who may write to it and which record profiles it supports.

When to use

Use to show where a name's records live, or to check that its resolver can store a record before writing it.

Details

  • The name's own resolver comes from the registry that holds the name (ENSv1 or ENSv2).
  • Without one, the resolver serving the name is returned with inherited: true: a parent's wildcard resolver or an off-chain resolver. For ENSv1 names that ENSv2 serves through the ENSv1 bridge, it is the ENSv1 resolver behind the bridge, as before the ENSv2 launch.
  • Costs three batched calls: name state, then one round of ERC-165 checks.
  • Returns null when nothing resolves the name, unless strict is set.

Gotchas

  • An inherited resolver belongs to a parent: records cannot be written there for this name.

Signature

function get(client: Like, options: get.Options): Promise<get.ReturnType>

Call it as ens.resolver.get(options) on a client, or Actions.resolver.get(client, options).

resolver.get.request(options) builds a deferred read for Actions.batch. See Look up many at once.

Parameters

OptionTypeDefaultDescription
name (required)stringENS name to read. Normalized automatically.

Also takes the read options.

Returns

Resolves to ResolverInfo | null. The resolver, or null when nothing resolves the name.

FieldTypeDescription
addressAddress
inheritedbooleanWhether the name has no resolver of its own and is served by another one (a parent's wildcard resolver, or the ENSv1 bridge). Records cannot be written for the name there.
servingbooleanWhether resolving the name reaches this resolver. false for a name's own resolver that resolution no longer uses, e.g. an ENSv1 name ENSv2 holds no reservation for after the launch: its records are kept there but do not resolve.
kindResolverKind
authorizationResolverAuthorization
profilesResolverProfiles
versionbigint | nullENSv1 record version of the name (bumped by clear); null when not versioned.

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_NAMEthe name cannot be normalized.
NotFoundErrorRESOLVER_NOT_FOUNDwith strict when nothing resolves the name.
NetworkErrorRPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITEDthe RPC request fails.

It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).

See How errors work.

Examples

Checking a resolver before writing
const resolver = await ens.resolver.get({ name: "nick.eth" })
if (resolver?.profiles.data) await ens.record.set({ name: "nick.eth", data: { key: "0x01" } })

Example response

Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.

await ens.resolver.get({ name: "nick.eth" })
{
  "address": "0xF4f1007EA430848F2fAd60e405A54Fc100fEc341",
  "inherited": false,
  "serving": true,
  "kind": "permissioned-resolver",
  "authorization": "roles",
  "profiles": {
    "addr": true,
    "addresses": true,
    "text": true,
    "contentHash": true,
    "abi": true,
    "pubkey": false,
    "name": true,
    "interfaces": true,
    "data": true,
    "extended": true
  },
  "version": null
}

See also

Was this page helpful?