feat(cheatcodes
): assert execution revert trace of a function call within try {} catch
context
#8745
Labels
Milestone
Component
Forge, Other (please describe)
Describe the feature you would like
With the introduction of
try{}catch
blocks in Solidity, nested calls that might revert can be handled gracefully to not enforce Transaction revert. It would be better to add an assertion in the tests suite to assert a revert of function call instead of a transaction callFor example:
Let's say function
x
on contractA
calls functiony
on contractB
in which it handles the revert ofy
gracefully using try{}catch. It would be awesome to have an assertion function that asserts the revert of functiony
during the execution of functionx
. Obviously,expectRevert
can not be used since it expects transaction revert instead of function revertAdditional context
No response
The text was updated successfully, but these errors were encountered: