[][src]Trait ethers_providers::Middleware

pub trait Middleware: Sync + Send + Debug {
    type Error: Sync + Send + Error + FromErr<<Self::Inner as Middleware>::Error>;
    type Provider: JsonRpcClient;
    type Inner: Middleware<Provider = Self::Provider>;
    pub fn inner(&self) -> &Self::Inner;

    pub fn provider(&self) -> &Provider<Self::Provider> { ... }
#[must_use] pub fn get_block_number<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<U64, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn send_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRequest,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, Self::Provider>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn resolve_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ens_name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Address, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn lookup_address<'life0, 'async_trait>(
        &'life0 self,
        address: Address
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_block<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
        &'life0 self,
        block_hash_or_number: T
    ) -> Pin<Box<dyn Future<Output = Result<Option<Block<TxHash>>, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_block_with_txs<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
        &'life0 self,
        block_hash_or_number: T
    ) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_transaction_count<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
        &'life0 self,
        from: T,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn estimate_gas<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tx: &'life1 TransactionRequest
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tx: &'life1 TransactionRequest,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_chainid<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_balance<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
        &'life0 self,
        from: T,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_transaction<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
        &'life0 self,
        transaction_hash: T
    ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_transaction_receipt<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
        &'life0 self,
        transaction_hash: T
    ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_gas_price<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_accounts<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn send_raw_transaction<'a, 'life0, 'async_trait>(
        &'a self,
        tx: &'life0 Transaction
    ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, Self::Provider>, Self::Error>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn sign<'life0, 'life1, 'async_trait, T: Into<Bytes> + Send + Sync>(
        &'life0 self,
        data: T,
        from: &'life1 Address
    ) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_logs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        filter: &'life1 Filter
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn new_filter<'life0, 'life1, 'async_trait>(
        &'life0 self,
        filter: FilterKind<'life1>
    ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn uninstall_filter<'life0, 'async_trait, T: Into<U256> + Send + Sync>(
        &'life0 self,
        id: T
    ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn watch<'a, 'life0, 'async_trait>(
        &'a self,
        filter: &'life0 Filter
    ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, Self::Provider, Log>, Self::Error>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn watch_pending_transactions<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_filter_changes<'life0, 'async_trait, T, R>(
        &'life0 self,
        id: T
    ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Self::Error>> + Send + 'async_trait>>
    where
        T: Into<U256> + Send + Sync,
        R: Serialize + DeserializeOwned + Send + Sync + Debug,
        T: 'async_trait,
        R: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn watch_blocks<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_code<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
        &'life0 self,
        at: T,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn get_storage_at<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
        &'life0 self,
        from: T,
        location: H256,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<H256, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn txpool_content<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn txpool_inspect<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn txpool_status<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_call<'life0, 'async_trait>(
        &'life0 self,
        req: TransactionRequest,
        trace_type: Vec<TraceType>,
        block: Option<BlockNumber>
    ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_raw_transaction<'life0, 'async_trait>(
        &'life0 self,
        data: Bytes,
        trace_type: Vec<TraceType>
    ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_replay_transaction<'life0, 'async_trait>(
        &'life0 self,
        hash: H256,
        trace_type: Vec<TraceType>
    ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_replay_block_transactions<'life0, 'async_trait>(
        &'life0 self,
        block: BlockNumber,
        trace_type: Vec<TraceType>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_block<'life0, 'async_trait>(
        &'life0 self,
        block: BlockNumber
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_filter<'life0, 'async_trait>(
        &'life0 self,
        filter: TraceFilter
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_get<'life0, 'async_trait, T: Into<U64> + Send + Sync>(
        &'life0 self,
        hash: H256,
        index: Vec<T>
    ) -> Pin<Box<dyn Future<Output = Result<Trace, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn trace_transaction<'life0, 'async_trait>(
        &'life0 self,
        hash: H256
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn parity_block_receipts<'life0, 'async_trait, T: Into<BlockNumber> + Send + Sync>(
        &'life0 self,
        block: T
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>>
    where
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn subscribe<'life0, 'async_trait, T, R>(
        &'life0 self,
        params: T
    ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, R>, Self::Error>> + Send + 'async_trait>>
    where
        T: Debug + Serialize + Send + Sync,
        R: DeserializeOwned + Send + Sync,
        Self::Provider: PubsubClient,
        T: 'async_trait,
        R: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn unsubscribe<'life0, 'async_trait, T>(
        &'life0 self,
        id: T
    ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
    where
        T: Into<U256> + Send + Sync,
        Self::Provider: PubsubClient,
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn subscribe_blocks<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, Block<TxHash>>, Self::Error>> + Send + 'async_trait>>
    where
        Self::Provider: PubsubClient,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn subscribe_pending_txs<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, TxHash>, Self::Error>> + Send + 'async_trait>>
    where
        Self::Provider: PubsubClient,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
#[must_use] pub fn subscribe_logs<'a, 'life0, 'async_trait>(
        &'a self,
        filter: &'life0 Filter
    ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, Self::Provider, Log>, Self::Error>> + Send + 'async_trait>>
    where
        Self::Provider: PubsubClient,
        'a: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

A middleware allows customizing requests send and received from an ethereum node.

Writing a middleware is as simple as:

  1. implementing the inner method to point to the next layer in the "middleware onion",
  2. implementing the FromErr trait on your middleware's error type
  3. implementing any of the methods you want to override
use ethers::{providers::{Middleware, FromErr}, types::{U64, TransactionRequest, U256}};
use thiserror::Error;
use async_trait::async_trait;

#[derive(Debug)]
struct MyMiddleware<M>(M);

#[derive(Error, Debug)]
pub enum MyError<M: Middleware> {
    #[error("{0}")]
    MiddlewareError(M::Error),

    // Add your middleware's specific errors here
}

impl<M: Middleware> FromErr<M::Error> for MyError<M> {
    fn from(src: M::Error) -> MyError<M> {
        MyError::MiddlewareError(src)
    }
}

#[async_trait]
impl<M> Middleware for MyMiddleware<M>
where
    M: Middleware,
{
    type Error = MyError<M>;
    type Provider = M::Provider;
    type Inner = M;

    fn inner(&self) -> &M {
        &self.0
    }

    /// Overrides the default `get_block_number` method to always return 0
    async fn get_block_number(&self) -> Result<U64, Self::Error> {
        Ok(U64::zero())
    }

    /// Overrides the default `estimate_gas` method to log that it was called,
    /// before forwarding the call to the next layer.
    async fn estimate_gas(&self, tx: &TransactionRequest) -> Result<U256, Self::Error> {
        println!("Estimating gas...");
        self.inner().estimate_gas(tx).await.map_err(FromErr::from)
    }
}

Associated Types

Loading content...

Required methods

pub fn inner(&self) -> &Self::Inner[src]

The next middleware in the stack

Loading content...

Provided methods

pub fn provider(&self) -> &Provider<Self::Provider>[src]

The HTTP or Websocket provider.

#[must_use]pub fn get_block_number<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U64, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn send_transaction<'life0, 'async_trait>(
    &'life0 self,
    tx: TransactionRequest,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, Self::Provider>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn resolve_name<'life0, 'life1, 'async_trait>(
    &'life0 self,
    ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Address, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn lookup_address<'life0, 'async_trait>(
    &'life0 self,
    address: Address
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_block<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
    &'life0 self,
    block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<TxHash>>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_block_with_txs<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
    &'life0 self,
    block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_transaction_count<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn estimate_gas<'life0, 'life1, 'async_trait>(
    &'life0 self,
    tx: &'life1 TransactionRequest
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn call<'life0, 'life1, 'async_trait>(
    &'life0 self,
    tx: &'life1 TransactionRequest,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_chainid<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_balance<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_transaction<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
    &'life0 self,
    transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_transaction_receipt<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
    &'life0 self,
    transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_gas_price<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_accounts<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn send_raw_transaction<'a, 'life0, 'async_trait>(
    &'a self,
    tx: &'life0 Transaction
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, Self::Provider>, Self::Error>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn sign<'life0, 'life1, 'async_trait, T: Into<Bytes> + Send + Sync>(
    &'life0 self,
    data: T,
    from: &'life1 Address
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_logs<'life0, 'life1, 'async_trait>(
    &'life0 self,
    filter: &'life1 Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn new_filter<'life0, 'life1, 'async_trait>(
    &'life0 self,
    filter: FilterKind<'life1>
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn uninstall_filter<'life0, 'async_trait, T: Into<U256> + Send + Sync>(
    &'life0 self,
    id: T
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn watch<'a, 'life0, 'async_trait>(
    &'a self,
    filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, Self::Provider, Log>, Self::Error>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn watch_pending_transactions<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_filter_changes<'life0, 'async_trait, T, R>(
    &'life0 self,
    id: T
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Self::Error>> + Send + 'async_trait>> where
    T: Into<U256> + Send + Sync,
    R: Serialize + DeserializeOwned + Send + Sync + Debug,
    T: 'async_trait,
    R: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn watch_blocks<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_code<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    at: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn get_storage_at<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    location: H256,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<H256, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn txpool_content<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn txpool_inspect<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn txpool_status<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn trace_call<'life0, 'async_trait>(
    &'life0 self,
    req: TransactionRequest,
    trace_type: Vec<TraceType>,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Executes the given call and returns a number of possible traces for it

#[must_use]pub fn trace_raw_transaction<'life0, 'async_trait>(
    &'life0 self,
    data: Bytes,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Traces a call to eth_sendRawTransaction without making the call, returning the traces

#[must_use]pub fn trace_replay_transaction<'life0, 'async_trait>(
    &'life0 self,
    hash: H256,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Replays a transaction, returning the traces

#[must_use]pub fn trace_replay_block_transactions<'life0, 'async_trait>(
    &'life0 self,
    block: BlockNumber,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Replays all transactions in a block returning the requested traces for each transaction

#[must_use]pub fn trace_block<'life0, 'async_trait>(
    &'life0 self,
    block: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns traces created at given block

#[must_use]pub fn trace_filter<'life0, 'async_trait>(
    &'life0 self,
    filter: TraceFilter
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Return traces matching the given filter

#[must_use]pub fn trace_get<'life0, 'async_trait, T: Into<U64> + Send + Sync>(
    &'life0 self,
    hash: H256,
    index: Vec<T>
) -> Pin<Box<dyn Future<Output = Result<Trace, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns trace at the given position

#[must_use]pub fn trace_transaction<'life0, 'async_trait>(
    &'life0 self,
    hash: H256
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns all traces of a given transaction

#[must_use]pub fn parity_block_receipts<'life0, 'async_trait, T: Into<BlockNumber> + Send + Sync>(
    &'life0 self,
    block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns all receipts for that block. Must be done on a parity node.

#[must_use]pub fn subscribe<'life0, 'async_trait, T, R>(
    &'life0 self,
    params: T
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, R>, Self::Error>> + Send + 'async_trait>> where
    T: Debug + Serialize + Send + Sync,
    R: DeserializeOwned + Send + Sync,
    Self::Provider: PubsubClient,
    T: 'async_trait,
    R: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn unsubscribe<'life0, 'async_trait, T>(
    &'life0 self,
    id: T
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>> where
    T: Into<U256> + Send + Sync,
    Self::Provider: PubsubClient,
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn subscribe_blocks<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, Block<TxHash>>, Self::Error>> + Send + 'async_trait>> where
    Self::Provider: PubsubClient,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn subscribe_pending_txs<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, Self::Provider, TxHash>, Self::Error>> + Send + 'async_trait>> where
    Self::Provider: PubsubClient,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn subscribe_logs<'a, 'life0, 'async_trait>(
    &'a self,
    filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, Self::Provider, Log>, Self::Error>> + Send + 'async_trait>> where
    Self::Provider: PubsubClient,
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementations on Foreign Types

impl<'b, U: 'b + Middleware + ?Sized> Middleware for &'b U where
    &'b U: Sync + Send + Debug
[src]

type Error = U::Error

type Provider = U::Provider

type Inner = U::Inner

impl<U: Middleware + ?Sized> Middleware for Box<U> where
    Box<U>: Sync + Send + Debug
[src]

type Error = U::Error

type Provider = U::Provider

type Inner = U::Inner

impl<U: Middleware + ?Sized> Middleware for Arc<U> where
    Arc<U>: Sync + Send + Debug
[src]

type Error = U::Error

type Provider = U::Provider

type Inner = U::Inner

Loading content...

Implementors

impl<P: JsonRpcClient> Middleware for Provider<P>[src]

type Error = ProviderError

type Provider = P

type Inner = Self

pub fn get_block_number<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U64, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the latest block number via the eth_BlockNumber API

pub fn get_block<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
    &'life0 self,
    block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<TxHash>>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the block at block_hash_or_number (transaction hashes only)

pub fn get_block_with_txs<'life0, 'async_trait, T: Into<BlockId> + Send + Sync>(
    &'life0 self,
    block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the block at block_hash_or_number (full transactions included)

pub fn get_transaction<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
    &'life0 self,
    transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the transaction with transaction_hash

pub fn get_transaction_receipt<'life0, 'async_trait, T: Send + Sync + Into<TxHash>>(
    &'life0 self,
    transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the transaction receipt with transaction_hash

pub fn get_gas_price<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the current gas price as estimated by the node

pub fn get_accounts<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Gets the accounts on the node

pub fn get_transaction_count<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the nonce of the address

pub fn get_balance<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the account's balance

pub fn get_chainid<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by EIP-155.

pub fn call<'life0, 'life1, 'async_trait>(
    &'life0 self,
    tx: &'life1 TransactionRequest,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Sends the read-only (constant) transaction to a single Ethereum node and return the result (as bytes) of executing it. This is free, since it does not change any state on the blockchain.

pub fn estimate_gas<'life0, 'life1, 'async_trait>(
    &'life0 self,
    tx: &'life1 TransactionRequest
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Sends a transaction to a single Ethereum node and return the estimated amount of gas required (as a U256) to send it This is free, but only an estimate. Providing too little gas will result in a transaction being rejected (while still consuming all provided gas).

pub fn send_transaction<'life0, 'async_trait>(
    &'life0 self,
    tx: TransactionRequest,
    __arg2: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, P>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Sends the transaction to the entire Ethereum network and returns the transaction's hash This will consume gas from the account that signed the transaction.

pub fn send_raw_transaction<'a, 'life0, 'async_trait>(
    &'a self,
    tx: &'life0 Transaction
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, P>, ProviderError>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send the raw RLP encoded transaction to the entire Ethereum network and returns the transaction's hash This will consume gas from the account that signed the transaction.

pub fn sign<'life0, 'life1, 'async_trait, T: Into<Bytes> + Send + Sync>(
    &'life0 self,
    data: T,
    from: &'life1 Address
) -> Pin<Box<dyn Future<Output = Result<Signature, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Signs data using a specific account. This account needs to be unlocked.

pub fn get_logs<'life0, 'life1, 'async_trait>(
    &'life0 self,
    filter: &'life1 Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns an array (possibly empty) of logs that match the filter

pub fn watch<'a, 'life0, 'async_trait>(
    &'a self,
    filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, P, Log>, ProviderError>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Streams matching filter logs

pub fn watch_blocks<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Streams new block hashes

pub fn watch_pending_transactions<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Streams pending transactions

pub fn new_filter<'life0, 'life1, 'async_trait>(
    &'life0 self,
    filter: FilterKind<'life1>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call get_filter_changes with the filter id.

pub fn uninstall_filter<'life0, 'async_trait, T: Into<U256> + Send + Sync>(
    &'life0 self,
    id: T
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Uninstalls a filter

pub fn get_filter_changes<'life0, 'async_trait, T, R>(
    &'life0 self,
    id: T
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, ProviderError>> + Send + 'async_trait>> where
    T: Into<U256> + Send + Sync,
    R: Serialize + DeserializeOwned + Send + Sync + Debug,
    T: 'async_trait,
    R: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Polling method for a filter, which returns an array of logs which occurred since last poll.

This method must be called with one of the following return types, depending on the filter type:

  • eth_newBlockFilter: H256, returns block hashes
  • eth_newPendingTransactionFilter: H256, returns transaction hashes
  • eth_newFilter: Log, returns raw logs

If one of these types is not used, decoding will fail and the method will return an error.

pub fn get_storage_at<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    from: T,
    location: H256,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Get the storage of an address for a particular slot location

pub fn get_code<'life0, 'async_trait, T: Into<NameOrAddress> + Send + Sync>(
    &'life0 self,
    at: T,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the deployed code at a given address

pub fn resolve_name<'life0, 'life1, 'async_trait>(
    &'life0 self,
    ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Address, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the address that the ens_name resolves to (or None if not configured).

Panics

If the bytes returned from the ENS registrar/resolver cannot be interpreted as an address. This should theoretically never happen.

pub fn lookup_address<'life0, 'async_trait>(
    &'life0 self,
    address: Address
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the ENS name the address resolves to (or None if not configured).

Panics

If the bytes returned from the ENS registrar/resolver cannot be interpreted as a string. This should theoretically never happen.

pub fn txpool_content<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here

pub fn txpool_inspect<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here

pub fn txpool_status<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here

pub fn trace_call<'life0, 'async_trait>(
    &'life0 self,
    req: TransactionRequest,
    trace_type: Vec<TraceType>,
    block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Executes the given call and returns a number of possible traces for it

pub fn trace_raw_transaction<'life0, 'async_trait>(
    &'life0 self,
    data: Bytes,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Traces a call to eth_sendRawTransaction without making the call, returning the traces

pub fn trace_replay_transaction<'life0, 'async_trait>(
    &'life0 self,
    hash: H256,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Replays a transaction, returning the traces

pub fn trace_replay_block_transactions<'life0, 'async_trait>(
    &'life0 self,
    block: BlockNumber,
    trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Replays all transactions in a block returning the requested traces for each transaction

pub fn trace_block<'life0, 'async_trait>(
    &'life0 self,
    block: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns traces created at given block

pub fn trace_filter<'life0, 'async_trait>(
    &'life0 self,
    filter: TraceFilter
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Return traces matching the given filter

pub fn trace_get<'life0, 'async_trait, T: Into<U64> + Send + Sync>(
    &'life0 self,
    hash: H256,
    index: Vec<T>
) -> Pin<Box<dyn Future<Output = Result<Trace, ProviderError>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns trace at the given position

pub fn trace_transaction<'life0, 'async_trait>(
    &'life0 self,
    hash: H256
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns all traces of a given transaction

pub fn parity_block_receipts<'life0, 'async_trait, T: Into<BlockNumber> + Send + Sync>(
    &'life0 self,
    block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
    T: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns all receipts for that block. Must be done on a parity node.

Loading content...