Skip to main content

fetch_slots_bulk

Function fetch_slots_bulk 

Source
pub async fn fetch_slots_bulk<P: Provider<AnyNetwork>>(
    provider: &P,
    requests: Vec<(Address, U256)>,
    block: BlockId,
    config: BulkCallConfig,
) -> Vec<(Address, U256, StorageFetchResult<U256>)>
Expand description

Fetch storage slots in bulk via eth_call code overrides (async core).

Returns exactly one result tuple per requested (address, slot) pair (order not preserved, duplicates included), matching the StorageBatchFetchFn contract. Chunk-level failures (transport errors, providers without state-override support) surface as per-slot errors.

This is the direct entry point for async callers — e.g. loading an entire AMM pool’s tick range during cold start — while bulk_call_storage_fetcher adapts it to the cache’s synchronous fetcher seam.