-
Notifications
You must be signed in to change notification settings - Fork 954
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
Contract verification plugin #5221
Merged
Aniket-Engg
merged 100 commits into
ethereum:master
from
sourcifyeth:contract-verification-plugin
Oct 15, 2024
Merged
Contract verification plugin #5221
Aniket-Engg
merged 100 commits into
ethereum:master
from
sourcifyeth:contract-verification-plugin
Oct 15, 2024
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
👷 Deploy request for remixproject pending review.Visit the deploys page to approve it
|
manuelwedler
force-pushed
the
contract-verification-plugin
branch
from
September 27, 2024 15:13
691a6f5
to
51651d9
Compare
Only after adding the PluginClient (that imports @remixproject/plugin-webview) the contract-verification-plugin started to inherit Remix styles
The current compilerArtefacts plugin's existing methods had two flaws: 1. It wasn't possible to get all Compiler Abstracts available in one go. 2. It was possible to first get all files with `getAllContractsData` and then call each CompilerAbstract one by one with `getCompilerAbstract`, however, in that case the CompilerAbstract was missing the `input` because it wasn't passed to the contructor and saveCompilationPerFileResult. It was only done so for the `solidityUnitTesting` plugin listener. The compiler input is needed for consistent contract verification. While it's possible to generate a compiler input from the contract artefact, via the metadata, it is not always possible to get a match due to known bugs in compiler's AST generation in prev. versions. This results in different bytecode from the original compiler input's output vs the compilation output from the metadata file.
…contract selection.
manuelwedler
force-pushed
the
contract-verification-plugin
branch
from
October 15, 2024 10:02
7fee827
to
dacce46
Compare
Aniket-Engg
approved these changes
Oct 15, 2024
Aniket-Engg
approved these changes
Oct 15, 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.
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.
This PR adds a generalized contract verification plugin. Contracts written / compiled in Remix can be verified at Sourcify, Etherscan and Blockscout at the same time. It basically adds all the features the separate Etherscan and Sourcify plugins had and makes them obsolete.
Features:
The plugin isn't enabled by default yet, as I wasn't sure how to do it.
We had to make changes to the
compiler-artefacts.ts
to be able to get the compiler input JSON of contracts. Some more info about this here: sourcifyeth#1