Skip to main content

Module runtime

Module runtime 

Source

Re-exportsΒ§

use super::abi::*; πŸ”’
use super::*; πŸ”’

ModulesΒ§

address πŸ”’
bool πŸ”’
bytes πŸ”’
calldata πŸ”’
cheatcodes πŸ”’
control πŸ”’
cx πŸ”’
evm πŸ”’
executor_view πŸ”’
expr πŸ”’
folded_slots πŸ”’
Registration of constant-folded mapping slots as concrete Keccak preimages.
hashcons πŸ”’
memory πŸ”’
precompiles πŸ”’
solver πŸ”’
Solver orchestration, query scheduling, caching, and model validation.
state πŸ”’
symbols πŸ”’
word πŸ”’

StructsΒ§

AccessRecord πŸ”’
AssumeNoRevert πŸ”’
CallFrame πŸ”’
CallMock πŸ”’
CallMockOutcome πŸ”’
ExecutorView
Network-independent, read-only view of a concrete Foundry executor.
ExpectedCall πŸ”’
ExpectedCreate πŸ”’
ExpectedEmit πŸ”’
ExpectedEmitChecks πŸ”’
ExpectedRevert πŸ”’
ExpressionDigests πŸ”’
Structural digests that identify expressions in stable symbol names.
ExpressionFoldCache πŸ”’
Results from one deterministic bottom-up expression fold.
FoldedContract πŸ”’
FoldedSlots πŸ”’
Candidate keys and storage layouts of the deployed contracts, kept to resolve the nested level of a folded mapping slot on demand.
FunctionMock πŸ”’
ModelEvaluator πŸ”’
Evaluates hash-consed expressions once per model.
NoopModel πŸ”’
PathState πŸ”’
SmtLibSubprocessSolver πŸ”’
StorageMappingKey πŸ”’
StorageWrite πŸ”’
SymBoolExpr πŸ”’
SymBytes πŸ”’
SymCalldata πŸ”’
SymCode πŸ”’
SymCx πŸ”’
SymCxCache πŸ”’
SymExpr πŸ”’
SymMemory πŸ”’
SymReturnData πŸ”’
SymStack πŸ”’
Symbol πŸ”’
SymbolicBlock πŸ”’
SymbolicBranchTarget
One comparison site from a fuzz branch frontier to target during symbolic execution.
SymbolicLog πŸ”’
SymbolicMappingProvenance πŸ”’
SymbolicMemoryWrite πŸ”’
SymbolicPrank πŸ”’
SymbolicReplayStorageSlot πŸ”’
SymbolicRunInput
SymbolicSnapshot πŸ”’
A vm.snapshotState entry: the world state with the block environment and gas price, which Forge restores together.
SymbolicStorageHook πŸ”’
SymbolicWorld πŸ”’
SymbolicWorldState πŸ”’
World data shared copy-on-write by branched paths and snapshots.
UnfoldedNodeCounter πŸ”’
UnknownCall πŸ”’
One call into code the equivalence check does not know, with its inputs and its fresh results.

EnumsΒ§

BoundedCopySize πŸ”’
BranchFeasibility πŸ”’
CallKind πŸ”’
CheatcodeOutcome πŸ”’
CreateKind πŸ”’
DigestNode πŸ”’
ExpectedRevertData πŸ”’
GuardedOpcode πŸ”’
PersistentWrite πŸ”’
A cheatcode write that survives a revert of the frame that made it, see PathState::replay_persistent_writes.
StepOutcome πŸ”’
SymBinOp πŸ”’
SymBoolExprKind πŸ”’
SymBytesKind πŸ”’
SymCmpOp πŸ”’
SymExprKind πŸ”’
SymTernOp πŸ”’
SymbolicError
Error returned by the internal symbolic executor.

ConstantsΒ§

MAX_BITWISE_BOOL_WORD_VISITS πŸ”’
MAX_BOUND_ANALYSIS_VISITS πŸ”’
MAX_BRANCHLESS_REWRITE_NODES πŸ”’
MAX_BRANCHLESS_REWRITE_UNFOLDED_NODES πŸ”’
MAX_CONSTANT_DIFFERENCE_VISITS πŸ”’
MAX_CONSTANT_ITE_EQ_NODES πŸ”’
Bounds both the number of distinct word nodes inspected by constant-ITE equality expansion and the unfolded size of the Boolean expression it could produce.
MAX_CONSTANT_ITE_EQ_UNFOLDED_NODES πŸ”’
MAX_NESTED_MAPPING_HASHES πŸ”’
SECP256K1_ORDER πŸ”’
Order of the secp256k1 curve, the exclusive bound of a valid signature scalar.
STORAGE_LAYOUT_OFFSET_BITS πŸ”’

