Finalized
Event v273 → current #5Emitted when a crowdloan successfully reaches its cap.
View events on chainUseful for: stakersdevelopersanalytics
The Big Picture
A campaign has succeeded!
Use Cases
- Track successful campaigns
From Chain Metadata
A crowdloan was finalized, funds were transferred and the call was dispatched.
Triggers
Emitted by
Preconditions
- Crowdloan reached cap
- Creator finalized
Effects
Storage Modified
Postconditions
- Funds transferred
- Call dispatched if configured
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | crowdloan_id | u32 | Crowdloan identifier |
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 });
// Subscribe to Finalized events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Crowdloan") &&
event.method === "Finalized"
)
.forEach(({ event }) => {
console.log("Finalized:", event.data.toHuman());
});
});Runtime Info
- Pallet Index
- 27
- Event Index
- 5
- First Version
- v273
- Current Version
- v393