Conversation
This PR makes a small modification the `simulate` function such that it ensures its inner `simulateAndRevert` reverts as expected. This is to prevent calls to the `CompatibilityFallbackHandler` from making unexpected state changes when not called by a Safe. While using the `CompatibilityFallbackHandler` for something other than a Safe fallback handler is explictely not supported, it makes sense to ensure the inner call inverts and prevent unintended behaviours.
733528e to
df76532
Compare
nlordell
commented
Apr 15, 2025
| */ | ||
| bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca; | ||
|
|
||
| bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256("simulate(address,bytes)")); |
remedcu
reviewed
Apr 17, 2025
remedcu
approved these changes
Apr 17, 2025
rmeissner
approved these changes
Apr 23, 2025
mmv08
approved these changes
Apr 23, 2025
akshay-ap
approved these changes
Apr 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR makes a small modification the
simulatefunction such that it ensures its innersimulateAndRevertreverts as expected. This is to prevent calls to theCompatibilityFallbackHandlerfrom making unexpected state changes when not called by a Safe.While using the
CompatibilityFallbackHandlerfor something other than a Safe fallback handler is explictely not supported, it makes sense to ensure the inner call inverts and prevent unintended behaviours.