-
Notifications
You must be signed in to change notification settings - Fork 851
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(staking): return single struct responses for queries #1734
Conversation
ENG-2005 Single struct return from precompile queries - Staking precompile
CurrentWe were wrapping single struct responses in an array because there was an issue with returning the single struct directly. The solution was to wrap the struct in another struct so it can be packed correctly by the ABI in go-ethereum. ExpectedModify the queries and transactions that are wrapping the response in an array to return single struct responses to be more user friendly for SC developers and map correctly to the Cosmos SDK return types. |
Codecov Report
@@ Coverage Diff @@
## main #1734 +/- ##
==========================================
+ Coverage 70.33% 70.34% +0.01%
==========================================
Files 297 297
Lines 22275 22283 +8
==========================================
+ Hits 15667 15675 +8
Misses 5841 5841
Partials 767 767
|
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.
This API breaking. Can you add a changelog entry
…om/evmos/evmos into Vvaradinov/staking-single-response # Conflicts: # CHANGELOG.md
https://github.com/Mergifyio backport release/v14.0.x |
✅ Backports have been created
|
* fix: modify Staking interface and regenerate abi.json * fix: adjust return responses * fix: convert return types for queries into single structs * add CHANGELOG * fix: CHANGELOG (cherry picked from commit e47d230) # Conflicts: # CHANGELOG.md
https://github.com/Mergifyio backport release/v15.0.x |
✅ Backports have been created
|
* fix: modify Staking interface and regenerate abi.json * fix: adjust return responses * fix: convert return types for queries into single structs * add CHANGELOG * fix: CHANGELOG (cherry picked from commit e47d230) # Conflicts: # CHANGELOG.md # precompiles/staking/testdata/StakingCaller.json
) (#1895) * fix(staking): return single struct responses for queries (#1734) * fix: modify Staking interface and regenerate abi.json * fix: adjust return responses * fix: convert return types for queries into single structs * add CHANGELOG * fix: CHANGELOG (cherry picked from commit e47d230) # Conflicts: # CHANGELOG.md # precompiles/staking/testdata/StakingCaller.json * fix conflicts * fix conflicts * fix: regenerate ABI --------- Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: tom <tomasguerraalda@hotmail.com>
Description
This PR refactors some of the queries that previously were wrapped in a slice to avoid errors. Now they return a single struct response as expected from their Cosmos SDK return types.
Closes ENG-2005