Module utils

Source
Expand description

Implementations of Utilities cheatcodes.

Structs§

IgnoredTraces
Contains locations of traces ignored via cheatcodes.

Functions§

get_canonical_type_def 🔒
Returns EIP-712 canonical type definition from the provided string type representation or type name. If type name provided, then it looks up bindings from file generated by forge bind-json.
get_struct_hash 🔒
Returns the EIP-712 struct hash for provided name, definition and ABI encoded data.
get_type_def_from_bindings 🔒
Returns the EIP-712 type definition from the bindings in the provided path. Assumes that read validation for the path has already been checked.
random_int 🔒
Helper to generate a random int value (with given bits if specified) from type strategy.
random_uint 🔒
Helper to generate a random uint value (with given bits or bounded if specified) from type strategy.