Skip to main content

StructLog

Geth-style structured log entry representing a single opcode execution with human-readable hex string formatting.

Overview

StructLog is the JSON-RPC format used by Geth’s debug_traceTransaction. It uses hex strings for all values (stack, memory, storage) instead of typed values.

Type Definition

Usage

Creating StructLogs

Converting to OpStep

RPC Response Format

Example from debug_traceTransaction

Parsing RPC Response

Memory Format

Memory is returned as an array of 32-byte hex strings (64 hex characters each):

Storage Format

Storage is a map of 32-byte hex keys to 32-byte hex values:

Common Patterns

Finding Reverts

Analyzing Gas Usage

Extracting Storage Changes

Stack Depth Analysis

Comparison with OpStep

See Also