pub trait TraceApi<N>: Send + Syncwhere
N: Network,{
// Required methods
fn trace_call<'a>(
&self,
request: &'a N::TransactionRequest,
) -> TraceBuilder<&'a N::TransactionRequest, TraceResults>;
fn trace_call_many<'a>(
&self,
request: TraceCallList<'a, N>,
) -> TraceBuilder<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<'a>(
&self,
data: &'a [u8],
) -> TraceBuilder<&'a [u8], TraceResults>;
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(
&self,
hash: TxHash,
) -> TraceBuilder<TxHash, TraceResults>;
fn trace_replay_block_transactions(
&self,
block: BlockId,
) -> TraceBuilder<BlockId, Vec<TraceResultsWithTransactionHash>>;
}
trace-api
only.Expand description
Trace namespace rpc interface that gives access to several non-standard RPC methods.
Required Methods§
Sourcefn trace_call<'a>(
&self,
request: &'a N::TransactionRequest,
) -> TraceBuilder<&'a N::TransactionRequest, TraceResults>
fn trace_call<'a>( &self, request: &'a N::TransactionRequest, ) -> TraceBuilder<&'a N::TransactionRequest, TraceResults>
Executes the given transaction and returns a number of possible traces.
Default trace type is TraceType::Trace
.
§Note
Not all nodes support this call.
Sourcefn trace_call_many<'a>(
&self,
request: TraceCallList<'a, N>,
) -> TraceBuilder<TraceCallList<'a, N>, Vec<TraceResults>>
fn trace_call_many<'a>( &self, request: TraceCallList<'a, N>, ) -> TraceBuilder<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.
If BlockId
is unset the default at which calls will be executed is BlockId::pending
.
§Note
Not all nodes support this call.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn trace_raw_transaction<'a>(
&self,
data: &'a [u8],
) -> TraceBuilder<&'a [u8], TraceResults>
fn trace_raw_transaction<'a>( &self, data: &'a [u8], ) -> TraceBuilder<&'a [u8], TraceResults>
Trace the given raw transaction.
Sourcefn 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_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.
Sourcefn 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_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,
Sourcefn trace_replay_transaction(
&self,
hash: TxHash,
) -> TraceBuilder<TxHash, TraceResults>
fn trace_replay_transaction( &self, hash: TxHash, ) -> TraceBuilder<TxHash, TraceResults>
Replays a transaction.
Default trace type is TraceType::Trace
.
Sourcefn trace_replay_block_transactions(
&self,
block: BlockId,
) -> TraceBuilder<BlockId, Vec<TraceResultsWithTransactionHash>>
fn trace_replay_block_transactions( &self, block: BlockId, ) -> TraceBuilder<BlockId, Vec<TraceResultsWithTransactionHash>>
Replays all transactions in the given block.
Default trace type is TraceType::Trace
.