Separate error bytes from the underlying reason execution failed.
LET’S PICTURE IT
An error receipt tells you where to begin investigating. It does not explain every step that led to the problem.
SEE IT FOR YOURSELF
Follow a revert and decode its error dataStep 1 / 4
This fictional call requests a transfer of one hundred raw units while the relevant balance is forty.
This fictional call requests a transfer of one hundred raw units while the relevant balance is forty.The contract rejects this request. State changes in the reverted call are rolled back, while work already consumed can still cost gas.A common Error(string) begins with selector 08c379a0. This example then encodes the message Not enough tokens.A decoder can recognize the supplied error shape. Identifying the true cause and source still needs the call context, code and state.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
A rollback, with a cost
A reverted call undoes its state changes. Gas already spent on execution is not returned merely because the result was unsuccessful. A top-level transaction can fail, or an outer contract can catch a failed inner call and continue.
Common error shapes
Error(string) has selector 0x08c379a0 and carries a readable message. Panic(uint256) has selector 0x4e487b71 and carries a numeric code for certain runtime failures. Solidity custom errors use their own selectors and ABI-encoded arguments. Revert data may also be empty.
Decode with context
Our revert decoder handles Error(string), Panic(uint256), and custom error declarations you supply. A selector collision is possible, and error bytes can be constructed by any contract. The decoded name is evidence about byte shape, not an authenticated statement of origin.
Then investigate execution
Check which contract returned the data, what inputs it received, and what state or permission caused the condition. A full trace needs execution context; an offline decoder cannot fetch it. Use our calldata lesson to inspect the requested action first.