Skip to main content Module ext Copy item path Source use crate::Config ; π use crate::extend ; π use crate::utils ; π use figment::Error; π use figment::Figment; π use figment::Metadata; π use figment::Profile; π use figment::Provider; π use figment::providers::Env; π use figment::providers::Format; π use figment::providers::Toml; π use figment::value::Dict; π use figment::value::Map; π use figment::value::Value; π use foundry_compilers::ProjectPathsConfig; π use heck::ToSnakeCase; π use serde::de::Error as _; π use std::cell::OnceCell ; π use std::env ; π use std::env ; π use std::io ; π use std::path::Path ; π use std::path::PathBuf ; π BackwardsCompatTomlProvider π A Provider that handles breaking changes in toml files DappEnvCompatProvider π A provider that checks for DAPP_ env vars that are named differently than FOUNDRY_ DappHardhatDirProvider π A provider that sets the src and output path depending on their existence. FallbackProfileProvider Extracts the profile from the profile key and sets unset values according to the fallback
provider ForcedSnakeCaseData π A Provider that ensures all keys are snake case if theyβre not standalone sections. See
Config::STANDALONE_SECTIONS IgnoreRootProvider π Drops the top-level root key from config file profiles. LegacyLabelsProvider π Adapts deprecated labels from arbitrary external providers. NormalizeSymbolicProvider π NormalizeTracingProvider π OptionalStrictProfileProvider π Extracts the profile from the profile key and using the original key as backup, merging
values where necessary ProjectRootErrorProvider π A provider that fails with the error that prevented locating the project root, so extraction
reports it instead of the figment conversion panicking. RenameProfileProvider π Renames a profile from from to to. TomlFileProvider π 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 UnwrapProfileProvider π Unwraps a profile reducing the key depth WrapProfileProvider π Wraps a profile in another profile ProviderExt π merge_missing π Recursively fills missing values while preserving values from the higher-precedence source. merge_tracing_labels π normalize_legacy_labels π normalize_legacy_labels_in_profile π normalize_symbolic_section π Moves the standalone symbolic section into the selected profile before inherited configs are
merged. normalize_tracing_section π Moves the standalone tracing section into the selected profile before inherited configs are
merged. The deprecated standalone labels section remains in place for warning generation and
is normalized again after inheritance is resolved. rewrite_legacy_profile_keys π Applies compiler overrides and legacy key rewrites to a profile dictionary. snake_case_profile_keys π Converts the top-level config keys in a profile value to snake_case.