Skip to main content
Schema: hyperevm.core Table: fact_traces Type: Table

What

This table contains detailed execution traces of all internal transactions within the EVM. While fact_transactions shows external calls, this table reveals the complete execution flow including contract-to-contract calls, value transfers, and computation paths.

Key Use Cases

  • Analyzing internal contract-to-contract calls and value transfers
  • Debugging failed transactions and understanding revert reasons
  • Tracking contract deployments (CREATE/CREATE2 operations)
  • Understanding DeFi protocol interactions and MEV analysis
  • Monitoring delegatecall patterns and proxy contract usage

Important Relationships

  • Join with fact_transactions: Use tx_hash for transaction context
  • Self-join for trace tree: Use tx_hash and trace_address array relationships
  • Join with fact_event_logs: Match execution flow with events
  • Join with dim_contracts: Get metadata for interacting contracts

Commonly-used Fields

  • trace_index: Sequential execution order within transaction
  • trace_address: Array showing position in execution tree
  • type: Operation type (CALL, DELEGATECALL, CREATE, etc.)
  • from_address: Address initiating this internal call
  • to_address: Destination address (NULL for contract creation)
  • value: Native token amount transferred
  • trace_succeeded: Whether execution completed successfully

Sample queries

-- Analyze internal ETH transfers
SELECT
    block_timestamp,
    tx_hash,
    trace_index,
    type,
    from_address,
    to_address,
    value,
    gas_used,
    trace_succeeded
FROM hyperevm.core.fact_traces
WHERE value > 0
    AND type = 'CALL'
    AND trace_succeeded
    AND block_timestamp >= CURRENT_DATE - 1
ORDER BY value DESC
LIMIT 100;

-- Find failed internal transactions with reasons
SELECT
    tx_hash,
    trace_index,
    from_address,
    to_address,
    type,
    error_reason,
    revert_reason,
    gas,
    gas_used
FROM hyperevm.core.fact_traces
WHERE NOT trace_succeeded
    AND block_timestamp >= CURRENT_DATE - 1
    AND error_reason IS NOT NULL
LIMIT 50;

-- Trace execution depth analysis
SELECT
    tx_hash,
    MAX(ARRAY_SIZE(trace_address)) AS max_depth,
    COUNT(*) AS total_traces,
    SUM(CASE WHEN trace_succeeded THEN 0 ELSE 1 END) AS failed_traces,
    SUM(value) AS total_value_transferred
FROM hyperevm.core.fact_traces
WHERE block_timestamp >= CURRENT_DATE - 1
GROUP BY 1
HAVING MAX(ARRAY_SIZE(trace_address)) > 3
ORDER BY 2 DESC;

-- Contract interaction patterns
WITH contract_calls AS (
    SELECT
        from_address AS caller,
        to_address AS callee,
        COUNT(*) AS call_count,
        SUM(value) AS total_value
    FROM hyperevm.core.fact_traces
    WHERE type IN ('CALL', 'DELEGATECALL')
        AND block_timestamp >= CURRENT_DATE - 7
    GROUP BY 1, 2
)
SELECT * FROM contract_calls
WHERE call_count > 100
ORDER BY call_count DESC;

Columns

Column NameData TypeDescription
BLOCK_NUMBERNUMBERSequential counter representing the position of a block in the blockchain since genesis (block 0).
BLOCK_TIMESTAMPTIMESTAMP_NTZUTC timestamp when the block was produced by validators/miners.
TX_HASHTEXTUnique 66-character identifier for the transaction.
TX_POSITIONNUMBERZero-indexed position of transaction within its block.
TRACE_INDEXNUMBERSequential index of trace within the transaction’s execution.
FROM_ADDRESSTEXTAddress that initiated this specific internal call.
TO_ADDRESSTEXTDestination address for this internal call.
INPUTTEXTHex-encoded input data for this trace (function call data).
OUTPUTTEXTHex-encoded output data from trace execution.
TYPETEXTThe type of EVM operation performed.
TRACE_ADDRESSTEXTArray describing the trace’s position in the execution tree.
SUB_TRACESNUMBERCount of immediate child traces spawned by this trace.
VALUEFLOATAmount of native tokens transferred, in token units (not Wei).
VALUE_PRECISE_RAWTEXTString representation of numeric values preserving exact precision without any adjustments.
VALUE_PRECISETEXTString representation of numeric values adjusted for human readability while maintaining precision.
VALUE_HEXTEXTHexadecimal representation of transaction values as provided by the blockchain RPC.
GASNUMBERGas allocated to this specific trace execution.
GAS_USEDNUMBERActual gas consumed by this trace execution.
ORIGIN_FROM_ADDRESSTEXTThe externally-owned account (EOA) or contract address that initiated the transaction.
ORIGIN_TO_ADDRESSTEXTThe destination address for the transaction - either an EOA or contract address.
ORIGIN_FUNCTION_SIGNATURETEXTFunction signature (first 4 bytes) of the called method.
TRACE_SUCCEEDEDBOOLEANBoolean indicating if the trace executed successfully.
ERROR_REASONTEXTTechnical reason for trace failure.
REVERT_REASONTEXTHuman-readable revert message from contract require/revert statements.
TX_SUCCEEDEDBOOLEANBoolean indicator of transaction success.
FACT_TRACES_IDTEXTPrimary key - unique identifier for each row ensuring data integrity.
INSERTED_TIMESTAMPTIMESTAMP_NTZUTC timestamp when the record was first added to the Flipside database.
MODIFIED_TIMESTAMPTIMESTAMP_NTZUTC timestamp of the most recent update to this record.