migration.get
Reads whether an ENSv1 name can migrate to ENSv2, how, and what it becomes. Parameters, return value, errors and examples for migration.get in @ensforge/sdk.
Reads whether an ENSv1 name can migrate to ENSv2, how, and what it becomes.
When to use
Use to drive a migration screen: route, blockers, resolver plan and the state after.
Details
status:eligible,blocked(seeblockers),migratedornot-required(already on ENSv2, or not registered).blockersare checked foraccount(the client's account by default).resolver.planshows whatmigration.migratedoes with the current resolver for the sameresolveroption.- With an indexer,
discoveredlists the records and subnamesmigratecarries over by default (read at the latest block).
Signature
function get(client: Like, options: get.Options): Promise<get.ReturnType>Call it as ens.migration.get(options) on a client, or Actions.migration.get(client, options).
migration.get.request(options) builds a deferred read for Actions.batch. See Look up many at once.
In React, use useMigrationStatus.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ENS name. Normalized automatically. | |
account | string | Account that would migrate. Defaults to the client's account. | |
resolver | "new" | "owned" | "keep" | (string & {}) | The resolver option migrate would get. |
Also takes the read options.
Returns
Resolves to get.ReturnType. Route, blockers, holder, resolver plan and the ENSv2 state after migrating.
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS | invalid input. |
UnsupportedError | UNSUPPORTED_ON_DEPLOYMENT | where ENSv2 is not deployed. |
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 status = await ens.migration.get({ name: "alice.eth" })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.migration.get({ name: "nick.eth" }){
"name": "nick.eth",
"status": "migrated",
"route": null,
"blockers": [],
"owner": null,
"manager": null,
"fuses": null,
"expiry": null,
"reservationExpiry": null,
"resolver": {
"current": null,
"plan": "none"
},
"after": {
"registry": null,
"subregistry": null,
"expiry": null,
"roles": []
},
"discovered": null
}See also
migration.migrateto migrate it
Was this page helpful?