In this track: Execution traces and low-level calls
advanced · 4 MIN READ
Value transfer and call failures
A value-bearing call can fail and must be handled deliberately.
LET’S PICTURE IT
A payment request can be rejected by the receiving desk.
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.
Check more than the address
A target can execute receiving code, and a call can fail because of execution conditions or insufficient available balance. A syntactically valid address does not guarantee success.
Read the low-level outcome
A low-level call reports success separately from its return bytes. Ignoring a false result can leave application accounting claiming a payment that did not complete.
Apply rollback boundaries
A failed child call rolls back its own value transfer and effects. The parent’s later behavior determines whether the whole enclosing execution also reverts.
Design state transitions around interaction
Update and validate internal accounting consistently and consider reentry during external calls. A fixed gas stipend is not a complete substitute for correct state design.
Follow the execution
A attempts value-bearing CALL to B
B fails → child value transfer and effects roll back
A sees false → A must choose a correct response
A local conceptual trace with explicit assumptions; this is not a trace of a live transaction.
QUICK CHECK · NO PRESSURE
Should a low-level false outcome be ignored after recording a payment as complete?