Canceled
Event v133 → v148, v149 → current #1Emitted when a scheduled task is cancelled before execution.
View events on chainUseful for: developersanalytics
The Big Picture
Confirmation that a scheduled task has been removed and will not execute.
Use Cases
- Confirm task cancellation
- Track cancelled operations
From Chain Metadata
Canceled some task.
Triggers
Emitted by
Preconditions
- Cancel call succeeded
- Task existed at specified position
Effects
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 Canceled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Scheduler.Canceled.get(block.hash);
for (const evt of events) {
console.log("Canceled:", evt.payload);
}
});Version History
v133 block 1,404,224 2 args
v149 block 3,014,339 2 args Current
Runtime Info
- Pallet Index
- 15
- Event Index
- 1
- First Version
- v133
- Current Version
- v411