Skip to content
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 function parameters #767

Merged
merged 9 commits into from
Jul 18, 2023
Merged

Conversation

bamzedev
Copy link
Contributor

@bamzedev bamzedev commented Jul 5, 2023

Description:
This PR fixes the issues that the SDK have with different types when interacting with smart contracts.
It has breaking changes as some functions are now returning different types, i.e. instead of uint now return int.

Maybe we need to create a new "wrapper" functions for the uint/int types as the current solution is very hard for the users to deal with.
Related issue(s):

Fixes #764, #769, #701

Notes for reviewer:
Currently some tests fail due to parallel execution. Will work on that.

Checklist

  • [ x ] Documented (Code comments, README, etc.)
  • [ x ] Tested (unit, integration, etc.)

@bamzedev bamzedev requested a review from SimiHunjan as a code owner July 5, 2023 07:29
@bamzedev bamzedev force-pushed the fix/smart-contract-int-calls branch 3 times, most recently from c62d75c to 408a595 Compare July 5, 2023 07:37
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage: 60.86% and project coverage change: +3.38 🎉

Comparison is base (25df50d) 57.78% compared to head (35da5de) 61.17%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #767      +/-   ##
===========================================
+ Coverage    57.78%   61.17%   +3.38%     
===========================================
  Files          163      163              
  Lines        32892    33624     +732     
===========================================
+ Hits         19007    20568    +1561     
+ Misses       12601    11764     -837     
- Partials      1284     1292       +8     
Impacted Files Coverage Δ
contract_function_parameters.go 55.09% <58.63%> (+50.15%) ⬆️
contract_function_result.go 72.60% <87.50%> (+58.65%) ⬆️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Outdated Show resolved Hide resolved
contract_function_parameters.go Show resolved Hide resolved
contract_function_result.go Outdated Show resolved Hide resolved
contract_function_result.go Show resolved Hide resolved
@bamzedev bamzedev force-pushed the fix/smart-contract-int-calls branch from fac2cc2 to aaa9863 Compare July 17, 2023 12:35
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
Signed-off-by: Emanuel Pargov <bamzedev@gmail.com>
@bamzedev bamzedev force-pushed the fix/smart-contract-int-calls branch from 67bd625 to 35da5de Compare July 18, 2023 12:25
@sonarcloud
Copy link

sonarcloud bot commented Jul 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bamzedev bamzedev merged commit a7c367c into develop Jul 18, 2023
7 checks passed
@bamzedev bamzedev deleted the fix/smart-contract-int-calls branch July 18, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Various issues when interacting with smart contracts with integers
2 participants