> **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.

# executeHcaCalls

Execute through the owner wallet or supplied adapter.

## Import

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

## Usage

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

const result = await executeHcaCalls(config, {
  hca: "0x1234567890123456789012345678901234567890",
  authorization: { kind: "owner" },
  calls: [{ to: "0x2345678901234567890123456789012345678901", value: 0n, data: "0x" }],
});
```

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

## Parameters

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

### hca

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

HCA address to inspect or operate on.

### authorization

`HcaAuthorization`

Owner authorization or an enabled destination session.

### counterfactualOwner

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

Expected owner for counterfactual execution.

### operationId

`string | undefined`

Optional caller correlation identifier for execution tracking.

### requiredCapabilities

`readonly ("ownerExecution" | "sessionExecution" | "counterfactualDeployment" | "atomicBatching" | "sponsorship" | "crossChainFunding")[] | undefined`

Capabilities that the execution route must support.

### salt

`bigint | undefined`

Account derivation salt. Defaults to the deployment profile canonical salt.

### calls

``readonly ({ readonly to: `0x${string}`; readonly data?: `0x${string}` | undefined; readonly value?: bigint | undefined; } | EnsWriteIntent<unknown, WriteError>)[]``

Ordered raw contract calls or supported ENS .call intents.

### walletClient

`WalletClient | undefined`

Viem wallet override. Defaults to the configured wallet resolver.

### account

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

Wallet account override for the operation.

### execution

`Adapter | undefined`

Compatible execution adapter. Omit for direct owner execution when supported.

## Return Type

```ts
type ExecuteHcaCallsResult = Awaited<ReturnType<typeof executeHcaCalls>>;
```

Returns `Awaited<ReturnType<Adapter["submit"]>>`.

## 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 = executeHcaCalls.effect(config, {
  hca: "0x1234567890123456789012345678901234567890",
  authorization: { kind: "owner" },
  calls: [{ to: "0x2345678901234567890123456789012345678901", value: 0n, data: "0x" }],
});

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

* [`executeHcaCalls`](/sdk/api/hca/execute-hca-calls)
* [Guide](/core/guides/hca)
