Fix outdated protocol name references for ERC7201 storage#41
Fix outdated protocol name references for ERC7201 storage#41adnanhq wants to merge 1 commit intooz-audit-fixesfrom
Conversation
adnanhq
commented
Mar 4, 2026
- Update "ccprotocol" references to "oaknetwork" for calculating ERC7201 storage location
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ebc8916fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // keccak256(abi.encode(uint256(keccak256("oaknetwork.storage.GlobalParams")) - 1)) & ~bytes32(uint256(0xff)) | ||
| bytes32 private constant GLOBAL_PARAMS_STORAGE_LOCATION = | ||
| 0x83d0145f7c1378f10048390769ec94f999b3ba6d94904b8fd7251512962b1c00; | ||
| 0xcab368c4291c205bbe63a595130eb08714925d02705f410a55bf1a45b8ddaf00; |
There was a problem hiding this comment.
Preserve ERC7201 storage slot identifiers across upgrades
Changing the ERC7201 namespace-derived slot constant here (and similarly in AdminAccessCheckerStorage, CampaignInfoFactoryStorage, and TreasuryFactoryStorage) breaks storage compatibility for existing UUPS proxies: after upgrade, contracts read/write a different storage root, so previously initialized state is effectively lost. This repo explicitly supports proxy upgrades (for example, GlobalParams is UUPS in src/GlobalParams.sol and script/UpgradeTreasuryFactory.s.sol upgrades live proxies), so this change can reset critical values like admin addresses, fee config, and implementation mappings on upgraded deployments.
Useful? React with 👍 / 👎.