-
Notifications
You must be signed in to change notification settings - Fork 413
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
lib-sourcify
refactoring (w/ rebase)
#935
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
Move sourcify-chains out of @ethereum-sourcify/core to server. export supported- and monitoredChainsMap and -Array. Create new-VerificationService to wrap the lib-sourcify verification methods and hold supported chains. Update sourcify-chains types new-VerificationController initially with legacyVerify endpoint. All util functions are moved to new-VerificationController-util. Only endpoint functions will be in VerificationController to keep clean.
Add RepositoryService and Controller for repository related endpoints. Most of the code from previous core/FileService. Move event manager to src/services from core Add types used internally by the server
Rename new-VerificationController* to VerificationController and rename VerificationController to VerificationController.old.ts Use the new Verification- and Repository- -Service and -Controller in routes.ts Store verified contracts in refactored legacyVerifyEndpoint and add the necessary new funcitons to RepositoryService. Change `chain` to `chainId` everywhere
Write reusable (DRY) tests in verification.spec.ts for deploying and verifying contract. Structure the tests to always have metadata.json sources/ artifact.json Move the UsingLibrary test from server to lib-sourcify.
Instead of doing in two separate functions, run deploy and verify in a single function in tests
Also move metadata-inliner.json as it's placed there mistakenly. Remove timeout from tests acompilers it can take longer to download the compiler with slower networks (like airport WiFi 😒)
Do assertions on Match with a single function `expectMatch`. For that, return deployedAddress from deployCheckAndVerify
monitor tests are passing
compilation throws an error
Also change "inject" function name in monitor.ts. Don't pass bytecode into "inject" function
Since many files are moved and some code parts changed places, we need to rebase and sync with the head manually Adds the missing functons to find the creatorTx of a contract. Find and pass the creatorTx to the next verification step if verif. fails. Updates chains.json as in d43746 Updates added chains as was in d43746 Removes SOLC_REPO_TMP
This reverts commit e130b76.
Since the new UI of the Etherscan, the txRegex was broken for the updated Etherscan deployments. Fix the regex to fit both old and new version.
Use ethers `getContractAddress` instead of own function.
The old expected behavior of the API is returning an error with 500 when Bytecodes don't match and can't verify. The changes were returning a match to check and verify once again with the creatorTx. Instead go back to the old way and check the thrown error message for re-verifying with creatorTx.
kuzdogan
changed the title
Sourcify refactoring kaan rebase
Feb 21, 2023
lib-sourcify
refactoring (w/ rebase)
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.
Clean PR for #898
Cleans up the double commits occurred during rebasing to
staging
. Since some files (e.g.services/core/sourcify-chains.ts
) etc were removed by these changes and modified bystaging
, a manual rebase was required.View in Huly HI-708