-
Notifications
You must be signed in to change notification settings - Fork 271
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
Support verifying proxy contracts from older versions #674
Comments
Greetings; any updates with this issue? |
This isn't something we are working on at the moment, although workarounds are possible:
|
Here are some technical details on what is needed for this issue. If anyone would like to contribute a PR, we would be happy to discuss it further / review. The function that we use to verify a contract tries to match the existing contract's creation code with known bytecode of proxy contract artifacts produced by the compiler. Currently there is only one set of artifact files provided, which corresponds to the different types of proxy contracts that can be deployed by that version of the plugin. The source code stored in the Solc JSON input and the compiler version string are also retrieved from the build-info file, and there is currently only one build-info file in the plugin corresponding to the latest source code. The fix would be to make this include multiple sets of artifact JSONs and build-info files with the plugin, and support searching through those different sets for a possible match. Previous artifact JSONs can be found in previous versions of the |
Additional implementation notes: Therefore, we can simplify the above to only include previous build-info files without previous artifact JSONs, and change the verification to read bytecode from the build-info files instead of artifact JSONs. Important: Another requirement is that before each release, we should have an automated way to add the build-info file from the previous release into the set of files for matching.
|
When performing Etherscan verification with the Hardhat Upgrades plugin's
verify
task, verification fails if the proxy contract was deployed from an older version of the Hardhat Upgrades plugin where the proxy contract source code or compiler version was different.For example, in this thread, an existing ProxyAdmin contract was previously deployed using compiler version 0.8.2 and failed to verify with compiler version 0.8.9.
We should include a repository of proxy contract artifacts from previous versions of the plugins, and attempt to verify against those.
The text was updated successfully, but these errors were encountered: