In this track: Execution traces and low-level calls
advanced · 4 MIN READ

Trace a failed token transfer

Separate the call result, return value and state effects.

LET’S PICTURE IT

A service can reject the request, reply false or claim success under its own rules.

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.

Identify the token interface

A standard transfer call takes a recipient and raw amount. The ABI input alone does not establish the implementation’s balance or permission behavior.

Read the low-level outcome

A revert yields a failed call and possible revert data. A successful low-level call can still return a boolean false under a token interface.

Apply the integration policy

A caller should handle the target’s documented return convention and relevant compatibility requirements. Do not equate every non-reverting byte sequence with a completed transfer.

Check retained effects

Inspect the successful state transition and surviving logs when available. A simulated trace needs matching state and chain context before it supports claims about a real transaction.

Follow the execution

Case A: call fails → inspect revert bytes
Case B: call succeeds, returns false → handle token-level failure
Case C: call succeeds, returns expected success shape → still use correct target context

A local conceptual trace with explicit assumptions; this is not a trace of a live transaction.

QUICK CHECK · NO PRESSURE

Does low-level success always mean a token returned true?

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.