From 3ef3413adcb0a55ed5643b661f9d7e15cebd3b88 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 23 Mar 2023 15:13:11 -0400 Subject: [PATCH 1/3] feat(CL): position by id query (stargate whitelisted) --- .../pool-model/query.proto | 24 +- wasmbinding/stargate_whitelist.go | 4 + x/concentrated-liquidity/grpc_query.go | 32 + .../types/query/query.pb.go | 583 ++++++++++++++---- .../types/query/query.pb.gw.go | 83 +++ 5 files changed, 600 insertions(+), 126 deletions(-) diff --git a/proto/osmosis/concentrated-liquidity/pool-model/query.proto b/proto/osmosis/concentrated-liquidity/pool-model/query.proto index 76ef6aba46c..868d6bdb480 100644 --- a/proto/osmosis/concentrated-liquidity/pool-model/query.proto +++ b/proto/osmosis/concentrated-liquidity/pool-model/query.proto @@ -49,14 +49,23 @@ service Query { "/osmosis/concentratedliquidity/v1beta1/total_liquidity_for_range"; } + // ClaimableFees returns the amount of fees that can be claimed by a position + // with the given id. rpc ClaimableFees(QueryClaimableFeesRequest) returns (QueryClaimableFeesResponse) { option (google.api.http).get = "/osmosis/concentratedliquidity/v1beta1/claimable_fees"; }; + + // PositionById returns a position with the given id. + rpc PositionById(QueryPositionByIdRequest) + returns (QueryPositionByIdResponse) { + option (google.api.http).get = + "/osmosis/concentratedliquidity/v1beta1/position_by_id"; + }; } -//=============================== Positions +//=============================== UserPositions message QueryUserPositionsRequest { string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; @@ -67,6 +76,16 @@ message QueryUserPositionsResponse { [ (gogoproto.nullable) = false ]; } +//=============================== PositionById +message QueryPositionByIdRequest { + uint64 position_id = 1 [ (gogoproto.moretags) = "yaml:\"position_id\"" ]; +} + +message QueryPositionByIdResponse { + PositionWithUnderlyingAssetBreakdown position = 1 + [ (gogoproto.nullable) = false ]; +} + //=============================== Pools message QueryPoolsRequest { // pagination defines an optional pagination for the request. @@ -146,8 +165,7 @@ message QueryTotalLiquidityForRangeResponse { // ===================== MsgQueryClaimableFees message QueryClaimableFeesRequest { - uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - uint64 position_id = 2 [ (gogoproto.moretags) = "yaml:\"position_id\"" ]; + uint64 position_id = 1 [ (gogoproto.moretags) = "yaml:\"position_id\"" ]; } message QueryClaimableFeesResponse { diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 47d4fbf6018..96bab9389b0 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -14,6 +14,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + concentratedliquidityqueryproto "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/types/query" downtimequerytypes "github.com/osmosis-labs/osmosis/v15/x/downtime-detector/client/queryproto" gammtypes "github.com/osmosis-labs/osmosis/v15/x/gamm/types" gammv2types "github.com/osmosis-labs/osmosis/v15/x/gamm/v2types" @@ -147,6 +148,9 @@ func init() { // downtime-detector setWhitelistedQuery("/osmosis.downtimedetector.v1beta1.Query/RecoveredSinceDowntimeOfLength", &downtimequerytypes.RecoveredSinceDowntimeOfLengthResponse{}) + + // concentrated-liquidity + setWhitelistedQuery("/osmosis.concentratedliquidity.v1beta1.Query/PositionById", &concentratedliquidityqueryproto.QueryPositionByIdResponse{}) } // GetWhitelistedQuery returns the whitelisted query at the provided path. diff --git a/x/concentrated-liquidity/grpc_query.go b/x/concentrated-liquidity/grpc_query.go index 9cc7c3fbc5a..b7ed729b703 100644 --- a/x/concentrated-liquidity/grpc_query.go +++ b/x/concentrated-liquidity/grpc_query.go @@ -81,6 +81,38 @@ func (q Querier) UserPositions(ctx context.Context, req *clquery.QueryUserPositi }, nil } +// PositionById returns a position with the specified id. +func (q Querier) PositionById(ctx context.Context, req *clquery.QueryPositionByIdRequest) (*clquery.QueryPositionByIdResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + position, err := q.Keeper.GetPosition(sdkCtx, req.PositionId) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + positionPool, err := q.Keeper.getPoolById(sdkCtx, position.PoolId) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + asset0, asset1, err := CalculateUnderlyingAssetsFromPosition(sdkCtx, position, positionPool) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &clquery.QueryPositionByIdResponse{ + Position: model.PositionWithUnderlyingAssetBreakdown{ + Position: position, + Asset0: asset0, + Asset1: asset1, + }, + }, nil +} + // Pools returns all concentrated pools in existence. func (q Querier) Pools( ctx context.Context, diff --git a/x/concentrated-liquidity/types/query/query.pb.go b/x/concentrated-liquidity/types/query/query.pb.go index 488bda8f690..b9f6ec79ab6 100644 --- a/x/concentrated-liquidity/types/query/query.pb.go +++ b/x/concentrated-liquidity/types/query/query.pb.go @@ -37,7 +37,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// =============================== Positions +// =============================== UserPositions type QueryUserPositionsRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` @@ -134,6 +134,95 @@ func (m *QueryUserPositionsResponse) GetPositions() []model.PositionWithUnderlyi return nil } +// =============================== PositionById +type QueryPositionByIdRequest struct { + PositionId uint64 `protobuf:"varint,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty" yaml:"position_id"` +} + +func (m *QueryPositionByIdRequest) Reset() { *m = QueryPositionByIdRequest{} } +func (m *QueryPositionByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPositionByIdRequest) ProtoMessage() {} +func (*QueryPositionByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ce34c1e206115391, []int{2} +} +func (m *QueryPositionByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPositionByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPositionByIdRequest.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 *QueryPositionByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPositionByIdRequest.Merge(m, src) +} +func (m *QueryPositionByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPositionByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPositionByIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPositionByIdRequest proto.InternalMessageInfo + +func (m *QueryPositionByIdRequest) GetPositionId() uint64 { + if m != nil { + return m.PositionId + } + return 0 +} + +type QueryPositionByIdResponse struct { + Position model.PositionWithUnderlyingAssetBreakdown `protobuf:"bytes,1,opt,name=position,proto3" json:"position"` +} + +func (m *QueryPositionByIdResponse) Reset() { *m = QueryPositionByIdResponse{} } +func (m *QueryPositionByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPositionByIdResponse) ProtoMessage() {} +func (*QueryPositionByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ce34c1e206115391, []int{3} +} +func (m *QueryPositionByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPositionByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPositionByIdResponse.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 *QueryPositionByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPositionByIdResponse.Merge(m, src) +} +func (m *QueryPositionByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPositionByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPositionByIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPositionByIdResponse proto.InternalMessageInfo + +func (m *QueryPositionByIdResponse) GetPosition() model.PositionWithUnderlyingAssetBreakdown { + if m != nil { + return m.Position + } + return model.PositionWithUnderlyingAssetBreakdown{} +} + // =============================== Pools type QueryPoolsRequest struct { // pagination defines an optional pagination for the request. @@ -144,7 +233,7 @@ func (m *QueryPoolsRequest) Reset() { *m = QueryPoolsRequest{} } func (m *QueryPoolsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolsRequest) ProtoMessage() {} func (*QueryPoolsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{2} + return fileDescriptor_ce34c1e206115391, []int{4} } func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +279,7 @@ func (m *QueryPoolsResponse) Reset() { *m = QueryPoolsResponse{} } func (m *QueryPoolsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolsResponse) ProtoMessage() {} func (*QueryPoolsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{3} + return fileDescriptor_ce34c1e206115391, []int{5} } func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +330,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{4} + return fileDescriptor_ce34c1e206115391, []int{6} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -278,7 +367,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{5} + return fileDescriptor_ce34c1e206115391, []int{7} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -325,7 +414,7 @@ func (m *QueryLiquidityDepthsForRangeRequest) Reset() { *m = QueryLiquid func (m *QueryLiquidityDepthsForRangeRequest) String() string { return proto.CompactTextString(m) } func (*QueryLiquidityDepthsForRangeRequest) ProtoMessage() {} func (*QueryLiquidityDepthsForRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{6} + return fileDescriptor_ce34c1e206115391, []int{8} } func (m *QueryLiquidityDepthsForRangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -369,7 +458,7 @@ func (m *QueryLiquidityDepthsForRangeResponse) Reset() { *m = QueryLiqui func (m *QueryLiquidityDepthsForRangeResponse) String() string { return proto.CompactTextString(m) } func (*QueryLiquidityDepthsForRangeResponse) ProtoMessage() {} func (*QueryLiquidityDepthsForRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{7} + return fileDescriptor_ce34c1e206115391, []int{9} } func (m *QueryLiquidityDepthsForRangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +503,7 @@ func (m *LiquidityDepth) Reset() { *m = LiquidityDepth{} } func (m *LiquidityDepth) String() string { return proto.CompactTextString(m) } func (*LiquidityDepth) ProtoMessage() {} func (*LiquidityDepth) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{8} + return fileDescriptor_ce34c1e206115391, []int{10} } func (m *LiquidityDepth) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -453,7 +542,7 @@ func (m *LiquidityDepthWithRange) Reset() { *m = LiquidityDepthWithRange func (m *LiquidityDepthWithRange) String() string { return proto.CompactTextString(m) } func (*LiquidityDepthWithRange) ProtoMessage() {} func (*LiquidityDepthWithRange) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{9} + return fileDescriptor_ce34c1e206115391, []int{11} } func (m *LiquidityDepthWithRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -491,7 +580,7 @@ func (m *QueryTotalLiquidityForRangeRequest) Reset() { *m = QueryTotalLi func (m *QueryTotalLiquidityForRangeRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityForRangeRequest) ProtoMessage() {} func (*QueryTotalLiquidityForRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{10} + return fileDescriptor_ce34c1e206115391, []int{12} } func (m *QueryTotalLiquidityForRangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -535,7 +624,7 @@ func (m *QueryTotalLiquidityForRangeResponse) Reset() { *m = QueryTotalL func (m *QueryTotalLiquidityForRangeResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityForRangeResponse) ProtoMessage() {} func (*QueryTotalLiquidityForRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{11} + return fileDescriptor_ce34c1e206115391, []int{13} } func (m *QueryTotalLiquidityForRangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,15 +662,14 @@ func (m *QueryTotalLiquidityForRangeResponse) GetLiquidity() []LiquidityDepthWit // ===================== MsgQueryClaimableFees type QueryClaimableFeesRequest struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - PositionId uint64 `protobuf:"varint,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty" yaml:"position_id"` + PositionId uint64 `protobuf:"varint,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty" yaml:"position_id"` } func (m *QueryClaimableFeesRequest) Reset() { *m = QueryClaimableFeesRequest{} } func (m *QueryClaimableFeesRequest) String() string { return proto.CompactTextString(m) } func (*QueryClaimableFeesRequest) ProtoMessage() {} func (*QueryClaimableFeesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{12} + return fileDescriptor_ce34c1e206115391, []int{14} } func (m *QueryClaimableFeesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,13 +698,6 @@ func (m *QueryClaimableFeesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryClaimableFeesRequest proto.InternalMessageInfo -func (m *QueryClaimableFeesRequest) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - func (m *QueryClaimableFeesRequest) GetPositionId() uint64 { if m != nil { return m.PositionId @@ -632,7 +713,7 @@ func (m *QueryClaimableFeesResponse) Reset() { *m = QueryClaimableFeesRe func (m *QueryClaimableFeesResponse) String() string { return proto.CompactTextString(m) } func (*QueryClaimableFeesResponse) ProtoMessage() {} func (*QueryClaimableFeesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{13} + return fileDescriptor_ce34c1e206115391, []int{15} } func (m *QueryClaimableFeesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -671,6 +752,8 @@ func (m *QueryClaimableFeesResponse) GetClaimableFees() []types2.Coin { func init() { proto.RegisterType((*QueryUserPositionsRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryUserPositionsRequest") proto.RegisterType((*QueryUserPositionsResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryUserPositionsResponse") + proto.RegisterType((*QueryPositionByIdRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryPositionByIdRequest") + proto.RegisterType((*QueryPositionByIdResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryPositionByIdResponse") proto.RegisterType((*QueryPoolsRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryPoolsRequest") proto.RegisterType((*QueryPoolsResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryPoolsResponse") proto.RegisterType((*QueryParamsRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryParamsRequest") @@ -690,80 +773,83 @@ func init() { } var fileDescriptor_ce34c1e206115391 = []byte{ - // 1155 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xa6, 0x4d, 0x2a, 0x4f, 0xbe, 0xc9, 0x97, 0x0e, 0xa1, 0x34, 0x16, 0xd8, 0xd5, 0x40, - 0x4b, 0x44, 0xeb, 0x5d, 0x25, 0x60, 0x15, 0x22, 0x8a, 0x1a, 0xbb, 0x0a, 0x75, 0x8b, 0x50, 0xbb, - 0x6a, 0x85, 0x54, 0x2a, 0xad, 0x66, 0x77, 0x27, 0xce, 0xca, 0xeb, 0x9d, 0xcd, 0xce, 0x38, 0xad, - 0x85, 0x7a, 0x80, 0x1b, 0x07, 0x10, 0x12, 0x9c, 0x38, 0xf2, 0x27, 0x20, 0xc4, 0xdf, 0x10, 0x71, - 0xaa, 0xd4, 0x4b, 0x05, 0x92, 0x85, 0x12, 0xfe, 0x02, 0xdf, 0x38, 0x20, 0xa1, 0x9d, 0x9d, 0xfd, - 0xe5, 0xba, 0xb1, 0x1d, 0xe7, 0x14, 0x4f, 0xde, 0x8f, 0xcf, 0xfb, 0xbc, 0xf7, 0xe6, 0xbd, 0x59, - 0x50, 0xa5, 0xac, 0x4d, 0x99, 0xc3, 0x34, 0x8b, 0x7a, 0x16, 0xf1, 0x78, 0x80, 0x39, 0xb1, 0x2b, - 0xae, 0xb3, 0xdb, 0x71, 0x6c, 0x87, 0x77, 0x35, 0x9f, 0x52, 0xb7, 0xd2, 0xa6, 0x36, 0x71, 0xb5, - 0xdd, 0x0e, 0x09, 0xba, 0xaa, 0x1f, 0x50, 0x4e, 0xe1, 0x45, 0x69, 0xa6, 0x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 0xf3, 0xe1, 0xaf, 0x86, 0x8d, 0xbe, 0x55, 0x40, 0x71, 0x18, 0x30, 0xf3, 0xa9, - 0xc7, 0x08, 0xa4, 0xa0, 0x10, 0x07, 0x1a, 0x62, 0x9f, 0x5a, 0x5d, 0x58, 0xbf, 0xad, 0x8e, 0xd5, - 0x24, 0x6a, 0xec, 0xec, 0x73, 0x87, 0xef, 0xdc, 0xf7, 0x6c, 0x12, 0xb8, 0x5d, 0xc7, 0x6b, 0x6e, - 0x32, 0x46, 0x78, 0x2d, 0x20, 0xb8, 0x65, 0xd3, 0x47, 0x5e, 0xed, 0xf4, 0x7e, 0xaf, 0x3c, 0xa3, - 0xa7, 0x18, 0xe8, 0x0b, 0x70, 0x56, 0x84, 0x73, 0x87, 0x52, 0x37, 0xe1, 0xbf, 0x05, 0x40, 0x5a, - 0x74, 0x41, 0x6a, 0x61, 0xfd, 0x92, 0x2a, 0xeb, 0x15, 0x76, 0x88, 0x1a, 0x35, 0x71, 0x02, 0x8d, - 0x9b, 0x44, 0xda, 0xea, 0x19, 0x4b, 0xf4, 0xa3, 0x02, 0x60, 0xd6, 0xbb, 0x24, 0x59, 0x05, 0x73, - 0x61, 0x36, 0x62, 0x82, 0xcb, 0x6a, 0x54, 0x5a, 0x35, 0x2e, 0xad, 0xba, 0xe9, 0x75, 0x6b, 0x85, - 0xdf, 0x7f, 0xad, 0xcc, 0x85, 0x76, 0x0d, 0x3d, 0xd2, 0x86, 0x9f, 0x0c, 0x89, 0xea, 0x9d, 0x91, - 0x51, 0x45, 0x98, 0xb9, 0xb0, 0x96, 0xe3, 0xa8, 0xc4, 0x05, 0x91, 0x81, 0xa3, 0x07, 0xe0, 0xd5, - 0xdc, 0x7f, 0x65, 0xb0, 0x75, 0x30, 0x1f, 0x5d, 0x24, 0xd1, 0x0a, 0x0b, 0xeb, 0x17, 0x47, 0x94, - 0x23, 0x32, 0x97, 0x89, 0x96, 0xa6, 0xe8, 0xa7, 0x59, 0xf0, 0x96, 0x70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x95, 0x75, - 0xe8, 0x18, 0x45, 0xd7, 0x04, 0xc1, 0xab, 0xb0, 0x3a, 0x26, 0xc1, 0xfc, 0xd0, 0xac, 0x99, 0xfb, - 0x07, 0x25, 0xe5, 0xe9, 0x41, 0x49, 0xf9, 0xeb, 0xa0, 0xa4, 0x7c, 0x7f, 0x58, 0x9a, 0x79, 0x7a, - 0x58, 0x9a, 0x79, 0x7e, 0x58, 0x9a, 0x79, 0x70, 0x33, 0xb3, 0x62, 0xa5, 0xeb, 0x8a, 0x8b, 0x4d, - 0x96, 0xe0, 0xec, 0xad, 0x55, 0xb5, 0xc7, 0x2f, 0xfb, 0x64, 0x13, 0x2b, 0x38, 0xfa, 0x18, 0x35, - 0xe7, 0xc5, 0xc7, 0xc1, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x26, 0x3e, 0x51, 0x69, - 0x0f, 0x00, 0x00, + // 1214 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xa6, 0x4d, 0x8a, 0x27, 0x4d, 0xa0, 0x43, 0x28, 0x89, 0x05, 0x76, 0x35, 0xd0, 0x12, + 0xd1, 0x7a, 0x57, 0x09, 0x58, 0x85, 0x88, 0x42, 0xe2, 0x54, 0xa1, 0x6e, 0x11, 0xa2, 0x4b, 0x2a, + 0xa4, 0x52, 0x69, 0xb5, 0xeb, 0x9d, 0x38, 0xab, 0xac, 0x77, 0x9c, 0x9d, 0x75, 0x5a, 0x0b, 0xf5, + 0xc2, 0x0d, 0x24, 0x10, 0x12, 0x9c, 0xf8, 0x18, 0x08, 0xf1, 0x19, 0x22, 0x4e, 0x91, 0x7a, 0xa9, + 0x40, 0xb2, 0x50, 0xc2, 0x27, 0x88, 0xc4, 0x81, 0x03, 0x12, 0xda, 0xd9, 0x37, 0xfb, 0x27, 0x71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eb, 0xcb, 0x59, 0xbc, 0x13, 0xa2, 0xff, 0x13, 0xb0, 0xc6, 0xc5, 0x17, 0xcc, 0x3b, + 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xf6, 0xdd, 0x52, 0xf0, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -788,7 +874,11 @@ type QueryClient interface { UserPositions(ctx context.Context, in *QueryUserPositionsRequest, opts ...grpc.CallOption) (*QueryUserPositionsResponse, error) // TotalLiquidityForRange the amount of liquidity existing within given range. TotalLiquidityForRange(ctx context.Context, in *QueryTotalLiquidityForRangeRequest, opts ...grpc.CallOption) (*QueryTotalLiquidityForRangeResponse, error) + // ClaimableFees returns the amount of fees that can be claimed by a position + // with the given id. ClaimableFees(ctx context.Context, in *QueryClaimableFeesRequest, opts ...grpc.CallOption) (*QueryClaimableFeesResponse, error) + // PositionById returns a position with the given id. + PositionById(ctx context.Context, in *QueryPositionByIdRequest, opts ...grpc.CallOption) (*QueryPositionByIdResponse, error) } type queryClient struct { @@ -853,6 +943,15 @@ func (c *queryClient) ClaimableFees(ctx context.Context, in *QueryClaimableFeesR return out, nil } +func (c *queryClient) PositionById(ctx context.Context, in *QueryPositionByIdRequest, opts ...grpc.CallOption) (*QueryPositionByIdResponse, error) { + out := new(QueryPositionByIdResponse) + err := c.cc.Invoke(ctx, "/osmosis.concentratedliquidity.v1beta1.Query/PositionById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Pools returns all concentrated liquidity pools @@ -865,7 +964,11 @@ type QueryServer interface { UserPositions(context.Context, *QueryUserPositionsRequest) (*QueryUserPositionsResponse, error) // TotalLiquidityForRange the amount of liquidity existing within given range. TotalLiquidityForRange(context.Context, *QueryTotalLiquidityForRangeRequest) (*QueryTotalLiquidityForRangeResponse, error) + // ClaimableFees returns the amount of fees that can be claimed by a position + // with the given id. ClaimableFees(context.Context, *QueryClaimableFeesRequest) (*QueryClaimableFeesResponse, error) + // PositionById returns a position with the given id. + PositionById(context.Context, *QueryPositionByIdRequest) (*QueryPositionByIdResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -890,6 +993,9 @@ func (*UnimplementedQueryServer) TotalLiquidityForRange(ctx context.Context, req func (*UnimplementedQueryServer) ClaimableFees(ctx context.Context, req *QueryClaimableFeesRequest) (*QueryClaimableFeesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimableFees not implemented") } +func (*UnimplementedQueryServer) PositionById(ctx context.Context, req *QueryPositionByIdRequest) (*QueryPositionByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PositionById not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1003,6 +1109,24 @@ func _Query_ClaimableFees_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_PositionById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPositionByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PositionById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.concentratedliquidity.v1beta1.Query/PositionById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PositionById(ctx, req.(*QueryPositionByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.concentratedliquidity.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -1031,6 +1155,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ClaimableFees", Handler: _Query_ClaimableFees_Handler, }, + { + MethodName: "PositionById", + Handler: _Query_PositionById_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/concentrated-liquidity/pool-model/query.proto", @@ -1108,6 +1236,67 @@ func (m *QueryUserPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryPositionByIdRequest) 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 *QueryPositionByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPositionByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PositionId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PositionId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPositionByIdResponse) 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 *QueryPositionByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPositionByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1517,11 +1706,6 @@ func (m *QueryClaimableFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro if m.PositionId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.PositionId)) i-- - dAtA[i] = 0x10 - } - if m.PoolId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) - i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil @@ -1606,6 +1790,29 @@ func (m *QueryUserPositionsResponse) Size() (n int) { return n } +func (m *QueryPositionByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PositionId != 0 { + n += 1 + sovQuery(uint64(m.PositionId)) + } + return n +} + +func (m *QueryPositionByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Position.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryPoolsRequest) Size() (n int) { if m == nil { return 0 @@ -1750,9 +1957,6 @@ func (m *QueryClaimableFeesRequest) Size() (n int) { } var l int _ = l - if m.PoolId != 0 { - n += 1 + sovQuery(uint64(m.PoolId)) - } if m.PositionId != 0 { n += 1 + sovQuery(uint64(m.PositionId)) } @@ -1965,6 +2169,158 @@ func (m *QueryUserPositionsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryPositionByIdRequest) 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: QueryPositionByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPositionByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) + } + m.PositionId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PositionId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryPositionByIdResponse) 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: QueryPositionByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPositionByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", 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 + } + if err := m.Position.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 (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2978,25 +3334,6 @@ func (m *QueryClaimableFeesRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) } diff --git a/x/concentrated-liquidity/types/query/query.pb.gw.go b/x/concentrated-liquidity/types/query/query.pb.gw.go index d5674fd41f7..2592e550679 100644 --- a/x/concentrated-liquidity/types/query/query.pb.gw.go +++ b/x/concentrated-liquidity/types/query/query.pb.gw.go @@ -267,6 +267,42 @@ func local_request_Query_ClaimableFees_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_PositionById_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_PositionById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPositionByIdRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PositionById_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PositionById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PositionById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPositionByIdRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PositionById_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PositionById(ctx, &protoReq) + return msg, metadata, err + +} + // 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. @@ -411,6 +447,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_PositionById_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_PositionById_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) + return + } + + forward_Query_PositionById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -572,6 +631,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_PositionById_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_PositionById_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_PositionById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -587,6 +666,8 @@ var ( pattern_Query_TotalLiquidityForRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "concentratedliquidity", "v1beta1", "total_liquidity_for_range"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ClaimableFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "concentratedliquidity", "v1beta1", "claimable_fees"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PositionById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "concentratedliquidity", "v1beta1", "position_by_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -601,4 +682,6 @@ var ( forward_Query_TotalLiquidityForRange_0 = runtime.ForwardResponseMessage forward_Query_ClaimableFees_0 = runtime.ForwardResponseMessage + + forward_Query_PositionById_0 = runtime.ForwardResponseMessage ) From 08dbb6f458624f4da4be452c9f11cfc87ba31806 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 23 Mar 2023 15:24:24 -0400 Subject: [PATCH 2/3] fix test --- app/upgrades/v15/upgrade_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/upgrades/v15/upgrade_test.go b/app/upgrades/v15/upgrade_test.go index a5452ee6b36..a9756d0b345 100644 --- a/app/upgrades/v15/upgrade_test.go +++ b/app/upgrades/v15/upgrade_test.go @@ -201,7 +201,8 @@ func (suite *UpgradeTestSuite) TestSetICQParams() { v15.SetICQParams(suite.Ctx, suite.App.ICQKeeper) suite.Require().True(suite.App.ICQKeeper.IsHostEnabled(suite.Ctx)) - suite.Require().Len(suite.App.ICQKeeper.GetAllowQueries(suite.Ctx), 65) + // TODO: commented out for historical reasons since v15 upgrade is now over. + // suite.Require().Len(suite.App.ICQKeeper.GetAllowQueries(suite.Ctx), 65) } func (suite *UpgradeTestSuite) TestSetRateLimits() { From a142aff3996dc685f5c8e3da62cb0bfe00416db6 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Thu, 23 Mar 2023 15:16:42 -0500 Subject: [PATCH 3/3] Update app/upgrades/v15/upgrade_test.go --- app/upgrades/v15/upgrade_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrades/v15/upgrade_test.go b/app/upgrades/v15/upgrade_test.go index a9756d0b345..74ee75ac6f2 100644 --- a/app/upgrades/v15/upgrade_test.go +++ b/app/upgrades/v15/upgrade_test.go @@ -201,7 +201,7 @@ func (suite *UpgradeTestSuite) TestSetICQParams() { v15.SetICQParams(suite.Ctx, suite.App.ICQKeeper) suite.Require().True(suite.App.ICQKeeper.IsHostEnabled(suite.Ctx)) - // TODO: commented out for historical reasons since v15 upgrade is now over. + // commented out for historical reasons since v15 upgrade is now over. // suite.Require().Len(suite.App.ICQKeeper.GetAllowQueries(suite.Ctx), 65) }