hcaAdmin.revokeUpgradeSetRoles
Revokes root roles on the HCA upgrade set (role admins only). Parameters, return value, errors and examples for hcaAdmin.revokeUpgradeSetRoles in @ensforge/hca.
Experimental
@ensforge/hca is experimental: its API can change in a minor release.
Revokes root roles on the HCA upgrade set (role admins only). Resolves once the transaction is submitted.
When to use
Use to remove an account's ability to approve HCA upgrade targets.
Signature
function revokeUpgradeSetRoles(
client: Like,
options: revokeUpgradeSetRoles.Options & Write.Options,
): Promise<revokeUpgradeSetRoles.ReturnType>Call it as ens.hcaAdmin.revokeUpgradeSetRoles(options) on a client, or Actions.hcaAdmin.revokeUpgradeSetRoles(client, options).
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
grantee (required) | string | Account to revoke. | |
roles (required) | bigint | Role bitmap. |
Also takes the write options.
Returns
Resolves to Write.Result. Submitted transaction hashes and the plan that produced them.
| Field | Type | Description |
|---|---|---|
hash | Hex | Hash of the last transaction. |
hashes | readonly Hex[] | Every submitted transaction, in order. |
id | string | EIP-5792 bundle id when the calls were sent as one batch. |
plan | Plan | The plan the write executed: its steps, in order, as they were submitted. |
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_ADDRESS | an invalid address. |
HcaError | HCA_UNAVAILABLE | on chains without an HCA deployment. |
It can also fail with the errors every write can (Errors.WriteError: the common errors plus InsufficientFundsError, TransactionError, UnsupportedError, UserRejectedError, WalletError).
See How errors work.
Examples
const { hash } = await ens.hcaAdmin.revokeUpgradeSetRoles({ grantee, roles })Plan methods
Each method takes the same options as hcaAdmin.revokeUpgradeSetRoles and sends nothing. See Preview before sending.
| Method | Description |
|---|---|
hcaAdmin.revokeUpgradeSetRoles.prepare(options) | Builds the plan without sending anything. |
hcaAdmin.revokeUpgradeSetRoles.simulate(options) | Simulates the plan with eth_call, reporting each step. |
hcaAdmin.revokeUpgradeSetRoles.estimateGas(options) | Estimates the gas and ETH the plan needs. |
Wait for the receipt with revokeUpgradeSetRolesSync
Revokes root roles on the HCA upgrade set (role admins only). Resolves once the receipt is in.
Use when the next step depends on the change being on-chain.
hcaAdmin.revokeUpgradeSetRolesSync takes the same options plus confirmations and timeout.
Resolves to Write.SyncResult. Receipts plus the submitted hashes and plan.
const { receipt } = await ens.hcaAdmin.revokeUpgradeSetRolesSync({ grantee, roles })Was this page helpful?