Crate foundry_config

Source
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 providers::Remappings;
pub use figment;
pub use utils::*;

Modules§

bind_json 🔒
cache
Support types for configuring storage caching
compilation 🔒
doc
Configuration specific to the forge doc command and the forge_doc package
endpoints 🔒
Support for multiple RPC-endpoints
error
error handling and solc error codes
etherscan 🔒
Support for multiple Etherscan keys.
filter
Helpers for constructing and using [FileFilter]s.
fix
Helpers to automatically fix configuration warnings.
fmt
Configuration specific to the forge fmt command and the forge_fmt package
from_opt_glob 🔒
Ser/de globset::Glob explicitly to handle Option<Glob> properly
from_str_lowercase 🔒
fs_permissions
Support for controlling fs access
fuzz 🔒
Configuration for fuzz testing.
inline 🔒
invariant 🔒
Configuration for invariant testing
macros 🔒
providers
Config providers.
resolve 🔒
Helper for resolving env vars
soldeer
Configuration specific to the forge soldeer command and the forge_soldeer package
utils
Utility functions
vyper 🔒
Vyper specific configuration types.
warning 🔒

Macros§

impl_figment_convert
A macro to implement converters from a type to Config and [figment::Figment].
impl_figment_convert_basic
Same as impl_figment_convert but also implies Provider for the given Serialize type for convenience. The Provider only provides the “root” value for the current profile
impl_figment_convert_cast
A macro to implement converters from a type to Config and [figment::Figment].
merge_impl_figment_convert
Same as impl_figment_convert but also merges the type itself into the figment

Structs§

BasicConfig
A subset of the foundry Config used to initialize a foundry.toml file
Chain
Either a known NamedChain or a EIP-155 chain ID.
CompilationRestrictions
Restrictions for compilation of given paths.
Config
Foundry configuration
FuzzConfig
Contains for fuzz testing
FuzzDictionaryConfig
Contains for fuzz testing
GasLimit
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
InlineConfig
Represents per-test configurations, declared inline as structured comments in Solidity test files. This allows to create configs directly bound to a solidity test.
InlineConfigError
Wrapper error struct that catches config parsing errors, enriching them with context information reporting the misconfigured line.
InvariantConfig
Contains for invariant testing
NatSpec
Convenient struct to hold in-line per-test configurations
RegexWrapper
Wrapper type for regex::Regex that implements PartialEq
ResolvedRpcEndpoint
Rpc endpoint with environment variables resolved to values, see RpcEndpoint::resolve.
ResolvedRpcEndpoints
Container type for resolved endpoints.
RpcEndpoint
Rpc endpoint configuration variant
RpcEndpoints
Container type for API endpoints, like various RPC endpoints
SettingsOverrides
Keeps possible overrides for default settings which users may configure to construct additional settings profile.
UnresolvedEnvVarError
Error when we failed to resolve an env var

Enums§

FigmentProviders
Determines what providers should be used when loading the [Figment] for a Config.
NamedChain
An Ethereum EIP-155 chain.
RpcEndpointUrl
Represents a single endpoint
SolcReq
Variants for selecting the [Solc] instance
Warning
Warnings emitted during loading or managing Configuration

Constants§

DEPRECATIONS
Deprecated keys and their replacements.
STANDALONE_FALLBACK_SECTIONS
Mapping of fallback standalone sections. See FallbackProfileProvider.

Functions§

canonic 🔒
parse_with_profile
Parses a config profile
root_default 🔒