You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aggregating a list of new cheatcodes and improvements to existing cheatcodes that have been requested in other issues:
1. vm.not cheat code. When called immediately before (or after?) expectEmit or expectCall it modifies that cheat code so the event/call is expected not to be present. Alternatively, expectNoEmit or expectNoCall would work. https://github.com/gakonst/foundry/issues/509
2. Allow expectEmit to be declared after the call emitting the event, instead of the current workflow which requires it to be declared before. If we have to choose only allowing it to be declared before or after, my preference would be after, because it allows you to read updated state from the call and use those values as the event args, as explained in https://github.com/gakonst/foundry/issues/512#issuecomment-1016577046
6. Still needs more discussion to determine if cheatcodes is the optimal approach, but I think cheatcodes for setting fuzzer params on a per-contract or per-test basis would be very useful: https://github.com/gakonst/foundry/issues/744
Component
Forge
Describe the feature you would like
Aggregating a list of new cheatcodes and improvements to existing cheatcodes that have been requested in other issues:
vm.notcheat code. When called immediately before (or after?)expectEmitorexpectCallit modifies that cheat code so the event/call is expected not to be present. Alternatively,expectNoEmitorexpectNoCallwould work. https://github.com/gakonst/foundry/issues/509expectEmitto be declared after the call emitting the event, instead of the current workflow which requires it to be declared before. If we have to choose only allowing it to be declared before or after, my preference would be after, because it allows you to read updated state from the call and use those values as the event args, as explained in https://github.com/gakonst/foundry/issues/512#issuecomment-1016577046mockCall,expectCall, andexpectRevert(andexpectEmit?) to work for JUMPs (currently they only work for calls). This has been discussed in bug:mockCallnot working as expected #432 andexpectRevertcheat code doesn't work for internal calls #864expectEmitmatcher fails, specify which topics or data did not match: https://github.com/gakonst/foundry/issues/592expectEmitissues described in https://github.com/gakonst/foundry/issues/760captureLogsandgetLogscheatcodes (similar torecordsandaccesses) to support https://github.com/gakonst/foundry/issues/543vm.rollshould update how RPC queries behave when forking: https://github.com/gakonst/foundry/issues/939expectEmiterror message: https://github.com/gakonst/foundry/issues/908expectRevertwith no bytes to assert that any revert should happen: https://github.com/gakonst/foundry/issues/885expectEmit/expectCallto only check the next call, and not all subsequent calls: bug: expectEmit and expectCall don't only check the next call #1745expect*edge cases / bugs? Forge doesn't work with multiple "vm.expectRevert" when testing free functions #3723 (comment)Additional context
No response