Contributed
Event v273 → current #1Emitted when TAO is contributed to a crowdloan.
View events on chainUseful for: stakersdevelopersanalytics
The Big Picture
Someone has backed a crowdfunding campaign.
Use Cases
- Track contributions
- Monitor fundraising progress
From Chain Metadata
A contribution was made to an active crowdloan.
Triggers
Emitted by
Preconditions
- Crowdloan is active
- Contributor has balance
- Meets minimum
Effects
Storage Modified
Postconditions
- Contribution recorded
- Funds transferred
Side Effects
- Total raised increased
Event Data
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);
// Subscribe to Contributed events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Crowdloan.Contributed.get(block.hash);
for (const evt of events) {
console.log("Contributed:", evt.payload);
}
});Runtime Info
- Pallet Index
- 27
- Event Index
- 1
- First Version
- v273
- Current Version
- v411