Skip to main content

Module expected_emit

Module expected_emit 

Source
Expand description

Engine-free matching for the expectEmit cheatcodes.

StructsΒ§

ExpectedEmit
LogCountMap

EnumsΒ§

EmitMismatch
UnmetEmit πŸ”’
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.
reconstruct_params πŸ”’
Restore the order of the params of a decoded event

Type AliasesΒ§

ExpectedEmitTracker
Handles expected emits specified by the expectEmit cheatcodes.