diff --git a/src/tracing/js/bindings.rs b/src/tracing/js/bindings.rs index 9e350d26..59e08d7b 100644 --- a/src/tracing/js/bindings.rs +++ b/src/tracing/js/bindings.rs @@ -671,6 +671,8 @@ pub(crate) struct JsEvmContext { pub(crate) value: U256, /// Number, block number pub(crate) block: u64, + /// Address, miner of the block + pub(crate) coinbase: Address, pub(crate) output: Bytes, /// Number, block timestamp pub(crate) time: String, @@ -692,6 +694,7 @@ impl JsEvmContext { intrinsic_gas, value, block, + coinbase, output, time, transaction_ctx, @@ -716,6 +719,7 @@ impl JsEvmContext { obj.set(js_string!("intrinsicGas"), intrinsic_gas, false, ctx)?; obj.set(js_string!("value"), to_bigint(value, ctx)?, false, ctx)?; obj.set(js_string!("block"), block, false, ctx)?; + obj.set(js_string!("coinbase"), address_to_byte_array(coinbase, ctx)?, false, ctx)?; obj.set(js_string!("output"), to_byte_array(output, ctx)?, false, ctx)?; obj.set(js_string!("time"), js_string!(time), false, ctx)?; if let Some(block_hash) = transaction_ctx.block_hash { diff --git a/src/tracing/js/mod.rs b/src/tracing/js/mod.rs index 1958f0a2..06109429 100644 --- a/src/tracing/js/mod.rs +++ b/src/tracing/js/mod.rs @@ -274,6 +274,7 @@ impl JsInspector { gas_price: env.tx.gas_price.try_into().unwrap_or(u64::MAX), value: env.tx.value, block: env.block.number.try_into().unwrap_or(u64::MAX), + coinbase: env.block.coinbase, output: output_bytes.unwrap_or_default(), time: env.block.timestamp.to_string(), intrinsic_gas: 0,