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

Support Estimate Swap queries via grpc gateway #5810

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

mattverse
Copy link
Member

Closes: #5446

What is the purpose of the change

Currently Estimate swaps query are not supported via grpc gateway(also known as REST) since grpc gateway does not support querying repeated struct types.

This PR solves the problem by unraveling repeated structs into repeated structs of primitive types then using indexes to group them together in the grpc method layer.

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! Can you confirm both of these queries were tested in a local environment? If, please feel free to hit merge.

@mattverse
Copy link
Member Author

Found bug in process of testing this, confirmed it is working as expected now and added documentation

@czarcas7ic czarcas7ic self-assigned this Aug 1, 2023
@czarcas7ic
Copy link
Member

Merging now, thanks!

@czarcas7ic czarcas7ic merged commit 11d4797 into main Aug 2, 2023
@czarcas7ic czarcas7ic deleted the matttverse/estimate-grpc branch August 2, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Estimate Swap queries via grpc gateway
3 participants