vm.stopAndReturnStateDiff()
results do not include call to create2 factory
#6634
Closed
2 tasks done
Labels
T-bug
Type: bug
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (73fb616 2023-12-19T00:17:51.579325000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
Deploying a contract using create2 shows up as a single create
AccountAccess
in the results returned byvm.stopAndReturnStateDiff()
even though the call to the create2 factory itself is also a state-changing action. This makes it difficult to determine if a contract was deployed using create or create2 based on the recorded results. The call to the create2 factory should be included in the results returned by this cheat code.It's unclear to me if the current behavior was intended or not. If it was intended, then this issue should probably be converted into a feature request. Please let me know if you think I should do that.
Replication
forge script ./script/Counter.s.sol --tc CounterScript
The text was updated successfully, but these errors were encountered: