Skip to main content

Module external_storage

Module external_storage 

Source
Expand description

Storage layouts for contracts that aren’t part of the local project.

foundry_common::external_storage turns a verified source into a storage layout and caches the result; ExternalIdentifier finds that source on a block explorer. This module is the seam between them, and owns the state that has to outlive a single lookup.

Re-exportsΒ§

use alloy_primitives::Address; πŸ”’
use alloy_primitives::map::AddressMap; πŸ”’
use alloy_primitives::map::HashMap; πŸ”’
use foundry_common::external_storage::fetch_external_storage_layouts; πŸ”’
use foundry_common::external_storage::lock_until; πŸ”’
use foundry_compilers::artifacts::StorageLayout; πŸ”’
use foundry_config::Chain; πŸ”’
use foundry_evm_traces::identifier::ExternalIdentifier; πŸ”’
use foundry_evm_traces::identifier::ExternalIdentifierConfig; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::LazyLock; πŸ”’
use std::sync::Mutex; πŸ”’
use std::time::Instant; πŸ”’

StaticsΒ§

IDENTIFIERS πŸ”’
The ExternalIdentifier in use for each chain, shared by every test in the process.

FunctionsΒ§

identifier πŸ”’
The identifier for chain, building it on first use.
storage_layouts πŸ”’
Resolves the storage layouts of contracts outside the local project.

Type AliasesΒ§

Identifiers πŸ”’
Chain id to the identifier for that chain, or None if one couldn’t be built.