The error declaration supplies names and types for its payload.
LET’S PICTURE IT
A specialized failure form can carry two exact quantities rather than a sentence.
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.
Start from the declaration
InsufficientBalance(uint256,uint256) has a selector derived from its canonical error signature. Parameter names help explain the values but do not change that selector.
Decode the typed arguments
For available three and requested five, the selector is followed by two integer words. This error has static arguments and needs no dynamic tail.
Keep the ABI available
Raw error bytes do not include the full declaration. A decoder needs a known schema or a candidate declaration and must account for selector collisions.
Interpret without trusting blindly
Decoded field names come from the supplied ABI, and any contract can construct matching bytes. Check the source and call frame before treating those values as verified balances.