pub trait AccountExtractor {
type Error: Debug;
// Required method
fn get_accounts_at_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block: &'life1 Block,
requests: &'life2 [StorageSnapshotRequest],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Bytes, AccountDelta>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for getting multiple account states from chain data.
Required Associated Types§
Required Methods§
Sourcefn get_accounts_at_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block: &'life1 Block,
requests: &'life2 [StorageSnapshotRequest],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Bytes, AccountDelta>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_accounts_at_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block: &'life1 Block,
requests: &'life2 [StorageSnapshotRequest],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Bytes, AccountDelta>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the account states at the end of the given block (after all transactions in the block have been applied).
§Arguments
block: The block at which to retrieve the account states.requests: A slice ofStorageSnapshotRequestobjects, each containing an address and optional slots. Note: If theslotsfield isNone, the function will return the entire account state. That could be a lot of data, so use with caution.
returns: Result<HashMap<Bytes, AccountDelta, RandomState>, Self::Error>
A result containing a HashMap where the keys are Bytes (addresses) and the values are
AccountDelta objects.