Skip to main content

Module error

Module error 

Source

Re-exportsΒ§

use super::InvariantContract; πŸ”’
use crate::executors::RawCallResult; πŸ”’
use crate::inspectors::EdgeCovHit; πŸ”’
use crate::inspectors::EdgeCoverage; πŸ”’
use alloy_json_abi::Function; πŸ”’
use alloy_primitives::Address; πŸ”’
use alloy_primitives::B256; πŸ”’
use alloy_primitives::Bytes; πŸ”’
use alloy_primitives::Selector; πŸ”’
use alloy_primitives::keccak256; πŸ”’
use foundry_config::InvariantConfig; πŸ”’
use foundry_evm_core::decode::ASSERTION_FAILED_PREFIX; πŸ”’
use foundry_evm_core::decode::EMPTY_REVERT_DATA; πŸ”’
use foundry_evm_core::decode::RevertDecoder; πŸ”’
use foundry_evm_core::evm::FoundryEvmNetwork; πŸ”’
use foundry_evm_fuzz::BasicTxDetails; πŸ”’
use foundry_evm_fuzz::Reason; πŸ”’
use foundry_evm_fuzz::invariant::FuzzRunIdentifiedContracts; πŸ”’
use proptest::test_runner::TestError; πŸ”’
use std::collections::HashMap; πŸ”’
use std::fmt; πŸ”’

StructsΒ§

FailedInvariantCaseData
HandlerAssertionFailure
A handler-side assertion bug: a require/assert inside a fuzzed handler that the campaign reached. Deduped by (reverter, selector) site (Echidna/Medusa semantics), shortest sequence wins on collision.
InvariantFailures
Stores invariant test failures and revert counts.
InvariantRunCtx
Run-scoped references shared by failure-recording paths in an invariant run.

EnumsΒ§

FailureKey
Identifies a single entry in the InvariantFailures map. Invariant predicate failures and handler-side assertion bugs share one map keyed by this enum.
InvariantFuzzError

FunctionsΒ§

handler_edge_fingerprint
Edge-coverage fingerprint for a handler-side assertion call. Prefers a pre-merge edges hash; falls back to keccak(target || selector) when edge coverage is disabled.
handler_site_already_minimal
True iff there is already a HandlerAssertionFailure for site no longer than candidate_len. Used to skip inserting a not-strictly-shorter repro.
record_handler_assertion_bug πŸ”’
Records a handler-side assertion bug (if strictly shorter than the existing repro for this site) and pops the just-asserted reverted input from inputs. Shared by the periodic-check path and the inline check-skipped path.
snapshot_edge_fingerprint
Stable hash of the call’s edge coverage, taken before merge_edge_coverage zeroes the buffer. Returns None when edge coverage is disabled.