Crate cyfrin_foundry_config

Source
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 doc command and the forge_doc package
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 fmt command and the forge_fmt package
fs_permissions
Support for controlling fs access
providers
Config providers.
soldeer
Configuration specific to the forge soldeer command and the forge_soldeer package
utils
Utility functions

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.
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
RelativeRemapping
A relative Remapping that’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.
ResolvedRpcEndpoints
Container type for resolved endpoints, see RpcEndpoint::resolve.
RootPath
A helper wrapper around the root path used during Config detection
RpcEndpoints
Container type for API endpoints, like various RPC endpoints
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.
RpcEndpoint
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

Traits§

InlineConfigParser
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 natspec use a valid profile.