-
-
Notifications
You must be signed in to change notification settings - Fork 803
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 #4370
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4370 +/- ##
==========================================
- Coverage 91.31% 88.83% -2.49%
==========================================
Files 113 113
Lines 16061 16092 +31
Branches 2703 2709 +6
==========================================
- Hits 14666 14295 -371
- Misses 964 1286 +322
- Partials 431 511 +80 ☔ View full report in Codecov by Sentry. |
…/storage_layout_json
This reverts commit 08f0396.
@charles-cooper requesting a review before I update the docs |
storage_layout_overrides: dict[PurePath, StorageLayout] = {} | ||
|
||
for path, value in input_dict.get("storage_layout_overrides", {}).items(): | ||
if path not in input_dict["sources"]: |
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 guess we can have contracts which do not have corresponding override files
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 think that's fine, since each key in "sources" is a compilation target.
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?
@@ -12,6 +12,7 @@ | |||
from vyper.compiler.settings import Settings |
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.
for verification, storage layout override can (and should) affect integrity hash.
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