-
Notifications
You must be signed in to change notification settings - Fork 607
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
Query osmo equivilent is staked via superfluid #1632
Query osmo equivilent is staked via superfluid #1632
Conversation
proto/osmosis/superfluid/query.proto
Outdated
@@ -70,6 +70,15 @@ service Query { | |||
"superfluid_delegations/{delegator_address}"; | |||
} | |||
|
|||
// Returns all the superfluid poistions for a specific delegator | |||
rpc SuperfluidOSMODelegationsByDelegator( |
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 is a mouthful haha. Any chance we can think of more abbreviated nomenclature.
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.
heee we can think of better names. How do u think about the logic
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.
I'm trying to understand what adding OSMO
to the query means? I read the original issue and I don't understand why we can't augment the current query (SuperfluidDelegationsByDelegator
)?
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.
@mattverse want to create a separate query (as i understant). Refer to #1539 (review)
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.
Should change to SuperfluidEquivilentDelegationsByDelegator?
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.
Looks much better :P
proto/osmosis/superfluid/query.proto
Outdated
@@ -187,6 +187,10 @@ message SuperfluidDelegationsByDelegatorResponse { | |||
(gogoproto.nullable) = false, | |||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | |||
]; | |||
cosmos.base.v1beta1.Coin total_equivilent_staked_amount = 3 [ |
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.
cosmos.base.v1beta1.Coin total_equivilent_staked_amount = 3 [ | |
cosmos.base.v1beta1.Coin total_equivalent_staked_amount = 3 [ |
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.
thank u xD i changed that
x/superfluid/keeper/grpc_query.go
Outdated
equivilentAmount := q.Keeper.GetSuperfluidOSMOTokens(ctx, baseDenom, lockedCoins.Amount) | ||
coin := sdk.NewCoin(appparams.BaseCoinUnit, equivilentAmount) |
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.
equivilentAmount := q.Keeper.GetSuperfluidOSMOTokens(ctx, baseDenom, lockedCoins.Amount) | |
coin := sdk.NewCoin(appparams.BaseCoinUnit, equivilentAmount) | |
equivalentAmount := q.Keeper.GetSuperfluidOSMOTokens(ctx, baseDenom, lockedCoins.Amount) | |
coin := sdk.NewCoin(appparams.BaseCoinUnit, equivalentAmount) |
minor nit
docs/core/proto-docs.md
Outdated
@@ -3691,6 +3692,7 @@ assets | |||
| ----- | ---- | ----- | ----------- | | |||
| `superfluid_delegation_records` | [SuperfluidDelegationRecord](#osmosis.superfluid.SuperfluidDelegationRecord) | repeated | | | |||
| `total_delegated_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | | |||
| `total_equivilent_staked_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | |
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.
I think this needs to be regenerated due to the typo
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 once proto-doc / typo is sorted out.
Thanks for adding this feature! Want to make a Changelog update? (Feature in unreleased)
Thank u, i missed. Also added entry to changelog. |
* fix proto * get osmo equivilent is staked via superfluid * format * fix go_fmt * Revert "fix go_fmt" This reverts commit 5407105. * augment SuperfluidDelegationsByDelegator query * remove fmt * format * fix spell * fix spell, changelog * query (cherry picked from commit 19fedeb) # Conflicts: # x/superfluid/keeper/grpc_query.go
* Query osmo equivilent is staked via superfluid (#1632) * fix proto * get osmo equivilent is staked via superfluid * format * fix go_fmt * Revert "fix go_fmt" This reverts commit 5407105. * augment SuperfluidDelegationsByDelegator query * remove fmt * format * fix spell * fix spell, changelog * query (cherry picked from commit 19fedeb) # Conflicts: # x/superfluid/keeper/grpc_query.go * resolved * fix lint Co-authored-by: Hieu Vu <[email protected]>
Closes: #1525
What is the purpose of the change