> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://ensforge.com/api/mcp` to find what you need.

# transferHcaGovernanceOwnership

Transfer ownership of a supported HCA governance contract.

## Import

```ts
import { transferHcaGovernanceOwnership } from "@ensforge/core/hca/admin";
```

## Usage

:::code-group
```ts [index.ts]
import { transferHcaGovernanceOwnership } from "@ensforge/core/hca/admin";
import { config } from "./config";

const result = await transferHcaGovernanceOwnership(config, {
  target: { kind: "factory" },
  newOwner: "0x2345678901234567890123456789012345678901",
});
```

```ts [config.ts]
// [!include ~/snippets/hca/config.ts]
```
:::

This targets HCA governance contracts. It does not transfer or renounce the immutable account owner.

## Parameters

```ts
import type { HcaAdminWriteParameters } from "@ensforge/core/hca/admin";
```

### target

`HcaGovernanceTarget`

Governance contract to inspect or modify.

### newOwner

`` `0x${string}` ``

New governance owner; this does not change the immutable HCA owner.

### confirmation

`ConfirmationPolicy | undefined`

Receipt confirmation policy.

### walletClient

`WalletClient | undefined`

Viem wallet override. Defaults to the configured wallet resolver.

### account

`` `0x${string}` | Account | undefined ``

Wallet account override for the operation.

## Return Type

```ts
import type { HcaManagementResult } from "@ensforge/core/hca";
```

| Property  | Type                         | Description                                    |
| --------- | ---------------------------- | ---------------------------------------------- |
| `hash`    | `` `0x${string}` ``          | Submitted transaction hash.                    |
| `receipt` | `TransactionReceipt \| null` | Confirmed transaction receipt, when requested. |

## Effect

Use `.effect` when composing the action in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";

const program = transferHcaGovernanceOwnership.effect(config, {
  target: { kind: "factory" },
  newOwner: "0x2345678901234567890123456789012345678901",
});

type Success = Effect.Success<typeof program>;
type Failure = Effect.Error<typeof program>;

const result = await Effect.runPromise(program);
```

## Error

The Promise API rejects with the same typed failures exposed by the Effect error channel. Errors
have a stable `_tag`, `code`, and `message`; boundary errors retain their original `cause`.

See [Error Handling](/core/guides/error-handling).

## Related

* [`transferHcaGovernanceOwnership`](/sdk/api/hca/admin/transfer-hca-governance-ownership)
* [Guide](/core/guides/hca)
