# finalize-crowdloan (/docs/tx/finalize-crowdloan)

Settles a successful raise: the pot is transferred to the loan's target
address, or its inner call is dispatched with the creator's origin. Only
the creator may finalize, and only once the cap has been reached. After
finalization the crowdloan can no longer be updated, refunded, or
dissolved.

| Signer    | Pallet    | Wraps                |
| --------- | --------- | -------------------- |
| `coldkey` | Crowdloan | `Crowdloan.finalize` |

## Parameters [#parameters]

| Parameter      | Type    | Required | Description                                                |
| -------------- | ------- | -------- | ---------------------------------------------------------- |
| `crowdloan_id` | integer | yes      | Identifier of the crowdloan, assigned when it was created. |

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx finalize-crowdloan \
  --crowdloan-id <int> --dry-run
btcli tx finalize-crowdloan \
  --crowdloan-id <int> -w my_coldkey
```

## Python [#python]

```python
import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.FinalizeCrowdloan(crowdloan_id=0)

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)
```

Or build it by op name, as an agent would:

```python
await client.execute_tool("finalize_crowdloan", {...}, wallet)
```
