Module utils

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.