create
Call v273 → current #0Creates a new crowdloan campaign to raise funds for a project.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Enables decentralized fundraising on Bittensor with built-in protections.
Use Cases
- Launch crowdfunding campaign
- Raise TAO for subnet development
From Chain Metadata
Create a crowdloan that will raise funds up to a maximum cap and if successful, will transfer funds to the target address if provided and dispatch the call (using creator origin). The initial deposit will be transfered to the crowdloan account and will be refunded in case the crowdloan fails to raise the cap. Additionally, the creator will pay for the execution of the call. The dispatch origin for this call must be _Signed_. Parameters: `deposit`: The initial deposit from the creator. `min_contribution`: The minimum contribution required to contribute to the crowdloan. `cap`: The maximum amount of funds that can be raised. `end`: The block number at which the crowdloan will end. `call`: The call to dispatch when the crowdloan is finalized. `target_address`: The address to transfer the raised funds to if provided.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | deposit | Compact<u64> Cpt BalanceOf<T> | deposit: Balance in chain native currency (RAO for TAO; ÷10⁹) (RAO -> TAO (/ 10^9)) |
| 1 | min_contribution | Compact<u64> Cpt BalanceOf<T> | min_contribution: Balance in chain native currency (RAO for TAO; ÷10⁹) (SCALE compact -> integer) |
| 2 | cap | Compact<u64> Cpt BalanceOf<T> | cap: Balance in chain native currency (RAO for TAO; ÷10⁹) (SCALE compact -> integer) |
| 3 | end | Compact<u32> Cpt BlockNumberFor<T> | end: Block number (SCALE compact -> integer) |
| 4 | call | Option Option<Box<<T as Config>::RuntimeCall>> | call (Option) |
| 5 | target_address | Option Option<T::AccountId> | target_address: optional Account address (32 bytes, SS58-encoded) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Signer has sufficient balance for deposit
- Cap exceeds deposit
- End block is valid
Effects
Events Emitted
Storage Modified
Postconditions
- New crowdloan created
- Deposit transferred
- Created event emitted
Side Effects
- NextCrowdloanId incremented
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Build create call (typed, named args)
const deposit = 0n;
const min_contribution = 0n;
const cap = 0n;
const end = 0;
const call = undefined;
const target_address = undefined;
const tx = api.tx.Crowdloan.create({
deposit,
min_contribution,
cap,
end,
call,
target_address,
});Runtime Info
- Pallet Index
- 27
- Call Index
- 0
- First Version
- v273
- Current Version
- v411