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.
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
viasays how the account is allowed: owner, operator, approved, delegate, roles or anyone.missinglists 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
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ENS name. Normalized automatically. | |
operation (required) | Operation | The operation to check. | |
account | string | the client's account | Account to check. |
Also takes the read options.
Returns
Resolves to PermissionCheck. Whether it is allowed, how, and what is missing.
| Field | Type | Description |
|---|---|---|
allowed | boolean | null | null when the contract's permission model is unknown (a custom resolver). |
via | Authority | null | |
contract | Address | null | Contract that enforces the operation. |
resource | bigint | null | EAC resource checked, for role-based contracts. |
missing | readonly UnauthorizedError.Requirement[] |
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS, INVALID_COIN_TYPE | invalid input. |
ConfigError | WALLET_NOT_CONFIGURED | without account or a client account. |
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 { 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
permission.getfor every operation at once
Was this page helpful?