Expand description
Utility functions
Enumsยง
- Numeric
- Helper type to parse both
u64andU256
Functionsยง
- deserialize_
stringified_ ๐percent - Deserialize stringified percent. The value must be between 0 and 100 inclusive.
- deserialize_
u64_ ๐or_ max - Deserialize a
u64or โmaxโ foru64::MAX. - deserialize_
u64_ to_ u256 - Deserialize into
U256from either au64or aU256hex string. - deserialize_
usize_ ๐or_ max - Deserialize a
usizeor โmaxโ forusize::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
rootthat contain afoundry.tomlfile - 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 theremappingsstr separated by newlines - serialize_
u64_ or_ u256 - Serialize
U256asu64if it fits, otherwise as a hex string. If the number fits into a i64, serialize it as number without quotation marks. If the number fits into a u64, serialize it as a stringified number with quotation marks. Otherwise, serialize it as a hex string with quotation marks. - to_
array_ value - Converts the
valinto afigment::Value::Array