1use crate::executors::RawCallResult;
2use alloy_primitives::{map::HashMap, Bytes, Log};
3use foundry_common::evm::Breakpoints;
4use foundry_evm_coverage::HitMaps;
5use foundry_evm_fuzz::FuzzCase;
6use foundry_evm_traces::SparsedTraceArena;
7use revm::interpreter::InstructionResult;
89/// Returned by a single fuzz in the case of a successful run
10#[derive(Debug)]
11pub struct CaseOutcome {
12/// Data of a single fuzz test case.
13pub case: FuzzCase,
14/// The traces of the call.
15pub traces: Option<SparsedTraceArena>,
16/// The coverage info collected during the call.
17pub coverage: Option<HitMaps>,
18/// Breakpoints char pc map.
19pub breakpoints: Breakpoints,
20/// logs of a single fuzz test case.
21pub logs: Vec<Log>,
22// Deprecated cheatcodes mapped to their replacements.
23pub deprecated_cheatcodes: HashMap<&'static str, Option<&'static str>>,
24}
2526/// Returned by a single fuzz when a counterexample has been discovered
27#[derive(Debug)]
28pub struct CounterExampleOutcome {
29/// Minimal reproduction test case for failing test.
30pub counterexample: (Bytes, RawCallResult),
31/// The status of the call.
32pub exit_reason: InstructionResult,
33/// Breakpoints char pc map.
34pub breakpoints: Breakpoints,
35}
3637/// Outcome of a single fuzz
38#[derive(Debug)]
39#[expect(clippy::large_enum_variant)]
40pub enum FuzzOutcome {
41 Case(CaseOutcome),
42 CounterExample(CounterExampleOutcome),
43}