pub trait TraceApiServer<TxReq>:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn trace_call(
&self,
call: TxReq,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send;
fn trace_call_many(
&self,
calls: Vec<(TxReq, HashSet<TraceType, DefaultHashBuilder>)>,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send;
fn trace_raw_transaction(
&self,
data: Bytes,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send;
fn replay_block_transactions(
&self,
block_id: BlockId,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> impl Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send;
fn replay_transaction(
&self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> impl Future<Output = Result<Option<TraceResultsWithTransactionHash>, ErrorObject<'static>>> + Send;
fn trace_block(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send;
fn trace_filter(
&self,
filter: TraceFilter,
) -> impl Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send;
fn trace_get(
&self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> impl Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send;
fn trace_transaction(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send;
fn trace_transaction_opcode_gas(
&self,
tx_hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send;
fn trace_block_opcode_gas(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send;
// 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(
&self,
call: TxReq,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send
fn trace_call( &self, call: TxReq, trace_types: HashSet<TraceType, DefaultHashBuilder>, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send
Executes the given call and returns a number of possible traces for it.
Sourcefn trace_call_many(
&self,
calls: Vec<(TxReq, HashSet<TraceType, DefaultHashBuilder>)>,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send
fn trace_call_many( &self, calls: Vec<(TxReq, HashSet<TraceType, DefaultHashBuilder>)>, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send
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(
&self,
data: Bytes,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send
fn trace_raw_transaction( &self, data: Bytes, trace_types: HashSet<TraceType, DefaultHashBuilder>, block_id: Option<BlockId>, ) -> impl Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send
Traces a call to eth_sendRawTransaction without making the call, returning the traces.
Expects a raw transaction data
Sourcefn replay_block_transactions(
&self,
block_id: BlockId,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> impl Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send
fn replay_block_transactions( &self, block_id: BlockId, trace_types: HashSet<TraceType, DefaultHashBuilder>, ) -> impl Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send
Replays all transactions in a block returning the requested traces for each transaction.
Sourcefn replay_transaction(
&self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> impl Future<Output = Result<Option<TraceResultsWithTransactionHash>, ErrorObject<'static>>> + Send
fn replay_transaction( &self, transaction: FixedBytes<32>, trace_types: HashSet<TraceType, DefaultHashBuilder>, ) -> impl Future<Output = Result<Option<TraceResultsWithTransactionHash>, ErrorObject<'static>>> + Send
Replays a transaction, returning the traces or None if the transaction does not exist.
Sourcefn trace_block(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send
fn trace_block( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send
Returns traces created at given block.
Sourcefn trace_filter(
&self,
filter: TraceFilter,
) -> impl Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send
fn trace_filter( &self, filter: TraceFilter, ) -> impl Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send
Returns traces matching given filter.
This is similar to eth_getLogs but for traces. Omitted range bounds default to latest.
Sourcefn trace_get(
&self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> impl Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send
fn trace_get( &self, hash: FixedBytes<32>, indices: Vec<Index>, ) -> impl Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send
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(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send
fn trace_transaction( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send
Returns all traces of given transaction.
Sourcefn trace_transaction_opcode_gas(
&self,
tx_hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send
fn trace_transaction_opcode_gas( &self, tx_hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send
Returns all opcodes with their count and combined gas usage for the given transaction in no particular order.
Sourcefn trace_block_opcode_gas(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send
fn trace_block_opcode_gas( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send
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".
Implementations on Foreign Types§
Source§impl<Eth> TraceApiServer<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest> for TraceApi<Eth>where
Eth: TraceExt,
impl<Eth> TraceApiServer<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest> for TraceApi<Eth>where
Eth: TraceExt,
Source§async fn trace_call(
&self,
call: <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Result<TraceResults, ErrorObject<'static>>
async fn trace_call( &self, call: <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, trace_types: HashSet<TraceType, DefaultHashBuilder>, block_id: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Result<TraceResults, ErrorObject<'static>>
Executes the given call and returns a number of possible traces for it.
Handler for trace_call
Source§async fn trace_call_many(
&self,
calls: Vec<(<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, HashSet<TraceType, DefaultHashBuilder>)>,
block_id: Option<BlockId>,
) -> Result<Vec<TraceResults>, ErrorObject<'static>>
async fn trace_call_many( &self, calls: Vec<(<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, HashSet<TraceType, DefaultHashBuilder>)>, block_id: Option<BlockId>, ) -> Result<Vec<TraceResults>, ErrorObject<'static>>
Handler for trace_callMany
Source§async fn trace_raw_transaction(
&self,
data: Bytes,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
block_id: Option<BlockId>,
) -> Result<TraceResults, ErrorObject<'static>>
async fn trace_raw_transaction( &self, data: Bytes, trace_types: HashSet<TraceType, DefaultHashBuilder>, block_id: Option<BlockId>, ) -> Result<TraceResults, ErrorObject<'static>>
Handler for trace_rawTransaction
Source§async fn replay_block_transactions(
&self,
block_id: BlockId,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>
async fn replay_block_transactions( &self, block_id: BlockId, trace_types: HashSet<TraceType, DefaultHashBuilder>, ) -> Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>
Handler for trace_replayBlockTransactions
Source§async fn replay_transaction(
&self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, DefaultHashBuilder>,
) -> Result<Option<TraceResultsWithTransactionHash>, ErrorObject<'static>>
async fn replay_transaction( &self, transaction: FixedBytes<32>, trace_types: HashSet<TraceType, DefaultHashBuilder>, ) -> Result<Option<TraceResultsWithTransactionHash>, ErrorObject<'static>>
Handler for trace_replayTransaction
Source§async fn trace_block(
&self,
block_id: BlockId,
) -> Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>
async fn trace_block( &self, block_id: BlockId, ) -> Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>
Handler for trace_block
Source§async fn trace_filter(
&self,
filter: TraceFilter,
) -> Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>
async fn trace_filter( &self, filter: TraceFilter, ) -> Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>
Handler for trace_filter
This is similar to eth_getLogs but for traces.
§Limitations
This currently requires block filter fields, since reth does not have address indices yet.
Source§async fn trace_get(
&self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>
async fn trace_get( &self, hash: FixedBytes<32>, indices: Vec<Index>, ) -> Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>
Returns transaction trace at given index.
Handler for trace_get
Source§async fn trace_transaction(
&self,
hash: FixedBytes<32>,
) -> Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>
async fn trace_transaction( &self, hash: FixedBytes<32>, ) -> Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>
Handler for trace_transaction
Source§async fn trace_transaction_opcode_gas(
&self,
tx_hash: FixedBytes<32>,
) -> Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>
async fn trace_transaction_opcode_gas( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>
Handler for trace_transactionOpcodeGas
Source§async fn trace_block_opcode_gas(
&self,
block_id: BlockId,
) -> Result<Option<BlockOpcodeGas>, ErrorObject<'static>>
async fn trace_block_opcode_gas( &self, block_id: BlockId, ) -> Result<Option<BlockOpcodeGas>, ErrorObject<'static>>
Handler for trace_blockOpcodeGas