From dd4e426c8d30f4ea76bfad6569738330fcf2a5a3 Mon Sep 17 00:00:00 2001 From: jelysn <129082781+jelysn@users.noreply.github.com> Date: Thu, 27 Jun 2024 22:31:12 +0800 Subject: [PATCH] Locked tokens query (#626) * amm hook fix when executed through leveragelp * add query for locked tokens in commitment and locked tokens in leveragelp position --- docs/static/openapi.yml | 108 ++++ proto/elys/commitment/query.proto | 22 + proto/elys/leveragelp/query.proto | 8 +- scripts/examples/commitment/commitment.sh | 11 + scripts/examples/leveragelp/leveragelp.sh | 3 + x/commitment/client/cli/query.go | 1 + .../client/cli/query_show_commitments.go | 29 + x/commitment/keeper/query.go | 16 + x/commitment/types/commitments.go | 16 + x/commitment/types/query.pb.go | 581 +++++++++++++++++- x/commitment/types/query.pb.gw.go | 111 +++- x/leveragelp/keeper/query_position.go | 8 +- x/leveragelp/types/query.pb.go | 253 +++++--- 13 files changed, 1018 insertions(+), 149 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 1907f32e8..53505c8e7 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -39963,6 +39963,77 @@ paths: additionalProperties: {} tags: - Query + /elys-network/elys/commitment/committed_tokens_locked/{address}: + get: + summary: Queries sum of committed tokens locked and not unlockable + operationId: ElysCommitmentCommittedTokensLocked + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + locked_committed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + total_committed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + in: path + required: true + type: string + tags: + - Query /elys-network/elys/commitment/number_of_commitments: get: summary: Queries the total number of commitment items. @@ -41244,6 +41315,8 @@ paths: format: uint64 stop_loss_price: type: string + locked_lp_token: + type: string default: description: An unexpected error response. schema: @@ -86377,6 +86450,39 @@ definitions: type: string format: uint64 description: Params defines the parameters for the module. + elys.commitment.QueryCommittedTokensLockedResponse: + type: object + properties: + address: + type: string + locked_committed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + total_committed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. elys.commitment.QueryNumberOfCommitmentsResponse: type: object properties: @@ -87145,6 +87251,8 @@ definitions: format: uint64 stop_loss_price: type: string + locked_lp_token: + type: string elys.leveragelp.PositionsByPoolResponse: type: object properties: diff --git a/proto/elys/commitment/query.proto b/proto/elys/commitment/query.proto index 5a3611dba..64ac29db7 100644 --- a/proto/elys/commitment/query.proto +++ b/proto/elys/commitment/query.proto @@ -8,6 +8,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "elys/commitment/params.proto"; import "elys/commitment/commitments.proto"; import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/elys-network/elys/x/commitment/types"; @@ -23,6 +24,11 @@ service Query { option (google.api.http).get = "/elys-network/elys/commitment/show_commitments/{creator}"; } + // Queries sum of committed tokens locked and not unlockable + rpc CommittedTokensLocked (QueryCommittedTokensLockedRequest) returns (QueryCommittedTokensLockedResponse) { + option (google.api.http).get = "/elys-network/elys/commitment/committed_tokens_locked/{address}"; + } + // Queries the total number of commitment items. rpc NumberOfCommitments (QueryNumberOfCommitmentsRequest) returns (QueryNumberOfCommitmentsResponse) { option (google.api.http).get = "/elys-network/elys/commitment/number_of_commitments"; @@ -50,3 +56,19 @@ message QueryNumberOfCommitmentsRequest {} message QueryNumberOfCommitmentsResponse { int64 number = 1; } + +message QueryCommittedTokensLockedRequest { + string address = 1; +} + +message QueryCommittedTokensLockedResponse { + string address = 1; + repeated cosmos.base.v1beta1.Coin locked_committed = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin total_committed = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/proto/elys/leveragelp/query.proto b/proto/elys/leveragelp/query.proto index e55171c40..9ca22b92d 100644 --- a/proto/elys/leveragelp/query.proto +++ b/proto/elys/leveragelp/query.proto @@ -172,7 +172,13 @@ message PositionRequest { uint64 id = 2; } -message PositionResponse { Position position = 1; } +message PositionResponse { + Position position = 1; + string locked_lp_token = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} message QueryLiquidationPriceRequest { string address = 1; diff --git a/scripts/examples/commitment/commitment.sh b/scripts/examples/commitment/commitment.sh index 80538db0d..14493d8da 100644 --- a/scripts/examples/commitment/commitment.sh +++ b/scripts/examples/commitment/commitment.sh @@ -3,5 +3,16 @@ elysd query commitment number-of-commitments # number: "395166" +elysd query commitment committed-tokens-locked $(elysd keys show -a treasury --keyring-backend=test) +# address: elys12tzylat4udvjj56uuhu3vj2n4vgp7cf9fwna9w +# locked_committed: +# - amount: "110000000000000000000000" +# denom: amm/pool/1 +# total_committed: +# - amount: "110000000000000000000000" +# denom: amm/pool/1 +# - amount: "100000000" +# denom: stablestake/share + elysd tx commitment commit-claimed-rewards 503544 ueden --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000 elysd tx commitment commit-claimed-rewards 1678547 uedenb --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000 diff --git a/scripts/examples/leveragelp/leveragelp.sh b/scripts/examples/leveragelp/leveragelp.sh index 51e05e9f8..bc66d74f8 100644 --- a/scripts/examples/leveragelp/leveragelp.sh +++ b/scripts/examples/leveragelp/leveragelp.sh @@ -2,6 +2,7 @@ # list pool elysd query leveragelp list-pool +elysd query leveragelp get-position $(elysd keys show -a treasury --keyring-backend=test) 1 elysd query leveragelp get-positions-for-address $(elysd keys show -a treasury --keyring-backend=test) elysd query leveragelp get-positions elysd query leveragelp params @@ -25,6 +26,7 @@ elysd tx leveragelp open 5.0 uusdc 5000000 1 0.0 --from=treasury --keyring-backe elysd tx leveragelp open [leverage] [collateral-asset] [collateral-amount] [amm-pool-id] [flags] # Close position +elysd tx leveragelp close 2 25000000000000000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000 elysd tx leveragelp close 1 500000000000000000 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000 elysd tx leveragelp close [position-id] [flags] @@ -36,6 +38,7 @@ elysd query leveragelp rewards $(elysd keys show -a treasury --keyring-backend=t elysd tx leveragelp claim-rewards 1 --from=treasury --keyring-backend=test --chain-id=elystestnet-1 --yes --gas=1000000 elysd query commitment show-commitments $(elysd keys show -a treasury --keyring-backend=test) +elysd query commitment committed-tokens-locked $(elysd keys show -a treasury --keyring-backend=test) # Testnet elysd query oracle show-price ATOM --node=https://rpc.testnet.elys.network:443 diff --git a/x/commitment/client/cli/query.go b/x/commitment/client/cli/query.go index 6ff7baf4f..852b1acfe 100644 --- a/x/commitment/client/cli/query.go +++ b/x/commitment/client/cli/query.go @@ -27,6 +27,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdQueryParams()) cmd.AddCommand(CmdShowCommitments()) cmd.AddCommand(CmdNumberOfCommitments()) + cmd.AddCommand(CmdCommittedTokensLocked()) // this line is used by starport scaffolding # 1 diff --git a/x/commitment/client/cli/query_show_commitments.go b/x/commitment/client/cli/query_show_commitments.go index f278caae9..fee98b258 100644 --- a/x/commitment/client/cli/query_show_commitments.go +++ b/x/commitment/client/cli/query_show_commitments.go @@ -36,6 +36,35 @@ func CmdShowCommitments() *cobra.Command { return cmd } +func CmdCommittedTokensLocked() *cobra.Command { + cmd := &cobra.Command{ + Use: "committed-tokens-locked [address]", + Short: "Show locked coins in commitment not unlockable", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + params := &types.QueryCommittedTokensLockedRequest{ + Address: args[0], + } + res, err := queryClient.CommittedTokensLocked(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + func CmdNumberOfCommitments() *cobra.Command { cmd := &cobra.Command{ Use: "number-of-commitments", diff --git a/x/commitment/keeper/query.go b/x/commitment/keeper/query.go index 373b87987..efd4a527d 100644 --- a/x/commitment/keeper/query.go +++ b/x/commitment/keeper/query.go @@ -29,3 +29,19 @@ func (k Keeper) NumberOfCommitments(goCtx context.Context, req *types.QueryNumbe ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryNumberOfCommitmentsResponse{Number: k.TotalNumberOfCommitments(ctx)}, nil } + +func (k Keeper) CommittedTokensLocked(goCtx context.Context, req *types.QueryCommittedTokensLockedRequest) (*types.QueryCommittedTokensLockedResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + commitments := k.GetCommitments(ctx, req.Address) + totalLocked, totalCommitted := commitments.CommittedTokensLocked(ctx) + return &types.QueryCommittedTokensLockedResponse{ + Address: req.Address, + LockedCommitted: totalLocked, + TotalCommitted: totalCommitted, + }, nil +} diff --git a/x/commitment/types/commitments.go b/x/commitment/types/commitments.go index c7b5c18ec..b26f6d19b 100644 --- a/x/commitment/types/commitments.go +++ b/x/commitment/types/commitments.go @@ -64,6 +64,22 @@ func (c *Commitments) AddCommittedTokens(denom string, amount math.Int, unlockTi c.CommittedTokens = append(c.CommittedTokens, committedToken) } +func (c Commitments) CommittedTokensLocked(ctx sdk.Context) (sdk.Coins, sdk.Coins) { + totalLocked := sdk.Coins{} + totalCommitted := sdk.Coins{} + for _, token := range c.CommittedTokens { + lockedAmount := sdk.ZeroInt() + for _, lockup := range token.Lockups { + if lockup.UnlockTimestamp > uint64(ctx.BlockTime().Unix()) { + lockedAmount = lockedAmount.Add(lockup.Amount) + } + } + totalLocked = totalLocked.Add(sdk.NewCoin(token.Denom, lockedAmount)) + totalCommitted = totalCommitted.Add(sdk.NewCoin(token.Denom, token.Amount)) + } + return totalLocked, totalCommitted +} + func (c *Commitments) DeductFromCommitted(denom string, amount math.Int, currTime uint64) error { for i, token := range c.CommittedTokens { if token.Denom == denom { diff --git a/x/commitment/types/query.pb.go b/x/commitment/types/query.pb.go index db0c5aade..64d96f8d8 100644 --- a/x/commitment/types/query.pb.go +++ b/x/commitment/types/query.pb.go @@ -6,6 +6,8 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -282,6 +284,110 @@ func (m *QueryNumberOfCommitmentsResponse) GetNumber() int64 { return 0 } +type QueryCommittedTokensLockedRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryCommittedTokensLockedRequest) Reset() { *m = QueryCommittedTokensLockedRequest{} } +func (m *QueryCommittedTokensLockedRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCommittedTokensLockedRequest) ProtoMessage() {} +func (*QueryCommittedTokensLockedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3594c973c98f55d7, []int{6} +} +func (m *QueryCommittedTokensLockedRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommittedTokensLockedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommittedTokensLockedRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCommittedTokensLockedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommittedTokensLockedRequest.Merge(m, src) +} +func (m *QueryCommittedTokensLockedRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCommittedTokensLockedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommittedTokensLockedRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommittedTokensLockedRequest proto.InternalMessageInfo + +func (m *QueryCommittedTokensLockedRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type QueryCommittedTokensLockedResponse struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + LockedCommitted github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=locked_committed,json=lockedCommitted,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"locked_committed"` + TotalCommitted github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=total_committed,json=totalCommitted,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_committed"` +} + +func (m *QueryCommittedTokensLockedResponse) Reset() { *m = QueryCommittedTokensLockedResponse{} } +func (m *QueryCommittedTokensLockedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCommittedTokensLockedResponse) ProtoMessage() {} +func (*QueryCommittedTokensLockedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3594c973c98f55d7, []int{7} +} +func (m *QueryCommittedTokensLockedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommittedTokensLockedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommittedTokensLockedResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCommittedTokensLockedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommittedTokensLockedResponse.Merge(m, src) +} +func (m *QueryCommittedTokensLockedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCommittedTokensLockedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommittedTokensLockedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommittedTokensLockedResponse proto.InternalMessageInfo + +func (m *QueryCommittedTokensLockedResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *QueryCommittedTokensLockedResponse) GetLockedCommitted() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.LockedCommitted + } + return nil +} + +func (m *QueryCommittedTokensLockedResponse) GetTotalCommitted() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalCommitted + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "elys.commitment.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "elys.commitment.QueryParamsResponse") @@ -289,44 +395,57 @@ func init() { proto.RegisterType((*QueryShowCommitmentsResponse)(nil), "elys.commitment.QueryShowCommitmentsResponse") proto.RegisterType((*QueryNumberOfCommitmentsRequest)(nil), "elys.commitment.QueryNumberOfCommitmentsRequest") proto.RegisterType((*QueryNumberOfCommitmentsResponse)(nil), "elys.commitment.QueryNumberOfCommitmentsResponse") + proto.RegisterType((*QueryCommittedTokensLockedRequest)(nil), "elys.commitment.QueryCommittedTokensLockedRequest") + proto.RegisterType((*QueryCommittedTokensLockedResponse)(nil), "elys.commitment.QueryCommittedTokensLockedResponse") } func init() { proto.RegisterFile("elys/commitment/query.proto", fileDescriptor_3594c973c98f55d7) } var fileDescriptor_3594c973c98f55d7 = []byte{ - // 504 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0x6b, 0x06, 0x45, 0xf3, 0x0e, 0x13, 0xde, 0x04, 0x53, 0x56, 0x65, 0x5b, 0x98, 0x10, - 0x9a, 0xb6, 0x9a, 0x6e, 0x9a, 0x40, 0xe3, 0x82, 0xca, 0x69, 0x12, 0xe2, 0x47, 0xb8, 0x71, 0x99, - 0x9c, 0xca, 0x4b, 0x23, 0x16, 0xbf, 0x2c, 0x76, 0x29, 0x15, 0xe2, 0x00, 0x7f, 0x01, 0x12, 0xff, - 0x04, 0xc7, 0xdd, 0xf8, 0x17, 0x76, 0x9c, 0xc4, 0x85, 0x13, 0x42, 0x2d, 0x12, 0xff, 0x02, 0x47, - 0x14, 0xdb, 0x55, 0x43, 0x92, 0x56, 0xec, 0x12, 0xd9, 0x7e, 0xdf, 0xf7, 0x7d, 0x1f, 0xbf, 0xe7, - 0xe0, 0x55, 0x7e, 0x32, 0x90, 0xb4, 0x03, 0x71, 0x1c, 0xa9, 0x98, 0x0b, 0x45, 0x4f, 0x7b, 0x3c, - 0x1d, 0x34, 0x93, 0x14, 0x14, 0x90, 0xc5, 0x2c, 0xd8, 0x9c, 0x04, 0x9d, 0xe5, 0x10, 0x42, 0xd0, - 0x31, 0x9a, 0xad, 0x8c, 0xcc, 0x69, 0x84, 0x00, 0xe1, 0x09, 0xa7, 0x2c, 0x89, 0x28, 0x13, 0x02, - 0x14, 0x53, 0x11, 0x08, 0x69, 0xa3, 0x5b, 0x1d, 0x90, 0x31, 0x48, 0x1a, 0x30, 0xc9, 0x8d, 0x3b, - 0x7d, 0xd3, 0x0a, 0xb8, 0x62, 0x2d, 0x9a, 0xb0, 0x30, 0x12, 0x5a, 0x3c, 0x76, 0x2a, 0xd2, 0x24, - 0x2c, 0x65, 0xf1, 0xd8, 0x69, 0xa3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, 0x1d, 0xb2, 0x49, 0x33, 0xf5, 0x8e, - 0xe0, 0xaa, 0x0f, 0xe9, 0x6b, 0x5a, 0xfd, 0x60, 0xc8, 0x19, 0xc2, 0x8b, 0x85, 0x9e, 0x92, 0xed, - 0xea, 0x3a, 0xd5, 0x33, 0x73, 0x76, 0xfe, 0x53, 0x6d, 0xf1, 0x1e, 0x69, 0xbc, 0x03, 0xf2, 0x60, - 0x36, 0x9e, 0xec, 0x42, 0xff, 0x28, 0x37, 0x15, 0xfa, 0xce, 0xbe, 0x84, 0xf7, 0xe4, 0x2b, 0xc2, - 0x4b, 0x15, 0x8d, 0x27, 0xf7, 0xaa, 0x41, 0xa6, 0x8f, 0xd1, 0x69, 0x5d, 0x22, 0xc3, 0xe2, 0x3f, - 0xd4, 0xf8, 0xfb, 0x64, 0x6f, 0x36, 0xbe, 0x99, 0xf5, 0x11, 0x1c, 0xe7, 0xef, 0xd0, 0x3e, 0x3c, - 0x1f, 0xba, 0xe8, 0x62, 0xe8, 0xa2, 0x9f, 0x43, 0x17, 0x7d, 0x1a, 0xb9, 0xb5, 0x8b, 0x91, 0x5b, - 0xfb, 0x3e, 0x72, 0x6b, 0xaf, 0x68, 0x18, 0xa9, 0x6e, 0x2f, 0xc8, 0x50, 0x2a, 0x8c, 0xdf, 0xe6, - 0xad, 0xd5, 0x20, 0xe1, 0x32, 0xa8, 0xeb, 0x7f, 0x76, 0xef, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xe7, 0x64, 0x3e, 0xd4, 0x97, 0x04, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0xd4, 0x40, + 0x14, 0xdf, 0x82, 0xac, 0x61, 0x48, 0x5c, 0x1d, 0x50, 0xb1, 0x90, 0x02, 0x95, 0x18, 0x42, 0xa0, + 0x03, 0x4b, 0x88, 0x06, 0x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0e, 0x44, 0x07, 0xca, 0xf9, 0x87, 0xf0, 0x93, + 0x06, 0x46, 0x33, 0x56, 0x16, 0x2e, 0x65, 0xab, 0xea, 0x7f, 0x01, 0xe8, 0xcb, 0xe7, 0xa8, 0x50, + 0x5d, 0xdc, 0x15, 0x5d, 0xac, 0xc2, 0x95, 0xfc, 0x2e, 0xe4, 0x2d, 0x51, 0xa5, 0x5b, 0xe9, 0xef, + 0x51, 0xd9, 0x38, 0x3e, 0x35, 0xb4, 0x93, 0x53, 0x43, 0xfb, 0x79, 0x6a, 0x68, 0x6f, 0xcf, 0x8c, + 0xc2, 0xc9, 0x99, 0x51, 0xf8, 0x76, 0x66, 0x14, 0x5e, 0xa2, 0xd4, 0x6a, 0xf4, 0x02, 0xbf, 0x4a, + 0x43, 0x8b, 0x3d, 0xa9, 0x15, 0xc5, 0x6d, 0xbf, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0xee, 0xe6, + 0x00, 0xd2, 0xf1, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -345,6 +464,8 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a Commitment item. ShowCommitments(ctx context.Context, in *QueryShowCommitmentsRequest, opts ...grpc.CallOption) (*QueryShowCommitmentsResponse, error) + // Queries sum of committed tokens locked and not unlockable + CommittedTokensLocked(ctx context.Context, in *QueryCommittedTokensLockedRequest, opts ...grpc.CallOption) (*QueryCommittedTokensLockedResponse, error) // Queries the total number of commitment items. NumberOfCommitments(ctx context.Context, in *QueryNumberOfCommitmentsRequest, opts ...grpc.CallOption) (*QueryNumberOfCommitmentsResponse, error) } @@ -375,6 +496,15 @@ func (c *queryClient) ShowCommitments(ctx context.Context, in *QueryShowCommitme return out, nil } +func (c *queryClient) CommittedTokensLocked(ctx context.Context, in *QueryCommittedTokensLockedRequest, opts ...grpc.CallOption) (*QueryCommittedTokensLockedResponse, error) { + out := new(QueryCommittedTokensLockedResponse) + err := c.cc.Invoke(ctx, "/elys.commitment.Query/CommittedTokensLocked", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) NumberOfCommitments(ctx context.Context, in *QueryNumberOfCommitmentsRequest, opts ...grpc.CallOption) (*QueryNumberOfCommitmentsResponse, error) { out := new(QueryNumberOfCommitmentsResponse) err := c.cc.Invoke(ctx, "/elys.commitment.Query/NumberOfCommitments", in, out, opts...) @@ -390,6 +520,8 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a Commitment item. ShowCommitments(context.Context, *QueryShowCommitmentsRequest) (*QueryShowCommitmentsResponse, error) + // Queries sum of committed tokens locked and not unlockable + CommittedTokensLocked(context.Context, *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) // Queries the total number of commitment items. NumberOfCommitments(context.Context, *QueryNumberOfCommitmentsRequest) (*QueryNumberOfCommitmentsResponse, error) } @@ -404,6 +536,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) ShowCommitments(ctx context.Context, req *QueryShowCommitmentsRequest) (*QueryShowCommitmentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ShowCommitments not implemented") } +func (*UnimplementedQueryServer) CommittedTokensLocked(ctx context.Context, req *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommittedTokensLocked not implemented") +} func (*UnimplementedQueryServer) NumberOfCommitments(ctx context.Context, req *QueryNumberOfCommitmentsRequest) (*QueryNumberOfCommitmentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NumberOfCommitments not implemented") } @@ -448,6 +583,24 @@ func _Query_ShowCommitments_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_CommittedTokensLocked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCommittedTokensLockedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CommittedTokensLocked(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/elys.commitment.Query/CommittedTokensLocked", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CommittedTokensLocked(ctx, req.(*QueryCommittedTokensLockedRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_NumberOfCommitments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNumberOfCommitmentsRequest) if err := dec(in); err != nil { @@ -478,6 +631,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ShowCommitments", Handler: _Query_ShowCommitments_Handler, }, + { + MethodName: "CommittedTokensLocked", + Handler: _Query_CommittedTokensLocked_Handler, + }, { MethodName: "NumberOfCommitments", Handler: _Query_NumberOfCommitments_Handler, @@ -657,6 +814,94 @@ func (m *QueryNumberOfCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *QueryCommittedTokensLockedRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCommittedTokensLockedRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommittedTokensLockedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCommittedTokensLockedResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCommittedTokensLockedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommittedTokensLockedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalCommitted) > 0 { + for iNdEx := len(m.TotalCommitted) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalCommitted[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.LockedCommitted) > 0 { + for iNdEx := len(m.LockedCommitted) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LockedCommitted[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -733,6 +978,44 @@ func (m *QueryNumberOfCommitmentsResponse) Size() (n int) { return n } +func (m *QueryCommittedTokensLockedRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCommittedTokensLockedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.LockedCommitted) > 0 { + for _, e := range m.LockedCommitted { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.TotalCommitted) > 0 { + for _, e := range m.TotalCommitted { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1156,6 +1439,238 @@ func (m *QueryNumberOfCommitmentsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryCommittedTokensLockedRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCommittedTokensLockedRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommittedTokensLockedRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCommittedTokensLockedResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCommittedTokensLockedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommittedTokensLockedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockedCommitted", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockedCommitted = append(m.LockedCommitted, types.Coin{}) + if err := m.LockedCommitted[len(m.LockedCommitted)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalCommitted", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalCommitted = append(m.TotalCommitted, types.Coin{}) + if err := m.TotalCommitted[len(m.TotalCommitted)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/commitment/types/query.pb.gw.go b/x/commitment/types/query.pb.gw.go index 06de3eadb..342e77911 100644 --- a/x/commitment/types/query.pb.gw.go +++ b/x/commitment/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -105,6 +103,60 @@ func local_request_Query_ShowCommitments_0(ctx context.Context, marshaler runtim } +func request_Query_CommittedTokensLocked_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommittedTokensLockedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.CommittedTokensLocked(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CommittedTokensLocked_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommittedTokensLockedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.CommittedTokensLocked(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_NumberOfCommitments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNumberOfCommitmentsRequest var metadata runtime.ServerMetadata @@ -126,14 +178,12 @@ func local_request_Query_NumberOfCommitments_0(ctx context.Context, marshaler ru // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -141,7 +191,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -155,8 +204,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ShowCommitments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -164,7 +211,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ShowCommitments_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -175,11 +221,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_CommittedTokensLocked_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CommittedTokensLocked_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CommittedTokensLocked_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_NumberOfCommitments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -187,7 +251,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_NumberOfCommitments_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -279,6 +342,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_CommittedTokensLocked_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CommittedTokensLocked_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CommittedTokensLocked_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_NumberOfCommitments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -307,6 +390,8 @@ var ( pattern_Query_ShowCommitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "commitment", "show_commitments", "creator"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_CommittedTokensLocked_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "commitment", "committed_tokens_locked", "address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_NumberOfCommitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "commitment", "number_of_commitments"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -315,5 +400,7 @@ var ( forward_Query_ShowCommitments_0 = runtime.ForwardResponseMessage + forward_Query_CommittedTokensLocked_0 = runtime.ForwardResponseMessage + forward_Query_NumberOfCommitments_0 = runtime.ForwardResponseMessage ) diff --git a/x/leveragelp/keeper/query_position.go b/x/leveragelp/keeper/query_position.go index e53ace11e..893259ca1 100644 --- a/x/leveragelp/keeper/query_position.go +++ b/x/leveragelp/keeper/query_position.go @@ -22,7 +22,13 @@ func (k Keeper) Position(goCtx context.Context, req *types.PositionRequest) (*ty return nil, err } - return &types.PositionResponse{Position: &position}, nil + commitments := k.commKeeper.GetCommitments(ctx, position.GetPositionAddress().String()) + totalLocked, _ := commitments.CommittedTokensLocked(ctx) + + return &types.PositionResponse{ + Position: &position, + LockedLpToken: totalLocked.AmountOf(ammtypes.GetPoolShareDenom(position.AmmPoolId)), + }, nil } func (k Keeper) LiquidationPrice(goCtx context.Context, req *types.QueryLiquidationPriceRequest) (*types.QueryLiquidationPriceResponse, error) { diff --git a/x/leveragelp/types/query.pb.go b/x/leveragelp/types/query.pb.go index ecb05dd58..52a649272 100644 --- a/x/leveragelp/types/query.pb.go +++ b/x/leveragelp/types/query.pb.go @@ -936,7 +936,8 @@ func (m *PositionRequest) GetId() uint64 { } type PositionResponse struct { - Position *Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` + Position *Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` + LockedLpToken github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=locked_lp_token,json=lockedLpToken,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"locked_lp_token"` } func (m *PositionResponse) Reset() { *m = PositionResponse{} } @@ -1444,107 +1445,109 @@ func init() { func init() { proto.RegisterFile("elys/leveragelp/query.proto", fileDescriptor_76659893e638cc9b) } var fileDescriptor_76659893e638cc9b = []byte{ - // 1595 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00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 0x95, - 0x4a, 0xc1, 0xa5, 0xbe, 0x40, 0x34, 0x16, 0xfb, 0x80, 0x92, 0x56, 0x2b, 0x15, 0x57, 0x28, 0xaf, - 0x45, 0xa8, 0x49, 0xf5, 0x4c, 0xcd, 0xb7, 0x02, 0x1c, 0x88, 0x41, 0x78, 0x62, 0x08, 0x9a, 0x80, - 0xb1, 0xab, 0x8e, 0xea, 0x54, 0x83, 0x72, 0xbb, 0x03, 0xe3, 0xfe, 0x02, 0x07, 0x29, 0xc1, 0x7e, - 0x6a, 0x62, 0xa3, 0xe0, 0x7b, 0x2f, 0x94, 0x68, 0xd5, 0x70, 0x38, 0x61, 0x53, 0xee, 0x96, 0x8f, - 0xf0, 0x82, 0xbb, 0x81, 0xce, 0xc0, 0x01, 0x9d, 0x6c, 0x62, 0x87, 0x54, 0x70, 0x54, 0x27, 0xc5, - 0x74, 0x66, 0xfc, 0xed, 0x26, 0x3d, 0xf1, 0x7d, 0xc8, 0x04, 0x3c, 0x5d, 0xa6, 0xd6, 0xaa, 0xa6, - 0x59, 0xd8, 0x0e, 0x2a, 0x75, 0x16, 0x86, 0x55, 0x6f, 0x85, 0x79, 0x4e, 0x2b, 0xfe, 0xcf, 0x3d, - 0x4b, 0xd4, 0xf7, 0x02, 0x1c, 0x6c, 0x09, 0xe0, 0x89, 0x49, 0xd6, 0x75, 0x98, 0xbc, 0x76, 0x83, - 0x38, 0x58, 0x27, 0xb6, 0xb3, 0xd7, 0x27, 0x78, 0x0b, 0xa6, 0x42, 0xb6, 0x79, 0xc8, 0x87, 0x20, - 0x5d, 0xf3, 0x17, 0x59, 0xc8, 0x69, 0xa5, 0xb1, 0xb0, 0x77, 0x71, 0x9d, 0x84, 0xe9, 0xbc, 0x1d, - 0x78, 0xc7, 0x5a, 0xc7, 0x9c, 0x8b, 0x6f, 0xc1, 0x4c, 0x44, 0x83, 0x23, 0x4e, 0x2e, 0x93, 0xa3, - 0x30, 0x4e, 0xec, 0x42, 0xad, 0xa1, 0xc3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, 0xf3, - 0x49, 0xb7, 0x95, 0x1a, 0x34, 0xfd, 0x71, 0x64, 0x5f, 0x0a, 0x30, 0xd6, 0x34, 0x49, 0xa0, 0xa3, - 0x31, 0xbf, 0xad, 0x66, 0x93, 0xcc, 0x42, 0x27, 0x31, 0x0e, 0xf1, 0x39, 0x06, 0x51, 0x42, 0x4b, - 0xed, 0x21, 0x12, 0x3b, 0x17, 0x1a, 0x4d, 0xd0, 0x47, 0x02, 0x0c, 0xb0, 0x03, 0x73, 0x24, 0xe6, - 0xa6, 0xc5, 0x74, 0x92, 0x39, 0xda, 0x41, 0x8a, 0x63, 0x59, 0x66, 0x58, 0x96, 0xd0, 0xf1, 0x4e, - 0xe9, 0x75, 0x4f, 0x07, 0x9b, 0x70, 0x76, 0xd0, 0x67, 0x02, 0x0c, 0xba, 0x46, 0xec, 0x24, 0x28, - 0xcd, 0x23, 0x4b, 0x12, 0x94, 0xc8, 0xe0, 0x21, 0x9e, 0x63, 0x50, 0x56, 0xd0, 0xe9, 0x6e, 0xa0, - 0x44, 0x93, 0xf6, 0x89, 0x00, 0x23, 0x7e, 0x19, 0xa3, 0xf9, 0xe4, 0x2e, 0x9f, 0x43, 0x3a, 0xdc, - 0x46, 0x82, 0xc3, 0x39, 0xcf, 0xe0, 0x9c, 0x45, 0x2b, 0xdd, 0x15, 0x7e, 0xb8, 0xd6, 0x89, 0xb6, - 0x83, 0x7e, 0x12, 0x60, 0x32, 0xda, 0xe5, 0xa3, 0x5c, 0x6b, 0x26, 0x12, 0x06, 0x8d, 0x8c, 0xd4, - 0xad, 0x38, 0x87, 0x7c, 0x89, 0x41, 0x7e, 0x11, 0x9d, 0x6f, 0x0f, 0x59, 0x6f, 0xe8, 0x17, 0xd8, - 0xbc, 0x20, 0x6f, 0x87, 0x9a, 0xa4, 0x1d, 0xf4, 0xb1, 0x00, 0xc3, 0xbc, 0x59, 0x4e, 0xca, 0x70, - 0xf3, 0x5c, 0x91, 0x94, 0xe1, 0x48, 0xc7, 0x2d, 0xae, 0x30, 0x7c, 0x32, 0xca, 0xb5, 0xc7, 0xc7, - 0xfe, 0x5a, 0xc2, 0xb6, 0x43, 0x2a, 0x0c, 0xa3, 0x5b, 0x6f, 0x23, 0x7e, 0xdf, 0x81, 0x12, 0x5c, - 0x45, 0xba, 0xd7, 0x16, 0x67, 0xb1, 0x65, 0xfb, 0x22, 0x9e, 0x61, 0x90, 0x4e, 0x22, 0xa9, 0x3d, - 0xa4, 0x92, 0xab, 0x17, 0xc6, 0xf4, 0xa9, 0x00, 0xc3, 0xbc, 0x39, 0x4a, 0xe2, 0xa8, 0xb9, 0x8b, - 0x4d, 0xe2, 0x28, 0xd2, 0x12, 0x8a, 0x67, 0x19, 0xa0, 0x53, 0x48, 0x6e, 0x0f, 0x88, 0x77, 0x7e, - 0x8d, 0xaa, 0x5b, 0xcb, 0xdf, 0x7f, 0x94, 0x15, 0x1e, 0x3c, 0xca, 0x0a, 0x7f, 0x3d, 0xca, 0x0a, - 0xf7, 0x76, 0xb3, 0x7d, 0x0f, 0x76, 0xb3, 0x7d, 0xbf, 0xef, 0x66, 0xfb, 0xae, 0xcb, 0xa1, 0x8e, - 0x26, 0x6e, 0xf4, 0x4e, 0xec, 0x2f, 0xe9, 0xe2, 0x10, 0xfb, 0xdf, 0xf9, 0xf4, 0xbf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xc3, 0x56, 0xe2, 0x66, 0x7e, 0x17, 0x00, 0x00, + // 1629 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdd, 0x6f, 0x1b, 0xc5, + 0x16, 0xcf, 0x3a, 0x9f, 0x3e, 0x69, 0xbe, 0xa6, 0xc9, 0x6d, 0xae, 0xdb, 0xeb, 0xa4, 0xab, 0x36, + 0xcd, 0x6d, 0xe3, 0xdd, 0x36, 0xbd, 0x69, 0xaf, 0xa8, 0x2a, 0x48, 0xfa, 0x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, 0x19, + 0xfa, 0xbc, 0x7b, 0x85, 0xa7, 0x63, 0xaa, 0x49, 0x95, 0x50, 0x83, 0xdf, 0xce, 0x4c, 0x50, 0x7c, + 0x93, 0x7b, 0x5d, 0x36, 0x8c, 0xa8, 0xd7, 0xbd, 0x4a, 0xee, 0x3d, 0x81, 0x03, 0x0d, 0xed, 0x27, + 0x80, 0xf6, 0x76, 0x04, 0x74, 0xef, 0x72, 0x7e, 0x0e, 0xc6, 0xc2, 0xb3, 0xd2, 0xf6, 0x88, 0x8f, + 0x42, 0x86, 0xe8, 0xfc, 0xf6, 0xc8, 0x10, 0x5d, 0xfc, 0x56, 0xa8, 0xbf, 0x65, 0x91, 0x67, 0x71, + 0x28, 0x38, 0x73, 0x9c, 0xaa, 0x16, 0xc7, 0x33, 0x14, 0x45, 0xd7, 0x60, 0xcc, 0xa0, 0xa5, 0x4d, + 0xac, 0xab, 0x86, 0xa5, 0xba, 0x74, 0x13, 0xfb, 0x61, 0x65, 0x57, 0x24, 0x2f, 0xec, 0x5f, 0x1f, + 0xce, 0xcc, 0x95, 0x89, 0x7b, 0x73, 0xab, 0x28, 0x95, 0x68, 0x45, 0xe6, 0xfd, 0x81, 0xff, 0x51, + 0x70, 0xf4, 0x4d, 0xfe, 0xae, 0xaf, 0x99, 0xae, 0x32, 0xe2, 0x9b, 0xb9, 0x62, 0xbd, 0xea, 0x19, + 0x11, 0x5f, 0x87, 0x43, 0x8c, 0xf2, 0x2b, 0xe4, 0xd6, 0x16, 0xd1, 0x59, 0xd0, 0xeb, 0x36, 0x29, + 0xe1, 0xf6, 0xd1, 0xce, 0xc0, 0x70, 0x78, 0x6f, 0x86, 0x61, 0x43, 0xb0, 0xb4, 0xa6, 0x8b, 0x18, + 0xfe, 0x93, 0x62, 0x9a, 0x53, 0x71, 0x11, 0xfa, 0x2d, 0x6f, 0xc1, 0xb7, 0xfc, 0x44, 0x91, 0x5c, + 0xc4, 0x25, 0xc5, 0x57, 0x16, 0xef, 0x66, 0x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f, 0x15, 0x76, 0x5c, 0x52, 0x61, 0x18, 0xbd, 0x7a, 0x1b, 0x0a, 0xfa, 0x0e, 0x94, + 0xe2, 0x2a, 0xd6, 0xbd, 0x36, 0x39, 0x8b, 0x4d, 0xdb, 0x17, 0xf1, 0x0c, 0x83, 0x74, 0x12, 0x49, + 0xad, 0x21, 0x95, 0x3c, 0xbd, 0x28, 0xa6, 0x0f, 0x05, 0x18, 0xe4, 0xcd, 0x51, 0x1a, 0x47, 0x8d, + 0x5d, 0x6c, 0x1a, 0x47, 0xb1, 0x96, 0x50, 0x3c, 0xcb, 0x00, 0x9d, 0x42, 0x72, 0x6b, 0x40, 0xbc, + 0xf3, 0xab, 0x57, 0xdd, 0xca, 0xda, 0xfd, 0x47, 0x79, 0xe1, 0xc1, 0xa3, 0xbc, 0xf0, 0xfb, 0xa3, + 0xbc, 0x70, 0xef, 0x71, 0xbe, 0xe7, 0xc1, 0xe3, 0x7c, 0xcf, 0x2f, 0x8f, 0xf3, 0x3d, 0x37, 0xe4, + 0x48, 0x47, 0x93, 0x34, 0x7a, 0x27, 0xf1, 0x5f, 0x77, 0x71, 0x80, 0xfd, 0xa1, 0x7d, 0xfa, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x12, 0x10, 0x1e, 0xe6, 0xd7, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2846,6 +2849,16 @@ func (m *PositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.LockedLpToken.Size() + i -= size + if _, err := m.LockedLpToken.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 if m.Position != nil { { size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) @@ -3576,6 +3589,8 @@ func (m *PositionResponse) Size() (n int) { l = m.Position.Size() n += 1 + l + sovQuery(uint64(l)) } + l = m.LockedLpToken.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -5591,6 +5606,40 @@ func (m *PositionResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockedLpToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LockedLpToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])