feat(forge): inspect ERC-7201 storage layouts - #16734
Draft
decofe wants to merge 3 commits into
Draft
Conversation
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>
Contributor
✅ Changelog foundThe deterministic check will validate the changed entry. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Include ERC-7201 namespaces in
forge inspect storageLayoutfor the selected contract and its bases. For example, acounterfield under@custom:storage-location erc7201:exampleappears asexample.counterat 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