Expand description
Β§foundry-config
Foundry configuration.
Re-exports§
pub use fmt::FormatterConfig;
pub use fs_permissions::FsPermissions;
pub use error::SolidityErrorCode;
pub use doc::DocConfig;
pub use filter::SkipBuildFilters;
pub use figment;
pub use utils::*;
Modules§
- bind_
json π - Support types for configuring storage caching
- compilation π
- Configuration specific to the
forge doc
command and theforge_doc
package - endpoints πSupport for multiple RPC-endpoints
- error handling and solc error codes
- etherscan πSupport for multiple Etherscan keys.
- Helpers for constructing and using [FileFilter]s.
- Helpers to automatically fix configuration warnings.
- Configuration specific to the
forge fmt
command and theforge_fmt
package - from_
opt_ πglob Ser/deglobset::Glob
explicitly to handleOption<Glob>
properly - from_
str_ πlowercase - Support for controlling fs access
- fuzz πConfiguration for fuzz testing.
- inline π
- invariant πConfiguration for invariant testing
- macros π
- Config providers.
- resolve πHelper for resolving env vars
- Configuration specific to the
forge soldeer
command and theforge_soldeer
package - Utility functions
- vyper πVyper specific configuration types.
- warning π
Macros§
- A macro to implement converters from a type to
Config
and [figment::Figment
]. - Same as
impl_figment_convert
but also impliesProvider
for the givenSerialize
type for convenience. TheProvider
only provides the βrootβ value for the current profile - A macro to implement converters from a type to
Config
and [figment::Figment
]. - Same as
impl_figment_convert
but also merges the type itself into the figment
Structs§
- A Provider that handles breaking changes in toml files
- A subset of the foundry
Config
used to initialize afoundry.toml
file - Either a known
NamedChain
or a EIP-155 chain ID. - Foundry configuration
- A provider that checks for DAPP_ env vars that are named differently than FOUNDRY_
- A provider that sets the
src
andoutput
path depending on their existence. - Forced
Snake πCase Data A Provider that ensures all keys are snake case if theyβre not standalone sections, SeeConfig::STANDALONE_SECTIONS
- Contains for fuzz testing
- Contains for fuzz testing
- Wrapper for the configβs
gas_limit
value necessary because toml-rs canβt handle larger number because integers are stored signed: https://github.com/alexcrichton/toml-rs/issues/256 - Represents per-test configurations, declared inline as structured comments in Solidity test files. This allows to create configs directly bound to a solidity test.
- Wrapper error struct that catches config parsing errors, enriching them with context information reporting the misconfigured line.
- Contains for invariant testing
- Convenient struct to hold in-line per-test configurations
- Extracts the profile from the
profile
key and using the original key as backup, merging values where necessary - Wrapper type for
regex::Regex
that implementsPartialEq
- Renames a profile from
from
toto
. - Container type for resolved endpoints, see
RpcEndpoint::resolve
. - A helper wrapper around the root path used during Config detection
- Container type for API endpoints, like various RPC endpoints
- Toml
File πProvider A convenience provider to retrieve a toml file. This will return an error if the env var is set but the file does not exist - Error when we failed to resolve an env var
- Unwraps a profile reducing the key depth
- Wrap
Profile πProvider Wraps a profile in another profile
Enums§
- Determines what providers should be used when loading the [Figment] for a Config
- An Ethereum EIP-155 chain.
- Represents a single endpoint
- Variants for selecting the [
Solc
] instance - Warnings emitted during loading or managing Configuration
Constants§
- Deprecated keys and their replacements.
- Mapping of fallback standalone sections. See
FallbackProfileProvider
Traits§
- This trait is intended to parse configurations from structured text. Foundry users can annotate Solidity test functions, providing special configs just for the execution of a specific test.
- Provider
Ext π
Functions§
- canonic π
- Parses a config profile
- Checks if all configuration lines specified in
natspec
use a valid profile.