-
Notifications
You must be signed in to change notification settings - Fork 266
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
CLI: Support --referenceBuildInfoDirs
option
#1062
Merged
Merged
Conversation
This file contains 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
Amxx
reviewed
Aug 21, 2024
Amxx
approved these changes
Aug 21, 2024
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.
Lot to look at, and difficult to keep track when you are not familiar with the CLI's code, but it looks good to me !
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.
In some project setups, users of the Upgrades Core CLI may not want to change the names of upgradeable contracts for every new version that they deploy. Instead, they just change the source code and want to perform storage layout comparisons with a previous version of their repository (e.g. from a different branch).
This PR provides a
--referenceBuildInfoDirs
option that takes a comma-separated list of additional build info directories that can be referenced for storage layout comparisons. These build info directories can be built from previous versions of the project repository, containing the build artifacts (including storage layouts) of previously deployed versions of contracts.When using this option, refer to one of these directories using prefix
<dirName>:
before the contract name or fully qualified name in the--reference
option or@custom:oz-upgrades-from
annotation, where<dirName>
is the directory short name. Each directory short name must be unique.Example usage:
artifacts/build-info
for Hardhat projects orout/build-info
for Foundry projects), renaming it to a unique name. For example,build-info-v1
.MyContract
with its previous version, run the CLI command like:Fixes #1034