Skip to content

feat(forge): inspect ERC-7201 storage layouts - #16734

Draft
decofe wants to merge 3 commits into
masterfrom
centaur/erc7201-storage-layout-1788867107
Draft

feat(forge): inspect ERC-7201 storage layouts#16734
decofe wants to merge 3 commits into
masterfrom
centaur/erc7201-storage-layout-1788867107

Conversation

@decofe

@decofe decofe commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Include ERC-7201 namespaces in forge inspect storageLayout for the selected contract and its bases. For example, a counter field under @custom:storage-location erc7201:example appears as example.counter at its computed root in both JSON and table output. Conventional storage remains present, transient storage is unchanged, and duplicate namespace roots or conflicting type definitions produce errors.

This implements Mablr's plan with a two-repository split: namespace discovery, inheritance, hashing, and artifact conversion live in a dedicated Forge module, while packing uses the generic primitive in Solar #1413. The Solar commit is pinned so this draft can be built and reviewed. No foundry-core changes are required; its dependency revision remains unchanged from the base branch.

Code and tests were written by Centaur with AI assistance.

Prompted by: @DaniPopes

Merge namespaces supplied by foundry-compilers into storageLayout
inspection, reject duplicate roots and conflicting types, and cover
JSON, table, cached, inherited, and error output through the CLI.

Pin the companion Solar and foundry-core implementations for review.

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

DaniPopes and others added 2 commits September 8, 2026 11:50
Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Move namespace discovery, inheritance, root hashing, and artifact conversion into Forge using the existing compiler accessor. Restore the original foundry-core revision so only the generic Solar primitive needs an upstream change.

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants