Skip to content

Commit

Permalink
fix(provider/debug): arg type in debug_trace_call (alloy-rs#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-atreya authored and ben186 committed Jul 27, 2024
1 parent ce3273e commit f47df64
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/provider/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use crate::Provider;
use alloy_network::Network;
use alloy_primitives::{BlockNumber, TxHash, B256};
use alloy_rpc_types::{BlockNumberOrTag, TransactionRequest};
use alloy_rpc_types_trace::geth::{GethDebugTracingOptions, GethTrace};
use alloy_rpc_types_trace::geth::{
GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace,
};
use alloy_transport::{Transport, TransportResult};

/// Debug namespace rpc interface that gives access to several non-standard RPC methods.
Expand Down Expand Up @@ -71,7 +73,7 @@ pub trait DebugApi<N, T>: Send + Sync {
&self,
tx: TransactionRequest,
block: BlockNumberOrTag,
trace_options: GethDebugTracingOptions,
trace_options: GethDebugTracingCallOptions,
) -> TransportResult<GethTrace>;

/// Same as `debug_trace_call` but it used to run and trace multiple transactions at once.
Expand All @@ -85,7 +87,7 @@ pub trait DebugApi<N, T>: Send + Sync {
&self,
txs: Vec<TransactionRequest>,
block: BlockNumberOrTag,
trace_options: GethDebugTracingOptions,
trace_options: GethDebugTracingCallOptions,
) -> TransportResult<Vec<GethTrace>>;
}

Expand Down Expand Up @@ -125,7 +127,7 @@ where
&self,
tx: TransactionRequest,
block: BlockNumberOrTag,
trace_options: GethDebugTracingOptions,
trace_options: GethDebugTracingCallOptions,
) -> TransportResult<GethTrace> {
self.client().request("debug_traceCall", (tx, block, trace_options)).await
}
Expand All @@ -134,7 +136,7 @@ where
&self,
txs: Vec<TransactionRequest>,
block: BlockNumberOrTag,
trace_options: GethDebugTracingOptions,
trace_options: GethDebugTracingCallOptions,
) -> TransportResult<Vec<GethTrace>> {
self.client().request("debug_traceCallMany", (txs, block, trace_options)).await
}
Expand Down Expand Up @@ -194,7 +196,7 @@ mod test {
.max_priority_fee_per_gas(gas_price + 1);

let trace = provider
.debug_trace_call(tx, BlockNumberOrTag::Latest, GethDebugTracingOptions::default())
.debug_trace_call(tx, BlockNumberOrTag::Latest, GethDebugTracingCallOptions::default())
.await
.unwrap();

Expand Down

0 comments on commit f47df64

Please sign in to comment.