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

registry.get

Reads an ENSv2 registry: its kind, implementation, parent, canonical name, URI, whether it is emancipated, and whether it can be upgraded.

ReadBatchablestable
Since v1.0.0View source

Reads an ENSv2 registry: its kind, implementation, parent, canonical name, URI, whether it is emancipated, and whether it can be upgraded.

When to use

Use to inspect the registry that holds a name's children before creating subnames or upgrading it.

Details

  • { name } reads the name's subregistry (where its children live); { registry } reads any registry by address.
  • An emancipated registry's owners cannot take children back.
  • Every upgrade needs the target to accept the current implementation (canUpgradeFrom); emancipated registries also need it listed in their upgrade set.
  • Pass account to include whether it holds the upgrade role (blocker: "unauthorized").
  • Returns null when the name has no subregistry, unless strict is set.

Signature

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

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

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

Parameters

With name:

OptionTypeDefaultDescription
name (required)string
accountstringAccount whose upgrade role is checked for upgrade.blocker.

With registry:

OptionTypeDefaultDescription
registry (required)string
accountstringAccount whose upgrade role is checked for upgrade.blocker.

Also takes the read options.

Returns

Resolves to RegistryInfo | null. The registry, or null when the name has no subregistry.

FieldTypeDescription
addressAddress
kindRegistryKind
implementationAddress | nullCurrent implementation behind the proxy; null when the registry is not a proxy.
parent{ readonly registry: Address; readonly label: string } | nullThe registry above it and the label it sits under, as set with setParent.
canonicalNamestring | nullName whose children this registry holds, e.g. nick.eth; null when not reachable.
uristring | null
rendererAddress | null
emancipatedbooleanNo root role holder can take children back (unregister, repoint, control transfers).
upgrade{ /** The deployment's latest implementation for this kind of registry. */ readonly latest: Address | null; readonly eligible: boolean; readonly blocker: RegistryUpgradeBlocker | null; }

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_NAME, INVALID_ADDRESSinvalid input.
NotFoundErrorREGISTRY_NOT_FOUNDwith strict when the name has no subregistry.
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

Inspecting a name's subregistry
const registry = await ens.registry.get({ name: "nick.eth" })
registry?.emancipated // false

Example response

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

await ens.registry.get({ name: "nick.eth" })
{
  "address": "0x02cA46F62f6C9F655364bf9Fd4f11Fb8f01C5753",
  "kind": "user",
  "implementation": "0xFAA23592ACA10A6d8875b18eA86954e8EB6d8d72",
  "parent": {
    "registry": "0xf60aba43E1f7F3DAB1186Ff03B561401C9Df85E2",
    "label": "nick"
  },
  "canonicalName": "nick.eth",
  "uri": null,
  "renderer": "0x6f412Ff4144d525f791777d3384e9A1B170492Fb",
  "emancipated": false,
  "upgrade": {
    "latest": "0x3269b830b61b3186Dc6d2f57Cab118E2FBC3E2df",
    "eligible": false,
    "blocker": "not-approved"
  }
}

See also

Was this page helpful?