Open topocount opened 2 months ago
Hi @topocount thanks for your suggestion, any stylistic changes to traces are to be applied in https://github.com/paradigmxyz/revm-inspectors/blob/main/src/tracing/writer.rs and changes to indicating whether something is an error is to be done in Foundry (it may be the case that it requires that).
Assigned this to you @topocount, please let me know if you need any pointers or have any questions along the way
Hey @zerosnacks I think I have a bead on an implementation path. Thanks for your guidance
please let me know if you need any pointers or have any questions along the way
don't you mean "borrows?" :sunglasses:
@zerosnacks is it okay if I create a new error in the cheatcodes package that that holds the abi-encoded bytestring of the unmatched event? I'd also like to capture the index of the event in the expected_events
Deque in case multiple events with same exact parameters are expected, so something like:
error UnmatchedEvent(uint256 positionExpected, bytes rawLog);
I'm not sure if I understand it completely but it makes sense to me to pass the reverted error in a structured manner.
Perhaps using an error with two structs holding an Expected
case and a Result
case makes this format more generalizable. Feel free to open a draft PR, that way others can chime in more easily as well.
Component
Forge
Describe the feature you would like
Currently, the tracer and error logger aren't very helpful when a matching event is not caught. I'd like to attempt to highlight the mismatched event(s) in red instead of white (or neutral) as they they are currently displayed by the tracer.
I'd like to contribute this small feature myself.
Additional context
This seems like a superficial improvement, but digging through large stack traces of emitted logs, trying to manually pick out the one that failed can be quite time consuming during development and integration testing.