NextCrowdloanId

Storage Plain v273 → current

The next incrementing crowdloan ID.

Explore chain
Queried by: developersanalytics

The Big Picture

Auto-incrementing counter for crowdloan IDs.

Use Cases

  • Predict next crowdloan ID
  • Count total crowdloans created

From Chain Metadata

The next incrementing crowdloan id.

Purpose & Usage

Purpose

Ensures unique IDs for new crowdloans.

Common Query Patterns

  • Single value query

Stored Value

value (u32)

Relationships

Modified By

Related Events

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);

// Query NextCrowdloanId storage (no keys - plain value)
const result = await api.query.Crowdloan.NextCrowdloanId.getValue();
console.log("NextCrowdloanId:", result);

Runtime Info

Pallet
Crowdloan
Storage Kind
Plain
First Version
v273
Current Version
v411