From 8431a7a4607cd96d006644dedac0eea199d9a7d5 Mon Sep 17 00:00:00 2001 From: Amit Date: Fri, 23 Aug 2024 11:22:07 +0530 Subject: [PATCH 01/10] improvements --- docs/static/openapi.yml | 465 +++++++++++------- proto/elys/leveragelp/query.proto | 25 +- x/leveragelp/client/cli/query.go | 2 + x/leveragelp/client/cli/query_get_add.go | 50 ++ x/leveragelp/keeper/msg_server_open.go | 5 +- x/leveragelp/keeper/position.go | 4 +- x/leveragelp/keeper/position_close.go | 11 +- x/leveragelp/keeper/query_get_add.go | 26 + x/leveragelp/keeper/query_position.go | 6 +- x/leveragelp/keeper/utils.go | 8 +- x/leveragelp/keeper/utils_test.go | 2 +- x/leveragelp/types/query.pb.go | 591 ++++++++++++++++++----- x/leveragelp/types/query.pb.gw.go | 101 ++++ 13 files changed, 991 insertions(+), 305 deletions(-) create mode 100644 x/leveragelp/client/cli/query_get_add.go create mode 100644 x/leveragelp/keeper/query_get_add.go diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index bc5121f77..c09d7d299 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -41020,6 +41020,41 @@ paths: type: string tags: - Query + /elys-network/elys/leveragelp/get_add/{id}: + get: + summary: Queries a list of GetAdd items. + operationId: ElysLeveragelpGetAdd + responses: + '200': + description: A successful response. + schema: + type: object + 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: id + in: path + required: true + type: integer + format: int32 + tags: + - Query /elys-network/elys/leveragelp/is-whitelisted: get: summary: Queries a list of IsWhitelisted items. @@ -41407,40 +41442,46 @@ paths: position: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements the + custom method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string locked_lp_token: type: string @@ -41489,40 +41530,46 @@ paths: items: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements + the custom method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string pagination: type: object @@ -41816,40 +41863,46 @@ paths: items: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements + the custom method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string pagination: type: object @@ -87331,6 +87384,18 @@ definitions: method signatures required by gogoproto. + elys.leveragelp.AddPool: + type: object + properties: + amm_pool_id: + type: string + format: uint64 + enabled: + type: boolean + closed: + type: boolean + leverage_max: + type: string elys.leveragelp.IsWhitelistedResponse: type: object properties: @@ -87340,6 +87405,8 @@ definitions: type: boolean elys.leveragelp.MsgAddCollateralResponse: type: object + elys.leveragelp.MsgAddPoolResponse: + type: object elys.leveragelp.MsgClaimRewardsResponse: type: object elys.leveragelp.MsgClosePositionsResponse: @@ -87350,6 +87417,8 @@ definitions: type: object elys.leveragelp.MsgOpenResponse: type: object + elys.leveragelp.MsgRemovePoolResponse: + type: object elys.leveragelp.MsgUpdateParamsResponse: type: object elys.leveragelp.MsgUpdatePoolsResponse: @@ -87520,40 +87589,45 @@ definitions: position: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements the custom + method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string locked_lp_token: type: string @@ -87565,40 +87639,45 @@ definitions: items: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements the custom + method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string pagination: type: object @@ -87710,40 +87789,45 @@ definitions: items: type: object properties: - address: - type: string - collateral: + position: type: object properties: - denom: - type: string - amount: + address: type: string - description: >- - Coin defines a token with a denomination and an amount. + collateral: + 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 + NOTE: The amount field is an Int which implements the custom + method - signatures required by gogoproto. - liabilities: - type: string - title: For recording - leverage: - type: string - title: For recording - leveraged_lp_amount: - type: string - position_health: - type: string - id: - type: string - format: uint64 - amm_pool_id: - type: string - format: uint64 - stop_loss_price: + signatures required by gogoproto. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: type: string pagination: type: object @@ -87860,6 +87944,8 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + elys.leveragelp.QueryGetAddResponse: + type: object elys.leveragelp.QueryGetPoolResponse: type: object properties: @@ -87893,6 +87979,49 @@ definitions: type: string borrow_fee: type: string + elys.leveragelp.QueryPosition: + type: object + properties: + position: + type: object + properties: + address: + type: string + collateral: + 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. + liabilities: + type: string + title: For recording + leverage: + type: string + title: For recording + leveraged_lp_amount: + type: string + position_health: + type: string + id: + type: string + format: uint64 + amm_pool_id: + type: string + format: uint64 + stop_loss_price: + type: string + updated_leverage: + type: string elys.leveragelp.QueryRewardsResponse: type: object properties: diff --git a/proto/elys/leveragelp/query.proto b/proto/elys/leveragelp/query.proto index 51a034bff..2e24682a3 100644 --- a/proto/elys/leveragelp/query.proto +++ b/proto/elys/leveragelp/query.proto @@ -8,7 +8,6 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "elys/leveragelp/params.proto"; import "elys/leveragelp/types.proto"; - import "elys/leveragelp/pool.proto"; option go_package = "github.com/elys-network/elys/x/leveragelp/types"; @@ -103,6 +102,12 @@ service Query { option (google.api.http).get = "/elys-network/elys/leveragelp/committed_tokens_locked/{address}"; } + + // Queries a list of GetAdd items. + rpc GetAdd (QueryGetAddRequest) returns (QueryGetAddResponse) { + option (google.api.http).get = "/elys-network/elys/leveragelp/get_add/{id}"; + + } } // ParamsRequest is request type for the Query/Params RPC method. message ParamsRequest {} @@ -119,7 +124,7 @@ message PositionsRequest { } message PositionsResponse { - repeated QueryPosition positions = 1; + repeated QueryPosition positions = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -129,7 +134,7 @@ message PositionsByPoolRequest { } message PositionsByPoolResponse { - repeated QueryPosition positions = 1; + repeated QueryPosition positions = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -187,7 +192,7 @@ message QueryAllPoolResponse { message PositionResponse { QueryPosition position = 1; - string locked_lp_token = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string locked_lp_token = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; } message QueryLiquidationPriceRequest { @@ -244,13 +249,21 @@ message QueryCommittedTokensLockedRequest { } message QueryCommittedTokensLockedResponse { - string address = 1; + 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"]; } message QueryPosition { - Position position = 1; + Position position = 1; string updated_leverage = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } +message QueryGetAddRequest { + int32 id = 1; +} + +message QueryGetAddResponse { + string address = 1; +} + diff --git a/x/leveragelp/client/cli/query.go b/x/leveragelp/client/cli/query.go index f7bf11604..dca0f0bf4 100644 --- a/x/leveragelp/client/cli/query.go +++ b/x/leveragelp/client/cli/query.go @@ -41,6 +41,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdCommittedTokensLocked()) + cmd.AddCommand(CmdGetAdd()) + // this line is used by starport scaffolding # 1 return cmd diff --git a/x/leveragelp/client/cli/query_get_add.go b/x/leveragelp/client/cli/query_get_add.go new file mode 100644 index 000000000..81e7c90b4 --- /dev/null +++ b/x/leveragelp/client/cli/query_get_add.go @@ -0,0 +1,50 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/elys-network/elys/x/leveragelp/types" + "github.com/spf13/cast" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdGetAdd() *cobra.Command { + cmd := &cobra.Command{ + Use: "get-add [id]", + Short: "Query get-add", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + reqId, err := cast.ToInt32E(args[0]) + if err != nil { + return err + } + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryGetAddRequest{ + + Id: reqId, + } + + res, err := queryClient.GetAdd(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/leveragelp/keeper/msg_server_open.go b/x/leveragelp/keeper/msg_server_open.go index 176fff5c1..bd6018676 100644 --- a/x/leveragelp/keeper/msg_server_open.go +++ b/x/leveragelp/keeper/msg_server_open.go @@ -20,7 +20,10 @@ func (k Keeper) Open(ctx sdk.Context, msg *types.MsgOpen) (*types.MsgOpenRespons } // Check if it is the same direction position for the same trader. - if position := k.CheckSamePosition(ctx, msg); position != nil { + if position, err := k.CheckSamePosition(ctx, msg); position != nil { + if err != nil { + return nil, err + } response, err := k.OpenConsolidate(ctx, position, msg) if err != nil { return nil, err diff --git a/x/leveragelp/keeper/position.go b/x/leveragelp/keeper/position.go index 30b03547e..405e34820 100644 --- a/x/leveragelp/keeper/position.go +++ b/x/leveragelp/keeper/position.go @@ -258,7 +258,7 @@ func (k Keeper) GetPositionHealth(ctx sdk.Context, position types.Position) (sdk baseCurrency, found := k.assetProfileKeeper.GetUsdcDenom(ctx) if !found { - return sdk.Dec{}, errorsmod.Wrapf(assetprofiletypes.ErrAssetProfileNotFound, "asset %s not found", ptypes.BaseCurrency) + return sdk.ZeroDec(), errorsmod.Wrapf(assetprofiletypes.ErrAssetProfileNotFound, "asset %s not found", ptypes.BaseCurrency) } leveragedLpAmount := sdk.ZeroInt() @@ -270,7 +270,7 @@ func (k Keeper) GetPositionHealth(ctx sdk.Context, position types.Position) (sdk exitCoinsAfterFee, _, err := k.amm.ExitPoolEst(ctx, position.GetAmmPoolId(), leveragedLpAmount, baseCurrency) if err != nil { - return sdk.Dec{}, err + return sdk.ZeroDec(), err } exitAmountAfterFee := exitCoinsAfterFee.AmountOf(baseCurrency) diff --git a/x/leveragelp/keeper/position_close.go b/x/leveragelp/keeper/position_close.go index 42d7486af..aabedb361 100644 --- a/x/leveragelp/keeper/position_close.go +++ b/x/leveragelp/keeper/position_close.go @@ -65,10 +65,8 @@ func (k Keeper) ForceCloseLong(ctx sdk.Context, position types.Position, pool ty // Update leveragedLpAmount position.LeveragedLpAmount = position.LeveragedLpAmount.Sub(lpAmount) if position.LeveragedLpAmount.IsZero() { - err = k.masterchefKeeper.ClaimRewards(ctx, position.GetPositionAddress(), []uint64{position.AmmPoolId}, positionOwner) - if err != nil { - return sdk.ZeroInt(), err - } + // As we have already exited the pool, we need to delete the position + k.masterchefKeeper.ClaimRewards(ctx, position.GetPositionAddress(), []uint64{position.AmmPoolId}, positionOwner) err = k.DestroyPosition(ctx, positionOwner, position.Id) if err != nil { return sdk.ZeroInt(), err @@ -76,10 +74,9 @@ func (k Keeper) ForceCloseLong(ctx sdk.Context, position types.Position, pool ty } else { // Update position health positionHealth, err := k.GetPositionHealth(ctx, position) - if err != nil { - return sdk.ZeroInt(), err + if err == nil { + position.PositionHealth = positionHealth } - position.PositionHealth = positionHealth // Update Liabilities debt = k.stableKeeper.UpdateInterestAndGetDebt(ctx, position.GetPositionAddress()) diff --git a/x/leveragelp/keeper/query_get_add.go b/x/leveragelp/keeper/query_get_add.go new file mode 100644 index 000000000..d6b848c61 --- /dev/null +++ b/x/leveragelp/keeper/query_get_add.go @@ -0,0 +1,26 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/elys-network/elys/x/leveragelp/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) GetAdd(goCtx context.Context, req *types.QueryGetAddRequest) (*types.QueryGetAddResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + address := types.GetPositionAddress(uint64(req.Id)) + addressString, err := sdk.Bech32ifyAddressBytes("elys", address) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryGetAddResponse{ + Address: addressString, + }, nil +} diff --git a/x/leveragelp/keeper/query_position.go b/x/leveragelp/keeper/query_position.go index 4564f4c7e..17199d61d 100644 --- a/x/leveragelp/keeper/query_position.go +++ b/x/leveragelp/keeper/query_position.go @@ -2,7 +2,7 @@ package keeper import ( "context" - + sdk "github.com/cosmos/cosmos-sdk/types" ammtypes "github.com/elys-network/elys/x/amm/types" "github.com/elys-network/elys/x/leveragelp/types" @@ -24,8 +24,8 @@ func (k Keeper) Position(goCtx context.Context, req *types.PositionRequest) (*ty var positions = []*types.Position{} positions = append(positions, &position) - - updatedLeveragePosition, err := k.GetLeverageLpUpdatedLeverage(ctx, positions) + + updatedLeveragePosition, err := k.GetLeverageLpUpdatedLeverage(ctx, positions) if err != nil { return nil, err } diff --git a/x/leveragelp/keeper/utils.go b/x/leveragelp/keeper/utils.go index 5c126f123..3e2530f78 100644 --- a/x/leveragelp/keeper/utils.go +++ b/x/leveragelp/keeper/utils.go @@ -20,18 +20,18 @@ func (k Keeper) CheckUserAuthorization(ctx sdk.Context, msg *types.MsgOpen) erro return nil } -func (k Keeper) CheckSamePosition(ctx sdk.Context, msg *types.MsgOpen) *types.Position { +func (k Keeper) CheckSamePosition(ctx sdk.Context, msg *types.MsgOpen) (*types.Position, error) { positions, _, err := k.GetPositionsForAddress(ctx, sdk.MustAccAddressFromBech32(msg.Creator), &query.PageRequest{}) if err != nil { - return nil + return nil, err } for _, position := range positions { if position.Position.AmmPoolId == msg.AmmPoolId && position.Position.Collateral.Denom == msg.CollateralAsset { - return position.Position + return position.Position, nil } } - return nil + return nil, nil } func (k Keeper) CheckPoolHealth(ctx sdk.Context, poolId uint64) error { diff --git a/x/leveragelp/keeper/utils_test.go b/x/leveragelp/keeper/utils_test.go index f40b7c11a..afc544d75 100644 --- a/x/leveragelp/keeper/utils_test.go +++ b/x/leveragelp/keeper/utils_test.go @@ -52,7 +52,7 @@ func (suite KeeperTestSuite) TestCheckSameAssets() { } // Expect no error - position = k.CheckSamePosition(suite.ctx, msg) + position, _ = k.CheckSamePosition(suite.ctx, msg) suite.Require().NotNil(position) } diff --git a/x/leveragelp/types/query.pb.go b/x/leveragelp/types/query.pb.go index 34db8293b..05eba3d6d 100644 --- a/x/leveragelp/types/query.pb.go +++ b/x/leveragelp/types/query.pb.go @@ -1507,6 +1507,94 @@ func (m *QueryPosition) GetPosition() *Position { return nil } +type QueryGetAddRequest struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryGetAddRequest) Reset() { *m = QueryGetAddRequest{} } +func (m *QueryGetAddRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetAddRequest) ProtoMessage() {} +func (*QueryGetAddRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_76659893e638cc9b, []int{31} +} +func (m *QueryGetAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAddRequest.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 *QueryGetAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAddRequest.Merge(m, src) +} +func (m *QueryGetAddRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAddRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAddRequest proto.InternalMessageInfo + +func (m *QueryGetAddRequest) GetId() int32 { + if m != nil { + return m.Id + } + return 0 +} + +type QueryGetAddResponse struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryGetAddResponse) Reset() { *m = QueryGetAddResponse{} } +func (m *QueryGetAddResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetAddResponse) ProtoMessage() {} +func (*QueryGetAddResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_76659893e638cc9b, []int{32} +} +func (m *QueryGetAddResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAddResponse.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 *QueryGetAddResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAddResponse.Merge(m, src) +} +func (m *QueryGetAddResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAddResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAddResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAddResponse proto.InternalMessageInfo + +func (m *QueryGetAddResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + func init() { proto.RegisterType((*ParamsRequest)(nil), "elys.leveragelp.ParamsRequest") proto.RegisterType((*ParamsResponse)(nil), "elys.leveragelp.ParamsResponse") @@ -1539,124 +1627,129 @@ func init() { proto.RegisterType((*QueryCommittedTokensLockedRequest)(nil), "elys.leveragelp.QueryCommittedTokensLockedRequest") proto.RegisterType((*QueryCommittedTokensLockedResponse)(nil), "elys.leveragelp.QueryCommittedTokensLockedResponse") proto.RegisterType((*QueryPosition)(nil), "elys.leveragelp.QueryPosition") + proto.RegisterType((*QueryGetAddRequest)(nil), "elys.leveragelp.QueryGetAddRequest") + proto.RegisterType((*QueryGetAddResponse)(nil), "elys.leveragelp.QueryGetAddResponse") } func init() { proto.RegisterFile("elys/leveragelp/query.proto", fileDescriptor_76659893e638cc9b) } var fileDescriptor_76659893e638cc9b = []byte{ - // 1782 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0x9f, 0x7c, 0x32, 0x45, 0x69, 0x2c, 0xd5, 0x32, 0xed, 0x52, 0xf2, 0xc2, 0x96, - 0x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 0x8a, 0x0c, 0x09, 0xe2, 0x25, 0x06, 0xe8, 0x3c, 0x92, 0xda, - 0x03, 0xe2, 0xb3, 0x40, 0xb3, 0xea, 0xd0, 0x0b, 0x01, 0xa6, 0x5a, 0x76, 0x93, 0x68, 0x31, 0x81, - 0x8b, 0x36, 0xad, 0x6b, 0xee, 0xc2, 0xbe, 0x74, 0x38, 0xf6, 0x55, 0x86, 0x7d, 0x19, 0x5d, 0xed, - 0x40, 0xa6, 0x67, 0xc4, 0xfd, 0x19, 0xc7, 0x2e, 0xb9, 0x4d, 0x66, 0x33, 0x96, 0x95, 0xb5, 0xe7, - 0xaf, 0xf3, 0xc2, 0xcb, 0xd7, 0x79, 0xe1, 0xdb, 0xd7, 0x79, 0xe1, 0xc9, 0x9b, 0x7c, 0xdf, 0xcb, - 0x37, 0xf9, 0xbe, 0xaf, 0xde, 0xe4, 0xfb, 0xee, 0x49, 0x81, 0xf6, 0x2c, 0xee, 0xe4, 0x51, 0xec, - 0xdf, 0x34, 0xe5, 0x21, 0xf6, 0xbf, 0x98, 0x0b, 0xdf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x02, - 0x41, 0x46, 0x92, 0x1a, 0x00, 0x00, + // 1835 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xdd, 0x6f, 0x1c, 0x57, + 0x15, 0xcf, 0xac, 0x3f, 0xe2, 0x3d, 0x8e, 0x3f, 0x72, 0x63, 0x13, 0x77, 0x13, 0xd6, 0xc9, 0xe0, + 0xa4, 0xa6, 0xcd, 0xee, 0x24, 0x0e, 0x6e, 0x51, 0x21, 0x2a, 0xeb, 0xb4, 0xb1, 0x0c, 0x06, 0xcc, + 0x04, 0xb5, 0x34, 0x08, 0x0d, 0xb3, 0x3b, 0x37, 0x9b, 0x91, 0x67, 0xe7, 0x4e, 0x66, 0xee, 0x66, + 0xe3, 0x58, 0x46, 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0x08, 0xfd, 0x42, 0x81, 0xa9, 0xd0, 0x48, 0x50, 0x04, 0x25, 0x3d, 0x3c, 0x17, 0x41, + 0xc9, 0x8c, 0xc0, 0xea, 0x57, 0x18, 0x94, 0x4d, 0x74, 0x73, 0x14, 0x28, 0xd9, 0xa0, 0xfd, 0x4c, + 0x81, 0x99, 0xe8, 0xcd, 0xb9, 0x54, 0xfc, 0xc2, 0x08, 0x48, 0x97, 0x07, 0x48, 0x08, 0x38, 0xb7, + 0x18, 0x9c, 0xd7, 0xd1, 0xe6, 0x68, 0x89, 0x9f, 0xcc, 0x75, 0xdb, 0x3a, 0x42, 0x7f, 0x56, 0x60, + 0x31, 0x3b, 0x4e, 0xa2, 0x5a, 0x7f, 0x26, 0x0a, 0x26, 0xda, 0x4a, 0x7d, 0x54, 0x71, 0x01, 0xf9, + 0x6d, 0x06, 0xf9, 0x4d, 0x74, 0x6b, 0x30, 0x64, 0x27, 0xd6, 0x37, 0xd8, 0x60, 0xaa, 0x1d, 0x26, + 0xba, 0xf1, 0x23, 0xf4, 0x53, 0x05, 0x4e, 0x8b, 0xa9, 0xac, 0x28, 0xc2, 0xe9, 0x01, 0xb6, 0x28, + 0xc2, 0x99, 0xd1, 0x4e, 0xdd, 0x64, 0xf8, 0x34, 0x54, 0x1b, 0x8c, 0x8f, 0x7d, 0xef, 0xc4, 0x01, + 0xb5, 0x3b, 0x0c, 0x63, 0x98, 0x6f, 0x33, 0xb2, 0xc1, 0x45, 0x05, 0xae, 0x32, 0x63, 0x52, 0x9f, + 0xbb, 0xd8, 0xb7, 0x4f, 0x56, 0x5f, 0x63, 0x90, 0xae, 0xa3, 0xfa, 0x60, 0x48, 0xad, 0x50, 0x2f, + 0x89, 0xe9, 0xe7, 0x0a, 0x9c, 0x16, 0x5d, 0x78, 0x11, 0x47, 0xe9, 0x71, 0xa9, 0x88, 0xa3, 0xcc, + 0xec, 0xa1, 0xbe, 0xce, 0x00, 0xdd, 0x40, 0xda, 0x60, 0x40, 0x62, 0xc4, 0x88, 0xb3, 0x0e, 0xfd, + 0x4d, 0x81, 0xe5, 0xbe, 0x4d, 0x2a, 0xda, 0x28, 0xe0, 0x62, 0x40, 0x47, 0x5c, 0xb9, 0x79, 0x2c, + 0x1d, 0x81, 0x7d, 0x9b, 0x61, 0x6f, 0xa0, 0x37, 0x87, 0x90, 0x29, 0x8d, 0xf0, 0xaf, 0x43, 0x81, + 0xc1, 0x7b, 0xd7, 0xc4, 0x59, 0xde, 0x57, 0x60, 0x9a, 0x37, 0x5e, 0xe8, 0x0b, 0x85, 0x75, 0x2c, + 0x6e, 0xde, 0x2a, 0x6b, 0x83, 0x85, 0x8e, 0x57, 0xeb, 0xda, 0x98, 0x1a, 0xa6, 0x65, 0xb1, 0x6b, + 0xbc, 0xb5, 0xf3, 0xc9, 0xb3, 0xaa, 0xf2, 0xe9, 0xb3, 0xaa, 0xf2, 0xef, 0x67, 0x55, 0xe5, 0xc3, + 0xe7, 0xd5, 0x53, 0x9f, 0x3e, 0xaf, 0x9e, 0xfa, 0xc7, 0xf3, 0xea, 0xa9, 0x7b, 0x5a, 0xa2, 0xff, + 0xcc, 0xdb, 0x7b, 0x9c, 0xfb, 0x7f, 0xa8, 0xe6, 0x34, 0xfb, 0xcf, 0xa6, 0x9b, 0xff, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0xae, 0x1d, 0x1b, 0xb2, 0x73, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1700,6 +1793,8 @@ type QueryClient interface { Rewards(ctx context.Context, in *QueryRewardsRequest, opts ...grpc.CallOption) (*QueryRewardsResponse, error) // Queries a list of CommittedTokensLocked items. CommittedTokensLocked(ctx context.Context, in *QueryCommittedTokensLockedRequest, opts ...grpc.CallOption) (*QueryCommittedTokensLockedResponse, error) + // Queries a list of GetAdd items. + GetAdd(ctx context.Context, in *QueryGetAddRequest, opts ...grpc.CallOption) (*QueryGetAddResponse, error) } type queryClient struct { @@ -1845,6 +1940,15 @@ func (c *queryClient) CommittedTokensLocked(ctx context.Context, in *QueryCommit return out, nil } +func (c *queryClient) GetAdd(ctx context.Context, in *QueryGetAddRequest, opts ...grpc.CallOption) (*QueryGetAddResponse, error) { + out := new(QueryGetAddResponse) + err := c.cc.Invoke(ctx, "/elys.leveragelp.Query/GetAdd", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1876,6 +1980,8 @@ type QueryServer interface { Rewards(context.Context, *QueryRewardsRequest) (*QueryRewardsResponse, error) // Queries a list of CommittedTokensLocked items. CommittedTokensLocked(context.Context, *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) + // Queries a list of GetAdd items. + GetAdd(context.Context, *QueryGetAddRequest) (*QueryGetAddResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1927,6 +2033,9 @@ func (*UnimplementedQueryServer) Rewards(ctx context.Context, req *QueryRewardsR func (*UnimplementedQueryServer) CommittedTokensLocked(ctx context.Context, req *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommittedTokensLocked not implemented") } +func (*UnimplementedQueryServer) GetAdd(ctx context.Context, req *QueryGetAddRequest) (*QueryGetAddResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAdd not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2202,6 +2311,24 @@ func _Query_CommittedTokensLocked_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_GetAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAddRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetAdd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/elys.leveragelp.Query/GetAdd", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetAdd(ctx, req.(*QueryGetAddRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.leveragelp.Query", HandlerType: (*QueryServer)(nil), @@ -2266,6 +2393,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "CommittedTokensLocked", Handler: _Query_CommittedTokensLocked_Handler, }, + { + MethodName: "GetAdd", + Handler: _Query_GetAdd_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "elys/leveragelp/query.proto", @@ -3534,6 +3665,64 @@ func (m *QueryPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryGetAddRequest) 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 *QueryGetAddRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGetAddResponse) 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 *QueryGetAddResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetAddResponse) 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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -4030,6 +4219,31 @@ func (m *QueryPosition) Size() (n int) { return n } +func (m *QueryGetAddRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetAddResponse) 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 sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7366,6 +7580,157 @@ func (m *QueryPosition) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetAddRequest) 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: QueryGetAddRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= int32(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 *QueryGetAddResponse) 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: QueryGetAddResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAddResponse: 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/leveragelp/types/query.pb.gw.go b/x/leveragelp/types/query.pb.gw.go index 80b170c61..31ea1dcfd 100644 --- a/x/leveragelp/types/query.pb.gw.go +++ b/x/leveragelp/types/query.pb.gw.go @@ -909,6 +909,60 @@ func local_request_Query_CommittedTokensLocked_0(ctx context.Context, marshaler } +func request_Query_GetAdd_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAddRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetAdd_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAddRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetAdd(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. @@ -1260,6 +1314,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetAdd_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_GetAdd_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_GetAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1601,6 +1678,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetAdd_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_GetAdd_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_GetAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1634,6 +1731,8 @@ var ( pattern_Query_Rewards_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", "leveragelp", "rewards", "address"}, "", 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", "leveragelp", "committed_tokens_locked", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_GetAdd_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", "leveragelp", "get_add", "id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1666,4 +1765,6 @@ var ( forward_Query_Rewards_0 = runtime.ForwardResponseMessage forward_Query_CommittedTokensLocked_0 = runtime.ForwardResponseMessage + + forward_Query_GetAdd_0 = runtime.ForwardResponseMessage ) From 35c523bac4dd6b87d60cf35ed261925a6b20fc5e Mon Sep 17 00:00:00 2001 From: Amit Date: Fri, 23 Aug 2024 12:06:17 +0530 Subject: [PATCH 02/10] remove --- proto/elys/leveragelp/query.proto | 15 - x/leveragelp/client/cli/query.go | 2 - x/leveragelp/client/cli/query_get_add.go | 50 -- x/leveragelp/keeper/query_get_add.go | 26 - x/leveragelp/types/query.pb.go | 591 +++++------------------ x/leveragelp/types/query.pb.gw.go | 101 ---- 6 files changed, 113 insertions(+), 672 deletions(-) delete mode 100644 x/leveragelp/client/cli/query_get_add.go delete mode 100644 x/leveragelp/keeper/query_get_add.go diff --git a/proto/elys/leveragelp/query.proto b/proto/elys/leveragelp/query.proto index 2e24682a3..814b21e3e 100644 --- a/proto/elys/leveragelp/query.proto +++ b/proto/elys/leveragelp/query.proto @@ -102,12 +102,6 @@ service Query { option (google.api.http).get = "/elys-network/elys/leveragelp/committed_tokens_locked/{address}"; } - - // Queries a list of GetAdd items. - rpc GetAdd (QueryGetAddRequest) returns (QueryGetAddResponse) { - option (google.api.http).get = "/elys-network/elys/leveragelp/get_add/{id}"; - - } } // ParamsRequest is request type for the Query/Params RPC method. message ParamsRequest {} @@ -258,12 +252,3 @@ message QueryPosition { Position position = 1; string updated_leverage = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } - -message QueryGetAddRequest { - int32 id = 1; -} - -message QueryGetAddResponse { - string address = 1; -} - diff --git a/x/leveragelp/client/cli/query.go b/x/leveragelp/client/cli/query.go index dca0f0bf4..f7bf11604 100644 --- a/x/leveragelp/client/cli/query.go +++ b/x/leveragelp/client/cli/query.go @@ -41,8 +41,6 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdCommittedTokensLocked()) - cmd.AddCommand(CmdGetAdd()) - // this line is used by starport scaffolding # 1 return cmd diff --git a/x/leveragelp/client/cli/query_get_add.go b/x/leveragelp/client/cli/query_get_add.go deleted file mode 100644 index 81e7c90b4..000000000 --- a/x/leveragelp/client/cli/query_get_add.go +++ /dev/null @@ -1,50 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/elys-network/elys/x/leveragelp/types" - "github.com/spf13/cast" - "github.com/spf13/cobra" -) - -var _ = strconv.Itoa(0) - -func CmdGetAdd() *cobra.Command { - cmd := &cobra.Command{ - Use: "get-add [id]", - Short: "Query get-add", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - reqId, err := cast.ToInt32E(args[0]) - if err != nil { - return err - } - - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryGetAddRequest{ - - Id: reqId, - } - - res, err := queryClient.GetAdd(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/leveragelp/keeper/query_get_add.go b/x/leveragelp/keeper/query_get_add.go deleted file mode 100644 index d6b848c61..000000000 --- a/x/leveragelp/keeper/query_get_add.go +++ /dev/null @@ -1,26 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/elys-network/elys/x/leveragelp/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) GetAdd(goCtx context.Context, req *types.QueryGetAddRequest) (*types.QueryGetAddResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - address := types.GetPositionAddress(uint64(req.Id)) - addressString, err := sdk.Bech32ifyAddressBytes("elys", address) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryGetAddResponse{ - Address: addressString, - }, nil -} diff --git a/x/leveragelp/types/query.pb.go b/x/leveragelp/types/query.pb.go index 05eba3d6d..34db8293b 100644 --- a/x/leveragelp/types/query.pb.go +++ b/x/leveragelp/types/query.pb.go @@ -1507,94 +1507,6 @@ func (m *QueryPosition) GetPosition() *Position { return nil } -type QueryGetAddRequest struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryGetAddRequest) Reset() { *m = QueryGetAddRequest{} } -func (m *QueryGetAddRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetAddRequest) ProtoMessage() {} -func (*QueryGetAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_76659893e638cc9b, []int{31} -} -func (m *QueryGetAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetAddRequest.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 *QueryGetAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetAddRequest.Merge(m, src) -} -func (m *QueryGetAddRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetAddRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetAddRequest proto.InternalMessageInfo - -func (m *QueryGetAddRequest) GetId() int32 { - if m != nil { - return m.Id - } - return 0 -} - -type QueryGetAddResponse struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryGetAddResponse) Reset() { *m = QueryGetAddResponse{} } -func (m *QueryGetAddResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetAddResponse) ProtoMessage() {} -func (*QueryGetAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_76659893e638cc9b, []int{32} -} -func (m *QueryGetAddResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetAddResponse.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 *QueryGetAddResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetAddResponse.Merge(m, src) -} -func (m *QueryGetAddResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetAddResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetAddResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetAddResponse proto.InternalMessageInfo - -func (m *QueryGetAddResponse) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - func init() { proto.RegisterType((*ParamsRequest)(nil), "elys.leveragelp.ParamsRequest") proto.RegisterType((*ParamsResponse)(nil), "elys.leveragelp.ParamsResponse") @@ -1627,129 +1539,124 @@ func init() { proto.RegisterType((*QueryCommittedTokensLockedRequest)(nil), "elys.leveragelp.QueryCommittedTokensLockedRequest") proto.RegisterType((*QueryCommittedTokensLockedResponse)(nil), "elys.leveragelp.QueryCommittedTokensLockedResponse") proto.RegisterType((*QueryPosition)(nil), "elys.leveragelp.QueryPosition") - proto.RegisterType((*QueryGetAddRequest)(nil), "elys.leveragelp.QueryGetAddRequest") - proto.RegisterType((*QueryGetAddResponse)(nil), "elys.leveragelp.QueryGetAddResponse") } func init() { proto.RegisterFile("elys/leveragelp/query.proto", fileDescriptor_76659893e638cc9b) } var fileDescriptor_76659893e638cc9b = []byte{ - // 1835 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xdd, 0x6f, 0x1c, 0x57, - 0x15, 0xcf, 0xac, 0x3f, 0xe2, 0x3d, 0x8e, 0x3f, 0x72, 0x63, 0x13, 0x77, 0x13, 0xd6, 0xc9, 0xe0, - 0xa4, 0xa6, 0xcd, 0xee, 0x24, 0x0e, 0x6e, 0x51, 0x21, 0x2a, 0xeb, 0xb4, 0xb1, 0x0c, 0x06, 0xcc, - 0x04, 0xb5, 0x34, 0x08, 0x0d, 0xb3, 0x3b, 0x37, 0x9b, 0x91, 0x67, 0xe7, 0x4e, 0x66, 0xee, 0x66, - 0xe3, 0x58, 0x46, 0x88, 0x97, 0xaa, 0x0f, 0x40, 0xf9, 0x90, 0x10, 0x88, 0x87, 0xf2, 0xc2, 0x43, - 0xc5, 0x1f, 0xc0, 0x1b, 0xe2, 0xad, 0x3c, 0x20, 0x55, 0xea, 0x0b, 0xe2, 0x21, 0xa0, 0x84, 0x3f, - 0x04, 0xcd, 0xfd, 0x98, 0xcf, 0x9d, 0xdd, 0xf5, 0xca, 0x41, 0x3c, 0xc5, 0x7b, 0xef, 0xf9, 0xf8, - 0xdd, 0xdf, 0x39, 0xf7, 0xdc, 0x73, 0x26, 0x70, 0x01, 0x3b, 0x07, 0x81, 0xe6, 0xe0, 0x47, 0xd8, - 0x37, 0xdb, 0xd8, 0xf1, 0xb4, 0x87,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, 0xb1, 0x6b, - 0xbc, 0xb5, 0xf3, 0xc9, 0xb3, 0xaa, 0xf2, 0xe9, 0xb3, 0xaa, 0xf2, 0xef, 0x67, 0x55, 0xe5, 0xc3, - 0xe7, 0xd5, 0x53, 0x9f, 0x3e, 0xaf, 0x9e, 0xfa, 0xc7, 0xf3, 0xea, 0xa9, 0x7b, 0x5a, 0xa2, 0xff, - 0xcc, 0xdb, 0x7b, 0x9c, 0xfb, 0x7f, 0xa8, 0xe6, 0x34, 0xfb, 0xcf, 0xa6, 0x9b, 0xff, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0xae, 0x1d, 0x1b, 0xb2, 0x73, 0x1b, 0x00, 0x00, + // 1782 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x52, 0x9f, 0x7c, 0x32, 0x45, 0x69, 0x2c, 0xd5, 0x32, 0xed, 0x52, 0xf2, 0xc2, 0x96, + 0x55, 0x5b, 0xe4, 0xda, 0x72, 0x65, 0x17, 0x6e, 0x0d, 0x57, 0xf2, 0x87, 0xa0, 0x56, 0x6d, 0xd5, + 0x75, 0x61, 0xd7, 0x2e, 0x0a, 0x76, 0xc9, 0x1d, 0xd1, 0x0b, 0x2d, 0x77, 0xd6, 0xbb, 0x43, 0xd3, + 0x92, 0xa0, 0xa2, 0xe8, 0xa5, 0xf0, 0xa1, 0xad, 0xdb, 0x04, 0x08, 0x12, 0xe4, 0xe0, 0x5c, 0x72, + 0x30, 0xf2, 0x07, 0xe4, 0x16, 0xe4, 0x66, 0x1f, 0x02, 0x18, 0xc8, 0x25, 0xc8, 0xc1, 0x09, 0xec, + 0xfc, 0x21, 0xc1, 0xce, 0xce, 0x2e, 0xf7, 0x83, 0x4b, 0x52, 0x84, 0x1c, 0xe4, 0x24, 0x72, 0xe6, + 0x7d, 0xfc, 0xde, 0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49, 0x81, 0xf6, 0x2c, 0xee, 0xe4, 0x51, 0xec, + 0xdf, 0x34, 0xe5, 0x21, 0xf6, 0xbf, 0x98, 0x0b, 0xdf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x02, + 0x41, 0x46, 0x92, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1793,8 +1700,6 @@ type QueryClient interface { Rewards(ctx context.Context, in *QueryRewardsRequest, opts ...grpc.CallOption) (*QueryRewardsResponse, error) // Queries a list of CommittedTokensLocked items. CommittedTokensLocked(ctx context.Context, in *QueryCommittedTokensLockedRequest, opts ...grpc.CallOption) (*QueryCommittedTokensLockedResponse, error) - // Queries a list of GetAdd items. - GetAdd(ctx context.Context, in *QueryGetAddRequest, opts ...grpc.CallOption) (*QueryGetAddResponse, error) } type queryClient struct { @@ -1940,15 +1845,6 @@ func (c *queryClient) CommittedTokensLocked(ctx context.Context, in *QueryCommit return out, nil } -func (c *queryClient) GetAdd(ctx context.Context, in *QueryGetAddRequest, opts ...grpc.CallOption) (*QueryGetAddResponse, error) { - out := new(QueryGetAddResponse) - err := c.cc.Invoke(ctx, "/elys.leveragelp.Query/GetAdd", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1980,8 +1876,6 @@ type QueryServer interface { Rewards(context.Context, *QueryRewardsRequest) (*QueryRewardsResponse, error) // Queries a list of CommittedTokensLocked items. CommittedTokensLocked(context.Context, *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) - // Queries a list of GetAdd items. - GetAdd(context.Context, *QueryGetAddRequest) (*QueryGetAddResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -2033,9 +1927,6 @@ func (*UnimplementedQueryServer) Rewards(ctx context.Context, req *QueryRewardsR func (*UnimplementedQueryServer) CommittedTokensLocked(ctx context.Context, req *QueryCommittedTokensLockedRequest) (*QueryCommittedTokensLockedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommittedTokensLocked not implemented") } -func (*UnimplementedQueryServer) GetAdd(ctx context.Context, req *QueryGetAddRequest) (*QueryGetAddResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAdd not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2311,24 +2202,6 @@ func _Query_CommittedTokensLocked_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Query_GetAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetAddRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/elys.leveragelp.Query/GetAdd", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetAdd(ctx, req.(*QueryGetAddRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.leveragelp.Query", HandlerType: (*QueryServer)(nil), @@ -2393,10 +2266,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "CommittedTokensLocked", Handler: _Query_CommittedTokensLocked_Handler, }, - { - MethodName: "GetAdd", - Handler: _Query_GetAdd_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "elys/leveragelp/query.proto", @@ -3665,64 +3534,6 @@ func (m *QueryPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryGetAddRequest) 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 *QueryGetAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryGetAddResponse) 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 *QueryGetAddResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetAddResponse) 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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -4219,31 +4030,6 @@ func (m *QueryPosition) Size() (n int) { return n } -func (m *QueryGetAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } - return n -} - -func (m *QueryGetAddResponse) 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 sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7580,157 +7366,6 @@ func (m *QueryPosition) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetAddRequest) 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: QueryGetAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= int32(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 *QueryGetAddResponse) 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: QueryGetAddResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetAddResponse: 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/leveragelp/types/query.pb.gw.go b/x/leveragelp/types/query.pb.gw.go index 31ea1dcfd..80b170c61 100644 --- a/x/leveragelp/types/query.pb.gw.go +++ b/x/leveragelp/types/query.pb.gw.go @@ -909,60 +909,6 @@ func local_request_Query_CommittedTokensLocked_0(ctx context.Context, marshaler } -func request_Query_GetAdd_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetAddRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetAdd_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetAddRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetAdd(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. @@ -1314,29 +1260,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GetAdd_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_GetAdd_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_GetAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -1678,26 +1601,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GetAdd_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_GetAdd_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_GetAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -1731,8 +1634,6 @@ var ( pattern_Query_Rewards_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", "leveragelp", "rewards", "address"}, "", 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", "leveragelp", "committed_tokens_locked", "address"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_GetAdd_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", "leveragelp", "get_add", "id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1765,6 +1666,4 @@ var ( forward_Query_Rewards_0 = runtime.ForwardResponseMessage forward_Query_CommittedTokensLocked_0 = runtime.ForwardResponseMessage - - forward_Query_GetAdd_0 = runtime.ForwardResponseMessage ) From d8579d4983815751adb1fa56ba59391056d80d98 Mon Sep 17 00:00:00 2001 From: Amit Date: Fri, 23 Aug 2024 12:18:51 +0530 Subject: [PATCH 03/10] migration script --- x/leveragelp/keeper/position.go | 56 ++++++++++++++++++++++++ x/leveragelp/migrations/v10_migration.go | 10 +++++ x/leveragelp/module.go | 4 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 x/leveragelp/migrations/v10_migration.go diff --git a/x/leveragelp/keeper/position.go b/x/leveragelp/keeper/position.go index 405e34820..ed5a2bd36 100644 --- a/x/leveragelp/keeper/position.go +++ b/x/leveragelp/keeper/position.go @@ -322,3 +322,59 @@ func (k Keeper) DeleteLegacyPosition(ctx sdk.Context, positionAddress string, id store.Delete(key) return nil } + +func (k Keeper) MigrateData(ctx sdk.Context) { + iterator := k.GetPositionIterator(ctx) + defer func(iterator sdk.Iterator) { + err := iterator.Close() + if err != nil { + panic(err) + } + }(iterator) + + for ; iterator.Valid(); iterator.Next() { + var position types.Position + bytesValue := iterator.Value() + err := k.cdc.Unmarshal(bytesValue, &position) + if err == nil { + // Check commitments match with lev.lpmount + leveragedLpAmount := sdk.ZeroInt() + commitments := k.commKeeper.GetCommitments(ctx, position.GetPositionAddress()) + + for _, commitment := range commitments.CommittedTokens { + leveragedLpAmount = leveragedLpAmount.Add(commitment.Amount) + } + + // Repay any balance, delete position + debt := k.stableKeeper.UpdateInterestAndGetDebt(ctx, position.GetPositionAddress()) + repayAmount := debt.GetTotalLiablities() + + // Check if position has enough coins to repay else repay partial + bal := k.bankKeeper.GetBalance(ctx, position.GetPositionAddress(), position.Collateral.Denom) + userAmount := sdk.ZeroInt() + if bal.Amount.LT(repayAmount) { + repayAmount = bal.Amount + } else { + userAmount = bal.Amount.Sub(repayAmount) + } + + if repayAmount.IsPositive() { + k.stableKeeper.Repay(ctx, position.GetPositionAddress(), sdk.NewCoin(position.Collateral.Denom, repayAmount)) + } + + positionOwner := sdk.MustAccAddressFromBech32(position.Address) + if userAmount.IsPositive() { + k.bankKeeper.SendCoins(ctx, position.GetPositionAddress(), positionOwner, sdk.Coins{sdk.NewCoin(position.Collateral.Denom, userAmount)}) + } + + if leveragedLpAmount.IsZero() { + // Repay any balance, delete position + k.DestroyPosition(ctx, positionOwner, position.Id) + } else { + // Repay any balance and update position value + position.LeveragedLpAmount = leveragedLpAmount + k.SetPosition(ctx, &position) + } + } + } +} diff --git a/x/leveragelp/migrations/v10_migration.go b/x/leveragelp/migrations/v10_migration.go new file mode 100644 index 000000000..b0a4031ce --- /dev/null +++ b/x/leveragelp/migrations/v10_migration.go @@ -0,0 +1,10 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (m Migrator) V10Migration(ctx sdk.Context) error { + m.keeper.MigrateData(ctx) + return nil +} diff --git a/x/leveragelp/module.go b/x/leveragelp/module.go index ae3a7e76e..3bda7c00e 100644 --- a/x/leveragelp/module.go +++ b/x/leveragelp/module.go @@ -117,7 +117,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := migrations.NewMigrator(am.keeper) - err := cfg.RegisterMigration(types.ModuleName, 8, m.V9Migration) + err := cfg.RegisterMigration(types.ModuleName, 9, m.V10Migration) if err != nil { panic(err) } @@ -144,7 +144,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 9 } +func (AppModule) ConsensusVersion() uint64 { return 10 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { From 26268a57efed63b8311730518aebe25aefa6297a Mon Sep 17 00:00:00 2001 From: Amit Yadav Date: Fri, 23 Aug 2024 13:07:46 +0530 Subject: [PATCH 04/10] gen --- x/leveragelp/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/leveragelp/types/params.go b/x/leveragelp/types/params.go index c7410c913..6c594dcce 100644 --- a/x/leveragelp/types/params.go +++ b/x/leveragelp/types/params.go @@ -39,7 +39,7 @@ func NewParams() Params { SafetyFactor: sdk.NewDecWithPrec(11, 1), // 1.1 WhitelistingEnabled: false, FallbackEnabled: true, - NumberPerBlock: 1000, + NumberPerBlock: (int64)(1000), } } From f531f709a7294b71483e22fdee151c73a3747a50 Mon Sep 17 00:00:00 2001 From: Amit Yadav Date: Mon, 26 Aug 2024 17:13:19 +0530 Subject: [PATCH 05/10] pool --- x/leveragelp/keeper/position.go | 6 ++++++ x/leveragelp/migrations/v10_migration.go | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/x/leveragelp/keeper/position.go b/x/leveragelp/keeper/position.go index ed5a2bd36..f4da3c290 100644 --- a/x/leveragelp/keeper/position.go +++ b/x/leveragelp/keeper/position.go @@ -344,6 +344,12 @@ func (k Keeper) MigrateData(ctx sdk.Context) { for _, commitment := range commitments.CommittedTokens { leveragedLpAmount = leveragedLpAmount.Add(commitment.Amount) } + pool, found := k.GetPool(ctx, position.AmmPoolId) + if found { + pool.LeveragedLpAmount = pool.LeveragedLpAmount.Add(leveragedLpAmount) + pool.Health = k.CalculatePoolHealth(ctx, &pool) + k.SetPool(ctx, pool) + } // Repay any balance, delete position debt := k.stableKeeper.UpdateInterestAndGetDebt(ctx, position.GetPositionAddress()) diff --git a/x/leveragelp/migrations/v10_migration.go b/x/leveragelp/migrations/v10_migration.go index b0a4031ce..258b5a524 100644 --- a/x/leveragelp/migrations/v10_migration.go +++ b/x/leveragelp/migrations/v10_migration.go @@ -5,6 +5,13 @@ import ( ) func (m Migrator) V10Migration(ctx sdk.Context) error { + pools := m.keeper.GetAllPools(ctx) + // Reset pools + for _, pool := range pools { + pool.LeveragedLpAmount = sdk.NewInt(0) + m.keeper.SetPool(ctx, pool) + } + m.keeper.MigrateData(ctx) return nil } From 8593db63a126e7adab62d820d379f66377eda746 Mon Sep 17 00:00:00 2001 From: Amit Date: Mon, 26 Aug 2024 18:54:49 +0530 Subject: [PATCH 06/10] check --- x/leveragelp/keeper/position_close.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x/leveragelp/keeper/position_close.go b/x/leveragelp/keeper/position_close.go index aabedb361..a69e04b9c 100644 --- a/x/leveragelp/keeper/position_close.go +++ b/x/leveragelp/keeper/position_close.go @@ -36,9 +36,11 @@ func (k Keeper) ForceCloseLong(ctx sdk.Context, position types.Position, pool ty userAmount = exitCoinsAfterExitFee[0].Amount.Sub(repayAmount) } - err = k.stableKeeper.Repay(ctx, position.GetPositionAddress(), sdk.NewCoin(position.Collateral.Denom, repayAmount)) - if err != nil { - return sdk.ZeroInt(), err + if repayAmount.IsPositive() { + err = k.stableKeeper.Repay(ctx, position.GetPositionAddress(), sdk.NewCoin(position.Collateral.Denom, repayAmount)) + if err != nil { + return sdk.ZeroInt(), err + } } positionOwner := sdk.MustAccAddressFromBech32(position.Address) From ef8f9657e1b37f6461d242fa72b761677603c89f Mon Sep 17 00:00:00 2001 From: Amit Date: Mon, 26 Aug 2024 19:13:15 +0530 Subject: [PATCH 07/10] user --- x/leveragelp/keeper/position.go | 2 ++ x/leveragelp/keeper/position_close.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/x/leveragelp/keeper/position.go b/x/leveragelp/keeper/position.go index f4da3c290..8f2b13e7a 100644 --- a/x/leveragelp/keeper/position.go +++ b/x/leveragelp/keeper/position.go @@ -366,6 +366,8 @@ func (k Keeper) MigrateData(ctx sdk.Context) { if repayAmount.IsPositive() { k.stableKeeper.Repay(ctx, position.GetPositionAddress(), sdk.NewCoin(position.Collateral.Denom, repayAmount)) + } else { + userAmount = bal.Amount } positionOwner := sdk.MustAccAddressFromBech32(position.Address) diff --git a/x/leveragelp/keeper/position_close.go b/x/leveragelp/keeper/position_close.go index a69e04b9c..71c5ea46a 100644 --- a/x/leveragelp/keeper/position_close.go +++ b/x/leveragelp/keeper/position_close.go @@ -41,6 +41,8 @@ func (k Keeper) ForceCloseLong(ctx sdk.Context, position types.Position, pool ty if err != nil { return sdk.ZeroInt(), err } + } else { + userAmount = bal.Amount } positionOwner := sdk.MustAccAddressFromBech32(position.Address) From aadf4f443be9b1358464722a9b6546b669563312 Mon Sep 17 00:00:00 2001 From: Amit Date: Mon, 26 Aug 2024 19:15:58 +0530 Subject: [PATCH 08/10] remove --- x/leveragelp/keeper/position.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/leveragelp/keeper/position.go b/x/leveragelp/keeper/position.go index 8f2b13e7a..5d7921fe8 100644 --- a/x/leveragelp/keeper/position.go +++ b/x/leveragelp/keeper/position.go @@ -337,7 +337,6 @@ func (k Keeper) MigrateData(ctx sdk.Context) { bytesValue := iterator.Value() err := k.cdc.Unmarshal(bytesValue, &position) if err == nil { - // Check commitments match with lev.lpmount leveragedLpAmount := sdk.ZeroInt() commitments := k.commKeeper.GetCommitments(ctx, position.GetPositionAddress()) From 3528b306f0d21e28dd670a61bca7e691ed24673a Mon Sep 17 00:00:00 2001 From: Amit Yadav Date: Thu, 29 Aug 2024 12:26:44 +0530 Subject: [PATCH 09/10] edge case --- x/leveragelp/keeper/begin_blocker.go | 7 +- x/tier/keeper/query_perpetual_test.go | 104 ++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 x/tier/keeper/query_perpetual_test.go diff --git a/x/leveragelp/keeper/begin_blocker.go b/x/leveragelp/keeper/begin_blocker.go index 2a77ee638..f38601b12 100644 --- a/x/leveragelp/keeper/begin_blocker.go +++ b/x/leveragelp/keeper/begin_blocker.go @@ -74,8 +74,11 @@ func (k Keeper) LiquidatePositionIfUnhealthy(ctx sdk.Context, position *types.Po params := k.GetParams(ctx) isHealthy = position.PositionHealth.GT(params.SafetyFactor) - if isHealthy { - return isHealthy, false, h, err + + debt := k.stableKeeper.UpdateInterestAndGetDebt(ctx, position.GetPositionAddress()) + liab := debt.GetTotalLiablities() + if isHealthy || liab.IsZero() { + return true, false, h, err } repayAmount, err := k.ForceCloseLong(ctx, *position, pool, position.LeveragedLpAmount) diff --git a/x/tier/keeper/query_perpetual_test.go b/x/tier/keeper/query_perpetual_test.go new file mode 100644 index 000000000..de4d3d530 --- /dev/null +++ b/x/tier/keeper/query_perpetual_test.go @@ -0,0 +1,104 @@ +package keeper_test + +import ( + "reflect" + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/elys-network/elys/testutil/nullify" + "github.com/elys-network/elys/x/tier/types" + "github.com/golang/mock/gomock" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestPerpetualQuery(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + mockKeeper := NewMockKeeper(ctrl) // Use gomock to create the mock + ctx := sdk.Context{} + wctx := sdk.WrapSDKContext(ctx) + //keeper, ctx := keepertest.MembershiptierKeeper(t) + + mockKeeper.EXPECT().RetrievePerpetualTotal(gomock.Any(), gomock.Any()).DoAndReturn( + func(ctx sdk.Context, user string) (sdk.Dec, sdk.Dec, sdk.Dec) { + return sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec() + }, + ).AnyTimes() + + //keeper.RetrievePerpetualTotal = mockKeeper.RetrievePerpetualTotal + + tests := []struct { + desc string + request *types.QueryPerpetualRequest + response *types.QueryPerpetualResponse + err error + }{ + { + desc: "First", + request: &types.QueryPerpetualRequest{ + User: "creator", + }, + response: &types.QueryPerpetualResponse{TotalValue: sdk.ZeroDec(), TotalBorrows: sdk.ZeroDec()}, + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + response, err := mockKeeper.Perpetual(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +// Define the mock interface in the same file or import it if already defined +type MockKeeper struct { + ctrl *gomock.Controller + recorder *MockKeeperMockRecorder +} + +func NewMockKeeper(ctrl *gomock.Controller) *MockKeeper { + mock := &MockKeeper{ctrl: ctrl} + mock.recorder = &MockKeeperMockRecorder{mock} + return mock +} + +type MockKeeperMockRecorder struct { + mock *MockKeeper +} + +// Implement the methods you need to mock +func (m *MockKeeper) EXPECT() *MockKeeperMockRecorder { + return m.recorder +} + +func (m *MockKeeper) RetrievePerpetualTotal(ctx sdk.Context, user string) (sdk.Coin, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RetrievePerpetualTotal", ctx, user) + ret0, _ := ret[0].(sdk.Coin) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (mr *MockKeeperMockRecorder) RetrievePerpetualTotal(ctx, user interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetrievePerpetualTotal", reflect.TypeOf((*MockKeeper)(nil).RetrievePerpetualTotal), ctx, user) +} From cbcde3e7a9ba198f5a6023439ed7894bd559638a Mon Sep 17 00:00:00 2001 From: Amit Yadav Date: Thu, 29 Aug 2024 12:27:04 +0530 Subject: [PATCH 10/10] remove --- x/tier/keeper/query_perpetual_test.go | 104 -------------------------- 1 file changed, 104 deletions(-) delete mode 100644 x/tier/keeper/query_perpetual_test.go diff --git a/x/tier/keeper/query_perpetual_test.go b/x/tier/keeper/query_perpetual_test.go deleted file mode 100644 index de4d3d530..000000000 --- a/x/tier/keeper/query_perpetual_test.go +++ /dev/null @@ -1,104 +0,0 @@ -package keeper_test - -import ( - "reflect" - "strconv" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/elys-network/elys/testutil/nullify" - "github.com/elys-network/elys/x/tier/types" - "github.com/golang/mock/gomock" -) - -// Prevent strconv unused error -var _ = strconv.IntSize - -func TestPerpetualQuery(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - mockKeeper := NewMockKeeper(ctrl) // Use gomock to create the mock - ctx := sdk.Context{} - wctx := sdk.WrapSDKContext(ctx) - //keeper, ctx := keepertest.MembershiptierKeeper(t) - - mockKeeper.EXPECT().RetrievePerpetualTotal(gomock.Any(), gomock.Any()).DoAndReturn( - func(ctx sdk.Context, user string) (sdk.Dec, sdk.Dec, sdk.Dec) { - return sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec() - }, - ).AnyTimes() - - //keeper.RetrievePerpetualTotal = mockKeeper.RetrievePerpetualTotal - - tests := []struct { - desc string - request *types.QueryPerpetualRequest - response *types.QueryPerpetualResponse - err error - }{ - { - desc: "First", - request: &types.QueryPerpetualRequest{ - User: "creator", - }, - response: &types.QueryPerpetualResponse{TotalValue: sdk.ZeroDec(), TotalBorrows: sdk.ZeroDec()}, - }, - { - desc: "InvalidRequest", - err: status.Error(codes.InvalidArgument, "invalid request"), - }, - } - for _, tc := range tests { - t.Run(tc.desc, func(t *testing.T) { - response, err := mockKeeper.Perpetual(wctx, tc.request) - if tc.err != nil { - require.ErrorIs(t, err, tc.err) - } else { - require.NoError(t, err) - require.Equal(t, - nullify.Fill(tc.response), - nullify.Fill(response), - ) - } - }) - } -} - -// Define the mock interface in the same file or import it if already defined -type MockKeeper struct { - ctrl *gomock.Controller - recorder *MockKeeperMockRecorder -} - -func NewMockKeeper(ctrl *gomock.Controller) *MockKeeper { - mock := &MockKeeper{ctrl: ctrl} - mock.recorder = &MockKeeperMockRecorder{mock} - return mock -} - -type MockKeeperMockRecorder struct { - mock *MockKeeper -} - -// Implement the methods you need to mock -func (m *MockKeeper) EXPECT() *MockKeeperMockRecorder { - return m.recorder -} - -func (m *MockKeeper) RetrievePerpetualTotal(ctx sdk.Context, user string) (sdk.Coin, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RetrievePerpetualTotal", ctx, user) - ret0, _ := ret[0].(sdk.Coin) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -func (mr *MockKeeperMockRecorder) RetrievePerpetualTotal(ctx, user interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetrievePerpetualTotal", reflect.TypeOf((*MockKeeper)(nil).RetrievePerpetualTotal), ctx, user) -}