Module utils

Source
Expand description

Utility functions

Enums§

Numeric
Helper type to parse both u64 and U256

Functions§

deserialize_stringified_percent 🔒
Deserialize stringified percent. The value must be between 0 and 100 inclusive.
deserialize_u64_or_max 🔒
Deserialize a u64 or “max” for u64::MAX.
deserialize_usize_or_max 🔒
Deserialize a usize or “max” for usize::MAX.
evm_spec_id
Returns the [SpecId] derived from [EvmVersion]
find_git_root
Returns the path of the top-level directory of the working git tree.
find_project_root
Returns the root path to set for the project root.
foundry_toml_dirs
Returns a list of unique paths to all folders under root that contain a foundry.toml file
get_dir_remapping 🔒
Returns a remapping for the given dir
load_config
Loads the config for the current project workspace.
load_config_with_root
Loads the config for the current project workspace or the provided root path.
remappings_from_env_var
Returns the remappings from the given var
remappings_from_newline
Returns all [Remapping]s contained in the remappings str separated by newlines
to_array_value
Converts the val into a figment::Value::Array