Skip to main content

Module calldata

Module calldata 

Source

Structs§

CalldataEncoder 🔒

Enums§

EnumClamp 🔒
Plan for constraining the enum leaves of a fuzzed parameter into their valid 0..variant_count range. Solidity enums are ABI-encoded as uint8, so without this the fuzzer can generate out-of-range values that the contract rejects with Panic(0x21) when decoding them.

Functions§

bound_enum 🔒
Wraps strat to constrain any enum leaves in input to their valid range; a no-op otherwise.
clamp_enum_leaf 🔒
Recursively reduces every uint8 leaf in an enum value (possibly nested in arrays) modulo count.
fuzz_calldata
Given a function, it returns a strategy which generates valid calldata for that function’s input types, following declared test fixtures.
fuzz_calldata_from_state
Given a function and some state, it returns a strategy which generated valid calldata for the given function’s input types, based on state taken from the EVM.
parse_input_types 🔒