Trait EthStateApiClient

Source
pub trait EthStateApiClient: ClientT {
    // Provided methods
    fn balance<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        block: Option<BlockNumberOrTagOrHash>,
    ) -> Pin<Box<dyn Future<Output = Result<U256, Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn storage_at<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        slot: U256,
        block: Option<BlockNumberOrTagOrHash>,
    ) -> Pin<Box<dyn Future<Output = Result<H256, Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn transaction_count<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        block: Option<BlockNumberOrTagOrHash>,
    ) -> Pin<Box<dyn Future<Output = Result<U256, Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn code<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        block: Option<BlockNumberOrTagOrHash>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn proof<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        storage_keys: H256,
        block: Option<BlockNumberOrTagOrHash>,
    ) -> Pin<Box<dyn Future<Output = Result<AccountProof, Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Client implementation for the EthStateApi RPC API.

Provided Methods§

Source

fn balance<'life0, 'async_trait>( &'life0 self, address: Address, block: Option<BlockNumberOrTagOrHash>, ) -> Pin<Box<dyn Future<Output = Result<U256, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the balance of the account of given address.

Source

fn storage_at<'life0, 'async_trait>( &'life0 self, address: Address, slot: U256, block: Option<BlockNumberOrTagOrHash>, ) -> Pin<Box<dyn Future<Output = Result<H256, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the value from a storage position at a given address.

Source

fn transaction_count<'life0, 'async_trait>( &'life0 self, address: Address, block: Option<BlockNumberOrTagOrHash>, ) -> Pin<Box<dyn Future<Output = Result<U256, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the number of transactions sent from an address.

Source

fn code<'life0, 'async_trait>( &'life0 self, address: Address, block: Option<BlockNumberOrTagOrHash>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the code at a given address.

Source

fn proof<'life0, 'async_trait>( &'life0 self, address: Address, storage_keys: H256, block: Option<BlockNumberOrTagOrHash>, ) -> Pin<Box<dyn Future<Output = Result<AccountProof, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the merkle proof for a given account and optionally some storage keys.

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.

Implementors§

Source§

impl<TypeJsonRpseeInteral> EthStateApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,