Transactions

withdraw-crowdloan

Withdraw the signer's contribution from a non-finalized crowdloan.

View as Markdown

Contributors can pull their contribution back out of any crowdloan that has not finalized, including while it is still raising. The creator may only withdraw the part of their contribution above the initial deposit; the deposit itself stays locked until dissolve_crowdloan returns it. Fails once the crowdloan has finalized or if the signer has nothing left to withdraw.

SignerPalletWraps
coldkeyCrowdloanCrowdloan.withdraw

Parameters

ParameterTypeRequiredDescription
crowdloan_idintegeryesIdentifier 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

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

btcli tx withdraw-crowdloan \
  --crowdloan-id <int> --dry-run
btcli tx withdraw-crowdloan \
  --crowdloan-id <int> -w my_coldkey

Python

import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.WithdrawCrowdloan(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:

await client.execute_tool("withdraw_crowdloan", {...}, wallet)