ExecutedFailed
Event v210 → current #4Emitted when a contract call fails, reverting state but consuming gas.
View events on chainUseful for: developers
The Big Picture
Contract calls can fail from require() failures, out of gas, or invalid state. State unchanged but gas spent.
Use Cases
- Debug failures
- Monitor failure rates
- Build retry logic
From Chain Metadata
A contract has been executed with errors. States are reverted with only gas fees applied.
Triggers
Emitted by
Preconditions
- Call attempted
- Error or revert occurred
Effects
Storage Modified
Postconditions
- State reverted
- Gas still charged
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | address → contract_address | H160 | Address of the contract that failed (H160) |
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 ExecutedFailed events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("EVM") &&
event.method === "ExecutedFailed"
)
.forEach(({ event }) => {
console.log("ExecutedFailed:", event.data.toHuman());
});
});Runtime Info
- Pallet Index
- 22
- Event Index
- 4
- First Version
- v210
- Current Version
- v393