Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Refactor Storage Access to be 4337 Compatible - #128

Closed
nlordell wants to merge 2 commits into
mainfrom
refactor-storage-mapping
Closed

Refactor Storage Access to be 4337 Compatible#128
nlordell wants to merge 2 commits into
mainfrom
refactor-storage-mapping

Conversation

@nlordell

@nlordell nlordell commented Nov 2, 2023

Copy link
Copy Markdown
Collaborator

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

@github-actions

github-actions Bot commented Nov 2, 2023

Copy link
Copy Markdown

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

@mmv08 mmv08 left a comment

Copy link
Copy Markdown
Contributor

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

nlordell commented Nov 8, 2023

Copy link
Copy Markdown
Collaborator Author

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