Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Storage Access to be 4337 Compatible #128

Closed
wants to merge 2 commits into from

Conversation

nlordell
Copy link
Collaborator

@nlordell nlordell commented Nov 2, 2023

This PR changes the manager storage to use the account in the inner most mapping. This allows the Manager to be used with 4337 during signature validation. Note that tests continue to pass.

I also noticed that most storage is public with an addition direct accessor function. This generates additional code (for example, it generates both a enabledPlugins(address,address) function and a getPluginInfo(address,address) function unnecessarily). I think we should either generated accessor methods, or hand-written methods, but definitely not both. Since it is outside of the scope of this PR, I created a separate issue #130 to track this. The reason it is worth mentioning here is that this effectively changes the Manager interface to be slightly different - the order of parameters in the generated accessors for the public mapping has changed, but the hand-written function accessors has not (hence, the Manager still implements ISafeProtocolManager correctly).

Related to #127

Copy link

github-actions bot commented Nov 2, 2023

Pull Request Test Coverage Report for Build 6800133305

  • 15 of 15 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 6691897064: 0.0%
Covered Lines: 227
Relevant Lines: 227

💛 - Coveralls

@nlordell nlordell marked this pull request as ready for review November 8, 2023 09:53
@nlordell nlordell requested a review from mmv08 November 8, 2023 14:22
Copy link
Member

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. What do you think about adding comments to explain why the mappings are defined this way? I feel this could be helpful because having a mapping from an account to a module (or any other primitive) is more natural than doing it from a module to an account and then storing the reference to the outer mapping in the inner mapping. But maybe I'm the only one who feels this way.

@nlordell
Copy link
Collaborator Author

nlordell commented Nov 8, 2023

Closed in favour of #132 with branch name that matches contribution standards.

@nlordell nlordell closed this Nov 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants