Expand description
Utility functions
Enumsยง
- Numeric
- Helper type to parse both
u64
andU256
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โ foru64::MAX
. - deserialize_
u64_ to_ u256 - Deserialize into
U256
from either au64
or aU256
hex string. - deserialize_
usize_ ๐or_ max - Deserialize a
usize
or โ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
root
that contain afoundry.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 theremappings
str separated by newlines - serialize_
u64_ or_ u256 - Serialize
U256
asu64
if 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
val
into afigment::Value::Array