pub fn fetch_external_storage_layouts(
chain: Chain,
addresses: impl IntoIterator<Item = Address>,
timeout: Duration,
fetch_sources: impl FnOnce(&[Address], Duration) -> AddressMap<Option<Metadata>>,
) -> AddressMap<(String, Arc<StorageLayout>)>Expand description
Resolves the storage layouts of addresses on chain, compiling verified sources as needed.
fetch_sources is only called for the addresses still unknown after the in-process and
on-disk caches have been consulted, so a warm run makes no network requests at all. For each
address it is handed, it returns that exact contract’s verified source, or None if the block
explorer conclusively reports that there is none.
An address fetch_sources leaves out is one it reached no conclusion about. Those are left
unresolved rather than remembered as having no layout, so a later call tries again instead of
letting one explorer outage disable decoding for the rest of the run.
Addresses without a usable layout are absent from the returned map.