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

permission.check

Checks whether an account may perform one operation on an ENS name, and lists exactly what it lacks when it may not. Errors and examples for permission.check.

ReadBatchablestable
Since v1.0.0View source

Checks whether an account may perform one operation on an ENS name, and lists exactly what it lacks when it may not.

When to use

Use to explain to a user why a change is not possible, or which role or approval to request.

Details

  • via says how the account is allowed: owner, operator, approved, delegate, roles or anyone.
  • missing lists ownership or approvals, roles on a resource, or what blocks the change for everyone (a burned fuse, the name's status, a transfer rule).
  • Writes use the same engine to explain failed simulations as UnauthorizedError.

Signature

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

Call it as ens.permission.check(options) on a client, or Actions.permission.check(client, options).

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

Parameters

OptionTypeDefaultDescription
name (required)stringENS name. Normalized automatically.
operation (required)OperationThe operation to check.
accountstringthe client's accountAccount to check.

Also takes the read options.

Returns

Resolves to PermissionCheck. Whether it is allowed, how, and what is missing.

FieldTypeDescription
allowedboolean | nullnull when the contract's permission model is unknown (a custom resolver).
viaAuthority | null
contractAddress | nullContract that enforces the operation.
resourcebigint | nullEAC resource checked, for role-based contracts.
missingreadonly UnauthorizedError.Requirement[]

Errors

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

See How errors work.

Examples

Explaining a disabled button
const { allowed, missing } = await ens.permission.check({ name: "alice.eth", operation: "setResolver" })

Example response

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

await ens.permission.check({ name: "nick.eth", operation: "transfer", account: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" })
{
  "allowed": false,
  "via": null,
  "contract": "0xf60aba43E1f7F3DAB1186Ff03B561401C9Df85E2",
  "resource": null,
  "missing": [
    {
      "type": "owner",
      "contract": "0xf60aba43E1f7F3DAB1186Ff03B561401C9Df85E2",
      "owner": "0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5"
    }
  ]
}

See also

Was this page helpful?