diff --git a/crates/revm/revm-inspectors/src/tracing/builder/parity.rs b/crates/revm/revm-inspectors/src/tracing/builder/parity.rs index 09eba35209..b70173a8db 100644 --- a/crates/revm/revm-inspectors/src/tracing/builder/parity.rs +++ b/crates/revm/revm-inspectors/src/tracing/builder/parity.rs @@ -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, + } } } diff --git a/crates/rpc/rpc-types/src/eth/trace/parity.rs b/crates/rpc/rpc-types/src/eth/trace/parity.rs index f99f97de67..60de0b5d15 100644 --- a/crates/rpc/rpc-types/src/eth/trace/parity.rs +++ b/crates/rpc/rpc-types/src/eth/trace/parity.rs @@ -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, + /// The program counter. + pub pc: usize, /// Subordinate trace of the CALL/CREATE if applicable. + #[serde(skip_serializing_if = "Option::is_none")] pub sub: Option, + /// Stringified opcode. + #[serde(skip_serializing_if = "Option::is_none")] + pub op: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub idx: Option, } /// A record of an executed VM operation.