@tevm/voltaire / primitives/OpStep
primitives/OpStep
Type Aliases
OpStepType
OpStepType = object
Defined in: src/primitives/OpStep/OpStepType.ts:12
Single opcode execution step
Represents the EVM state at a specific instruction
See
https://voltaire.tevm.sh/primitives/op-step for OpStep documentationSince
0.0.0Properties
[brand]
Defined in: src/primitives/OpStep/OpStepType.ts:13readonly[brand]:"OpStep"
depth
Defined in: src/primitives/OpStep/OpStepType.ts:23 Call depth (0 for top-level call)readonlydepth:number
error?
Defined in: src/primitives/OpStep/OpStepType.ts:31 Error message if step failedreadonlyoptionalerror:string
gas
Defined in: src/primitives/OpStep/OpStepType.ts:19 Remaining gas before executing this operationreadonlygas:Type
gasCost
Defined in: src/primitives/OpStep/OpStepType.ts:21 Gas cost for this operationreadonlygasCost:Type
memory?
Defined in: src/primitives/OpStep/OpStepType.ts:27 Memory state (raw bytes)readonlyoptionalmemory:Uint8Array
op
Defined in: src/primitives/OpStep/OpStepType.ts:17 Opcode number (0x00-0xFF)readonlyop:BrandedOpcode
pc
Defined in: src/primitives/OpStep/OpStepType.ts:15 Program counter (bytecode offset)readonlypc:number
stack?
Defined in: src/primitives/OpStep/OpStepType.ts:25 Stack state (top to bottom)readonlyoptionalstack: readonlyType[]
storage?
Defined in: src/primitives/OpStep/OpStepType.ts:29 Storage changes in this step (key -> value)readonlyoptionalstorage:Record<string,Type>
Functions
_from()
_from(Defined in: src/primitives/OpStep/from.js:21 Creates an OpStep from raw datadata):OpStepType
Parameters
data
OpStep datadepth
number
Call depth
error?
string
Error message
gas
Type
Remaining gas
gasCost
Type
Gas cost
memory?
Uint8Array<ArrayBufferLike>
Memory state
op
BrandedOpcode
Opcode
pc
number
Program counter
stack?
readonlyType[]
Stack state
storage?
Record<string, Type>
Storage changes
Returns
OpStepType
OpStep instance
Example
_hasError()
_hasError(Defined in: src/primitives/OpStep/hasError.js:14 Checks if an OpStep has an errorstep):boolean
Parameters
step
OpStepType
OpStep to check
Returns
boolean
True if step has an error
Example
from()
from(Defined in: src/primitives/OpStep/index.ts:22 Creates an OpStep from raw datadata):OpStepType
Parameters
data
Omit<OpStepType, brand>
OpStep data
Returns
OpStepType
OpStep instance
See
https://voltaire.tevm.sh/primitives/op-step for OpStep documentationSince
0.0.0Example
hasError()
hasError(Defined in: src/primitives/OpStep/index.ts:41 Checks if an OpStep has an errorstep):boolean
Parameters
step
OpStepType
OpStep to check
Returns
boolean
True if step has an error

