@tevm/voltaire / primitives/StructLog
primitives/StructLog
Type Aliases
StructLogType
StructLogType = object
Defined in: src/primitives/StructLog/StructLogType.ts:11
Geth-style structured execution log entry
Each entry represents one opcode execution with human-readable formatting
See
https://voltaire.tevm.sh/primitives/struct-log for StructLog documentationSince
0.0.0Properties
[brand]
Defined in: src/primitives/StructLog/StructLogType.ts:12readonly[brand]:"StructLog"
depth
Defined in: src/primitives/StructLog/StructLogType.ts:22 Call depth (0 for top-level call)readonlydepth:number
error?
Defined in: src/primitives/StructLog/StructLogType.ts:32 Error message if operation failedreadonlyoptionalerror:string
gas
Defined in: src/primitives/StructLog/StructLogType.ts:18 Remaining gas before this operationreadonlygas:Type
gasCost
Defined in: src/primitives/StructLog/StructLogType.ts:20 Gas cost for this operationreadonlygasCost:Type
memory?
Defined in: src/primitives/StructLog/StructLogType.ts:26 Memory contents as 32-byte hex chunksreadonlyoptionalmemory: readonlystring[]
op
Defined in: src/primitives/StructLog/StructLogType.ts:16 Opcode name (e.g., “PUSH1”, “ADD”, “SSTORE”)readonlyop:string
pc
Defined in: src/primitives/StructLog/StructLogType.ts:14 Program counterreadonlypc:number
refund?
Defined in: src/primitives/StructLog/StructLogType.ts:30 Gas refund counterreadonlyoptionalrefund:Type
stack
Defined in: src/primitives/StructLog/StructLogType.ts:24 Stack contents as hex strings (top to bottom)readonlystack: readonlystring[]
storage?
Defined in: src/primitives/StructLog/StructLogType.ts:28 Storage changes (hex key -> hex value)readonlyoptionalstorage:Record<string,string>
Functions
_from()
_from(Defined in: src/primitives/StructLog/from.js:29 Creates a StructLog from raw datadata):StructLogType
Parameters
data
StructLog datadepth
number
Call depth
error?
string
Error message
gas
Type
Remaining gas
gasCost
Type
Gas cost
memory?
readonlystring[]
Memory as hex chunks
op
string
Opcode name
pc
number
Program counter
refund?
Type
Gas refund
stack
readonlystring[]
Stack as hex strings
storage?
Record<string, string>
Storage changes
Returns
StructLogType
StructLog instance
Example
_toOpStep()
_toOpStep(Defined in: src/primitives/StructLog/toOpStep.js:13 Converts a StructLog to an OpStep Parses hex strings back to typed valueslog):OpStepType
Parameters
log
StructLogType
StructLog to convert
Returns
OpStepType
OpStep instance
Example
from()
from(Defined in: src/primitives/StructLog/index.ts:23 Creates a StructLog from raw datadata):StructLogType
Parameters
data
Omit<StructLogType, brand>
StructLog data
Returns
StructLogType
StructLog instance
See
https://voltaire.tevm.sh/primitives/struct-log for StructLog documentationSince
0.0.0Example
toOpStep()
toOpStep(Defined in: src/primitives/StructLog/index.ts:40 Converts a StructLog to an OpSteplog):OpStepType
Parameters
log
StructLogType
StructLog to convert
Returns
OpStepType
OpStep instance

