Transactions

create-crowdloan

Open a crowdloan raising up to `cap_tao` by `end` block.

View as Markdown

Locks deposit_tao from the creator (it counts toward the raise and comes back when the loan is dissolved) and opens the loan for contributions until end. Provide exactly one of target_ss58 (the address that receives the raised funds on finalize) or call (an inner intent, {"op": ..., ...args}, dispatched with the creator's origin on finalize) — supplying both or neither is rejected. If the cap is reached the creator finalizes with finalize_crowdloan. Passing end only stops new contributions — nothing is refunded automatically: the creator returns contributions with refund_crowdloan (contributors may also withdraw_crowdloan themselves) and then dissolve_crowdloan to recover the deposit.

SignerPalletWraps
coldkeyCrowdloanCrowdloan.create

Parameters

ParameterTypeRequiredDescription
deposit_taonumber | "all"yesCreator's initial deposit, locked when the crowdloan opens. It counts toward the raise and is returned when the crowdloan is dissolved.
min_contribution_taonumber | "all"yesSmallest contribution the crowdloan will accept from a contributor.
cap_taonumber | "all"yesMaximum total to raise. Reaching the cap lets the creator finalize.
endintegeryesBlock number at which the crowdloan stops accepting contributions. Passing it refunds nothing by itself; refunds happen via explicit refund or withdraw calls.
target_ss58stringnoAccount that receives the raised funds on finalize. Provide exactly one of this or call.
callobjectnoInner intent dispatched with the creator's origin on finalize, as a JSON object {"op": <name>, ...args}. Provide exactly one of this or target_ss58.

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 create-crowdloan \
  --deposit-tao <amount|all> \
  --min-contribution-tao <amount|all> \
  --cap-tao <amount|all> \
  --end <int> --dry-run
btcli tx create-crowdloan \
  --deposit-tao <amount|all> \
  --min-contribution-tao <amount|all> \
  --cap-tao <amount|all> \
  --end <int> -w my_coldkey

Python

import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.CreateCrowdloan(deposit_tao=1.0, min_contribution_tao=1.0, cap_tao=1.0, end=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("create_crowdloan", {...}, wallet)