From 86ceb50e25b1a57112ac05d54cf0f3fd0628e740 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev <46343690+pysel@users.noreply.github.com> Date: Thu, 23 Mar 2023 15:14:54 +0700 Subject: [PATCH 1/2] Better `Short` field of `forceprune` (#4705) * forceprune cmd * docs --- cmd/osmosisd/cmd/forceprune.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/osmosisd/cmd/forceprune.go b/cmd/osmosisd/cmd/forceprune.go index f585f2bbb26..70ffbb1a8fb 100644 --- a/cmd/osmosisd/cmd/forceprune.go +++ b/cmd/osmosisd/cmd/forceprune.go @@ -34,8 +34,11 @@ const ( func forceprune() *cobra.Command { cmd := &cobra.Command{ Use: "forceprune", - Short: "Example osmosisd forceprune -f 188000 -m 1000, which would keep blockchain and state data of last 188000 blocks (approximately 2 weeks) and ABCI responses of last 1000 blocks.", - Long: "Forceprune options prunes and compacts blockstore.db and state.db. One needs to shut down chain before running forceprune. By default it keeps last 188000 blocks (approximately 2 weeks of data) blockstore and state db (validator and consensus information) and 1000 blocks of abci responses from state.db. Everything beyond these heights in blockstore and state.db is pruned. ABCI Responses are stored in index db and so redundant especially if one is running pruned nodes. As a result we are removing ABCI data from state.db aggressively by default. One can override height for blockstore.db and state.db by using -f option and for abci response by using -m option. Example osmosisd forceprune -f 188000 -m 1000.", + Short: "Forceprune option prunes and compacts blockstore.db and state.db.", + Long: `Forceprune option prunes and compacts blockstore.db and state.db. One needs to shut down chain before running forceprune. By default it keeps last 188000 blocks (approximately 2 weeks of data) blockstore and state db (validator and consensus information) and 1000 blocks of abci responses from state.db. Everything beyond these heights in blockstore and state.db is pruned. ABCI Responses are stored in index db and so redundant especially if one is running pruned nodes. As a result we are removing ABCI data from state.db aggressively by default. One can override height for blockstore.db and state.db by using -f option and for abci response by using -m option. +Example: + osmosisd forceprune -f 188000 -m 1000, +which would keep blockchain and state data of last 188000 blocks (approximately 2 weeks) and ABCI responses of last 1000 blocks.`, RunE: func(cmd *cobra.Command, args []string) error { fullHeightFlag, err := cmd.Flags().GetString(fullHeight) if err != nil { From fbf577ee21ff039eef18738aba3dcc95f66f840b Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:18:08 +0900 Subject: [PATCH 2/2] (CL): Add query for Liquidity in Ranges (#4691) * WIP: initial liquidity for range * Add test cases * WIP * Change to revised logic * Add test cases * Add proto fixes * Revert back proto changes * Revert unncessary proto changes --- .../pool-model/query.proto | 34 + x/concentrated-liquidity/grpc_query.go | 18 + x/concentrated-liquidity/tick.go | 84 ++ x/concentrated-liquidity/tick_test.go | 161 ++++ x/concentrated-liquidity/types/errors.go | 8 + .../types/query/query.pb.go | 780 ++++++++++++++++-- .../types/query/query.pb.gw.go | 83 ++ 7 files changed, 1099 insertions(+), 69 deletions(-) diff --git a/proto/osmosis/concentrated-liquidity/pool-model/query.proto b/proto/osmosis/concentrated-liquidity/pool-model/query.proto index 873645f7859..9d4a59b9ea0 100644 --- a/proto/osmosis/concentrated-liquidity/pool-model/query.proto +++ b/proto/osmosis/concentrated-liquidity/pool-model/query.proto @@ -42,6 +42,13 @@ service Query { "/osmosis/concentratedliquidity/v1beta1/positions/{address}"; } + // TotalLiquidityForRange the amount of liquidity existing within given range. + rpc TotalLiquidityForRange(QueryTotalLiquidityForRangeRequest) + returns (QueryTotalLiquidityForRangeResponse) { + option (google.api.http).get = + "/osmosis/concentratedliquidity/v1beta1/total_liquidity_for_range"; + } + rpc ClaimableFees(QueryClaimableFeesRequest) returns (QueryClaimableFeesResponse) { option (google.api.http).get = @@ -110,6 +117,33 @@ message LiquidityDepth { ]; } +message LiquidityDepthWithRange { + string liquidity_amount = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"liquidity_net\"", + (gogoproto.nullable) = false + ]; + string lower_tick = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"tick\"", + (gogoproto.nullable) = false + ]; + string upper_tick = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"tick\"", + (gogoproto.nullable) = false + ]; +} + +//=============================== TickLiquidityInBatches +message QueryTotalLiquidityForRangeRequest { + uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; +} +message QueryTotalLiquidityForRangeResponse { + repeated LiquidityDepthWithRange liquidity = 1 + [ (gogoproto.nullable) = false ]; +} + // ===================== MsgQueryClaimableFees message QueryClaimableFeesRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; diff --git a/x/concentrated-liquidity/grpc_query.go b/x/concentrated-liquidity/grpc_query.go index b735579ebe6..05a2ecc6486 100644 --- a/x/concentrated-liquidity/grpc_query.go +++ b/x/concentrated-liquidity/grpc_query.go @@ -161,6 +161,24 @@ func (q Querier) LiquidityDepthsForRange(goCtx context.Context, req *clquery.Que }, nil } +// TotalLiquidityForRange returns an array of LiquidityDepthWithRange, which contains the range(lower tick and upper tick) and the liquidity amount in the range. +func (q Querier) TotalLiquidityForRange(goCtx context.Context, req *clquery.QueryTotalLiquidityForRangeRequest) (*clquery.QueryTotalLiquidityForRangeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + liquidity, err := q.Keeper.GetTickLiquidityForRange( + ctx, + req.PoolId, + ) + if err != nil { + return nil, err + } + + return &clquery.QueryTotalLiquidityForRangeResponse{Liquidity: liquidity}, nil +} + func (q Querier) ClaimableFees(ctx context.Context, req *clquery.QueryClaimableFeesRequest) (*clquery.QueryClaimableFeesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/concentrated-liquidity/tick.go b/x/concentrated-liquidity/tick.go index 16d54da0ab9..c8d4f0624c6 100644 --- a/x/concentrated-liquidity/tick.go +++ b/x/concentrated-liquidity/tick.go @@ -7,6 +7,7 @@ import ( "github.com/osmosis-labs/osmosis/osmoutils" "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/internal/math" + "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/internal/swapstrategy" "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/model" "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/types" "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/types/genesis" @@ -183,6 +184,75 @@ func GetMinAndMaxTicksFromExponentAtPriceOne(exponentAtPriceOne sdk.Int) (minTic return math.GetMinAndMaxTicksFromExponentAtPriceOneInternal(exponentAtPriceOne) } +// GetTickLiquidityForRangeInBatches returns an array of liquidity depth within the given range of lower tick and upper tick. +func (k Keeper) GetTickLiquidityForRange(ctx sdk.Context, poolId uint64) ([]query.LiquidityDepthWithRange, error) { + // sanity check that pool exists and upper tick is greater than lower tick + if !k.poolExists(ctx, poolId) { + return []query.LiquidityDepthWithRange{}, types.PoolNotFoundError{PoolId: poolId} + } + + // use false for zeroForOne since we're going from lower tick -> upper tick + zeroForOne := false + swapStrategy := swapstrategy.New(zeroForOne, sdk.ZeroDec(), k.storeKey, sdk.ZeroDec()) + + // get min and max tick for the pool + p, err := k.getPoolById(ctx, poolId) + if err != nil { + return []query.LiquidityDepthWithRange{}, err + } + exponentAtPriceOne := p.GetPrecisionFactorAtPriceOne() + minTick, maxTick := math.GetMinAndMaxTicksFromExponentAtPriceOneInternal(exponentAtPriceOne) + + // set current tick to min tick, and find the first initialized tick starting from min tick -1. + // we do -1 to make min tick inclusive. + currentTick := minTick - 1 + + nextTick, ok := swapStrategy.NextInitializedTick(ctx, poolId, currentTick) + if !ok { + return []query.LiquidityDepthWithRange{}, types.InvalidTickError{Tick: currentTick, IsLower: false, MinTick: minTick, MaxTick: maxTick} + } + + tick, err := k.getTickByTickIndex(ctx, poolId, nextTick) + if err != nil { + return []query.LiquidityDepthWithRange{}, err + } + + liquidityDepthsForRange := []query.LiquidityDepthWithRange{} + + // use the smallest tick initialized as the starting point for calculating liquidity. + currentLiquidity := tick.LiquidityNet + currentTick = nextTick.Int64() + + totalLiquidityWithinRange := currentLiquidity + for currentTick <= maxTick { + nextTick, ok := swapStrategy.NextInitializedTick(ctx, poolId, currentTick) + // break and return the liquidity as is if + // - there are no more next tick that is initialized, + // - we hit upper limit + if !ok { + break + } + + tick, err := k.getTickByTickIndex(ctx, poolId, nextTick) + if err != nil { + return []query.LiquidityDepthWithRange{}, err + } + + liquidityDepthForRange := query.LiquidityDepthWithRange{ + LowerTick: sdk.NewInt(currentTick), + UpperTick: nextTick, + LiquidityAmount: totalLiquidityWithinRange, + } + liquidityDepthsForRange = append(liquidityDepthsForRange, liquidityDepthForRange) + + currentLiquidity = tick.LiquidityNet + totalLiquidityWithinRange = totalLiquidityWithinRange.Add(currentLiquidity) + currentTick = nextTick.Int64() + } + + return liquidityDepthsForRange, nil +} + // GetPerTickLiquidityDepthFromRange uses the given lower tick and upper tick, iterates over ticks, creates and returns LiquidityDepth array. // LiquidityNet from the tick is used to indicate liquidity depths. func (k Keeper) GetPerTickLiquidityDepthFromRange(ctx sdk.Context, poolId uint64, lowerTick, upperTick int64) ([]query.LiquidityDepth, error) { @@ -226,3 +296,17 @@ func (k Keeper) GetPerTickLiquidityDepthFromRange(ctx sdk.Context, poolId uint64 return liquidityDepths, nil } + +func (k Keeper) getTickByTickIndex(ctx sdk.Context, poolId uint64, tickIndex sdk.Int) (model.TickInfo, error) { + store := ctx.KVStore(k.storeKey) + keyTick := types.KeyTick(poolId, tickIndex.Int64()) + tickStruct := model.TickInfo{} + found, err := osmoutils.Get(store, keyTick, &tickStruct) + if err != nil { + return model.TickInfo{}, err + } + if !found { + return model.TickInfo{}, types.TickNotFoundError{Tick: tickIndex.Int64()} + } + return tickStruct, nil +} diff --git a/x/concentrated-liquidity/tick_test.go b/x/concentrated-liquidity/tick_test.go index 3a8a9d347c2..6af21922bed 100644 --- a/x/concentrated-liquidity/tick_test.go +++ b/x/concentrated-liquidity/tick_test.go @@ -26,6 +26,13 @@ func withPoolId(tick genesis.FullTick, poolId uint64) genesis.FullTick { return tick } +func withLiquidityNetandTickIndex(tick genesis.FullTick, tickIndex int64, liquidityNet sdk.Dec) genesis.FullTick { + tick.TickIndex = tickIndex + tick.Info.LiquidityNet = liquidityNet + + return tick +} + func (s *KeeperTestSuite) TestTickOrdering() { s.SetupTest() @@ -601,6 +608,160 @@ func (s *KeeperTestSuite) TestCrossTick() { } } +func (s *KeeperTestSuite) TestGetTickLiquidityForRange() { + defaultTick := withPoolId(defaultTick, defaultPoolId) + + tests := []struct { + name string + presetTicks []genesis.FullTick + + expectedLiquidityDepthForRange []query.LiquidityDepthWithRange + }{ + { + name: "one full range position, testing range in between", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + }, + expectedLiquidityDepthForRange: []query.LiquidityDepthWithRange{ + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(DefaultMinTick), + UpperTick: sdk.NewInt(DefaultMaxTick), + }, + }, + }, + { + name: "one ranged position, testing range with greater range than initialized ticks", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, 5, sdk.NewDec(-10)), + }, + expectedLiquidityDepthForRange: []query.LiquidityDepthWithRange{ + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(DefaultMinTick), + UpperTick: sdk.NewInt(5), + }, + }, + }, + // 10 ----------------- 30 + // -20 ------------- 20 + { + name: "two ranged positions, testing overlapping positions", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, -20, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, 20, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(50)), + withLiquidityNetandTickIndex(defaultTick, 30, sdk.NewDec(-50)), + }, + expectedLiquidityDepthForRange: []query.LiquidityDepthWithRange{ + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(-20), + UpperTick: sdk.NewInt(10), + }, + { + LiquidityAmount: sdk.NewDec(60), + LowerTick: sdk.NewInt(10), + UpperTick: sdk.NewInt(20), + }, + { + LiquidityAmount: sdk.NewDec(50), + LowerTick: sdk.NewInt(20), + UpperTick: sdk.NewInt(30), + }, + }, + }, + // 10 ----------------- 30 + // min tick --------------------------------------max tick + { + name: "one full ranged position, one narrow position", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(50)), + withLiquidityNetandTickIndex(defaultTick, 30, sdk.NewDec(-50)), + }, + expectedLiquidityDepthForRange: []query.LiquidityDepthWithRange{ + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(DefaultMinTick), + UpperTick: sdk.NewInt(10), + }, + { + LiquidityAmount: sdk.NewDec(60), + LowerTick: sdk.NewInt(10), + UpperTick: sdk.NewInt(30), + }, + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(30), + UpperTick: sdk.NewInt(DefaultMaxTick), + }, + }, + }, + // 11--13 + // 10 ----------------- 30 + // -20 ------------- 20 + { + name: "three ranged positions, testing overlapping positions", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, -20, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, 20, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(50)), + withLiquidityNetandTickIndex(defaultTick, 30, sdk.NewDec(-50)), + withLiquidityNetandTickIndex(defaultTick, 11, sdk.NewDec(100)), + withLiquidityNetandTickIndex(defaultTick, 13, sdk.NewDec(-100)), + }, + expectedLiquidityDepthForRange: []query.LiquidityDepthWithRange{ + { + LiquidityAmount: sdk.NewDec(10), + LowerTick: sdk.NewInt(-20), + UpperTick: sdk.NewInt(10), + }, + { + LiquidityAmount: sdk.NewDec(60), + LowerTick: sdk.NewInt(10), + UpperTick: sdk.NewInt(11), + }, + { + LiquidityAmount: sdk.NewDec(160), + LowerTick: sdk.NewInt(11), + UpperTick: sdk.NewInt(13), + }, + { + LiquidityAmount: sdk.NewDec(60), + LowerTick: sdk.NewInt(13), + UpperTick: sdk.NewInt(20), + }, + { + LiquidityAmount: sdk.NewDec(50), + LowerTick: sdk.NewInt(20), + UpperTick: sdk.NewInt(30), + }, + }, + }, + } + + for _, test := range tests { + s.Run(test.name, func() { + // Init suite for each test. + s.Setup() + + // Create a default CL pool + s.PrepareConcentratedPool() + for _, tick := range test.presetTicks { + s.App.ConcentratedLiquidityKeeper.SetTickInfo(s.Ctx, tick.PoolId, tick.TickIndex, tick.Info) + } + + liquidityForRange, err := s.App.ConcentratedLiquidityKeeper.GetTickLiquidityForRange(s.Ctx, defaultPoolId) + s.Require().NoError(err) + s.Require().Equal(liquidityForRange, test.expectedLiquidityDepthForRange) + }) + } +} + func (s *KeeperTestSuite) TestGetLiquidityDepthFromIterator() { firstTickLiquidityDepth := query.LiquidityDepth{ TickIndex: sdk.NewInt(-3), diff --git a/x/concentrated-liquidity/types/errors.go b/x/concentrated-liquidity/types/errors.go index 38fecfa26b4..443893d136b 100644 --- a/x/concentrated-liquidity/types/errors.go +++ b/x/concentrated-liquidity/types/errors.go @@ -195,6 +195,14 @@ func (e TickIndexMinimumError) Error() string { return fmt.Sprintf("tickIndex must be greater than or equal to %d", e.MinTick) } +type TickNotFoundError struct { + Tick int64 +} + +func (e TickNotFoundError) Error() string { + return fmt.Sprintf("tick %d is not found", e.Tick) +} + type ExponentAtPriceOneError struct { ProvidedExponentAtPriceOne sdk.Int PrecisionValueAtPriceOneMin sdk.Int diff --git a/x/concentrated-liquidity/types/query/query.pb.go b/x/concentrated-liquidity/types/query/query.pb.go index e72c9882649..d8bffe67b70 100644 --- a/x/concentrated-liquidity/types/query/query.pb.go +++ b/x/concentrated-liquidity/types/query/query.pb.go @@ -443,6 +443,134 @@ func (m *LiquidityDepth) XXX_DiscardUnknown() { var xxx_messageInfo_LiquidityDepth proto.InternalMessageInfo +type LiquidityDepthWithRange struct { + LiquidityAmount github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=liquidity_amount,json=liquidityAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidity_amount" yaml:"liquidity_net"` + LowerTick github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=lower_tick,json=lowerTick,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"lower_tick" yaml:"tick"` + UpperTick github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=upper_tick,json=upperTick,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"upper_tick" yaml:"tick"` +} + +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} +} +func (m *LiquidityDepthWithRange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LiquidityDepthWithRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LiquidityDepthWithRange.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 *LiquidityDepthWithRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_LiquidityDepthWithRange.Merge(m, src) +} +func (m *LiquidityDepthWithRange) XXX_Size() int { + return m.Size() +} +func (m *LiquidityDepthWithRange) XXX_DiscardUnknown() { + xxx_messageInfo_LiquidityDepthWithRange.DiscardUnknown(m) +} + +var xxx_messageInfo_LiquidityDepthWithRange proto.InternalMessageInfo + +// =============================== TickLiquidityInBatches +type QueryTotalLiquidityForRangeRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` +} + +func (m *QueryTotalLiquidityForRangeRequest) Reset() { *m = QueryTotalLiquidityForRangeRequest{} } +func (m *QueryTotalLiquidityForRangeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidityForRangeRequest) ProtoMessage() {} +func (*QueryTotalLiquidityForRangeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ce34c1e206115391, []int{10} +} +func (m *QueryTotalLiquidityForRangeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidityForRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidityForRangeRequest.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 *QueryTotalLiquidityForRangeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidityForRangeRequest.Merge(m, src) +} +func (m *QueryTotalLiquidityForRangeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidityForRangeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidityForRangeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidityForRangeRequest proto.InternalMessageInfo + +func (m *QueryTotalLiquidityForRangeRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +type QueryTotalLiquidityForRangeResponse struct { + Liquidity []LiquidityDepthWithRange `protobuf:"bytes,1,rep,name=liquidity,proto3" json:"liquidity"` +} + +func (m *QueryTotalLiquidityForRangeResponse) Reset() { *m = QueryTotalLiquidityForRangeResponse{} } +func (m *QueryTotalLiquidityForRangeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidityForRangeResponse) ProtoMessage() {} +func (*QueryTotalLiquidityForRangeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ce34c1e206115391, []int{11} +} +func (m *QueryTotalLiquidityForRangeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidityForRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidityForRangeResponse.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 *QueryTotalLiquidityForRangeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidityForRangeResponse.Merge(m, src) +} +func (m *QueryTotalLiquidityForRangeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidityForRangeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidityForRangeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidityForRangeResponse proto.InternalMessageInfo + +func (m *QueryTotalLiquidityForRangeResponse) GetLiquidity() []LiquidityDepthWithRange { + if m != nil { + return m.Liquidity + } + return nil +} + // ===================== MsgQueryClaimableFees type QueryClaimableFeesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` @@ -455,7 +583,7 @@ func (m *QueryClaimableFeesRequest) Reset() { *m = QueryClaimableFeesReq func (m *QueryClaimableFeesRequest) String() string { return proto.CompactTextString(m) } func (*QueryClaimableFeesRequest) ProtoMessage() {} func (*QueryClaimableFeesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce34c1e206115391, []int{9} + return fileDescriptor_ce34c1e206115391, []int{12} } func (m *QueryClaimableFeesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -520,7 +648,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{10} + return fileDescriptor_ce34c1e206115391, []int{13} } func (m *QueryClaimableFeesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -566,6 +694,9 @@ func init() { proto.RegisterType((*QueryLiquidityDepthsForRangeRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryLiquidityDepthsForRangeRequest") proto.RegisterType((*QueryLiquidityDepthsForRangeResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryLiquidityDepthsForRangeResponse") proto.RegisterType((*LiquidityDepth)(nil), "osmosis.concentratedliquidity.v1beta1.LiquidityDepth") + proto.RegisterType((*LiquidityDepthWithRange)(nil), "osmosis.concentratedliquidity.v1beta1.LiquidityDepthWithRange") + proto.RegisterType((*QueryTotalLiquidityForRangeRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryTotalLiquidityForRangeRequest") + proto.RegisterType((*QueryTotalLiquidityForRangeResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryTotalLiquidityForRangeResponse") proto.RegisterType((*QueryClaimableFeesRequest)(nil), "osmosis.concentratedliquidity.v1beta1.QueryClaimableFeesRequest") proto.RegisterType((*QueryClaimableFeesResponse)(nil), "osmosis.concentratedliquidity.v1beta1.QueryClaimableFeesResponse") } @@ -575,73 +706,81 @@ func init() { } var fileDescriptor_ce34c1e206115391 = []byte{ - // 1048 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0xce, 0xe6, 0xc7, 0xc5, 0x13, 0x1c, 0xc8, 0x90, 0x8a, 0xc6, 0x02, 0xbb, 0x1a, 0x68, 0x09, - 0xb4, 0xde, 0x55, 0x42, 0x2c, 0x20, 0xa2, 0x12, 0xb1, 0xab, 0x80, 0x29, 0x42, 0x65, 0x45, 0x85, - 0x54, 0x90, 0xac, 0xf1, 0xee, 0xc4, 0x19, 0x79, 0xbd, 0xb3, 0xd9, 0x19, 0xa7, 0xb5, 0x50, 0x6f, - 0xb8, 0x07, 0x21, 0xc1, 0x15, 0x0f, 0xc0, 0x03, 0x20, 0xc4, 0x33, 0x54, 0x5c, 0x55, 0xea, 0x4d, - 0x05, 0x92, 0x41, 0x09, 0x4f, 0xe0, 0x7b, 0x24, 0xb4, 0x33, 0xb3, 0xf6, 0xae, 0x71, 0x6a, 0x3b, - 0xe9, 0x95, 0xbd, 0x7b, 0x7e, 0xbe, 0xf3, 0x9d, 0xf3, 0xcd, 0xd9, 0x01, 0x65, 0xc6, 0xdb, 0x8c, - 0x53, 0x6e, 0x39, 0xcc, 0x77, 0x88, 0x2f, 0x42, 0x2c, 0x88, 0x5b, 0xf2, 0xe8, 0x61, 0x87, 0xba, - 0x54, 0x74, 0xad, 0x80, 0x31, 0xaf, 0xd4, 0x66, 0x2e, 0xf1, 0xac, 0xc3, 0x0e, 0x09, 0xbb, 0x66, - 0x10, 0x32, 0xc1, 0xe0, 0x15, 0x1d, 0x66, 0x26, 0xc3, 0x06, 0x51, 0xe6, 0xd1, 0x66, 0x83, 0x08, - 0xbc, 0x99, 0x5f, 0x6b, 0xb2, 0x26, 0x93, 0x11, 0x56, 0xf4, 0x4f, 0x05, 0xe7, 0xaf, 0x4d, 0xc2, - 0xc4, 0x21, 0x6e, 0x73, 0xed, 0x5c, 0x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0x62, 0xc6, 0xc9, 0xbe, 0xa0, - 0xe2, 0xe0, 0x8e, 0xef, 0x92, 0xd0, 0xeb, 0x52, 0xbf, 0xb9, 0xcb, 0x39, 0x11, 0x95, 0x90, 0xe0, - 0x96, 0xcb, 0xee, 0xf9, 0x95, 0xc5, 0x87, 0xbd, 0xe2, 0x9c, 0x3d, 0xc4, 0x40, 0x5f, 0x82, 0x55, - 0x59, 0xce, 0x6d, 0xc6, 0xbc, 0x01, 0xff, 0x3d, 0x00, 0x86, 0x43, 0x97, 0xa4, 0x96, 0xb7, 0xae, - 0x9a, 0x7a, 0x5e, 0x91, 0x42, 0x4c, 0x25, 0xe2, 0x01, 0x34, 0x6e, 0x12, 0x1d, 0x6b, 0x27, 0x22, - 0xd1, 0x8f, 0x06, 0x80, 0xc9, 0xec, 0x9a, 0x64, 0x19, 0x2c, 0x45, 0xdd, 0x88, 0x09, 0xae, 0x99, - 0x6a, 0xb4, 0x66, 0x3c, 0x5a, 0x73, 0xd7, 0xef, 0x56, 0xb2, 0xbf, 0xff, 0x5a, 0x5a, 0x8a, 0xe2, - 0x6a, 0xb6, 0xf2, 0x86, 0x1f, 0x8e, 0xa9, 0xea, 0x8d, 0x89, 0x55, 0x29, 0xcc, 0x54, 0x59, 0x6b, - 0x71, 0x55, 0xf2, 0x80, 0xe8, 0xc2, 0xd1, 0x5d, 0xf0, 0x52, 0xea, 0xad, 0x2e, 0xb6, 0x0a, 0x32, - 0xea, 0x20, 0x49, 0x29, 0x2c, 0x6f, 0x5d, 0x99, 0x30, 0x0e, 0x15, 0xae, 0x1b, 0xad, 0x43, 0xd1, - 0x4f, 0xf3, 0xe0, 0x35, 0x99, 0xfc, 0x93, 0xd8, 0xef, 0x26, 0x09, 0xc4, 0x01, 0xdf, 0x63, 0xa1, - 0x8d, 0xfd, 0x41, 0xf3, 0x92, 0x52, 0x32, 0x26, 0x49, 0x09, 0x36, 0x00, 0xf0, 0xd8, 0x3d, 0x12, - 0xd6, 0x05, 0x75, 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, 0x67, 0x61, - 0x3d, 0x94, 0x1c, 0x9f, 0x18, 0x20, 0x97, 0xba, 0x55, 0xc0, 0x0f, 0x66, 0xa9, 0x74, 0xdc, 0x4d, - 0x28, 0xbf, 0x7b, 0x8e, 0x0c, 0x9a, 0x61, 0x45, 0x32, 0x7c, 0x1f, 0xee, 0x4c, 0xad, 0x42, 0x9d, - 0xc1, 0xfa, 0x5a, 0xdf, 0xb0, 0x1e, 0xc0, 0xc7, 0x06, 0xc8, 0xa5, 0x4e, 0xf3, 0x6c, 0xd4, 0xc6, - 0x6d, 0xba, 0xd9, 0xa8, 0x8d, 0x5d, 0x25, 0xe8, 0x86, 0xa4, 0xf6, 0x0e, 0x2c, 0x4f, 0x49, 0x2d, - 0xbd, 0x38, 0x2a, 0x8d, 0x87, 0xc7, 0x05, 0xe3, 0xd1, 0x71, 0xc1, 0xf8, 0xfb, 0xb8, 0x60, 0x7c, - 0x7f, 0x52, 0x98, 0x7b, 0x74, 0x52, 0x98, 0x7b, 0x72, 0x52, 0x98, 0xbb, 0xfb, 0x51, 0x62, 0xcb, - 0xeb, 0xd4, 0x25, 0x0f, 0x37, 0xf8, 0x00, 0xe7, 0x68, 0xb3, 0x6c, 0xdd, 0x3f, 0xed, 0xaa, 0x2b, - 0xbf, 0x02, 0xea, 0x12, 0xdf, 0xc8, 0xc8, 0x4b, 0xd5, 0xdb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, - 0x0e, 0xaa, 0xb8, 0xd8, 0xa1, 0x0c, 0x00, 0x00, + // 1173 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xe6, 0x5f, 0xe5, 0x09, 0x09, 0x64, 0x48, 0xa1, 0xb1, 0xc0, 0xae, 0x06, 0x5a, 0x02, + 0xad, 0x77, 0x95, 0x10, 0x0b, 0x88, 0x28, 0x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 0xdb, 0xa0, 0xae, + 0xcb, 0xa5, 0x12, 0x86, 0x48, 0x8b, 0x20, 0x55, 0xa7, 0x6a, 0x6b, 0xcb, 0xa0, 0x6e, 0x3b, 0x14, + 0x05, 0x20, 0x95, 0x80, 0x4a, 0x70, 0x00, 0x51, 0xbe, 0xdb, 0x4a, 0xda, 0x0d, 0x26, 0x24, 0x6d, + 0x34, 0x43, 0x02, 0xdd, 0x0a, 0x56, 0xcb, 0x4b, 0x06, 0x55, 0xe8, 0x5b, 0x01, 0x61, 0xc7, 0xea, + 0x64, 0x0f, 0x2d, 0xde, 0xf5, 0x59, 0xde, 0x17, 0xcc, 0xbb, 0x03, 0x22, 0x61, 0xb2, 0xdd, 0x16, + 0x13, 0x12, 0x5f, 0x45, 0xe7, 0xa8, 0x65, 0x79, 0x4c, 0x88, 0x0b, 0xda, 0x45, 0x6d, 0x29, 0x53, + 0xc2, 0x47, 0x9d, 0xfc, 0x5c, 0x9b, 0x36, 0x9c, 0x35, 0x02, 0x02, 0x62, 0x86, 0x2a, 0xf8, 0x0a, + 0x3a, 0xe7, 0x97, 0xb7, 0x62, 0x5b, 0x17, 0xc6, 0x2f, 0x6a, 0x4b, 0x93, 0x49, 0x6d, 0x10, 0x10, + 0x73, 0xda, 0xff, 0x56, 0xb6, 0xc8, 0xb7, 0x1a, 0xca, 0xf6, 0x02, 0x16, 0x4d, 0xee, 0x0a, 0x86, + 0x39, 0xca, 0x84, 0x81, 0xfa, 0xd8, 0x13, 0x4b, 0x33, 0x2b, 0xb7, 0xf5, 0x81, 0x9a, 0x44, 0x0f, + 0x9d, 0x7d, 0x61, 0xcb, 0xed, 0xfb, 0xae, 0xc5, 0x3c, 0xa7, 0x6d, 0xbb, 0xf5, 0x75, 0x21, 0x98, + 0x2c, 0x79, 0x8c, 0xee, 0x58, 0xfc, 0x91, 0x5b, 0x9a, 0xdc, 0xef, 0xe4, 0xc7, 0xcc, 0x18, 0x83, + 0x7c, 0x89, 0xe6, 0x55, 0x38,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07, 0xd7, 0x05, 0x87, + 0x56, 0x45, 0x84, 0xb3, 0xb7, 0x5c, 0x34, 0x1e, 0x1f, 0xf7, 0x87, 0x50, 0x2d, 0xf8, 0xe0, 0xaf, + 0x6e, 0x75, 0x5a, 0xfd, 0xf5, 0x78, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x31, 0x15, 0x79, + 0xed, 0xc7, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -664,6 +803,8 @@ type QueryClient interface { LiquidityDepthsForRange(ctx context.Context, in *QueryLiquidityDepthsForRangeRequest, opts ...grpc.CallOption) (*QueryLiquidityDepthsForRangeResponse, error) // UserPositions returns all concentrated postitions of some address. 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(ctx context.Context, in *QueryClaimableFeesRequest, opts ...grpc.CallOption) (*QueryClaimableFeesResponse, error) } @@ -711,6 +852,15 @@ func (c *queryClient) UserPositions(ctx context.Context, in *QueryUserPositionsR return out, nil } +func (c *queryClient) TotalLiquidityForRange(ctx context.Context, in *QueryTotalLiquidityForRangeRequest, opts ...grpc.CallOption) (*QueryTotalLiquidityForRangeResponse, error) { + out := new(QueryTotalLiquidityForRangeResponse) + err := c.cc.Invoke(ctx, "/osmosis.concentratedliquidity.v1beta1.Query/TotalLiquidityForRange", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) ClaimableFees(ctx context.Context, in *QueryClaimableFeesRequest, opts ...grpc.CallOption) (*QueryClaimableFeesResponse, error) { out := new(QueryClaimableFeesResponse) err := c.cc.Invoke(ctx, "/osmosis.concentratedliquidity.v1beta1.Query/ClaimableFees", in, out, opts...) @@ -730,6 +880,8 @@ type QueryServer interface { LiquidityDepthsForRange(context.Context, *QueryLiquidityDepthsForRangeRequest) (*QueryLiquidityDepthsForRangeResponse, error) // UserPositions returns all concentrated postitions of some address. UserPositions(context.Context, *QueryUserPositionsRequest) (*QueryUserPositionsResponse, error) + // TotalLiquidityForRange the amount of liquidity existing within given range. + TotalLiquidityForRange(context.Context, *QueryTotalLiquidityForRangeRequest) (*QueryTotalLiquidityForRangeResponse, error) ClaimableFees(context.Context, *QueryClaimableFeesRequest) (*QueryClaimableFeesResponse, error) } @@ -749,6 +901,9 @@ func (*UnimplementedQueryServer) LiquidityDepthsForRange(ctx context.Context, re func (*UnimplementedQueryServer) UserPositions(ctx context.Context, req *QueryUserPositionsRequest) (*QueryUserPositionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserPositions not implemented") } +func (*UnimplementedQueryServer) TotalLiquidityForRange(ctx context.Context, req *QueryTotalLiquidityForRangeRequest) (*QueryTotalLiquidityForRangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalLiquidityForRange not implemented") +} func (*UnimplementedQueryServer) ClaimableFees(ctx context.Context, req *QueryClaimableFeesRequest) (*QueryClaimableFeesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimableFees not implemented") } @@ -829,6 +984,24 @@ func _Query_UserPositions_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_TotalLiquidityForRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalLiquidityForRangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalLiquidityForRange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.concentratedliquidity.v1beta1.Query/TotalLiquidityForRange", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalLiquidityForRange(ctx, req.(*QueryTotalLiquidityForRangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_ClaimableFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryClaimableFeesRequest) if err := dec(in); err != nil { @@ -867,6 +1040,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "UserPositions", Handler: _Query_UserPositions_Handler, }, + { + MethodName: "TotalLiquidityForRange", + Handler: _Query_TotalLiquidityForRange_Handler, + }, { MethodName: "ClaimableFees", Handler: _Query_ClaimableFees_Handler, @@ -1216,6 +1393,124 @@ func (m *LiquidityDepth) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *LiquidityDepthWithRange) 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 *LiquidityDepthWithRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LiquidityDepthWithRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.UpperTick.Size() + i -= size + if _, err := m.UpperTick.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.LowerTick.Size() + i -= size + if _, err := m.LowerTick.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.LiquidityAmount.Size() + i -= size + if _, err := m.LiquidityAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryTotalLiquidityForRangeRequest) 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 *QueryTotalLiquidityForRangeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidityForRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalLiquidityForRangeResponse) 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 *QueryTotalLiquidityForRangeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidityForRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Liquidity) > 0 { + for iNdEx := len(m.Liquidity) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Liquidity[iNdEx].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 *QueryClaimableFeesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1436,6 +1731,48 @@ func (m *LiquidityDepth) Size() (n int) { return n } +func (m *LiquidityDepthWithRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LiquidityAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.LowerTick.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.UpperTick.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTotalLiquidityForRangeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + return n +} + +func (m *QueryTotalLiquidityForRangeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Liquidity) > 0 { + for _, e := range m.Liquidity { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryClaimableFeesRequest) Size() (n int) { if m == nil { return 0 @@ -2342,6 +2679,311 @@ func (m *LiquidityDepth) Unmarshal(dAtA []byte) error { } return nil } +func (m *LiquidityDepthWithRange) 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: LiquidityDepthWithRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LiquidityDepthWithRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidityAmount", 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.LiquidityAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LowerTick", 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.LowerTick.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpperTick", 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.UpperTick.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 *QueryTotalLiquidityForRangeRequest) 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: QueryTotalLiquidityForRangeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalLiquidityForRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + 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 + } + } + 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 *QueryTotalLiquidityForRangeResponse) 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: QueryTotalLiquidityForRangeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalLiquidityForRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Liquidity", 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.Liquidity = append(m.Liquidity, LiquidityDepthWithRange{}) + if err := m.Liquidity[len(m.Liquidity)-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 (m *QueryClaimableFeesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/concentrated-liquidity/types/query/query.pb.gw.go b/x/concentrated-liquidity/types/query/query.pb.gw.go index a53a05a6682..d5674fd41f7 100644 --- a/x/concentrated-liquidity/types/query/query.pb.gw.go +++ b/x/concentrated-liquidity/types/query/query.pb.gw.go @@ -195,6 +195,42 @@ func local_request_Query_UserPositions_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_TotalLiquidityForRange_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TotalLiquidityForRange_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidityForRangeRequest + 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_TotalLiquidityForRange_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TotalLiquidityForRange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalLiquidityForRange_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidityForRangeRequest + 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_TotalLiquidityForRange_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TotalLiquidityForRange(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_ClaimableFees_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -329,6 +365,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TotalLiquidityForRange_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_TotalLiquidityForRange_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_TotalLiquidityForRange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_ClaimableFees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -473,6 +532,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TotalLiquidityForRange_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_TotalLiquidityForRange_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_TotalLiquidityForRange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_ClaimableFees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -505,6 +584,8 @@ var ( pattern_Query_UserPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "concentratedliquidity", "v1beta1", "positions", "address"}, "", runtime.AssumeColonVerbOpt(false))) + 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))) ) @@ -517,5 +598,7 @@ var ( forward_Query_UserPositions_0 = runtime.ForwardResponseMessage + forward_Query_TotalLiquidityForRange_0 = runtime.ForwardResponseMessage + forward_Query_ClaimableFees_0 = runtime.ForwardResponseMessage )