DispatchedAs
Event v120 → current #5Emitted when a call was dispatched with a different origin.
View events on chainUseful for: developersvalidatorsanalytics
The Big Picture
Audit trail for origin impersonation by root.
Use Cases
- Audit governance actions
From Chain Metadata
A call was dispatched.
Triggers
Emitted by
Preconditions
- dispatch_as called by root
Effects
Postconditions
- Result recorded
Side Effects
- Provides audit trail
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | result | Result | Result of the dispatched call (Ok or Err) |
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 DispatchedAs events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Utility") &&
event.method === "DispatchedAs"
)
.forEach(({ event }) => {
console.log("DispatchedAs:", event.data.toHuman());
});
});Runtime Info
- Pallet Index
- 11
- Event Index
- 5
- First Version
- v120
- Current Version
- v393