Skip to content

Fix outdated protocol name references for ERC7201 storage#41

Open
adnanhq wants to merge 1 commit intooz-audit-fixesfrom
oz-fix-issue-23
Open

Fix outdated protocol name references for ERC7201 storage#41
adnanhq wants to merge 1 commit intooz-audit-fixesfrom
oz-fix-issue-23

Conversation

@adnanhq
Copy link
Contributor

@adnanhq adnanhq commented Mar 4, 2026

  • Update "ccprotocol" references to "oaknetwork" for calculating ERC7201 storage location

@adnanhq adnanhq self-assigned this Mar 4, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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;

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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

Successfully merging this pull request may close these issues.

1 participant