Expand description
Engine-free matching for the expectEmit cheatcodes.
Re-exportsΒ§
use crate::Error;πuse alloy_dyn_abi::EventExt;πuse alloy_primitives::Address;πuse alloy_primitives::Bytes;πuse alloy_primitives::Log;πuse alloy_primitives::LogData as RawLog;πuse alloy_primitives::hex;πuse alloy_primitives::hex;πuse alloy_primitives::map::HashMap;πuse alloy_primitives::map::hash_map::Entry;πuse alloy_sol_types::SolValue;πuse foundry_common::abi::get_indexed_event;πuse foundry_common::abi::reconstruct_event_params;πuse foundry_common::fmt::format_token;πuse foundry_evm_traces::DecodedCallLog;πuse foundry_evm_traces::identifier::SignaturesIdentifier;πuse std::collections::VecDeque;π
StructsΒ§
EnumsΒ§
- Emit
Mismatch - Unmet
Emit π - Why the tracked expected emits were not satisfied when a call ended.
FunctionsΒ§
- check_
call_ πemits - Checks the entire tracker when a non-static call ends at any tracked expectationβs
depth. - checked_
topic_ πcount - checks_
topics_ πand_ data - decode_
event π - first_
unmet_ πroot_ emit - Checks for leftover expected emits when the root call ends without reverting.
- get_
emit_ πmismatch_ message - Gets a detailed mismatch message for emit assertions
- name_
mismatched_ πlogs - Formats the generic mismatch message: βlog != expected logβ to include event names if available
- observe_
log π - Fills or checks the expected emits against an emitted log.
Type AliasesΒ§
- Expected
Emit Tracker - Handles expected emits specified by the
expectEmitcheatcodes.