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

# waitForHcaExecution

Wait for execution with bounded polling.

## Import

```ts
import { Ensforge } from "@ensforge/sdk";
```

## Usage

:::code-group
```ts [index.ts]
import { sdk } from "./client";

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

const result = await sdk.hca.waitForHcaExecution({
  submission,
});
```

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

## Parameters

```ts
import type { WaitForHcaExecutionParameters } from "@ensforge/sdk/hca";
```

### submission

`HcaExecutionSubmission<unknown>`

Previously returned or explicitly recovered execution submission.

### confirmations

`number | undefined`

Required receipt confirmations.

### timeout

`number | undefined`

Maximum time to wait, in milliseconds.

### pollingInterval

`number | undefined`

Initial status polling interval, in milliseconds.

### maxPollingInterval

`number | undefined`

Upper bound for the status polling interval, in milliseconds.

### execution

`ExecutionAdapter<unknown, unknown, unknown> | undefined`

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

## Return Type

```ts
import type { HcaExecutionStatus } from "@ensforge/sdk/hca";
```

## Effect

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

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

const program = sdk.hca.waitForHcaExecution.effect({
  submission,
});

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

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

## Error

The method rejects with the corresponding Core action errors. Use `.effect` to keep those failures
in the typed Effect error channel.

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

## Action

* [`waitForHcaExecution`](/core/api/actions/hca/wait-for-hca-execution)
* [Guide](/core/guides/hca)
