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 { 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 ExecutedFailed events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.EVM.ExecutedFailed.get(block.hash);
for (const evt of events) {
console.log("ExecutedFailed:", evt.payload);
}
});Runtime Info
- Pallet Index
- 22
- Event Index
- 4
- First Version
- v210
- Current Version
- v411