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

feat: add missing debug_* rpc methods #986

Merged
merged 9 commits into from
Jun 28, 2024
Prev Previous commit
fix: hex encode rlp_block bytes
  • Loading branch information
alexfertel committed Jun 28, 2024
commit cbbbe5ffd34d5f83a01639e569095df8eac0d4d1
3 changes: 2 additions & 1 deletion crates/provider/src/ext/debug.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This module extends the Ethereum JSON-RPC provider with the Debug namespace's RPC methods.
use crate::Provider;
use alloy_network::Network;
use alloy_primitives::{Bytes, TxHash, B256};
use alloy_primitives::{hex, Bytes, TxHash, B256};
use alloy_rpc_types_eth::{Block, BlockNumberOrTag, TransactionRequest};
use alloy_rpc_types_trace::geth::{
BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult,
Expand Down Expand Up @@ -169,6 +169,7 @@ where
rlp_block: &[u8],
trace_options: GethDebugTracingOptions,
) -> TransportResult<Vec<TraceResult>> {
let rlp_block = hex::encode_prefixed(rlp_block);
self.client().request("debug_traceBlock", (rlp_block, trace_options)).await
}

Expand Down