Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(provider/debug): arg type in debug_trace_call #585

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading