Useful for: stakersdevelopersanalytics
The Big Picture
Funding goal changed.
Use Cases
- Track goal changes
From Chain Metadata
The cap was updated.
Triggers
Emitted by
Preconditions
- Crowdloan not finalized
- Creator updated
Effects
Storage Modified
Postconditions
- New cap in effect
Side Effects
- May become finalizable if lowered below raised
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 CapUpdated events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Crowdloan.CapUpdated.get(block.hash);
for (const evt of events) {
console.log("CapUpdated:", evt.payload);
}
});Runtime Info
- Pallet Index
- 27
- Event Index
- 9
- First Version
- v273
- Current Version
- v411