Contributions

Storage Map v273 → current

Map of (crowdloan_id, contributor) to contribution amount.

Explore chain
Queried by: stakersdevelopersanalytics

The Big Picture

Detailed contribution records for all crowdloans.

Use Cases

  • Check your contribution
  • List all contributors
  • Calculate total raised

From Chain Metadata

A map of crowdloan ids to their contributors and their contributions.

Purpose & Usage

Purpose

Tracks individual contributions to each crowdloan.

Common Query Patterns

  • Query by crowdloan_id and contributor
  • Iterate all contributors for a crowdloan

Query Keys

#NameTypeDescription
1
key1
u32 key1 (u32)
2
key2
AccountId key2 (AccountId) (hex -> SS58)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

Relationships

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query Contributions storage
const key1 = 0;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("Crowdloan")]
  [stringCamelCase("Contributions")](
  key1,
  key2
);

console.log("Contributions:", result.toHuman());

On-Chain Activity

Write Frequency
●●○○○○ Minimal <10K est. writes

<10K estimated writes

#63 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

Pallet
Crowdloan
Storage Kind
Map
First Version
v273
Current Version
v393