feat[tool]: support storage layouts via json and .vyz inputs#4370
feat[tool]: support storage layouts via json and .vyz inputs#4370charles-cooper merged 44 commits intovyperlang:masterfrom
json and .vyz inputs#4370Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4370 +/- ##
==========================================
- Coverage 91.86% 90.67% -1.19%
==========================================
Files 119 119
Lines 16640 16676 +36
Branches 2801 2807 +6
==========================================
- Hits 15286 15121 -165
- Misses 929 1083 +154
- Partials 425 472 +47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit 08f0396.
|
@charles-cooper requesting a review before I update the docs |
charles-cooper
left a comment
There was a problem hiding this comment.
looks overall pretty good to me. left a few comments. @cyberthirst could you also take a look?
charles-cooper
left a comment
There was a problem hiding this comment.
lgtm. tagging @cyberthirst for final review
|
|
||
| for path, value in input_dict.get("storage_layout_overrides", {}).items(): | ||
| if path not in input_dict["sources"]: | ||
| raise JSONError(f"unknown target for storage layout override: {path}") |
There was a problem hiding this comment.
charles-cooper
left a comment
There was a problem hiding this comment.
and a couple lines are missing coverage
|
@tserg could you please add one more test for multiple compilation targets for each of which you'd provide an override file, where the target is either in the json/archive format? |
|
i think we currently don't allow multiple compilation targets for archive bundles ( vyper/vyper/cli/compile_archive.py Lines 48 to 49 in ebe26a6 |
| "storage_layout_overrides": { | ||
| "contracts/foo.vy": FOO_STORAGE_LAYOUT_OVERRIDES, | ||
| "contracts/bar.vy": BAR_STORAGE_LAYOUT_OVERRIDES, | ||
| }, |
There was a problem hiding this comment.
I added a second storage layout override to this test. Is this sufficient?
|
@tserg looks like there's some merge conflict |
|
@tserg looks like the latest merge from master broke some tests - could you take a look? |
json and .vyz inputs
What I did
Resolves #4367
How I did it
solc_jsonand archive outputs, emit the storage layout as output if it was overriden.solc_jsonand archive inputs if provided.How to verify it
See tests.
Commit message
Description for the changelog
Cute Animal Picture