pub trait TraceApiServer<TxReq>:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TxReq,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TxReq, HashSet<TraceType>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<TraceResults>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<TraceResultsWithTransactionHash>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: B256,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TraceResultsWithTransactionHash>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: B256,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionOpcodeGas>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trace_block_opcode_gas<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<BlockOpcodeGas>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where TxReq: Send + Sync + 'static + DeserializeOwned { ... }
}Expand description
Server trait implementation for the TraceApi RPC API.
Required Methods§
Sourcefn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TxReq,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TxReq,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
state_overrides: Option<StateOverride>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes the given call and returns a number of possible traces for it.
Sourcefn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TxReq, HashSet<TraceType>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<TraceResults>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TxReq, HashSet<TraceType>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<TraceResults>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Performs multiple call traces on top of the same block, defaulting to latest when no block is specified. Each call is executed with the preceding calls applied first, allowing dependent transactions to be traced.
Sourcefn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = RpcResult<TraceResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Traces a call to eth_sendRawTransaction without making the call, returning the traces.
Expects a raw transaction data
Sourcefn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<TraceResultsWithTransactionHash>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<TraceResultsWithTransactionHash>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replays all transactions in a block returning the requested traces for each transaction.
Sourcefn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: B256,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TraceResultsWithTransactionHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: B256,
trace_types: HashSet<TraceType>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TraceResultsWithTransactionHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replays a transaction, returning the traces or None if the transaction does not exist.
Sourcefn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns traces created at given block.
Sourcefn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns traces matching given filter.
This is similar to eth_getLogs but for traces. Omitted range bounds default to latest.
Sourcefn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: B256,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<LocalizedTransactionTrace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: B256,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<LocalizedTransactionTrace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the transaction trace at the given traceAddress path.
An empty path selects the root, [0] selects its first child, and [0, 1] selects that
child’s second child. Returns None if the transaction or path does not exist.
Callers requiring a flat index can index the result of trace_transaction instead.
Sourcefn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<LocalizedTransactionTrace>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all traces of given transaction.
Sourcefn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionOpcodeGas>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: B256,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<TransactionOpcodeGas>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all opcodes with their count and combined gas usage for the given transaction in no particular order.
Sourcefn trace_block_opcode_gas<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<BlockOpcodeGas>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_block_opcode_gas<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Option<BlockOpcodeGas>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the opcodes of all transactions in the given block.
This is the same as trace_transactionOpcodeGas but for all transactions in a block.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".