TraitsΒ§

SymbolicModelLookup πŸ”’

FunctionsΒ§

abi_bytes_return πŸ”’
abi_bytes_return_with_len πŸ”’
abi_concrete_bytes_return πŸ”’
abi_concrete_value_return πŸ”’
abi_static_input_size πŸ”’
accesses_return_data πŸ”’
active_precompiles πŸ”’
Returns the canonical precompiles active under spec_id.
address_word πŸ”’
artifact_code πŸ”’
artifact_json_fallback_paths πŸ”’
Returns fallback paths for symbolic artifact lookup.
artifact_json_path πŸ”’
assertion_message_condition πŸ”’
Returns the condition under which symbolic revert data is an Error(string) whose message contains the assertion prefix, validated like is_revert_assertion_failure: the encoded length must be concrete and within the data, the concrete bytes must decode as UTF-8 and contain the prefix on their own, and every symbolic byte must be ASCII so the message stays valid UTF-8.
assertion_revert_condition πŸ”’
Returns the condition under which symbolic revert data is an assertion failure: a Panic(0x01) or an Error(string) whose message contains the assertion prefix.
byte_expr πŸ”’
Returns the byte extraction expression for a symbolic word.
byte_word πŸ”’
byte_word_dynamic πŸ”’
cancelled_difference_minuend πŸ”’
Returns a for the sum (a - b) + b in either operand order.
cheatcode_error_revert_condition πŸ”’
clz_word πŸ”’
Returns the number of leading zero bits in value, or 256 when it is zero.
cmp_upper_bound_usize πŸ”’
Returns the constant upper bound a comparison places on expr, when it fits a usize.
complete_cheatcode_call πŸ”’
compute_create2_address_word πŸ”’
compute_create_address_word πŸ”’
concrete_expr_bytes πŸ”’
context_forces_masked_expr πŸ”’
create2_address_word πŸ”’
create2_hash_address_word πŸ”’
Builds keccak256(0xff ++ deployer ++ salt ++ init_code_hash) cut to an address.
decode_cheatcode_args πŸ”’
deployer_identity πŸ”’
Identifies a deployer in a stable address symbol name.
derive_private_key πŸ”’
derive_private_key_with_language πŸ”’
dyn_address πŸ”’
dyn_address_array πŸ”’
dyn_bool πŸ”’
dyn_bytes πŸ”’
dyn_bytes32_array πŸ”’
dyn_potential_revert πŸ”’
dyn_potential_reverts πŸ”’
dyn_string πŸ”’
dyn_string_array πŸ”’
ecrecover_signature_well_formed πŸ”’
Returns whether a 128-byte ECRECOVER input is a well-formed signature: v is 27 or 28 and r and s are in [1, n). The precompile returns no data otherwise.
env_var πŸ”’
Reads an environment variable like Forge’s envOr cheatcodes: None only when it is not set, and an error when it is not valid unicode.
error_string_return_data πŸ”’
euclidean_sum_dividend πŸ”’
Returns a for the Euclidean sum (a / d) * d + a % d in either operand order.
eval_model_constraints πŸ”’
execute_precompile πŸ”’
Executes a canonical precompile on concrete input with at most gas gas.
execute_symbolic_precompile πŸ”’
exp_expr_for_concrete_exponent πŸ”’
first_symbolic_opcode πŸ”’
Returns the first opcode position that holds a symbolic byte, skipping concrete push data.
foundry_cheatcode_min_input_size πŸ”’
hex_nibble_ascii πŸ”’
is_assertion_revert πŸ”’
is_full_word_array_assertion πŸ”’
is_precompile_for_spec πŸ”’
Returns whether address is a canonical precompile active under spec_id.
is_revert_assertion_failure πŸ”’
keccak_word πŸ”’
keccak_word_with_len πŸ”’
key_fits πŸ”’
Returns whether key is a value of the mapping key type ty as abi.encode pads it.
low_masked_source πŸ”’
low_masked_source_any πŸ”’
mapping_preimage πŸ”’
Returns keccak(key . slot) and its 64-byte preimage.
mask_bits πŸ”’
mask_low_bits πŸ”’
masked_expr_matches πŸ”’
modexp_gas πŸ”’
Returns the gas the modexp precompile for spec_id charges for these lengths and leading exponent word, as EIP-198, EIP-2565 (Berlin) and EIP-7883 (Osaka) define it.
parse_env_array πŸ”’
parse_env_value πŸ”’
past_deadline πŸ”’
power_of_two_shift πŸ”’
precompile_call_gas πŸ”’
Returns the most gas a gasleft() call gives a precompile in a transaction with gas_limit gas: 63/64 of the gas left (EIP-150), plus the value transfer stipend when it sends value.
precompile_gas_fits πŸ”’
Returns whether a precompile whose cost lies between min_cost and max_cost fits in gas, or None when that depends on symbolic input.
precompile_number πŸ”’
precompile_number_for_spec πŸ”’
private_key_address πŸ”’
private_key_signer πŸ”’
push_ascii πŸ”’
push_hex_byte πŸ”’
push_hex_word πŸ”’
push_immediates πŸ”’
Returns the right-aligned values of the PUSH immediates in code.
read_abi_address_arg πŸ”’
read_abi_address_or_symbolic_slot_arg πŸ”’
read_abi_address_word_arg πŸ”’
Reads an address argument as a word, pinned to its constant when path constraints force one.
read_abi_address_word_or_symbolic_slot_arg πŸ”’
read_abi_bool_arg πŸ”’
read_abi_bytes4_words_arg πŸ”’
read_abi_concrete_word_arg πŸ”’
read_abi_constrained_address_arg πŸ”’
read_abi_constrained_word_arg πŸ”’
read_abi_dynamic_bytes_arg πŸ”’
read_abi_dynamic_return_data_arg πŸ”’
read_abi_string_arg πŸ”’
read_abi_symbolic_dynamic_byte_exprs_arg πŸ”’
read_abi_symbolic_dynamic_bytes_arg πŸ”’
read_abi_symbolic_dynamic_bytes_array_arg πŸ”’
read_abi_u32_arg πŸ”’
read_abi_u64_arg πŸ”’
read_abi_word_arg πŸ”’
record_mapping_preimage πŸ”’
Records keccak(key . slot) with its preimage and returns the hash.
record_preimage_bytes πŸ”’
recorded_logs_json_return_data πŸ”’
recorded_logs_return_data πŸ”’
register_expected_call πŸ”’
Registers an expected call using the concrete cheatcode’s keyed-additive semantics.
revert_cheatcode_call πŸ”’
Completes a cheatcode call that reverts with return_data, which can be the reverter of a pending vm.expectRevert or vm.assumeNoRevert, including one this frame set.
rounded_product_operands πŸ”’
Returns (a, d) for the rounded product (a / d) * d in either operand order.
shift_left πŸ”’
sign_compact_hash_words πŸ”’
sign_hash_words πŸ”’
signextend πŸ”’
signextend_word πŸ”’
signextend_word_dynamic πŸ”’
stable_symbol πŸ”’
storage_mapping_key_eq πŸ”’
storage_offset_is_large πŸ”’
Returns the condition under which a storage layout offset is too large to assume no aliasing.
storage_slots_abi_array πŸ”’
symbolic_create2_address_word πŸ”’
symbolic_create_address_word πŸ”’
symbolic_fixed_len_precompile_output πŸ”’
symbolic_hash_word_with_len πŸ”’
symbolic_input_word_range πŸ”’
Returns the smallest and largest big-endian values of the len input bytes at offset, taking each symbolic byte as 0x00 and 0xff and each byte past input_len as zero.
symbolic_modexp_precompile πŸ”’
symbolic_storage_symbol πŸ”’
symbolic_vm_cheatcode_min_input_size πŸ”’
visit_unique πŸ”’
Visits reachable word nodes in depth-first, left-to-right order until the visitor breaks.
vm_params πŸ”’
Returns the parameter types of a Vm cheatcode from its generated ABI signature.
walk_mapping_slots πŸ”’
Calls hash for every candidate key that fits the key type of the mapping at slot, descending into struct members and levels - 1 nested mapping levels through the returned hash. Returns false when hash stopped the walk.
word_from_extracted_bytes πŸ”’
word_to_address πŸ”’

Type AliasesΒ§

SymbolicModel πŸ”’
SymbolicVars πŸ”’