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

Remove Unnecessary Storage Accessor Functions #130

Open
nlordell opened this issue Nov 8, 2023 · 0 comments
Open

Remove Unnecessary Storage Accessor Functions #130

nlordell opened this issue Nov 8, 2023 · 0 comments

Comments

@nlordell
Copy link
Collaborator

nlordell commented Nov 8, 2023

May storage fields are marked with public. This makes the Solidity compiler generate functions for accessing them. In principle, there is no issue with this. However, many of these storage values have hand-written accessors as well, which means that double code which is doing the same thing is being generated. For example:

https://github.com/safe-global/safe-core-protocol/blob/0f3ee326009709a705eb560712bad070b52d8890/contracts/SafeProtocolManager.sol#L29

https://github.com/safe-global/safe-core-protocol/blob/0f3ee326009709a705eb560712bad070b52d8890/contracts/SafeProtocolManager.sol#L231-L233

This generates both enabledPlugins(address,address) and getPluginInfo(address,address) which do the exact same thing.

We should choose one or the other, but not both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant