registry.get
Reads an ENSv2 registry: its kind, implementation, parent, canonical name, URI, whether it is emancipated, and whether it can be upgraded.
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
accountto include whether it holds theupgraderole (blocker: "unauthorized"). - Returns
nullwhen the name has no subregistry, unlessstrictis 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:
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ||
account | string | Account whose upgrade role is checked for upgrade.blocker. |
With registry:
| Option | Type | Default | Description |
|---|---|---|---|
registry (required) | string | ||
account | string | Account 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.
| Field | Type | Description |
|---|---|---|
address | Address | |
kind | RegistryKind | |
implementation | Address | null | Current implementation behind the proxy; null when the registry is not a proxy. |
parent | { readonly registry: Address; readonly label: string } | null | The registry above it and the label it sits under, as set with setParent. |
canonicalName | string | null | Name whose children this registry holds, e.g. nick.eth; null when not reachable. |
uri | string | null | |
renderer | Address | null | |
emancipated | boolean | No 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
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS | invalid input. |
NotFoundError | REGISTRY_NOT_FOUND | with strict when the name has no subregistry. |
NetworkError | RPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITED | the RPC request fails. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const registry = await ens.registry.get({ name: "nick.eth" })
registry?.emancipated // falseExample 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
registry.upgradeto upgrade it
Was this page helpful?