Skip to main content Module param Copy item path Source use super::UintStrategy ; ๐ use super::state::DictionaryRead ; ๐ use crate::invariant::SenderFilters ; ๐ use crate::strategies::mutators::BitMutator ; ๐ use crate::strategies::mutators::GaussianNoiseMutator ; ๐ use crate::strategies::mutators::IncrementDecrementMutator ; ๐ use crate::strategies::mutators::InterestingWordMutator ; ๐ use alloy_dyn_abi::DynSolType; ๐ use alloy_dyn_abi::DynSolValue; ๐ use alloy_dyn_abi::Word; ๐ use alloy_primitives::Address; ๐ use alloy_primitives::B256; ๐ use alloy_primitives::I256; ๐ use alloy_primitives::U256; ๐ use proptest::strategy::ValueTree; ๐ use proptest::test_runner::TestRunner; ๐ use rand::SeedableRng ; ๐ use rand::prelude::IndexedMutRandom ; ๐ use rand::rngs::StdRng ; ๐ use std::mem::replace ; ๐ use proptest::prelude::*; ๐ MAX_ARRAY_LEN ๐ The max length of arrays we fuzz for is 256. TYPED_SAMPLE_SHARE ๐ Share of dictionary picks that take a typed sample of the parameter type when the type has
any. The rest come from the untyped pool, which also holds account addresses, bytecode
constants and storage words without a layout. array_len ๐ Length of a dynamic array: mostly short, sometimes medium, rarely long. Every level of a
nested array draws its own length, so a uniform length up to MAX_ARRAY_LEN gave two levels
an average of 16k elements and single calls of several MiB of calldata. fuzz_msg_value Returns a proptest strategy for generating random msg.value for payable functions. fuzz_param Given a parameter type, returns a strategy for generating values for that type. fuzz_param_from_state ๐ Given a parameter type, returns a strategy for generating values for that type, given some EVM
fuzz state. fuzz_param_from_state_inner ๐ fuzz_param_inner ๐ fuzz_param_with_fixtures Given a parameter type and configured fixtures for param name, returns a strategy for generating
values for that type. generate_msg_value Generates a msg.value for payable functions using TestRunnerโs RNG (corpus mutation path). mutate_param_value ๐ Mutates the current value of the given parameter type and value. mutate_param_value_inner ๐ mutate_random_array_value ๐ Mutates random value from given array. mutate_random_tuple_value ๐ Mutates random value from given tuples. select_random_address ๐ Selects a random address for mutation, respecting sender filters if provided.