Skip to content

Conversation

@0xClandestine
Copy link
Member

Motivation:

Storage layout checker was incorrectly treating __gap variable overrides as critical errors, despite this being their intended use in upgradeable contracts.

Modifications:

  • Added special handling for __gap variables
  • Split issues into critical errors (storage overrides, removals) and warnings (gap overrides, renames)
  • Updated error messages and return values accordingly

Result:

Script now properly validates storage layout changes, only failing on actually dangerous modifications while allowing intended gap usage.

@0xClandestine 0xClandestine changed the title feat: only throw for errors feat: ci storage check required Feb 3, 2025
@0xClandestine 0xClandestine merged commit dca7208 into dev Feb 3, 2025
5 of 6 checks passed
@0xClandestine 0xClandestine deleted the ci/storage-required branch February 3, 2025 22:12
ypatil12 pushed a commit that referenced this pull request Feb 19, 2025
* feat: only throw for errors

- except __gap overwrite

* ci: storage check should fail

* ci: storage check should fail

* perf: optimize storage ci

* fix: remove bad variable

* chore: forge fmt
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.

3 participants