diff --git a/proto/elys/tier/query.proto b/proto/elys/tier/query.proto index a15eeeabb..9f42de233 100644 --- a/proto/elys/tier/query.proto +++ b/proto/elys/tier/query.proto @@ -21,7 +21,7 @@ service Query { // Queries a list of Portfolio items. rpc Portfolio (QueryGetPortfolioRequest) returns (QueryGetPortfolioResponse) { - option (google.api.http).get = "/elys-network/elys/membershiptier/portfolio/{user}/{assetType}"; + option (google.api.http).get = "/elys-network/elys/membershiptier/portfolio/{user}"; } rpc PortfolioAll (QueryAllPortfolioRequest) returns (QueryAllPortfolioResponse) { @@ -89,7 +89,6 @@ message QueryParamsResponse { message QueryGetPortfolioRequest { string user = 1; - string assetType = 2; } message QueryGetPortfolioResponse { diff --git a/x/leveragelp/migrations/v7_migration.go b/x/leveragelp/migrations/v7_migration.go index 7f998ade7..b0086d7aa 100644 --- a/x/leveragelp/migrations/v7_migration.go +++ b/x/leveragelp/migrations/v7_migration.go @@ -17,10 +17,14 @@ func (m Migrator) V7Migration(ctx sdk.Context) error { m.keeper.DeletePoolPosIdsLiquidationSorted(ctx, pool.AmmPoolId) m.keeper.DeletePoolPosIdsStopLossSorted(ctx, pool.AmmPoolId) } + openCount := uint64(0) for _, position := range positions { m.keeper.SetSortedLiquidationAndStopLoss(ctx, position) + openCount++ } + m.keeper.SetOpenPositionCount(ctx, openCount) + // Liquidate <1.1 positions // Q: What will happen if there won't be enough liquidity to return to users(as health for some positions must be below 1) ? Do we need to fill the pool ? for _, pool := range pools { diff --git a/x/tier/client/cli/query_portfolio.go b/x/tier/client/cli/query_portfolio.go index 7d0f556a2..2f10a2d03 100644 --- a/x/tier/client/cli/query_portfolio.go +++ b/x/tier/client/cli/query_portfolio.go @@ -46,9 +46,9 @@ func CmdListPortfolio() *cobra.Command { func CmdShowPortfolio() *cobra.Command { cmd := &cobra.Command{ - Use: "show-portfolio [user] [asset-type]", + Use: "show-portfolio [user]", Short: "shows a portfolio", - Args: cobra.ExactArgs(2), + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -58,11 +58,9 @@ func CmdShowPortfolio() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) argUser := args[0] - argType := args[1] params := &types.QueryGetPortfolioRequest{ - User: argUser, - AssetType: argType, + User: argUser, } res, err := queryClient.Portfolio(cmd.Context(), params) diff --git a/x/tier/keeper/query_portfolio_test.go b/x/tier/keeper/query_portfolio_test.go index 1ad1cb2f9..0d2ddae6c 100644 --- a/x/tier/keeper/query_portfolio_test.go +++ b/x/tier/keeper/query_portfolio_test.go @@ -46,8 +46,7 @@ func TestPortfolioQuerySingle(t *testing.T) { // TODO: update, should be empty desc: "KeyNotFound", request: &types.QueryGetPortfolioRequest{ - User: strconv.Itoa(100000), - AssetType: strconv.Itoa(100000), + User: strconv.Itoa(100000), }, err: status.Error(codes.NotFound, "not found"), }, diff --git a/x/tier/types/query.pb.go b/x/tier/types/query.pb.go index fc4f98cb5..d081d923b 100644 --- a/x/tier/types/query.pb.go +++ b/x/tier/types/query.pb.go @@ -115,8 +115,7 @@ func (m *QueryParamsResponse) GetParams() Params { } type QueryGetPortfolioRequest struct { - User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=assetType,proto3" json:"assetType,omitempty"` + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` } func (m *QueryGetPortfolioRequest) Reset() { *m = QueryGetPortfolioRequest{} } @@ -159,13 +158,6 @@ func (m *QueryGetPortfolioRequest) GetUser() string { return "" } -func (m *QueryGetPortfolioRequest) GetAssetType() string { - if m != nil { - return m.AssetType - } - return "" -} - type QueryGetPortfolioResponse struct { TotalPortfolio string `protobuf:"bytes,1,opt,name=total_portfolio,json=totalPortfolio,proto3" json:"total_portfolio,omitempty"` } @@ -1013,75 +1005,73 @@ func init() { func init() { proto.RegisterFile("elys/tier/query.proto", fileDescriptor_461504ebf74c9a97) } var fileDescriptor_461504ebf74c9a97 = []byte{ - // 1076 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0xc7, 0xe3, 0xb4, 0x09, 0xe4, 0xa5, 0x50, 0x75, 0xd8, 0x96, 0xd4, 0xa4, 0xdb, 0xc4, 0x41, - 0x49, 0x9a, 0x1f, 0x76, 0xb3, 0x41, 0x10, 0x84, 0x28, 0xe4, 0x87, 0x12, 0x21, 0xe5, 0xb0, 0x2c, - 0x3d, 0x71, 0x60, 0x99, 0x5d, 0x0f, 0xae, 0x15, 0xdb, 0xe3, 0xd8, 0xb3, 0x2d, 0xab, 0x28, 0x12, - 0xea, 0x85, 0x03, 0x12, 0x20, 0x71, 0xe0, 0x82, 0xfa, 0x1f, 0x70, 0xe0, 0xbf, 0xe8, 0xb1, 0x12, - 0x17, 0xc4, 0xa1, 0x42, 0x09, 0x7f, 0x08, 0xf2, 0xcc, 0xd8, 0x6b, 0xaf, 0xbd, 0xde, 0xa5, 0xda, - 0xd3, 0xda, 0xe3, 0xef, 0x7b, 0xef, 0x33, 0xf3, 0x66, 0xe6, 0xab, 0x85, 0x9b, 0xc4, 0xe9, 0x86, - 0x06, 0xb3, 0x49, 0x60, 0x9c, 0x76, 0x48, 0xd0, 0xd5, 0xfd, 0x80, 0x32, 0x8a, 0x66, 0xa2, 0x61, - 0x3d, 0x1a, 0x56, 0x2b, 0x16, 0xb5, 0x28, 0x1f, 0x35, 0xa2, 0x27, 0x21, 0x50, 0xe7, 0x2d, 0x4a, - 0x2d, 0x87, 0x18, 0xd8, 0xb7, 0x0d, 0xec, 0x79, 0x94, 0x61, 0x66, 0x53, 0x2f, 0x94, 0x5f, 0xd7, - 0xda, 0x34, 0x74, 0x69, 0x68, 0xb4, 0x70, 0x48, 0x44, 0x5e, 0xe3, 0xf1, 0x56, 0x8b, 0x30, 0xbc, - 0x65, 0xf8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- 0x08, 0x09, 0x7c, 0xc2, 0x3a, 0xe5, 0xcb, 0xf3, 0x95, 0x64, 0x4f, 0x89, 0xc7, 0x0a, 0xb3, 0x29, - 0x67, 0x7b, 0x6c, 0x9f, 0x76, 0x6c, 0x73, 0x68, 0xb7, 0xbe, 0x96, 0xdd, 0xcd, 0xc8, 0xc7, 0x0a, - 0xf4, 0x99, 0x04, 0x3a, 0x22, 0x6c, 0xd7, 0x75, 0xeb, 0x81, 0xdd, 0x8e, 0x6f, 0x11, 0x54, 0x81, - 0x29, 0x93, 0x78, 0xd4, 0x95, 0x44, 0xe2, 0x05, 0xcd, 0xc1, 0x6b, 0x26, 0x69, 0xdb, 0x2e, 0x76, - 0xf8, 0xf1, 0x99, 0x6a, 0xc4, 0xaf, 0x09, 0x6c, 0x26, 0xd5, 0x58, 0x61, 0x77, 0x60, 0x21, 0xae, - 0xb0, 0x4f, 0xbd, 0x90, 0x3a, 0xb6, 0x89, 0x19, 0x31, 0x87, 0x53, 0x6b, 0x36, 0x2c, 0x96, 0x44, - 0xf6, 0x20, 0xfd, 0x68, 0xe0, 0x55, 0x21, 0x79, 0x70, 0xed, 0xbb, 0x37, 0x60, 0x8a, 0xd7, 0x42, - 0x5d, 0x98, 0x16, 0x56, 0x84, 0xee, 0xa4, 0xee, 0xd4, 0xbc, 0xc7, 0xa9, 0xd5, 0x41, 0x9f, 0x05, - 0x98, 0x76, 0xff, 0xe9, 0x9f, 0xff, 0xfe, 0x32, 0xb9, 0x86, 0x56, 0x8d, 0x48, 0xb7, 0xe9, 0x11, - 0xf6, 0x84, 0x06, 0x27, 0xfc, 0xc5, 0x70, 0x89, 0xdb, 0x22, 0x41, 0xf8, 0xc8, 0xf6, 0x53, 0x66, - 0x8b, 0x9e, 0x29, 0x30, 0x93, 0x5c, 0xde, 0x68, 0xa9, 0x3f, 0x7f, 0x81, 0x09, 0xaa, 0xef, 0x96, - 0x8b, 0x24, 0xca, 0x21, 0x47, 0xf9, 0x14, 0x3d, 0x18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0x58, 0xa2, 0x18, 0xe1, 0x86, 0x10, 0x1b, 0x3d, 0x0e, 0x89, 0x21, 0x7e, 0x50, 0x60, 0x36, 0x65, - 0x2b, 0x28, 0x37, 0xd9, 0xbc, 0x45, 0xa9, 0x4b, 0xa5, 0x9a, 0x11, 0x4e, 0x9f, 0xd8, 0x33, 0x3c, - 0x28, 0xdb, 0x9c, 0x5f, 0x15, 0x98, 0x4d, 0xf9, 0x46, 0x9e, 0x26, 0xef, 0x4f, 0xea, 0x52, 0xa9, - 0x46, 0xd2, 0x7c, 0xc2, 0x69, 0x3e, 0x44, 0x1f, 0x0c, 0xa2, 0xb1, 0x08, 0x6b, 0x62, 0xd7, 0x6d, - 0xf2, 0xcb, 0xdb, 0x38, 0xe3, 0x76, 0x71, 0x1e, 0xfd, 0x72, 0x53, 0x3b, 0x47, 0x7f, 0x28, 0x50, - 0x29, 0x72, 0x0d, 0xb4, 0x5e, 0x50, 0x7e, 0x90, 0x2b, 0xa9, 0x1b, 0xa3, 0x89, 0x25, 0xf4, 0x03, - 0x0e, 0xbd, 0x83, 0xde, 0x2f, 0x83, 0x6e, 0xa7, 0xc2, 0xb3, 0xf4, 0x7b, 0xfb, 0xcf, 0x2f, 0xaa, - 0xca, 0x8b, 0x8b, 0xaa, 0xf2, 0xcf, 0x45, 0x55, 0xf9, 0xf9, 0xb2, 0x3a, 0xf1, 0xe2, 0xb2, 0x3a, - 0xf1, 0xd7, 0x65, 0x75, 0xe2, 0xcb, 0x7b, 0x29, 0x2f, 0xcb, 0xe7, 0xfe, 0x56, 0x64, 0xe7, 0x96, - 0xd6, 0x9a, 0xe6, 0xff, 0xca, 0xb6, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x33, 0x47, 0xe0, 0x22, - 0x4c, 0x0e, 0x00, 0x00, + // 1055 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4d, 0x6f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xf3, 0xa3, + 0x02, 0xb3, 0x29, 0xaf, 0xc8, 0xd3, 0xe4, 0x3d, 0x49, 0x5d, 0x2e, 0xd5, 0x48, 0x9a, 0x0f, 0x90, + 0xe6, 0x6d, 0xf2, 0xd6, 0x30, 0x9a, 0x2e, 0x13, 0x2d, 0xea, 0x38, 0x2d, 0xbc, 0xb0, 0x8d, 0xa7, + 0x68, 0x11, 0xe7, 0xe1, 0x2f, 0x1a, 0xd9, 0x39, 0xf9, 0x55, 0x81, 0x6a, 0x91, 0x53, 0x90, 0x8d, + 0x82, 0xf2, 0xc3, 0x9c, 0x48, 0xdd, 0x1c, 0x4f, 0x2c, 0xa1, 0xdf, 0x47, 0xe8, 0x5d, 0xf2, 0x66, + 0x19, 0x74, 0x27, 0x15, 0x9e, 0xa5, 0xdf, 0x3f, 0x78, 0x7e, 0x51, 0x53, 0x5e, 0x5c, 0xd4, 0x94, + 0x3f, 0x2f, 0x6a, 0xca, 0x77, 0x97, 0xb5, 0xa9, 0x17, 0x97, 0xb5, 0xa9, 0xdf, 0x2f, 0x6b, 0x53, + 0x9f, 0xde, 0x4b, 0xf9, 0x57, 0x3e, 0xf7, 0x97, 0x51, 0x76, 0xb4, 0xb1, 0xf6, 0x0c, 0xfe, 0xd7, + 0xda, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x44, 0x48, 0x42, 0x18, 0x22, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1620,13 +1610,6 @@ func (m *QueryGetPortfolioRequest) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AssetType))) - i-- - dAtA[i] = 0x12 - } if len(m.User) > 0 { i -= len(m.User) copy(dAtA[i:], m.User) @@ -2312,10 +2295,6 @@ func (m *QueryGetPortfolioRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.AssetType) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -2769,38 +2748,6 @@ func (m *QueryGetPortfolioRequest) Unmarshal(dAtA []byte) error { } m.User = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", 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.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/tier/types/query.pb.gw.go b/x/tier/types/query.pb.gw.go index bd498265c..c061e288b 100644 --- a/x/tier/types/query.pb.gw.go +++ b/x/tier/types/query.pb.gw.go @@ -73,17 +73,6 @@ func request_Query_Portfolio_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "user", err) } - val, ok = pathParams["assetType"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "assetType") - } - - protoReq.AssetType, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "assetType", err) - } - msg, err := client.Portfolio(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -111,17 +100,6 @@ func local_request_Query_Portfolio_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "user", err) } - val, ok = pathParams["assetType"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "assetType") - } - - protoReq.AssetType, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "assetType", err) - } - msg, err := server.Portfolio(ctx, &protoReq) return msg, metadata, err @@ -1143,7 +1121,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "membershiptier", "params"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Portfolio_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"elys-network", "elys", "membershiptier", "portfolio", "user", "assetType"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Portfolio_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", "membershiptier", "portfolio", "user"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_PortfolioAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "membershiptier", "portfolio"}, "", runtime.AssumeColonVerbOpt(true)))