-
Notifications
You must be signed in to change notification settings - Fork 404
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
Etherscan metadata variations #976
Conversation
experiment to create files varations before running verification searching for perfect matches
…bytecode WIP * add tryToFindOriginalMetadata to CheckedContract: tries to recontruct the original metadata by iterating on all files variations * call tryToFindOriginalMetadata after `matchWithDeployedBytecode` if match is not perfect
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## staging #976 +/- ##
===========================================
- Coverage 77.56% 73.33% -4.24%
===========================================
Files 29 38 +9
Lines 1373 2171 +798
Branches 254 416 +162
===========================================
+ Hits 1065 1592 +527
- Misses 180 356 +176
- Partials 128 223 +95
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@kuzdogan PR is not ready but if you want to check what I did till now and give me some feedback, it's appreciated. |
…hash by updating the source section of the metadata and generating the metadata CID
* I translated the ipfsHash.cpp file from the solidity repo * now that everything is synchronous I simplified the code that replace the ipfs and bzz hash in the urls array in metadata.sources * I added some comments to clearify the storebyhash grouped by variation
TODO
|
Tests are failing because https://ipfs.io is down EDIT: it's not down, but it doesn't support anymore url with double slashes https://ipfs.io//ipfs/QmT82ab2aGqBc5owXEqmiE1NYfYEdWCKpc4V11ncummXit instead of https://ipfs.io/ipfs/QmT82ab2aGqBc5owXEqmiE1NYfYEdWCKpc4V11ncummXit |
@kuzdogan now I think we are ready for merge, wanna review again? |
Added some comments. Specifically how we return the match at Don't we have verification test cases? Like the one that is our starting point from Etherscan? |
what do you mean? |
I see the function is just unit tested but the reason we develop this at the first place is to be able to verify contracts perfectly when they have common and known changes in the metadata that we can try to fix. I was referring to the contracts in this issue #936 We should test the verification on those, as well as find and add other cases that we know. |
The contract in the test is actually one of those, the one from this comment: #936 (comment) |
Good, let's use it in the verification tests then. With that we will have tested the whole workflow and not just that part |
* test in verification.spec.ts
Co-authored-by: Kaan Uzdoğan <[email protected]>
* refactor `verifyDeployed` so that it uses the new function ´tryToFindOriginalMetadataAndMatch´
View in Huly HI-713