Skip to main content

Module utils

Module utils 

Source
Expand description

Implementations of Utilities cheatcodes.

Re-exportsยง

use crate::Cheatcode; ๐Ÿ”’
use crate::CheatcodesCore; ๐Ÿ”’
use crate::CheatcodesExecutor; ๐Ÿ”’
use crate::CheatsCtxt; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use alloy_dyn_abi::DynSolType; ๐Ÿ”’
use alloy_dyn_abi::DynSolValue; ๐Ÿ”’
use alloy_dyn_abi::Resolver; ๐Ÿ”’
use alloy_dyn_abi::TypedData; ๐Ÿ”’
use alloy_dyn_abi::eip712_parser::EncodeType; ๐Ÿ”’
use alloy_ens::namehash; ๐Ÿ”’
use alloy_primitives::B64; ๐Ÿ”’
use alloy_primitives::Bytes; ๐Ÿ”’
use alloy_primitives::I256; ๐Ÿ”’
use alloy_primitives::U256; ๐Ÿ”’
use alloy_primitives::aliases::B32; ๐Ÿ”’
use alloy_primitives::keccak256; ๐Ÿ”’
use alloy_primitives::map::HashMap; ๐Ÿ”’
use alloy_rlp::Decodable; ๐Ÿ”’
use alloy_rlp::Encodable; ๐Ÿ”’
use alloy_sol_types::SolValue; ๐Ÿ”’
use foundry_common::TYPE_BINDING_PREFIX; ๐Ÿ”’
use foundry_common::fs; ๐Ÿ”’
use foundry_config::fs_permissions::FsAccessKind; ๐Ÿ”’
use foundry_evm_core::constants::DEFAULT_CREATE2_DEPLOYER; ๐Ÿ”’
use foundry_evm_core::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm_fuzz::strategies::BoundMutator; ๐Ÿ”’
use proptest::prelude::Strategy; ๐Ÿ”’
use rand::Rng; ๐Ÿ”’
use rand::RngCore; ๐Ÿ”’
use rand::seq::SliceRandom; ๐Ÿ”’
use revm::context::ContextTr; ๐Ÿ”’
use revm::context::JournalTr; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use crate::Vm::*; ๐Ÿ”’

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 ๐Ÿ”’
random_uint ๐Ÿ”’