Skip to content

docs: Add comprehensive storage layout reference with namespace mappi…#881

Merged
Junirezz merged 1 commit into
Junirezz:mainfrom
Muhamadmust:feat-yield-updates
Jun 29, 2026
Merged

docs: Add comprehensive storage layout reference with namespace mappi…#881
Junirezz merged 1 commit into
Junirezz:mainfrom
Muhamadmust:feat-yield-updates

Conversation

@Muhamadmust

Copy link
Copy Markdown
Contributor

PR: Add Contract Storage Layout Reference with Upgrade Notes (#613)

Description

Introduces a comprehensive storage layout reference document to map active contract state allocations and establishes clear guidelines to guarantee storage compatibility and safety during future contract upgrades.

Changes Implemented

  • Created docs/storage-layout-reference.md: Developed a centralized reference tracking all storage structures, mapping strategies, and slot allocations.
  • Documented Storage Keys: Detailed explicit namespaces, key prefixes, and state variables currently implemented in the codebase.
  • Added Upgrade Safety Notes: Outlined critical rules regarding state preservation, structural preservation (avoiding type changes/reordering), and safe data appending to prevent storage collisions in proxy-upgradable patterns.

Verification Checklist

  • Documentation compiles and renders correctly in markdown preview.
  • All existing storage structures and key prefixes are accurately mapped.
  • Upgrade considerations clearly define constraints for future state schema extensions.

Closes #613

…ng and upgrade safety guidelines

- Document all 9 storage namespaces (Core, Governance, User, Shipment, Fee, Withdrawal, Oracle, Emergency, Strategy)
- Map 50+ storage keys with types, parameterization patterns, and access constraints
- Include proxy storage separation and EIP-1967 slot constants
- Provide upgrade safety constraints: forbidden operations (reordering, deletion, mutation) and safe operations (append-only, field extension)
- Add version migration patterns and backward compatibility guidelines
- Include storage collision prevention validation and namespace isolation
- Add audit checklist for pre-deployment verification
- Include unsafe/safe extension examples

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Junirezz Junirezz merged commit 85f2537 into Junirezz:main Jun 29, 2026
13 checks passed
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.

Documentation: Add contract storage layout reference with upgrade notes

2 participants