Find a failed inner call in a successful Ethereum transaction

An application can catch a failed call and complete its outer transaction successfully. The Geth call tree helps locate the frame that reverted.

Request a nested call trace

On a Geth endpoint with authorized debug access, call debug_traceTransaction with the transaction hash and the options below. Keep nested calls enabled. Read the root frame and recursively examine its calls entries.

{"tracer":"callTracer","tracerConfig":{"onlyTopCall":false}}

Suppose the root has no error while its second child has error set and revert bytes in output. Record the child’s call type, target and input selector. This identifies the failed attempt even when the parent recovered and returned normally.

Reconstruct the execution context

A DELEGATECALL frame can run code at one address against another account’s storage. Follow the parent chain when assigning state effects. An endpoint may lack the historical state needed to replay the transaction or may refuse traces for resource reasons. geth.ethereum.org Geth callTracer