pub trait TraceApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TransactionRequest,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TransactionRequest, HashSet<TraceType, RandomState>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn trace_block_opcode_gas<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the TraceApi
RPC API.
Required Methods§
Sourcefn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TransactionRequest,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TransactionRequest,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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<(TransactionRequest, HashSet<TraceType, RandomState>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TransactionRequest, HashSet<TraceType, RandomState>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Performs multiple call traces on top of the same block. i.e. transaction n will be executed on top of a pending block with all n-1 transactions applied (traced) first. Allows to trace dependent transactions.
Sourcefn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Replays all transactions in a block returning the requested traces for each transaction.
Sourcefn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Replays a transaction, returning the traces.
Sourcefn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns traces created at given block.
Sourcefn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns traces matching given filter.
This is similar to eth_getLogs
but for traces.
Sourcefn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns transaction trace at given index.
indices
represent the index positions of the traces.
Note: This expects a list of indices but only one is supported since this function returns a single [LocalizedTransactionTrace].
Sourcefn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns all traces of given transaction.
Sourcefn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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 = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_block_opcode_gas<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<Eth> TraceApiServer for TraceApi<Eth>where
Eth: TraceExt + 'static,
impl<Eth> TraceApiServer for TraceApi<Eth>where
Eth: TraceExt + 'static,
Source§fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TransactionRequest,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_call<'life0, 'async_trait>(
&'life0 self,
call: TransactionRequest,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block_overrides: Option<Box<BlockOverrides>>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Executes the given call and returns a number of possible traces for it.
Handler for trace_call
Source§fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TransactionRequest, HashSet<TraceType, RandomState>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_call_many<'life0, 'async_trait>(
&'life0 self,
calls: Vec<(TransactionRequest, HashSet<TraceType, RandomState>)>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceResults>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_callMany
Source§fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_types: HashSet<TraceType, RandomState>,
block_id: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_rawTransaction
Source§fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceResultsWithTransactionHash>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_replayBlockTransactions
Source§fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn replay_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: FixedBytes<32>,
trace_types: HashSet<TraceType, RandomState>,
) -> Pin<Box<dyn Future<Output = Result<TraceResults, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_replayTransaction
Source§fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block_id: BlockId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_block
Source§fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
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§fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_get<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
indices: Vec<Index>,
) -> Pin<Box<dyn Future<Output = Result<Option<LocalizedTransactionTrace>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Returns transaction trace at given index.
Handler for trace_get
Source§fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<LocalizedTransactionTrace>>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_transaction
Source§fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
fn trace_transaction_opcode_gas<'life0, 'async_trait>(
&'life0 self,
tx_hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionOpcodeGas>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
TraceApi<Eth>: 'async_trait,
Handler for trace_transactionOpcodeGas