Skip to main content

CallTrace

Hierarchical call tree structure returned by Geth’s callTracer. Represents the complete call graph of a transaction execution.

Overview

CallTrace captures the tree of contract calls made during transaction execution. Each node represents a call (CALL, STATICCALL, DELEGATECALL, CREATE, etc.) with its inputs, outputs, gas usage, and nested subcalls.

Type Definition

Usage

Creating CallTraces

Nested Calls

Methods

getCalls

Get immediate child calls:

flatten

Convert tree to flat list:

hasError

Check if call failed:

Common Patterns

Finding Failing Call

Gas Analysis

Call Count by Contract

Extract All Reverts

Call Depth Analysis

Value Flow Tracking

RPC Usage

With debug_traceTransaction

With debug_traceCall

Call Types

CALL

Standard contract call with value transfer.

STATICCALL

Read-only call (no state changes, no value).

DELEGATECALL

Call preserving caller context (msg.sender, msg.value).

CREATE

Deploy new contract.

CREATE2

Deploy with deterministic address.

See Also