Expand description
§cyfrin-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§
- cache
- Support types for configuring storage caching
- doc
- Configuration specific to the
forge doccommand and theforge_docpackage - error
- error handling and solc error codes
- filter
- Helpers for constructing and using FileFilters.
- fix
- Helpers to automatically fix configuration warnings.
- fmt
- Configuration specific to the
forge fmtcommand and theforge_fmtpackage - fs_
permissions - Support for controlling fs access
- providers
- Config providers.
- soldeer
- Configuration specific to the
forge soldeercommand and theforge_soldeerpackage - utils
- Utility functions
Macros§
- impl_
figment_ convert - A macro to implement converters from a type to
Configandfigment::Figment. - impl_
figment_ convert_ basic - Same as
impl_figment_convertbut also impliesProviderfor the givenSerializetype for convenience. TheProvideronly provides the “root” value for the current profile - impl_
figment_ convert_ cast - A macro to implement converters from a type to
Configandfigment::Figment. - merge_
impl_ figment_ convert - Same as
impl_figment_convertbut also merges the type itself into the figment
Structs§
- Basic
Config - A subset of the foundry
Configused to initialize afoundry.tomlfile - Chain
- Either a known
NamedChainor a EIP-155 chain ID. - Config
- Foundry configuration
- Fuzz
Config - Contains for fuzz testing
- Fuzz
Dictionary Config - Contains for fuzz testing
- GasLimit
- Wrapper for the config’s
gas_limitvalue necessary because toml-rs can’t handle larger number because integers are stored signed: https://github.com/alexcrichton/toml-rs/issues/256 - Inline
Config - Represents per-test configurations, declared inline as structured comments in Solidity test files. This allows to create configs directly bound to a solidity test.
- Inline
Config Error - Wrapper error struct that catches config parsing errors, enriching them with context information reporting the misconfigured line.
- Invariant
Config - Contains for invariant testing
- NatSpec
- Convenient struct to hold in-line per-test configurations
- Regex
Wrapper - Wrapper type for
regex::Regexthat implementsPartialEq - Relative
Remapping - A relative
Remappingthat’s aware of the current location - Remapping
- The solidity compiler can only reference files that exist locally on your computer. So importing directly from GitHub (as an example) is not possible.
- Resolved
RpcEndpoints - Container type for resolved endpoints, see
RpcEndpoint::resolve. - Root
Path - A helper wrapper around the root path used during Config detection
- RpcEndpoints
- Container type for API endpoints, like various RPC endpoints
- Unresolved
EnvVar Error - Error when we failed to resolve an env var
Enums§
- Figment
Providers - Determines what providers should be used when loading the Figment for a Config
- Named
Chain - An Ethereum EIP-155 chain.
- RpcEndpoint
- Represents a single endpoint
- SolcReq
- Variants for selecting the
Solcinstance - 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
Traits§
- Inline
Config Parser - 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.
Functions§
- parse_
with_ profile - Parses a config profile
- validate_
profiles - Checks if all configuration lines specified in
natspecuse a valid profile.