IfElseMainSuccess
Event v320 → current #6Emitted when the main call in if_else succeeded.
View events on chainUseful for: developerswallets
The Big Picture
Primary path worked - fallback wasn't needed.
Use Cases
- Confirm primary operation succeeded
From Chain Metadata
Main call was dispatched.
Triggers
Emitted by
Preconditions
- if_else call executed
- Main call succeeded
Effects
Postconditions
- Main call's effects applied
This event has no data fields.
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 IfElseMainSuccess events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Utility") &&
event.method === "IfElseMainSuccess"
)
.forEach(({ event }) => {
console.log("IfElseMainSuccess:", event.data.toHuman());
});
});Runtime Info
- Pallet Index
- 11
- Event Index
- 6
- First Version
- v320
- Current Version
- v393