mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add missing op and idx fields (#4076)
This commit is contained in:
@ -365,7 +365,14 @@ impl ParityTraceBuilder {
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
VmInstruction { pc: step.pc, cost: cost as u64, ex: maybe_execution, sub: maybe_sub }
|
||||
VmInstruction {
|
||||
pc: step.pc,
|
||||
cost: cost as u64,
|
||||
ex: maybe_execution,
|
||||
sub: maybe_sub,
|
||||
op: Some(step.op.to_string()),
|
||||
idx: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -291,14 +291,20 @@ pub struct VmTrace {
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct VmInstruction {
|
||||
/// The program counter.
|
||||
pub pc: usize,
|
||||
/// The gas cost for this instruction.
|
||||
pub cost: u64,
|
||||
/// Information concerning the execution of the operation.
|
||||
pub ex: Option<VmExecutedOperation>,
|
||||
/// The program counter.
|
||||
pub pc: usize,
|
||||
/// Subordinate trace of the CALL/CREATE if applicable.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub sub: Option<VmTrace>,
|
||||
/// Stringified opcode.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub op: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub idx: Option<String>,
|
||||
}
|
||||
|
||||
/// A record of an executed VM operation.
|
||||
|
||||
Reference in New Issue
Block a user