Open andreas-blockswap opened 7 months ago
I think the transient storage context should be split by default for each top-level call in the Foundry test runner.
Also, I would like transient storage to be cleared when explicitly switching the runtime context using prank etc.
Hello, was this implemented?
Through this comment, I learned that running tests with the --isolate
option allows the top-level call to be executed as a context-independent tx.
Component
Forge
Describe the feature you would like
In solc version 0.8.24, transactions compose differently than message calls. While adding support for solc 0.8.24 (issue #6903) I think that it will be useful with a cheat code to clear the transient storage, so that we can model transactions with message calls.
For example a cheat code
function clearTransientStorage(address)
to zero the transient storage. This cheat code can be used to model a transactiona.f(x)
withand transaction composition of
a.f(x)
anda.g(y)
can be modeled withAdditional context
No response