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
I use the changePrank added in foundry-rs/forge-std#319 a lot, and one of the issues I have with it is that I always need to ensure that it's called after a vm.startPrank. Otherwise, Foundry throws this error:
You have an active prank already.
Users would never see this error if there was a cheat that combined startPrank and changePrank like this:
Is prank started?
If not, run vm.startPrank
If yes, replicate the logic in changePrank (i.e. vm.stopPrank and vm.startPrank again)
Possible names for this new cheat include startChangePrank or startAndChangePrank. Alternatively, the startPrank cheat could itself be modified to work like this, which would make changePrank redundant.
Side note: I opened this issue here rather than forge-std due to the ongoing plan to implement all cheats natively in Foundry (#3782).
The text was updated successfully, but these errors were encountered:
Component
Forge
Describe the feature you would like
I use the
changePrank
added in foundry-rs/forge-std#319 a lot, and one of the issues I have with it is that I always need to ensure that it's called after avm.startPrank
. Otherwise, Foundry throws this error:Users would never see this error if there was a cheat that combined
startPrank
andchangePrank
like this:vm.startPrank
changePrank
(i.e.vm.stopPrank
andvm.startPrank
again)Possible names for this new cheat include
startChangePrank
orstartAndChangePrank
. Alternatively, thestartPrank
cheat could itself be modified to work like this, which would makechangePrank
redundant.Side note: I opened this issue here rather than
forge-std
due to the ongoing plan to implement all cheats natively in Foundry (#3782).The text was updated successfully, but these errors were encountered: