-
Notifications
You must be signed in to change notification settings - Fork 608
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
Add Pool Type Query #2832
Add Pool Type Query #2832
Conversation
x/gamm/keeper/grpc_query.go
Outdated
|
||
switch pool := pool.(type) { | ||
case *balancer.Pool: | ||
return &types.QueryPoolTypeResponse{PoolType: "Balancer"}, nil |
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.
We should have this be exposed as a method on the pool interface, right?
Or at least, lets make a go API for keeper.PoolType(ctx, poolId) (string, error)
, to have it in a more discoverable point
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.
Changed to having go API, I would prefer having further discussion in adding pool type to PoolI
, I'd like to go ahead and open an issue for this for further discussion for this if you agree!
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.
SGTM
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.
Perfect!
Can you make a followup issue for discussing adding it to the poolI api?
Closes: #2739 ## What is the purpose of the change Adds pool type query to query the type of pool. The query would return a string of the type of pool in a string, depending on the type of pool, would return an error otherwise. ## Brief Changelog - Add pool type query ## Testing and Verifying Added new test cases ## Documentation and Release Note - Does this pull request introduce a new feature or user-facing behavior changes? yes - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`?yes - How is the feature or change documented? (not applicable / specification (`x/<module>/spec/`) / [Osmosis docs repo](https://github.com/osmosis-labs/docs) / not documented) (cherry picked from commit ae6a366) # Conflicts: # CHANGELOG.md
Closes: osmosis-labs#2739 ## What is the purpose of the change Adds pool type query to query the type of pool. The query would return a string of the type of pool in a string, depending on the type of pool, would return an error otherwise. ## Brief Changelog - Add pool type query ## Testing and Verifying Added new test cases ## Documentation and Release Note - Does this pull request introduce a new feature or user-facing behavior changes? yes - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`?yes - How is the feature or change documented? (not applicable / specification (`x/<module>/spec/`) / [Osmosis docs repo](https://github.com/osmosis-labs/docs) / not documented)
* Add Pool Type Query (#2832) Closes: #2739 ## What is the purpose of the change Adds pool type query to query the type of pool. The query would return a string of the type of pool in a string, depending on the type of pool, would return an error otherwise. ## Brief Changelog - Add pool type query ## Testing and Verifying Added new test cases ## Documentation and Release Note - Does this pull request introduce a new feature or user-facing behavior changes? yes - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`?yes - How is the feature or change documented? (not applicable / specification (`x/<module>/spec/`) / [Osmosis docs repo](https://github.com/osmosis-labs/docs) / not documented) (cherry picked from commit ae6a366) # Conflicts: # CHANGELOG.md * fix merge conflict Co-authored-by: Matt, Park <[email protected]> Co-authored-by: mattverse <[email protected]>
Closes: #2739
What is the purpose of the change
Adds pool type query to query the type of pool. The query would return a string of the type of pool in a string, depending on the type of pool, would return an error otherwise.
Brief Changelog
Testing and Verifying
Added new test cases
Documentation and Release Note
Unreleased
section inCHANGELOG.md
?yesx/<module>/spec/
) / Osmosis docs repo / not documented)