diff --git a/crates/provider/src/ext/debug.rs b/crates/provider/src/ext/debug.rs index 136f9188c93..3fac4d45f46 100644 --- a/crates/provider/src/ext/debug.rs +++ b/crates/provider/src/ext/debug.rs @@ -4,7 +4,7 @@ use alloy_network::Network; use alloy_primitives::{Bytes, TxHash, B256}; use alloy_rpc_types_eth::{Block, BlockNumberOrTag, TransactionRequest}; use alloy_rpc_types_trace::geth::{ - GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult, + BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult, }; use alloy_transport::{Transport, TransportResult}; @@ -27,6 +27,13 @@ pub trait DebugApi: Send + Sync { /// Returns an array of recent bad blocks that the client has seen on the network. async fn debug_get_bad_blocks(&self) -> TransportResult>; + /// Returns the structured logs created during the execution of EVM between two blocks (excluding start) as a JSON object. + async fn debug_trace_chain( + &self, + start_exclusive: BlockNumberOrTag, + end_inclusive: BlockNumberOrTag, + ) -> TransportResult>; + /// Reruns the transaction specified by the hash and returns the trace. /// /// It will replay any prior transactions to achieve the same state the transaction was executed @@ -134,6 +141,14 @@ where self.client().request("debug_getBadBlocks", ()).await } + async fn debug_trace_chain( + &self, + start_exclusive: BlockNumberOrTag, + end_inclusive: BlockNumberOrTag, + ) -> TransportResult> { + self.client().request("debug_traceChain", (start_exclusive, end_inclusive)).await + } + async fn debug_trace_transaction( &self, hash: TxHash,