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
Follow a revert and decode its error dataRequested actionTransfer 100 raw unitsExample inputsAvailable balance40 raw unitsCheck the ruleA deliberately failing local scenario, not a live transactionCondition fails100 > 40Request rejectedRollbackNo successful transferConsumed gas still mattersTop-level failure and a caught nested failure have different contextsError selector0x08c379a04 bytesMessage tailNot enough tokensDynamic string encodingCustom errors and Panic use different selectors and schemasDecoded messageNot enough tokensA diagnostic clueFurther evidenceCaller and code pathRelevant stateError bytes can be constructed by code; decoding is not authentication

This fictional call requests a transfer of one hundred raw units while the relevant balance is forty.

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?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.