eigen_client_eth::client

Trait BackendClient

Source
pub trait BackendClient {
    type Error;

    // Required methods
    fn block_number<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<BlockNumber, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn block_by_number<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrTag,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Block>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn block_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BlockNumber, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the latest block number.

§Returns

The latest block number.

Source

fn block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, ) -> Pin<Box<dyn Future<Output = Result<Option<Block>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the block hash given its block number.

§Arguments
  • number - The block number.
§Returns

The block having that number.

Implementors§