Trait brontes_core::decoding::TracingProvider

source ·
pub trait TracingProvider:
    Send
    + Sync
    + 'static {
    // Required methods
    fn eth_call<'life0, 'async_trait>(
        &'life0 self,
        request: TransactionRequest,
        block_number: Option<BlockId>,
        state_overrides: Option<HashMap<Address, AccountOverride>>,
        block_overrides: Option<Box<BlockOverrides>>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_hash_for_id<'life0, 'async_trait>(
        &'life0 self,
        block_num: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn best_block_number(&self) -> Result<u64, Report>;
    fn replay_block_transactions<'life0, 'async_trait>(
        &'life0 self,
        block_id: BlockId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TxTrace>>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_receipts<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrTag,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TransactionReceipt<AnyReceiptEnvelope<Log>>>>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn header_by_number<'life0, 'async_trait>(
        &'life0 self,
        number: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block_and_tx_index<'life0, 'async_trait>(
        &'life0 self,
        hash: FixedBytes<32>,
    ) -> Pin<Box<dyn Future<Output = Result<(u64, usize), Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_storage<'life0, 'async_trait>(
        &'life0 self,
        block_number: Option<u64>,
        address: Address,
        storage_key: FixedBytes<32>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_bytecode<'life0, 'async_trait>(
        &'life0 self,
        block_number: Option<u64>,
        address: Address,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Bytecode>, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn eth_call_light<'life0, 'async_trait>(
        &'life0 self,
        request: TransactionRequest,
        block_number: BlockId,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait { ... }
}

Required Methods§

source

fn eth_call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn block_hash_for_id<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn best_block_number(&self) -> Result<u64, Report>

source

fn replay_block_transactions<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TxTrace>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn block_receipts<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TransactionReceipt<AnyReceiptEnvelope<Log>>>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn header_by_number<'life0, 'async_trait>( &'life0 self, number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn block_and_tx_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<(u64, usize), Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn get_storage<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, storage_key: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

source

fn get_bytecode<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytecode>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

source

fn eth_call_light<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

eth call that fetches state and does minimal processing will bypass threadpool

Implementations on Foreign Types§

source§

impl TracingProvider for TracingClient

source§

fn eth_call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn eth_call_light<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn block_hash_for_id<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn best_block_number(&self) -> Result<u64, Report>

source§

fn replay_block_transactions<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TxTrace>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn block_receipts<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TransactionReceipt<AnyReceiptEnvelope<Log>>>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn block_and_tx_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<(u64, usize), Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn header_by_number<'life0, 'async_trait>( &'life0 self, number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn get_storage<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, storage_key: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

fn get_bytecode<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytecode>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, TracingClient: 'async_trait,

source§

impl<T> TracingProvider for Box<T>
where T: TracingProvider + ?Sized, Box<T>: Send + Sync + 'static,

source§

fn eth_call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn eth_call_light<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn block_hash_for_id<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn best_block_number(&self) -> Result<u64, Report>

source§

fn replay_block_transactions<'life0, 'async_trait>( &'life0 self, block_id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TxTrace>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn block_receipts<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TransactionReceipt<AnyReceiptEnvelope<Log>>>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn header_by_number<'life0, 'async_trait>( &'life0 self, number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn block_and_tx_index<'life0, 'async_trait>( &'life0 self, hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<(u64, usize), Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn get_storage<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, storage_key: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Uint<256, 4>>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

source§

fn get_bytecode<'life0, 'async_trait>( &'life0 self, block_number: Option<u64>, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytecode>, Report>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

Implementors§