fix(cheatcodes): Record call to create2 factory in state diff #7207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
#6634
Solution
Adds logic to include the call to the create2 factory in the results returned by the
vm.stopAndReturnStateDiff()
cheat code in all cases where it is used.Additional Context
This is a follow-up to #6656, which was recently merged and allows the default create2 factory to be used in tests and non-broadcasting scripts. The logic in this PR integrates with those changes so that the call to the create2 factory is properly recorded in all situations, including when the
always_use_create_2_factory
option is enabled.