alloy_provider::ext

Trait TxPoolApi

Source
pub trait TxPoolApi<T, N: Network = Ethereum>: Send + Sync {
    // Required methods
    fn txpool_content<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolContent<N::TransactionResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn txpool_content_from<'life0, 'async_trait>(
        &'life0 self,
        from: Address,
    ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolContentFrom<N::TransactionResponse>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn txpool_inspect<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolInspect>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn txpool_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature txpool-api only.
Expand description

Txpool namespace rpc interface.

Required Methods§

Source

fn txpool_content<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolContent<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the content of the transaction pool.

Lists the exact details 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.

See here for more details

Source

fn txpool_content_from<'life0, 'async_trait>( &'life0 self, from: Address, ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolContentFrom<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the content of the transaction pool filtered by a specific address.

See here for more details

Source

fn txpool_inspect<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolInspect>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a textual summary of each transaction in the pool.

Lists a textual 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. This is a method specifically tailored to developers to quickly see the transactions in the pool and find any potential issues.

See here for more details

Source

fn txpool_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<TxpoolStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the current status of the transaction pool.

i.e 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.

See here for more details

Implementors§

Source§

impl<P, T, N> TxPoolApi<T, N> for P
where P: Provider<T, N>, T: Transport + Clone, N: Network,