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
ensforgeHCA

hcaAdmin.getGovernance

Reads who governs ENS HCAs: the factory owner and whether implementations are approved. Options, result, errors and examples for hcaAdmin.getGovernance.

ReadBatchableexperimental
Since v1.0.0View source

Experimental

@ensforge/hca is experimental: its API can change in a minor release.

Reads who governs ENS HCAs: the factory owner and whether implementations are approved.

When to use

Use to inspect HCA governance before approving or revoking implementations.

Signature

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

Call it as ens.hcaAdmin.getGovernance(options) on a client, or Actions.hcaAdmin.getGovernance(client, options).

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

Parameters

OptionTypeDefaultDescription
implementationstringImplementation to check.

Returns

Resolves to getGovernance.ReturnType. Factory owner, upgrade set and the implementation's approvals.

FieldTypeDescription
factoryOwnerAddress
upgradeSetAddress
deploymentApprovedboolean | null
upgradeApprovedboolean | null

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_ADDRESSan invalid address.
HcaErrorHCA_UNAVAILABLEon chains without an HCA deployment.

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

See How errors work.

Examples

Reading HCA governance
const governance = await ens.hcaAdmin.getGovernance({ implementation })

Was this page helpful?