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
Currently, the mockCall() method can only return values. It would be useful to have a similar method called mockCallWithAction(), which takes in encoded calldata and address as additional parameter. For example, in ERC4626 vault's withdraw() method returns the asset amount as well as performs a transfer call which sends funds to the caller/recipient.
Component
Forge
Describe the feature you would like
Currently, the
mockCall()
method can only return values. It would be useful to have a similar method calledmockCallWithAction()
, which takes in encoded calldata and address as additional parameter. For example, in ERC4626 vault'swithdraw()
method returns the asset amount as well as performs a transfer call which sends funds to the caller/recipient.So, instead of just doing:
We can do something like this:
It would also be nice to include actions the ability to trigger specific cheatcodes like
deal()
, etc.,This would be super useful during integration testing. Happy to take this on. Let me know wdyt.
Additional context
No response
The text was updated successfully, but these errors were encountered: