Skip to main content

StateSource

Trait StateSource 

Source
pub trait StateSource: Send + Sync {
    // Required method
    fn proof<'life0, 'life1, 'async_trait>(
        &'life0 self,
        addr: Address,
        slots: &'life1 [B256],
        block: u64,
    ) -> Pin<Box<dyn Future<Output = Result<AccountProof>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Where Merkle proofs come from.

Required Methods§

Source

fn proof<'life0, 'life1, 'async_trait>( &'life0 self, addr: Address, slots: &'life1 [B256], block: u64, ) -> Pin<Box<dyn Future<Output = Result<AccountProof>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

eth_getProof(addr, slots, block). One call per (address, block) carries any number of slots — batching happens here, not in JSON-RPC.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: StateSource + ?Sized> StateSource for &S

Source§

fn proof<'life0, 'life1, 'async_trait>( &'life0 self, addr: Address, slots: &'life1 [B256], block: u64, ) -> Pin<Box<dyn Future<Output = Result<AccountProof>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<S: StateSource> StateSource for Option<S>

Source§

fn proof<'life0, 'life1, 'async_trait>( &'life0 self, addr: Address, slots: &'life1 [B256], block: u64, ) -> Pin<Box<dyn Future<Output = Result<AccountProof>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§