alloy_provider::ext

Trait TraceApi

source
pub trait TraceApi<N, T>: Send + Sync
where N: Network, T: Transport + Clone,
{ // Required methods fn trace_call<'a, 'b>( &self, request: &'a N::TransactionRequest, trace_type: &'b [TraceType], ) -> RpcWithBlock<T, (&'a N::TransactionRequest, &'b [TraceType]), TraceResults>; fn trace_call_many<'a>( &self, request: TraceCallList<'a, N>, ) -> RpcWithBlock<T, (TraceCallList<'a, N>,), Vec<TraceResults>>; fn trace_transaction<'life0, 'async_trait>( &'life0 self, hash: TxHash, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn trace_get<'life0, 'async_trait>( &'life0 self, hash: TxHash, index: usize, ) -> Pin<Box<dyn Future<Output = TransportResult<LocalizedTransactionTrace>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn trace_raw_transaction<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, data: &'life1 [u8], trace_type: &'life2 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<TraceResults>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn trace_filter<'life0, 'life1, 'async_trait>( &'life0 self, tracer: &'life1 TraceFilter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn trace_block<'life0, 'async_trait>( &'life0 self, block: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn trace_replay_transaction<'life0, 'life1, 'async_trait>( &'life0 self, hash: TxHash, trace_types: &'life1 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<TraceResults>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn trace_replay_block_transactions<'life0, 'life1, 'async_trait>( &'life0 self, block: BlockId, trace_types: &'life1 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TraceResultsWithTransactionHash>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; }
Available on crate feature trace-api only.
Expand description

Trace namespace rpc interface that gives access to several non-standard RPC methods.

Required Methods§

source

fn trace_call<'a, 'b>( &self, request: &'a N::TransactionRequest, trace_type: &'b [TraceType], ) -> RpcWithBlock<T, (&'a N::TransactionRequest, &'b [TraceType]), TraceResults>

Executes the given transaction and returns a number of possible traces.

§Note

Not all nodes support this call.

source

fn trace_call_many<'a>( &self, request: TraceCallList<'a, N>, ) -> RpcWithBlock<T, (TraceCallList<'a, N>,), Vec<TraceResults>>

Traces multiple transactions on top of the same block, i.e. transaction n will be executed on top of the given block with all n - 1 transaction applied first.

Allows tracing dependent transactions.

§Note

Not all nodes support this call.

source

fn trace_transaction<'life0, 'async_trait>( &'life0 self, hash: TxHash, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Parity trace transaction.

source

fn trace_get<'life0, 'async_trait>( &'life0 self, hash: TxHash, index: usize, ) -> Pin<Box<dyn Future<Output = TransportResult<LocalizedTransactionTrace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Traces of the transaction on the given positions

§Note

This function accepts single index and build list with it under the hood because trace_get method accepts list of indices but limits this list to len == 1.

source

fn trace_raw_transaction<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, data: &'life1 [u8], trace_type: &'life2 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<TraceResults>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Trace the given raw transaction.

source

fn trace_filter<'life0, 'life1, 'async_trait>( &'life0 self, tracer: &'life1 TraceFilter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Traces matching given filter.

source

fn trace_block<'life0, 'async_trait>( &'life0 self, block: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Trace all transactions in the given block.

§Note

Not all nodes support this call.

source

fn trace_replay_transaction<'life0, 'life1, 'async_trait>( &'life0 self, hash: TxHash, trace_types: &'life1 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<TraceResults>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replays a transaction.

source

fn trace_replay_block_transactions<'life0, 'life1, 'async_trait>( &'life0 self, block: BlockId, trace_types: &'life1 [TraceType], ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TraceResultsWithTransactionHash>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replays all transactions in the given block.

Implementors§

source§

impl<N, T, P> TraceApi<N, T> for P
where N: Network, T: Transport + Clone, P: Provider<T, N>,