hcaAdmin.getGovernance
Reads who governs ENS HCAs: the factory owner and whether implementations are approved. Options, result, errors and examples for hcaAdmin.getGovernance.
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
| Option | Type | Default | Description |
|---|---|---|---|
implementation | string | Implementation to check. |
Returns
Resolves to getGovernance.ReturnType. Factory owner, upgrade set and the implementation's approvals.
| Field | Type | Description |
|---|---|---|
factoryOwner | Address | |
upgradeSet | Address | |
deploymentApproved | boolean | null | |
upgradeApproved | boolean | null |
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 read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const governance = await ens.hcaAdmin.getGovernance({ implementation })Was this page helpful?