-
Notifications
You must be signed in to change notification settings - Fork 111
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
Fix contract deployment with value (0.117) #9703
Conversation
This PR fixes contract deployment when the contract deployment is made with value. This PR modifies : Modified ContractCallRequest - change the 'to' validation to check if the call is for contract deployment BytecodeUtils - Added a new method isInitBytecode which checks if a given data is an init bytecode - needed in ContractCallRequest validation ContractControllerTest - Added new test and modified a few existing ones based on the new changes to the validation of the to field. Modified ContractCallAddressThisTest - added tests for deployment of payable contract with and without value Modified ContractCallServiceERCTokenModificationFunctionsTest - added tests for deployment of non payable contract with and without value. --------- Signed-off-by: Kristiyan Selveliev <kristiyan.selveliev@limechain.tech>
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.
LGTM
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/0.117 #9703 +/- ##
===================================================
- Coverage 92.23% 92.22% -0.01%
- Complexity 7609 7622 +13
===================================================
Files 933 934 +1
Lines 32000 32019 +19
Branches 4042 4045 +3
===================================================
+ Hits 29515 29530 +15
- Misses 1536 1537 +1
- Partials 949 952 +3 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
Description:
Cherry pick fix from -> 6a42166
This PR fixes contract deployment when the contract deployment is made with value.
This PR modifies :
Modified ContractCallRequest - change the 'to' validation to check if the call is for contract deployment
BytecodeUtils - Added a new method isInitBytecode which checks if a given data is an init bytecode - needed in ContractCallRequest validation
ContractControllerTest - Added new test and modified a few existing ones based on the new changes to the validation of the to field.
Modified ContractCallAddressThisTest - added tests for deployment of payable contract with and without value
Modified ContractCallServiceERCTokenModificationFunctionsTest - added tests for deployment of non payable contract with and without value.
Related issue(s):
Fixes #9636
Notes for reviewer:
Checklist