-
-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat[tool]: support storage layouts via json
and .vyz
inputs
#4370
feat[tool]: support storage layouts via json
and .vyz
inputs
#4370
Conversation
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. |
…/storage_layout_json
This reverts commit 08f0396.
@charles-cooper requesting a review before I update the docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks overall pretty good to me. left a few comments. @cyberthirst could you also take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no coverage for this line https://github.com/vyperlang/vyper/pull/4370/checks?check_run_id=34325903794
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/vyperlang/vyper/pull/4370/files#r1882232779
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a second storage layout override to this test. Is this sufficient?
…/storage_layout_json
@tserg looks like there's some merge conflict |
…/storage_layout_json
@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_json
and archive outputs, emit the storage layout as output if it was overriden.solc_json
and archive inputs if provided.How to verify it
See tests.
Commit message
Description for the changelog
Cute Animal Picture