foundry
foundry copied to clipboard
feat(cheatcodes): mark unmatched expectedEmits as unemitted
Motivation
It can be very difficult to find a failing expectEmit
when looking
as traces involving deep traces with a lot of events.
fixes #8506
Solution
If an emitted event is marked as unmatched, it can then be hilighted as an error in red.
This is accomplished by passing the sequence index of the first event
that was expected but not emitted as a revert error, and then
finding that event during tracing and marking it as unmatched
.
please see https://github.com/paradigmxyz/revm-inspectors/pull/181 for the dependent changes that allow for the actual highlighting