foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(cheatcodes): mark unmatched expectedEmits as unemitted

Open topocount opened this issue 6 months ago • 0 comments

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

topocount avatar Aug 17 '24 05:08 topocount