-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verification flow verification classes (#1879)
* implement Verifcation.ts * Refactor Verification.ts * Add tests * Add more tests * Add comment to tests * Add Vyper tests in Verification * refactor Verification class * handle ContructorTransformation * add comment * Refactor runtime bytecode matching and add call protection transformation * Refactor Verification class to use getter methods and improve encapsulation * Refactor AbstractCompilation to use protected properties and getter methods * Move check transformation functions into Verification class Refactor project structure and import paths in lib-sourcify * restore old `verification.ts` tests * fix constructor arguments trasformantion tests * restore old `types.ts` * add VerificationError class * Implement Vyper constructor argument transformation test * Pass forceEmscripten option to compilation call * Split library map into runtime and creation maps * replace expectMatch with expectVerification * fix "should verify a contract with viaIR:true, optimizer disabled, and compiler <0.8.21" test * Add test for library verification with call protection transformation * fix call protection test * increase coverage * add missing tests from verification.spec.ts increasing coverage * Refactor bytecode transformations and verification logic - Extracted transformation functions from the Verification class to a separate module - Added a new SolidityBugType enum to handle specific compilation scenarios - Improved error handling for RPC unavailability * fix linting * Refactor error handling and type definitions in Sourcify library * Update error handling for bytecode fetching in Sourcify verification * Remove unnecessary compilationTarget deletion in SolidityCompilation * Refactor bytecode matching method signature and remove unused context interface * Improve bytecode matching readability with descriptive variable names * Remove unused getter abiEncodedConstructorArguments in Verification class * Refactor Solidity settings type and improve bug handling in verification * Update SolidityBugType and improve error handling in verification tests * Renamed functions in Transformations.ts to use 'extract' prefix instead of 'checkAndCreate' * Simplify extra file input bug detection and remove redundant error handling * Refactor Solidity metadata and compiler settings types * fixes for PR comments * Validate the bytecode length for Solidity and Vyper compilations before proceeding with bytecode matching * do not use existing transformations/values in `matchBytecode`. * Fix extra-file-input-bug at bytecode mismatch error * fix `should return null match when there is no perfect match and no auxdata` * fix "maliciously verify with creation bytecode that startsWith the creatorTx input" test * fixes after PR review * Improve source file reading and verification error handling - Update source file reading to support nested directory structures - Clarify error message for bytecode matching with no auxdata - Improve test description for bytecode matching scenario --------- Co-authored-by: Manuel Wedler <[email protected]>
- Loading branch information
1 parent
02b208a
commit 337fd91
Showing
157 changed files
with
22,277 additions
and
168 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.