diff --git a/.golangci.yml b/.golangci.yml index 2bd1c15eb4..67340b615f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,22 +1,10 @@ run: tests: false - govet: - # Enable analyzers by name (in addition to default). - # Run `go tool vet help` to see all analyzers. - # Default: [] - enable: - - fieldalignment linters: enable: - # - dupl - # - nestif - # - rowserrcheck -- enable when it will support generics - # - whitespace - # - wsl - asciicheck - bodyclose - # TODO; we need re-enable this linter once golangci-lint or .depguard.yaml is done # - depguard - dogsled - errcheck @@ -56,27 +44,27 @@ issues: - linters: - lll source: "https://" + max-same-issues: 50 linters-settings: gosec: excludes: - - G115 # FIXME temporarily suppress 'G115: integer overflow conversion': it produces many hits, some of which may be false positives, and need to be looked at; + - G115 + dogsled: max-blank-identifiers: 3 + misspell: locale: US + nolintlint: allow-unused: false - allow-leading-space: true require-explanation: false + revive: confidence: 0 severity: error - error-code: 1 - warning-code: 0 - # List of rules to enable explicitly should be a subset of .revive.toml - # so only critical rules cause CI to fail instead of just generating annotations. rules: - name: blank-imports - name: context-as-argument diff --git a/proto/umee/leverage/v1/events.proto b/proto/umee/leverage/v1/events.proto index 3b9eaf7736..c4acc31290 100644 --- a/proto/umee/leverage/v1/events.proto +++ b/proto/umee/leverage/v1/events.proto @@ -108,3 +108,47 @@ message EventFundOracle { // Assets sent to oracle module repeated cosmos.base.v1beta1.Coin assets = 1 [(gogoproto.nullable) = false]; } + + +// EventRepayIsolatedBadDebt is emitted when isolated bad debt is repaid (partial or full) +message EventRepayIsolatedBadDebt { + // who paid + string from = 1; + + // borrower whose debt is being repaid + string borrower = 2; + + // denom of the asset + string denom = 3; + + // total amount repaid (principal + interest) + cosmos.base.v1beta1.Coin total_repaid = 4 [(gogoproto.nullable) = false]; + + // principal repaid + string principal_repaid = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + + // interest repaid + string interest_repaid = 6 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + + // remaining principal after repayment + string remaining_principal = 7 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + + // remaining interest after repayment + string remaining_interest = 8 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/umee/leverage/v1/genesis.proto b/proto/umee/leverage/v1/genesis.proto index 600b4af19e..51e1e2135c 100644 --- a/proto/umee/leverage/v1/genesis.proto +++ b/proto/umee/leverage/v1/genesis.proto @@ -26,7 +26,26 @@ message GenesisState { (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - repeated SpecialAssetPair special_pairs = 10 [(gogoproto.nullable) = false]; + repeated SpecialAssetPair special_pairs = 10 [(gogoproto.nullable) = false]; + repeated IsolatedBadDebt isolated_bad_debts = 11 [(gogoproto.nullable) = false]; +} + +// IsolatedBadDebt is an isolated bad debt instance used in the leverage module's genesis state. +message IsolatedBadDebt { + string address = 1; + string denom = 2; + string amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string interest_scalar = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string interest_accrued = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } // AdjustedBorrow is a borrow struct used in the leverage module's genesis diff --git a/proto/umee/leverage/v1/query.proto b/proto/umee/leverage/v1/query.proto index b0c2196c05..c1cd80ba4e 100644 --- a/proto/umee/leverage/v1/query.proto +++ b/proto/umee/leverage/v1/query.proto @@ -102,6 +102,66 @@ service Query { returns (QueryInspectAccountResponse) { option (google.api.http).get = "/umee/leverage/v1/inspect-account"; } + + // IsolatedBadDebts returns all isolated bad debts. + rpc IsolatedBadDebts(QueryIsolatedBadDebts) returns (QueryIsolatedBadDebtsResponse) { + option (google.api.http).get = "/umee/leverage/v1/isolated_bad_debts"; + } + + // InterestScalars returns all interest scalars. + rpc InterestScalars(QueryInterestScalars) returns (QueryInterestScalarsResponse) { + option (google.api.http).get = "/umee/leverage/v1/interest_scalars"; + } + + // AllReserves returns all reserves. + rpc AllReserves(QueryAllReserves) returns (QueryAllReservesResponse) { + option (google.api.http).get = "/umee/leverage/v1/all_reserves"; + } + + // LastInterestTime returns the last interest time. + rpc LastInterestTime(QueryLastInterestTime) returns (QueryLastInterestTimeResponse) { + option (google.api.http).get = "/umee/leverage/v1/last_interest_time"; + } +} + +// QueryLastInterestTime defines the request structure for the LastInterestTime +// gRPC service handler. +message QueryLastInterestTime {} + +// QueryLastInterestTimeResponse defines the response structure for the LastInterestTime +// gRPC service handler. +message QueryLastInterestTimeResponse { + int64 last_interest_time = 1; +} + +// QueryAllReserves defines the request structure for the Reserves +// gRPC service handler. +message QueryAllReserves {} + +// QueryAllReservesResponse defines the response structure for the Reserves +// gRPC service handler. +message QueryAllReservesResponse { + repeated cosmos.base.v1beta1.Coin reserves = 1 [(gogoproto.nullable) = false]; +} + +// QueryInterestScalars defines the request structure for the InterestScalars +// gRPC service handler. +message QueryInterestScalars {} + +// QueryInterestScalarsResponse defines the response structure for the InterestScalars +// gRPC service handler. +message QueryInterestScalarsResponse { + repeated InterestScalar interest_scalars = 1 [(gogoproto.nullable) = false]; +} + +// QueryIsolatedBadDebts defines the request structure for the IsolatedBadDebts +// gRPC service handler. +message QueryIsolatedBadDebts {} + +// QueryIsolatedBadDebtsResponse defines the response structure for the IsolatedBadDebts +// gRPC service handler. +message QueryIsolatedBadDebtsResponse { + repeated IsolatedBadDebt isolated_bad_debts = 1 [(gogoproto.nullable) = false]; } // QueryParams defines the request structure for the Params gRPC service diff --git a/proto/umee/leverage/v1/tx.proto b/proto/umee/leverage/v1/tx.proto index c6582f0a8f..83da48e3a0 100644 --- a/proto/umee/leverage/v1/tx.proto +++ b/proto/umee/leverage/v1/tx.proto @@ -75,6 +75,22 @@ service Msg { // GovSetParams is used by governance proposals to update parameters. rpc GovSetParams(MsgGovSetParams) returns (MsgGovSetParamsResponse); + + // RepayIsolatedBadDebt allows a user to repay isolated bad debts. + rpc RepayIsolatedBadDebt(MsgRepayIsolatedBadDebt) returns (MsgRepayIsolatedBadDebtResponse); +} + +// MsgRepayIsolatedBadDebt represents a user's request to repay isolated bad debts. +message MsgRepayIsolatedBadDebt { + string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string borrower = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.Coin asset = 3 [(gogoproto.nullable) = false]; + bool repay_interest = 4; +} + +// MsgRepayIsolatedBadDebtResponse defines the Msg/RepayIsolatedBadDebt response type. +message MsgRepayIsolatedBadDebtResponse { + cosmos.base.v1beta1.Coin asset = 1 [(gogoproto.nullable) = false]; } // MsgSupply represents a user's request to supply assets to the module. diff --git a/x/auction/genesis.go b/x/auction/genesis.go index 867993839e..521d0ec3a7 100644 --- a/x/auction/genesis.go +++ b/x/auction/genesis.go @@ -19,10 +19,10 @@ func DefaultGenesis() *GenesisState { func (gs *GenesisState) Validate() error { if gs.RewardsParams.BidDuration <= 60 { - return errors.New("RewardsParams.BidDuration must be at least 60s") + return errors.New("rewards params bid duration must be at least 60s") } if gs.RewardsParams.BidDuration >= 180*24*3600 { - return errors.New("RewardsParams.BidDuration must be at most 15552000s = 180days") + return errors.New("rewards params bid duration must be at most 15552000s = 180days") } for _, elem := range gs.RewardsAuctions { coins := sdk.Coins(elem.Rewards.Rewards) diff --git a/x/leverage/client/cli/flags.go b/x/leverage/client/cli/flags.go new file mode 100644 index 0000000000..ada3a048b0 --- /dev/null +++ b/x/leverage/client/cli/flags.go @@ -0,0 +1,3 @@ +package cli + +const FlagRepayInterest = "repay-interest" diff --git a/x/leverage/client/cli/query.go b/x/leverage/client/cli/query.go index e19264420a..f719303019 100644 --- a/x/leverage/client/cli/query.go +++ b/x/leverage/client/cli/query.go @@ -41,6 +41,10 @@ func GetQueryCmd() *cobra.Command { QueryMaxBorrow(), QueryInspect(), QueryInspectAccount(), + QueryIsolatedBadDebts(), + QueryInterestScalars(), + QueryAllReserves(), + QueryLastInterestTime(), ) return cmd @@ -427,3 +431,95 @@ func QueryInspectAccount() *cobra.Command { return cmd } + +func QueryIsolatedBadDebts() *cobra.Command { + cmd := &cobra.Command{ + Use: "isolated-bad-debts", + Args: cobra.ExactArgs(0), + Short: "Query for all isolated bad debts", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryIsolatedBadDebts{} + resp, err := queryClient.IsolatedBadDebts(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func QueryInterestScalars() *cobra.Command { + cmd := &cobra.Command{ + Use: "interest-scalars", + Args: cobra.ExactArgs(0), + Short: "Query for all interest scalars", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryInterestScalars{} + resp, err := queryClient.InterestScalars(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func QueryAllReserves() *cobra.Command { + cmd := &cobra.Command{ + Use: "all-reserves", + Args: cobra.ExactArgs(0), + Short: "Query for all reserves", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryAllReserves{} + resp, err := queryClient.AllReserves(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func QueryLastInterestTime() *cobra.Command { + cmd := &cobra.Command{ + Use: "last-interest-time", + Args: cobra.ExactArgs(0), + Short: "Query for the last interest time", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryLastInterestTime{} + resp, err := queryClient.LastInterestTime(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/leverage/client/cli/tx.go b/x/leverage/client/cli/tx.go index c1c193d0cd..3cf4166a11 100644 --- a/x/leverage/client/cli/tx.go +++ b/x/leverage/client/cli/tx.go @@ -35,6 +35,7 @@ func GetTxCmd() *cobra.Command { Liquidate(), LeveragedLiquidate(), SupplyCollateral(), + RepayIsolatedBadDebt(), ) return cmd @@ -405,3 +406,46 @@ func SupplyCollateral() *cobra.Command { return cmd } + +// RepayIsolatedBadDebt creates a Cobra command to generate or broadcast a +// transaction with a MsgRepayIsolatedBadDebt message. +func RepayIsolatedBadDebt() *cobra.Command { + cmd := &cobra.Command{ + Use: "repay-isolated-bad-debt [borrower] [amount]", + Args: cobra.ExactArgs(2), + Short: "Repay isolated bad debt", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + borrowerAddr, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + asset, err := sdk.ParseCoinNormalized(args[1]) + if err != nil { + return err + } + + repayInterest, err := cmd.Flags().GetBool(FlagRepayInterest) + if err != nil { + return err + } + + msg := types.NewMsgRepayIsolatedBadDebt(clientCtx.GetFromAddress(), borrowerAddr, asset, repayInterest) + if err = msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().Bool(FlagRepayInterest, false, "Repay interest") + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/leverage/keeper/genesis.go b/x/leverage/keeper/genesis.go index 3b3b01d216..9afc36e71f 100644 --- a/x/leverage/keeper/genesis.go +++ b/x/leverage/keeper/genesis.go @@ -47,6 +47,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { for _, pair := range genState.SpecialPairs { util.Panic(k.SetSpecialAssetPair(ctx, pair)) } + + for _, isolatedBadDebt := range genState.IsolatedBadDebts { + util.Panic(k.SetIsolatedBadDebt(ctx, isolatedBadDebt)) + } } // ExportGenesis returns the x/leverage module's exported genesis state. @@ -58,10 +62,11 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.getAllCollateral(ctx), k.GetAllReserves(ctx), k.getLastInterestTime(ctx), - k.getAllBadDebts(ctx), + k.GetAllBadDebts(ctx), k.getAllInterestScalars(ctx), k.GetAllUTokenSupply(ctx), k.GetAllSpecialAssetPairs(ctx), + k.GetIsolatedBadDebts(ctx), ) } diff --git a/x/leverage/keeper/grpc_query.go b/x/leverage/keeper/grpc_query.go index c1e7f9d10e..7b857b6232 100644 --- a/x/leverage/keeper/grpc_query.go +++ b/x/leverage/keeper/grpc_query.go @@ -277,7 +277,7 @@ func (q Querier) BadDebts( } ctx := sdk.UnwrapSDKContext(goCtx) - targets := q.getAllBadDebts(ctx) + targets := q.GetAllBadDebts(ctx) return &types.QueryBadDebtsResponse{Targets: targets}, nil } @@ -405,3 +405,59 @@ func (q Querier) MaxBorrow( Tokens: maxTokens, }, nil } + +// IsolatedBadDebts returns all isolated bad debts. +func (q Querier) IsolatedBadDebts( + goCtx context.Context, + req *types.QueryIsolatedBadDebts, +) (*types.QueryIsolatedBadDebtsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + return &types.QueryIsolatedBadDebtsResponse{ + IsolatedBadDebts: q.GetIsolatedBadDebts(ctx), + }, nil +} + +// InterestScalars returns all interest scalars. +func (q Querier) InterestScalars( + goCtx context.Context, + req *types.QueryInterestScalars, +) (*types.QueryInterestScalarsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + return &types.QueryInterestScalarsResponse{ + InterestScalars: q.getAllInterestScalars(ctx), + }, nil +} + +// LastInterestTime returns the last interest time. +func (q Querier) LastInterestTime( + goCtx context.Context, + req *types.QueryLastInterestTime, +) (*types.QueryLastInterestTimeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + return &types.QueryLastInterestTimeResponse{ + LastInterestTime: q.getLastInterestTime(ctx), + }, nil +} + +// AllReserves returns all reserves. +func (q Querier) AllReserves( + goCtx context.Context, + req *types.QueryAllReserves, +) (*types.QueryAllReservesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + return &types.QueryAllReservesResponse{ + Reserves: q.GetAllReserves(ctx), + }, nil +} diff --git a/x/leverage/keeper/grpc_query_test.go b/x/leverage/keeper/grpc_query_test.go index 7a9a1c8606..1caa27e2c4 100644 --- a/x/leverage/keeper/grpc_query_test.go +++ b/x/leverage/keeper/grpc_query_test.go @@ -451,5 +451,47 @@ func (s *IntegrationTestSuite) TestQuerier_MaxBorrow() { expected = types.QueryMaxBorrowResponse{ Tokens: sdk.NewCoins(sdk.NewCoin(umeeDenom, sdk.NewInt(150_000000))), } + require.Equal(expected, *resp) } + +func (s *IntegrationTestSuite) TestQuerier_IsolatedBadDebts() { + ctx, require := s.ctx, s.Require() + + // creates account which has supplied and collateralized 1000 UMEE + addr := s.newAccount(coin.New(umeeDenom, 1000_000000)) + s.supply(addr, coin.New(umeeDenom, 1000_000000)) + s.collateralize(addr, coin.New("u/"+umeeDenom, 1000_000000)) + + resp, err := s.queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + + require.Equal(3, len(resp.IsolatedBadDebts)) + + for _, bd := range resp.IsolatedBadDebts { + if bd.Denom == umeeDenom || bd.Denom == pairedDenom || bd.Denom == daiDenom { + require.Equal(bd.Amount, sdk.NewInt(1000)) + } + } +} + +func (s *IntegrationTestSuite) TestQuerier_AllReserves() { + ctx, require := s.ctx, s.Require() + resp, err := s.queryClient.AllReserves(ctx, &types.QueryAllReserves{}) + require.NoError(err) + require.Equal(0, len(resp.Reserves)) +} + +func (s *IntegrationTestSuite) TestQuerier_LastInterestTime() { + ctx, require := s.ctx, s.Require() + resp, err := s.queryClient.LastInterestTime(ctx, &types.QueryLastInterestTime{}) + require.NoError(err) + require.Equal(ctx.BlockTime().Unix(), resp.LastInterestTime) +} + +func (s *IntegrationTestSuite) TestQuerier_InterestScalars() { + ctx, require := s.ctx, s.Require() + resp, err := s.queryClient.InterestScalars(ctx, &types.QueryInterestScalars{}) + require.NoError(err) + require.Equal(0, len(resp.InterestScalars)) +} diff --git a/x/leverage/keeper/isolated_bad_debts.go b/x/leverage/keeper/isolated_bad_debts.go new file mode 100644 index 0000000000..a7fd8f5805 --- /dev/null +++ b/x/leverage/keeper/isolated_bad_debts.go @@ -0,0 +1,206 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/umee-network/umee/v6/util" + "github.com/umee-network/umee/v6/util/coin" + "github.com/umee-network/umee/v6/util/sdkutil" + "github.com/umee-network/umee/v6/util/store" + "github.com/umee-network/umee/v6/x/leverage/types" +) + +// GetIsolatedBadDebts returns all isolated bad debts. +func (k Keeper) GetIsolatedBadDebts(ctx sdk.Context) []types.IsolatedBadDebt { + prefix := types.KeyPrefixIsolatedBadDebt + isolatedBadDebts := []types.IsolatedBadDebt{} + + iterator := func(key, _ []byte) error { + addr := types.AddressFromKey(key, prefix) + denom := types.DenomFromKeyWithAddress(key, prefix) + var ibd types.IsolatedBadDebt + store.GetValueCdc(ctx.KVStore(k.storeKey), k.cdc, types.KeyIsolatedBadDebt(denom, addr), &ibd, "bad debt") + isolatedBadDebts = append(isolatedBadDebts, ibd) + return nil + } + util.Panic(k.iterate(ctx, prefix, iterator)) + return isolatedBadDebts +} + +// SetIsolatedBadDebt sets the isolated bad debt for a borrower. +// It panics if the denom is invalid, the borrower is empty, or the amount is negative. +// Key : prefix + address + denom = amount +// if amount is zero then it will remove the isolated bad debt entry +func (k Keeper) SetIsolatedBadDebt(ctx sdk.Context, ibd types.IsolatedBadDebt) error { + if err := types.ValidateBaseDenom(ibd.Denom); err != nil { + return err + } + if ibd.Address == "" { + return types.ErrEmptyAddress + } + if ibd.Amount.IsNegative() { + return types.ErrSetAmount.Wrapf("%s is below the minimum %s of zero", ibd.Amount, "bad debt") + } + if ibd.InterestAccrued.IsNegative() { + return types.ErrSetAmount.Wrapf("%s is below the minimum %s of zero", ibd.InterestAccrued, "interest accrued") + } + accAddr, err := sdk.AccAddressFromBech32(ibd.Address) + if err != nil { + return err + } + // if amount and interest accrued are zero then remove the bad debt entry + if ibd.Amount.Add(ibd.InterestAccrued).IsZero() { + ctx.KVStore(k.storeKey).Delete(types.KeyIsolatedBadDebt(ibd.Denom, accAddr)) + return nil + } + return store.SetValueCdc( + ctx.KVStore(k.storeKey), + k.cdc, + types.KeyIsolatedBadDebt(ibd.Denom, accAddr), + &ibd, + "bad debt", + ) +} + +// GetIsolatedBadDebt returns the isolated bad debt for a borrower. +func (k Keeper) GetIsolatedBadDebt(ctx sdk.Context, denom string, borrower sdk.AccAddress) types.IsolatedBadDebt { + var ibd types.IsolatedBadDebt + store.GetValueCdc(ctx.KVStore(k.storeKey), k.cdc, types.KeyIsolatedBadDebt(denom, borrower), &ibd, "bad debt") + return ibd +} + +// RemoveBadDebt removes the isolated bad debt for a borrower. +func (k Keeper) RemoveBadDebt(ctx sdk.Context, denom string, borrower sdk.AccAddress) error { + return k.setBadDebtAddress(ctx, borrower, denom, false) +} + +// GetBorrowerBorrowsWithoutInterest returns an sdk.Coins object containing all open borrows +// associated with an address. +func (k Keeper) GetBorrowerBorrowsWithoutInterest( + ctx sdk.Context, borrowerAddr sdk.AccAddress, +) []types.BorrowWithInterest { + prefix := types.KeyAdjustedBorrowNoDenom(borrowerAddr) + totalBorrowed := []types.BorrowWithInterest{} + iterator := func(key, val []byte) error { + borrowDenom := types.DenomFromKeyWithAddress(key, types.KeyPrefixAdjustedBorrow) + var adjustedAmount sdk.Dec + if err := adjustedAmount.Unmarshal(val); err != nil { + // improperly marshaled borrow amount should never happen + return err + } + + interestScalar := k.getInterestScalar(ctx, borrowDenom) + // interestScalar always >=1 + interestAccured := adjustedAmount.Mul(interestScalar.Sub(sdk.OneDec())).Ceil().TruncateInt() + b := types.NewBorrowWithInterest(borrowDenom, adjustedAmount.Ceil().TruncateInt(), interestScalar, interestAccured) + totalBorrowed = append(totalBorrowed, b) + return nil + } + util.Panic(k.iterate(ctx, prefix, iterator)) + return totalBorrowed +} + +// RepayIsolatedBadDebt repays the isolated bad debt for a borrower. +// It returns the amount of bad debt repaid. +func (k Keeper) RepayIsolatedBadDebt( + ctx sdk.Context, + fromAddr sdk.AccAddress, + borrowerAddr sdk.AccAddress, + payment sdk.Coin, + repayInterest bool, +) (sdk.Coin, error) { + // validate asset + if err := validateBaseToken(payment); err != nil { + return sdk.Coin{}, err + } + + // get bad debt + badDebt := k.GetIsolatedBadDebt(ctx, payment.Denom, borrowerAddr) + if badDebt.Denom != payment.Denom { + return sdk.Coin{}, types.ErrBadDebtDenomMismatch.Wrapf( + "denom %s does not match bad debt denom %s", + payment.Denom, badDebt.Denom, + ) + } + + if payment.Amount.IsZero() { + return coin.Zero(payment.Denom), nil + } + + // nothing to repay + if badDebt.Amount.IsZero() && badDebt.InterestAccrued.IsZero() { + return coin.Zero(payment.Denom), nil + } + + // check balance + balance := k.bankKeeper.GetBalance(ctx, fromAddr, payment.Denom) + if balance.IsLT(payment) { + return sdk.Coin{}, types.ErrInsufficientBalance + } + + remainingPayment := payment.Amount + + // interest repayment + interestRepaid := sdk.ZeroInt() + remainingInterest := badDebt.InterestAccrued + + if repayInterest && !badDebt.InterestAccrued.IsZero() { + interestRepaid = sdk.MinInt(remainingPayment, badDebt.InterestAccrued) + remainingInterest = badDebt.InterestAccrued.Sub(interestRepaid) + remainingPayment = remainingPayment.Sub(interestRepaid) + } + + // principal repayment + principalRepaid := sdk.ZeroInt() + remainingPrincipal := badDebt.Amount + + if !remainingPayment.IsZero() { + principalRepaid = sdk.MinInt(remainingPayment, badDebt.Amount) + remainingPrincipal = badDebt.Amount.Sub(principalRepaid) + } + + // total actually used + totalRepaid := interestRepaid.Add(principalRepaid) + if totalRepaid.IsZero() { + return coin.Zero(payment.Denom), nil + } + + // send only used amount + actualPayment := sdk.NewCoin(payment.Denom, totalRepaid) + + err := k.bankKeeper.SendCoinsFromAccountToModule( + ctx, + fromAddr, + types.ModuleName, + sdk.NewCoins(actualPayment), + ) + if err != nil { + return sdk.Coin{}, err + } + + // update bad debt with remaining values + ibd := types.NewIsolatedBadDebt( + borrowerAddr.String(), + payment.Denom, + remainingPrincipal, + badDebt.InterestScalar, + remainingInterest, + ) + + err = k.SetIsolatedBadDebt(ctx, ibd) + if err != nil { + return sdk.Coin{}, err + } + + sdkutil.Emit(&ctx, &types.EventRepayIsolatedBadDebt{ + From: fromAddr.String(), + Borrower: borrowerAddr.String(), + Denom: payment.Denom, + TotalRepaid: actualPayment, + PrincipalRepaid: principalRepaid, + InterestRepaid: interestRepaid, + RemainingPrincipal: remainingPrincipal, + RemainingInterest: remainingInterest, + }) + + return sdk.NewCoin(payment.Denom, totalRepaid), nil +} diff --git a/x/leverage/keeper/iter.go b/x/leverage/keeper/iter.go index b9cac1bf4b..e444dcc5ae 100644 --- a/x/leverage/keeper/iter.go +++ b/x/leverage/keeper/iter.go @@ -21,8 +21,8 @@ func (k Keeper) iterate(ctx sdk.Context, prefix []byte, cb func(key, val []byte) return store.Iterate(ctx.KVStore(k.storeKey), prefix, cb) } -// getAllBadDebts gets bad debt instances across all borrowers. -func (k Keeper) getAllBadDebts(ctx sdk.Context) []types.BadDebt { +// GetAllBadDebts gets bad debt instances across all borrowers. +func (k Keeper) GetAllBadDebts(ctx sdk.Context) []types.BadDebt { prefix := types.KeyPrefixBadDebt badDebts := []types.BadDebt{} diff --git a/x/leverage/keeper/migrations.go b/x/leverage/keeper/migrations.go deleted file mode 100644 index 81d056ba53..0000000000 --- a/x/leverage/keeper/migrations.go +++ /dev/null @@ -1,11 +0,0 @@ -package keeper - -// Migrator is a struct for handling in-place store migrations. -type Migrator struct { - keeper *Keeper -} - -// NewMigrator creates a Migrator. -func NewMigrator(keeper *Keeper) Migrator { - return Migrator{keeper: keeper} -} diff --git a/x/leverage/keeper/msg_server.go b/x/leverage/keeper/msg_server.go index 55768e9748..f7ea394776 100644 --- a/x/leverage/keeper/msg_server.go +++ b/x/leverage/keeper/msg_server.go @@ -618,3 +618,38 @@ func (s msgServer) GovSetParams( return &types.MsgGovSetParamsResponse{}, nil } + +// RepayIsolatedBadDebt allows a user to repay isolated bad debts. +func (s msgServer) RepayIsolatedBadDebt( + goCtx context.Context, + msg *types.MsgRepayIsolatedBadDebt, +) (*types.MsgRepayIsolatedBadDebtResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + fromAddr, err := sdk.AccAddressFromBech32(msg.From) + if err != nil { + return nil, err + } + + borrowerAddr, err := sdk.AccAddressFromBech32(msg.Borrower) + if err != nil { + return nil, err + } + + repaid, err := s.keeper.RepayIsolatedBadDebt(ctx, fromAddr, borrowerAddr, msg.Asset, msg.RepayInterest) + if err != nil { + return nil, err + } + + s.keeper.Logger(ctx).Debug( + "isolated bad debt repaid", + "from", msg.From, + "borrower", msg.Borrower, + "asset", msg.Asset.String(), + "repaid", repaid.String(), + ) + + return &types.MsgRepayIsolatedBadDebtResponse{ + Asset: repaid, + }, nil +} diff --git a/x/leverage/keeper/msg_server_test.go b/x/leverage/keeper/msg_server_test.go index 75b87821b9..8c71afc346 100644 --- a/x/leverage/keeper/msg_server_test.go +++ b/x/leverage/keeper/msg_server_test.go @@ -2845,3 +2845,94 @@ func (s *IntegrationTestSuite) TestMinCollateralLiquidity_Collateralize() { _, err = srv.Collateralize(ctx, msg) require.ErrorIs(err, types.ErrMinCollateralLiquidity, "collateralize") } + +func (s *IntegrationTestSuite) TestRepayIsolatedBadDebt() { + ctx, srv, require, addrs, queryClient, app := s.ctx, s.msgSrvr, s.Require(), s.addrs, s.queryClient, s.app + + leverageModuleAccount, err := sdk.AccAddressFromBech32("umee185vjuy55vukn8fdz8fax4rs5xnhl3ufmsul2ks") + borrower := addrs[0] + supplier := s.newAccount(coin.New(umeeDenom, 10000), coin.New(pairedDenom, 10000)) // this user will repay + oldBalance := app.BankKeeper.GetBalance(ctx, leverageModuleAccount, umeeDenom) + + firstBadDebts, err := queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + require.Equal(len(firstBadDebts.IsolatedBadDebts), 3) + + // repay the isolated bad debt + msg := &types.MsgRepayIsolatedBadDebt{ + From: supplier.String(), + Borrower: borrower.String(), + Asset: coin.New(umeeDenom, 100), + RepayInterest: false, + } + _, err = srv.RepayIsolatedBadDebt(ctx, msg) + require.NoError(err) + + // get the isolated bad debts + badDebts, err := queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + require.Len(badDebts.IsolatedBadDebts, 3) + + for _, badDebt := range badDebts.IsolatedBadDebts { + if badDebt.Address == borrower.String() && badDebt.Denom == umeeDenom { + // default we have 1000 bad debt + require.Equal(badDebt.Amount, sdk.NewInt(900)) + } + } + + // leverage module balance should increase 100 + require.NoError(err) + newBalance := app.BankKeeper.GetBalance(ctx, leverageModuleAccount, umeeDenom) + require.Equal(newBalance.Sub(oldBalance).Amount, sdk.NewInt(100)) + + // 2. repay total for umee + msg.Asset = coin.New(umeeDenom, 900) + _, err = srv.RepayIsolatedBadDebt(ctx, msg) + require.NoError(err) + + // get the isolated bad debts + badDebts, err = queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + require.Len(badDebts.IsolatedBadDebts, 2) + require.Equal(badDebts.IsolatedBadDebts[0].Address, borrower.String()) + + // leverage module balance should increase 1000 + newBalance = app.BankKeeper.GetBalance(ctx, leverageModuleAccount, umeeDenom) + require.Equal(newBalance.Sub(oldBalance).Amount, sdk.NewInt(1000)) + + // pay interest only + msg.Asset = coin.New(pairedDenom, 300) + msg.RepayInterest = true + _, err = srv.RepayIsolatedBadDebt(ctx, msg) + require.NoError(err) + + // get the isolated bad debts + badDebts, err = queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + require.Len(badDebts.IsolatedBadDebts, 2) + require.Equal(badDebts.IsolatedBadDebts[0].Address, borrower.String()) + + for _, debt := range badDebts.IsolatedBadDebts { + if debt.Denom == pairedDenom { + require.Equal(debt.Amount, sdk.NewInt(1000)) + // 400 - 300 = 100 + require.Equal(debt.InterestAccrued, sdk.NewInt(100)) + } + } + + // pay complete debt with include interest for pairedDenom + msg.Asset = coin.New(pairedDenom, 1100) // 1000 principal + 100 interest + msg.RepayInterest = true + _, err = srv.RepayIsolatedBadDebt(ctx, msg) + require.NoError(err) + + // get the isolated bad debts + badDebts, err = queryClient.IsolatedBadDebts(ctx, &types.QueryIsolatedBadDebts{}) + require.NoError(err) + require.Len(badDebts.IsolatedBadDebts, 1) + require.Equal(badDebts.IsolatedBadDebts[0].Address, borrower.String()) + + // leverage module balance of pairedDenom should increase 1400 + pairedBalance := app.BankKeeper.GetBalance(ctx, leverageModuleAccount, pairedDenom) + require.Equal(pairedBalance.Amount, sdk.NewInt(1400)) +} diff --git a/x/leverage/keeper/suite_test.go b/x/leverage/keeper/suite_test.go index f5d475a918..3b28600840 100644 --- a/x/leverage/keeper/suite_test.go +++ b/x/leverage/keeper/suite_test.go @@ -124,6 +124,20 @@ func (s *IntegrationTestSuite) SetupTest() { s.setupAccountCounter = sdkmath.ZeroInt() s.queryClient = types.NewQueryClient(queryHelper) s.addrs = umeeapp.AddTestAddrsIncremental(app, s.ctx, 1, sdk.NewInt(3000000)) + // storing the isolate bad debts for testing + isolatedBadDebt := types.NewIsolatedBadDebt(s.addrs[0].String(), umeeDenom, sdk.NewInt(1000), sdk.OneDec(), + sdk.ZeroDec().TruncateInt()) + app.LeverageKeeper.SetIsolatedBadDebt(ctx, isolatedBadDebt) + // + interstScalar := sdk.MustNewDecFromStr("1.4") + interstAccured := sdk.MustNewDecFromStr("400").Ceil().TruncateInt() // 1.4 interst scalar means interst accured 1000 * (1.4-1) = 400 + isolatedBadDebt = types.NewIsolatedBadDebt(s.addrs[0].String(), pairedDenom, sdk.NewInt(1000), interstScalar, + interstAccured) + app.LeverageKeeper.SetIsolatedBadDebt(ctx, isolatedBadDebt) + isolatedBadDebt = types.NewIsolatedBadDebt(s.addrs[0].String(), daiDenom, sdk.NewInt(1000), sdk.OneDec(), + sdk.ZeroDec().TruncateInt()) + app.LeverageKeeper.SetIsolatedBadDebt(ctx, isolatedBadDebt) + s.msgSrvr = keeper.NewMsgServerImpl(s.app.LeverageKeeper) } diff --git a/x/leverage/migrations/migrations.go b/x/leverage/migrations/migrations.go new file mode 100644 index 0000000000..f4b1a8a8f8 --- /dev/null +++ b/x/leverage/migrations/migrations.go @@ -0,0 +1,58 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/umee-network/umee/v6/x/leverage/keeper" + "github.com/umee-network/umee/v6/x/leverage/types" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper *keeper.Keeper +} + +// NewMigrator creates a Migrator. +func NewMigrator(keeper *keeper.Keeper) Migrator { + return Migrator{keeper: keeper} +} + +// Migrate1to2 migrates the x/leverage module state from version 1 to version 2. +// It moves all bad debts to the isolated bad debts store. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + // get all bad debts + badDebts := m.keeper.GetAllBadDebts(ctx) + + // store them in the new isolated bad debts store + for _, bd := range badDebts { + borrower, err := sdk.AccAddressFromBech32(bd.Address) + if err != nil { + return err + } + + // we will get the borrows without interest + borrows := m.keeper.GetBorrowerBorrowsWithoutInterest(ctx, borrower) + // borrow + var borrow types.BorrowWithInterest + for _, b := range borrows { + if b.Denom == bd.Denom { + borrow = b + break + } + } + // we will set the isolated bad debt with the amount of borrows without interest + isolateBadDebt := types.NewIsolatedBadDebt(borrower.String(), bd.Denom, borrow.Amount, + borrow.InterestScalar, borrow.InterestAccured) + err = m.keeper.SetIsolatedBadDebt(ctx, isolateBadDebt) + if err != nil { + return err + } + + // delete the previous bad debts + err = m.keeper.RemoveBadDebt(ctx, bd.Denom, borrower) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/leverage/module.go b/x/leverage/module.go index d84a8fd274..068271d4b0 100644 --- a/x/leverage/module.go +++ b/x/leverage/module.go @@ -19,6 +19,7 @@ import ( "github.com/umee-network/umee/v6/x/leverage/client/cli" "github.com/umee-network/umee/v6/x/leverage/keeper" + "github.com/umee-network/umee/v6/x/leverage/migrations" "github.com/umee-network/umee/v6/x/leverage/simulation" "github.com/umee-network/umee/v6/x/leverage/types" ) @@ -118,13 +119,18 @@ func (am AppModule) Name() string { } func (AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } // RegisterServices registers gRPC services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.keeper)) + + m := migrations.NewMigrator(&am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/leverage from version 1 to 2: %v", err)) + } } // RegisterInvariants registers the x/leverage module's invariants. diff --git a/x/leverage/simulation/genesis.go b/x/leverage/simulation/genesis.go index 70474e3de1..1023c37d9b 100644 --- a/x/leverage/simulation/genesis.go +++ b/x/leverage/simulation/genesis.go @@ -93,6 +93,7 @@ func RandomizedGenState(simState *module.SimulationState) { []types.InterestScalar{}, sdk.Coins{}, []types.SpecialAssetPair{}, + []types.IsolatedBadDebt{}, ) bz, err := json.MarshalIndent(&leverageGenesis.Params, "", " ") diff --git a/x/leverage/types/errors.go b/x/leverage/types/errors.go index 39dc32ca82..4d3bf89a74 100644 --- a/x/leverage/types/errors.go +++ b/x/leverage/types/errors.go @@ -61,4 +61,9 @@ var ( // 7XX = Disabled Functionality ErrNotLiquidatorNode = errors.Register(ModuleName, 700, "node has disabled liquidator queries") + + // 8XX = Isolated Bad Debts + ErrBadDebtNotFound = errors.Register(ModuleName, 800, "bad debt not found") + ErrInsufficientRepayment = errors.Register(ModuleName, 801, "insufficient repayment") + ErrBadDebtDenomMismatch = errors.Register(ModuleName, 802, "bad debt denom mismatch") ) diff --git a/x/leverage/types/events.pb.go b/x/leverage/types/events.pb.go index 03065ec232..00b9a37af0 100644 --- a/x/leverage/types/events.pb.go +++ b/x/leverage/types/events.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -487,6 +488,59 @@ func (m *EventFundOracle) XXX_DiscardUnknown() { var xxx_messageInfo_EventFundOracle proto.InternalMessageInfo +// EventRepayIsolatedBadDebt is emitted when isolated bad debt is repaid (partial or full) +type EventRepayIsolatedBadDebt struct { + // who paid + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // borrower whose debt is being repaid + Borrower string `protobuf:"bytes,2,opt,name=borrower,proto3" json:"borrower,omitempty"` + // denom of the asset + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + // total amount repaid (principal + interest) + TotalRepaid types.Coin `protobuf:"bytes,4,opt,name=total_repaid,json=totalRepaid,proto3" json:"total_repaid"` + // principal repaid + PrincipalRepaid github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=principal_repaid,json=principalRepaid,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"principal_repaid"` + // interest repaid + InterestRepaid github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=interest_repaid,json=interestRepaid,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"interest_repaid"` + // remaining principal after repayment + RemainingPrincipal github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=remaining_principal,json=remainingPrincipal,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining_principal"` + // remaining interest after repayment + RemainingInterest github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=remaining_interest,json=remainingInterest,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining_interest"` +} + +func (m *EventRepayIsolatedBadDebt) Reset() { *m = EventRepayIsolatedBadDebt{} } +func (m *EventRepayIsolatedBadDebt) String() string { return proto.CompactTextString(m) } +func (*EventRepayIsolatedBadDebt) ProtoMessage() {} +func (*EventRepayIsolatedBadDebt) Descriptor() ([]byte, []int) { + return fileDescriptor_aaf62b4902d7471c, []int{11} +} +func (m *EventRepayIsolatedBadDebt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRepayIsolatedBadDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRepayIsolatedBadDebt.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 *EventRepayIsolatedBadDebt) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRepayIsolatedBadDebt.Merge(m, src) +} +func (m *EventRepayIsolatedBadDebt) XXX_Size() int { + return m.Size() +} +func (m *EventRepayIsolatedBadDebt) XXX_DiscardUnknown() { + xxx_messageInfo_EventRepayIsolatedBadDebt.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRepayIsolatedBadDebt proto.InternalMessageInfo + func init() { proto.RegisterType((*EventSupply)(nil), "umee.leverage.v1.EventSupply") proto.RegisterType((*EventWithdraw)(nil), "umee.leverage.v1.EventWithdraw") @@ -499,53 +553,64 @@ func init() { proto.RegisterType((*EventRepayBadDebt)(nil), "umee.leverage.v1.EventRepayBadDebt") proto.RegisterType((*EventReservesExhausted)(nil), "umee.leverage.v1.EventReservesExhausted") proto.RegisterType((*EventFundOracle)(nil), "umee.leverage.v1.EventFundOracle") + proto.RegisterType((*EventRepayIsolatedBadDebt)(nil), "umee.leverage.v1.EventRepayIsolatedBadDebt") } func init() { proto.RegisterFile("umee/leverage/v1/events.proto", fileDescriptor_aaf62b4902d7471c) } var fileDescriptor_aaf62b4902d7471c = []byte{ - // 647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xcb, 0x6e, 0xd4, 0x3c, - 0x14, 0xc7, 0xc7, 0x33, 0xf3, 0x55, 0xad, 0xfb, 0xf5, 0x42, 0x54, 0xa1, 0xb4, 0x82, 0x50, 0xb2, - 0xea, 0xa6, 0x09, 0xe5, 0x2e, 0xb1, 0x40, 0x9d, 0x5e, 0x04, 0x15, 0x02, 0x69, 0xba, 0x40, 0x62, - 0x33, 0x72, 0xe2, 0xa3, 0x8c, 0xd5, 0x24, 0x0e, 0xb6, 0x93, 0x5e, 0xd8, 0x80, 0x78, 0x01, 0xde, - 0x80, 0x87, 0x00, 0x1e, 0x80, 0x5d, 0x97, 0x15, 0x2b, 0x16, 0x08, 0x41, 0xfb, 0x22, 0x28, 0x4e, - 0x3a, 0x19, 0x56, 0xa4, 0x59, 0xc0, 0x2e, 0x3e, 0xfe, 0xff, 0xcf, 0xf9, 0x1d, 0xfb, 0x44, 0xc6, - 0x57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f, 0x07, 0x00, 0x00, + // 815 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x96, 0xcd, 0x6e, 0xe4, 0x44, + 0x10, 0xc7, 0xc7, 0xc9, 0x24, 0x24, 0x95, 0xcd, 0xc7, 0x36, 0x11, 0x72, 0x22, 0x98, 0x0d, 0x3e, + 0xa0, 0xbd, 0x64, 0x4c, 0xf8, 0x96, 0x40, 0x42, 0x3b, 0xbb, 0x1b, 0x91, 0x15, 0x02, 0xe4, 0x3d, + 0x20, 0x71, 0x19, 0xb5, 0xdd, 0xc5, 0x4c, 0x6b, 0xec, 0x6e, 0xd3, 0xdd, 0x9e, 0x6c, 0x96, 0x0b, + 0x88, 0x17, 0xe0, 0x0d, 0x78, 0x08, 0x96, 0x07, 0xe0, 0x96, 0xe3, 0xb2, 0x27, 0x84, 0xd0, 0x0a, + 0x92, 0x17, 0x41, 0x6e, 0xb7, 0xc7, 0x03, 0x17, 0x9c, 0x51, 0x04, 0xa7, 0x71, 0x57, 0x57, 0xd5, + 0xff, 0x57, 0xd5, 0xe5, 0x1e, 0xc3, 0x2b, 0x45, 0x86, 0x18, 0xa6, 0x38, 0x45, 0x45, 0x47, 0x18, + 0x4e, 0x8f, 0x42, 0x9c, 0xa2, 0x30, 0xba, 0x9f, 0x2b, 0x69, 0x24, 0xd9, 0x29, 0xb7, 0xfb, 0xf5, + 0x76, 0x7f, 0x7a, 0xb4, 0xdf, 0x4b, 0xa4, 0xce, 0xa4, 0x0e, 0x63, 0xaa, 0x4b, 0xf7, 0x18, 0x0d, + 0x3d, 0x0a, 0x13, 0xc9, 0x45, 0x15, 0xb1, 0xbf, 0x57, 0xed, 0x0f, 0xed, 0x2a, 0xac, 0x16, 0x6e, + 0x6b, 0x77, 0x24, 0x47, 0xb2, 0xb2, 0x97, 0x4f, 0x95, 0x35, 0xf8, 0xd1, 0x83, 0x8d, 0xfb, 0xa5, + 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xf1, 0x67, 0x75, 0x5e, 0x32, 0x81, 0xc6, 0xda, 0x5c, 0x30, 0x6b, 0xd7, 0xa0, + 0x76, 0x73, 0x96, 0xb7, 0xbe, 0x81, 0x06, 0x9f, 0x9c, 0xff, 0xd9, 0xeb, 0x9c, 0x5f, 0xf4, 0xbc, + 0xa7, 0x17, 0x3d, 0xef, 0x8f, 0x8b, 0x9e, 0xf7, 0xfd, 0x65, 0xaf, 0xf3, 0xf4, 0xb2, 0xd7, 0xf9, + 0xf5, 0xb2, 0xd7, 0xf9, 0xe2, 0xf5, 0x39, 0x99, 0xf2, 0x23, 0xef, 0x50, 0xa0, 0x39, 0x95, 0x6a, + 0x62, 0x17, 0xe1, 0xf4, 0x9d, 0xf0, 0x51, 0xf3, 0x55, 0x68, 0x45, 0xe3, 0x55, 0xfb, 0xbd, 0xf6, + 0xe6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0x52, 0xb7, 0xea, 0x33, 0x0a, 0x00, 0x00, } func (m *EventSupply) Marshal() (dAtA []byte, err error) { @@ -1053,6 +1118,100 @@ func (m *EventFundOracle) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventRepayIsolatedBadDebt) 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 *EventRepayIsolatedBadDebt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRepayIsolatedBadDebt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.RemainingInterest.Size() + i -= size + if _, err := m.RemainingInterest.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.RemainingPrincipal.Size() + i -= size + if _, err := m.RemainingPrincipal.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.InterestRepaid.Size() + i -= size + if _, err := m.InterestRepaid.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.PrincipalRepaid.Size() + i -= size + if _, err := m.PrincipalRepaid.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.TotalRepaid.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + if len(m.Borrower) > 0 { + i -= len(m.Borrower) + copy(dAtA[i:], m.Borrower) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Borrower))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintEvents(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -1253,6 +1412,37 @@ func (m *EventFundOracle) Size() (n int) { return n } +func (m *EventRepayIsolatedBadDebt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Borrower) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.TotalRepaid.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.PrincipalRepaid.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.InterestRepaid.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.RemainingPrincipal.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.RemainingInterest.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2698,6 +2888,321 @@ func (m *EventFundOracle) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventRepayIsolatedBadDebt) 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 ErrIntOverflowEvents + } + 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: EventRepayIsolatedBadDebt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRepayIsolatedBadDebt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Borrower", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Borrower = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRepaid", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalRepaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrincipalRepaid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PrincipalRepaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InterestRepaid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InterestRepaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingPrincipal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RemainingPrincipal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingInterest", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RemainingInterest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/leverage/types/genesis.go b/x/leverage/types/genesis.go index 750e199548..1778928a48 100644 --- a/x/leverage/types/genesis.go +++ b/x/leverage/types/genesis.go @@ -3,6 +3,7 @@ package types import ( "encoding/json" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -19,6 +20,7 @@ func NewGenesisState( interestScalars []InterestScalar, uTokenSupply sdk.Coins, specialPairs []SpecialAssetPair, + isolatedBadDebts []IsolatedBadDebt, ) *GenesisState { return &GenesisState{ Params: params, @@ -31,6 +33,7 @@ func NewGenesisState( InterestScalars: interestScalars, UtokenSupply: uTokenSupply, SpecialPairs: specialPairs, + IsolatedBadDebts: isolatedBadDebts, } } @@ -107,6 +110,18 @@ func (gs GenesisState) Validate() error { return err } + for _, isolatedBadDebt := range gs.IsolatedBadDebts { + if _, err := sdk.AccAddressFromBech32(isolatedBadDebt.Address); err != nil { + return err + } + if err := sdk.ValidateDenom(isolatedBadDebt.Denom); err != nil { + return err + } + if isolatedBadDebt.Amount.IsNegative() { + return ErrSetAmount.Wrapf("%s is below the minimum %s of zero", isolatedBadDebt.Amount, "bad debt") + } + } + return gs.UtokenSupply.Validate() } @@ -153,3 +168,15 @@ func NewInterestScalar(denom string, scalar sdk.Dec) InterestScalar { Scalar: scalar, } } + +// NewIsolatedBadDebt creates the IsolatedBadDebt struct used in GenesisState +func NewIsolatedBadDebt(addr, denom string, amount math.Int, interestScalar sdk.Dec, + interestAccrued math.Int) IsolatedBadDebt { + return IsolatedBadDebt{ + Address: addr, + Denom: denom, + Amount: amount, + InterestScalar: interestScalar, + InterestAccrued: interestAccrued, + } +} diff --git a/x/leverage/types/genesis.pb.go b/x/leverage/types/genesis.pb.go index 8158d1d2db..8b9abdc287 100644 --- a/x/leverage/types/genesis.pb.go +++ b/x/leverage/types/genesis.pb.go @@ -37,6 +37,7 @@ type GenesisState struct { InterestScalars []InterestScalar `protobuf:"bytes,8,rep,name=interest_scalars,json=interestScalars,proto3" json:"interest_scalars"` UtokenSupply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=utoken_supply,json=utokenSupply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"utoken_supply"` SpecialPairs []SpecialAssetPair `protobuf:"bytes,10,rep,name=special_pairs,json=specialPairs,proto3" json:"special_pairs"` + IsolatedBadDebts []IsolatedBadDebt `protobuf:"bytes,11,rep,name=isolated_bad_debts,json=isolatedBadDebts,proto3" json:"isolated_bad_debts"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -72,6 +73,48 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo +// IsolatedBadDebt is an isolated bad debt instance used in the leverage module's genesis state. +type IsolatedBadDebt struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + InterestScalar github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=interest_scalar,json=interestScalar,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"interest_scalar"` + InterestAccrued github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=interest_accrued,json=interestAccrued,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"interest_accrued"` +} + +func (m *IsolatedBadDebt) Reset() { *m = IsolatedBadDebt{} } +func (m *IsolatedBadDebt) String() string { return proto.CompactTextString(m) } +func (*IsolatedBadDebt) ProtoMessage() {} +func (*IsolatedBadDebt) Descriptor() ([]byte, []int) { + return fileDescriptor_a51f71666aa8f549, []int{1} +} +func (m *IsolatedBadDebt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IsolatedBadDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IsolatedBadDebt.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 *IsolatedBadDebt) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsolatedBadDebt.Merge(m, src) +} +func (m *IsolatedBadDebt) XXX_Size() int { + return m.Size() +} +func (m *IsolatedBadDebt) XXX_DiscardUnknown() { + xxx_messageInfo_IsolatedBadDebt.DiscardUnknown(m) +} + +var xxx_messageInfo_IsolatedBadDebt proto.InternalMessageInfo + // AdjustedBorrow is a borrow struct used in the leverage module's genesis // state. type AdjustedBorrow struct { @@ -83,7 +126,7 @@ func (m *AdjustedBorrow) Reset() { *m = AdjustedBorrow{} } func (m *AdjustedBorrow) String() string { return proto.CompactTextString(m) } func (*AdjustedBorrow) ProtoMessage() {} func (*AdjustedBorrow) Descriptor() ([]byte, []int) { - return fileDescriptor_a51f71666aa8f549, []int{1} + return fileDescriptor_a51f71666aa8f549, []int{2} } func (m *AdjustedBorrow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +166,7 @@ func (m *Collateral) Reset() { *m = Collateral{} } func (m *Collateral) String() string { return proto.CompactTextString(m) } func (*Collateral) ProtoMessage() {} func (*Collateral) Descriptor() ([]byte, []int) { - return fileDescriptor_a51f71666aa8f549, []int{2} + return fileDescriptor_a51f71666aa8f549, []int{3} } func (m *Collateral) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +205,7 @@ func (m *BadDebt) Reset() { *m = BadDebt{} } func (m *BadDebt) String() string { return proto.CompactTextString(m) } func (*BadDebt) ProtoMessage() {} func (*BadDebt) Descriptor() ([]byte, []int) { - return fileDescriptor_a51f71666aa8f549, []int{3} + return fileDescriptor_a51f71666aa8f549, []int{4} } func (m *BadDebt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -202,7 +245,7 @@ func (m *InterestScalar) Reset() { *m = InterestScalar{} } func (m *InterestScalar) String() string { return proto.CompactTextString(m) } func (*InterestScalar) ProtoMessage() {} func (*InterestScalar) Descriptor() ([]byte, []int) { - return fileDescriptor_a51f71666aa8f549, []int{4} + return fileDescriptor_a51f71666aa8f549, []int{5} } func (m *InterestScalar) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -233,6 +276,7 @@ var xxx_messageInfo_InterestScalar proto.InternalMessageInfo func init() { proto.RegisterType((*GenesisState)(nil), "umee.leverage.v1.GenesisState") + proto.RegisterType((*IsolatedBadDebt)(nil), "umee.leverage.v1.IsolatedBadDebt") proto.RegisterType((*AdjustedBorrow)(nil), "umee.leverage.v1.AdjustedBorrow") proto.RegisterType((*Collateral)(nil), "umee.leverage.v1.Collateral") proto.RegisterType((*BadDebt)(nil), "umee.leverage.v1.BadDebt") @@ -242,47 +286,52 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/genesis.proto", fileDescriptor_a51f71666aa8f549) } var fileDescriptor_a51f71666aa8f549 = []byte{ - // 635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x6e, 0xd3, 0x4c, - 0x14, 0x8e, 0x7b, 0x49, 0x9b, 0xe9, 0xe5, 0xaf, 0x46, 0x95, 0x7e, 0x53, 0x55, 0x4e, 0x94, 0x05, - 0xca, 0x82, 0xda, 0x6d, 0x91, 0x8a, 0x8a, 0xd8, 0xd4, 0xad, 0x40, 0x2c, 0x40, 0x25, 0xe9, 0x8a, - 0x8d, 0x35, 0xb6, 0x0f, 0xc6, 0xd4, 0xf6, 0x58, 0x73, 0x26, 0x29, 0x5d, 0xf2, 0x06, 0x3c, 0x07, - 0x4f, 0xd2, 0x65, 0x97, 0x88, 0x45, 0x81, 0xf6, 0x45, 0x90, 0x67, 0x26, 0x69, 0xd3, 0x40, 0xc4, - 0x82, 0x55, 0x32, 0x73, 0xbe, 0xcb, 0x9c, 0xf3, 0xcd, 0x98, 0x38, 0xfd, 0x1c, 0xc0, 0xcb, 0x60, - 0x00, 0x82, 0x25, 0xe0, 0x0d, 0x76, 0xbc, 0x04, 0x0a, 0xc0, 0x14, 0xdd, 0x52, 0x70, 0xc9, 0xe9, - 0x5a, 0x55, 0x77, 0x87, 0x75, 0x77, 0xb0, 0xb3, 0xe1, 0x44, 0x1c, 0x73, 0x8e, 0x5e, 0xc8, 0xb0, - 0xc2, 0x87, 0x20, 0xd9, 0x8e, 0x17, 0xf1, 0xb4, 0xd0, 0x8c, 0x8d, 0xe6, 0x84, 0xe2, 0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c9, 0x3d, 0x8f, 0x29, - 0x93, 0x1c, 0x37, 0xd8, 0x27, 0x0b, 0x26, 0xf7, 0x29, 0xea, 0xeb, 0x64, 0x3e, 0x86, 0x82, 0xe7, - 0x4a, 0xbc, 0xd1, 0xd5, 0x8b, 0x76, 0x41, 0x56, 0xc7, 0xd3, 0xbe, 0xc5, 0x59, 0x77, 0x70, 0xf4, - 0x39, 0xa9, 0xeb, 0x6b, 0xa3, 0xe9, 0xbe, 0x5b, 0x1d, 0xe0, 0xdb, 0x55, 0xf3, 0xe1, 0x5f, 0x44, - 0x79, 0x04, 0x51, 0xd7, 0xb0, 0xfd, 0xd7, 0x17, 0x3f, 0x9d, 0xda, 0xc5, 0xb5, 0x63, 0x5d, 0x5e, - 0x3b, 0xd6, 0x8f, 0x6b, 0xc7, 0xfa, 0x7c, 0xe3, 0xd4, 0x2e, 0x6f, 0x9c, 0xda, 0xd7, 0x1b, 0xa7, - 0xf6, 0x76, 0xfb, 0x8e, 0x5a, 0x95, 0xe9, 0x56, 0x01, 0xf2, 0x8c, 0x8b, 0x53, 0xb5, 0xf0, 0x06, - 0x7b, 0xde, 0xc7, 0xdb, 0x2f, 0x9d, 0xd2, 0x0e, 0xeb, 0xea, 0x73, 0xf6, 0xf8, 0x57, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xba, 0x3b, 0x91, 0xf3, 0x59, 0x05, 0x00, 0x00, + // 716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, + 0x18, 0xcd, 0x0f, 0x04, 0x18, 0xfe, 0xa2, 0x11, 0xd2, 0x9d, 0x8b, 0x90, 0x93, 0x9b, 0xc5, 0x55, + 0x16, 0xc5, 0x06, 0x2a, 0x51, 0x51, 0x75, 0x43, 0x40, 0xad, 0x58, 0xb4, 0xa2, 0x09, 0x55, 0xd5, + 0x6e, 0xac, 0xb1, 0xfd, 0x35, 0x75, 0xb1, 0x3d, 0x96, 0xbf, 0x49, 0x28, 0x6f, 0xd1, 0xe7, 0xe8, + 0x3b, 0x74, 0xcf, 0x92, 0x25, 0xea, 0x82, 0xb6, 0xf0, 0x22, 0x95, 0xc7, 0x93, 0x04, 0x27, 0x14, + 0xb5, 0xa8, 0xab, 0x64, 0xbe, 0x39, 0xe7, 0x7c, 0x33, 0xe7, 0xcc, 0x8c, 0x89, 0xd1, 0x0b, 0x01, + 0xac, 0x00, 0xfa, 0x90, 0xf0, 0x2e, 0x58, 0xfd, 0x4d, 0xab, 0x0b, 0x11, 0xa0, 0x8f, 0x66, 0x9c, + 0x08, 0x29, 0x68, 0x35, 0x9d, 0x37, 0x07, 0xf3, 0x66, 0x7f, 0x73, 0xd5, 0x70, 0x05, 0x86, 0x02, + 0x2d, 0x87, 0x63, 0x8a, 0x77, 0x40, 0xf2, 0x4d, 0xcb, 0x15, 0x7e, 0x94, 0x31, 0x56, 0x6b, 0x13, + 0x8a, 0x43, 0x76, 0x06, 0x58, 0xe9, 0x8a, 0xae, 0x50, 0x7f, 0xad, 0xf4, 0x5f, 0x56, 0x6d, 0x5c, + 0x54, 0xc8, 0xc2, 0xb3, 0xac, 0x75, 0x47, 0x72, 0x09, 0x74, 0x9b, 0x54, 0x62, 0x9e, 0xf0, 0x10, + 0x59, 0xb1, 0x5e, 0x6c, 0xce, 0x6f, 0x31, 0x73, 0x7c, 0x29, 0xe6, 0xa1, 0x9a, 0x6f, 0x4d, 0x9d, + 0x5d, 0xd6, 0x0a, 0x6d, 0x8d, 0xa6, 0x3b, 0x64, 0x36, 0x81, 0xae, 0x8f, 0x32, 0x39, 0x65, 0xa5, + 0x7a, 0xb9, 0x39, 0xbf, 0xf5, 0xcf, 0x24, 0xf3, 0x48, 0x1c, 0x43, 0xa4, 0x89, 0x43, 0x38, 0x7d, + 0x49, 0xaa, 0xdc, 0xfb, 0xd0, 0x43, 0x09, 0x9e, 0xed, 0x88, 0x24, 0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x3e, 0xb8, 0xea, 0xfc, 0xe9, 0x97, 0x2b, 0x63, 0x34, 0x6c, + 0x42, 0x46, 0xef, 0xc0, 0x1d, 0x3d, 0x1e, 0x8d, 0xf5, 0xb8, 0xe3, 0x80, 0xe7, 0x1b, 0xec, 0x90, + 0x99, 0x7b, 0xe6, 0xdf, 0x88, 0xc8, 0x52, 0xfe, 0x12, 0x8e, 0x70, 0xc5, 0xb1, 0x73, 0xa2, 0x63, + 0x2d, 0xdd, 0x2b, 0x56, 0xcd, 0x6e, 0xbd, 0x38, 0xfb, 0x61, 0x14, 0xce, 0xae, 0x8c, 0xe2, 0xf9, + 0x95, 0x51, 0xfc, 0x7e, 0x65, 0x14, 0x3f, 0x5d, 0x1b, 0x85, 0xf3, 0x6b, 0xa3, 0x70, 0x71, 0x6d, + 0x14, 0xde, 0x6e, 0xdc, 0x50, 0x4b, 0xaf, 0xc5, 0x7a, 0x04, 0xf2, 0x44, 0x24, 0xc7, 0x6a, 0x60, + 0xf5, 0xb7, 0xad, 0x8f, 0xa3, 0x0f, 0x90, 0xd2, 0x76, 0x2a, 0xea, 0x2b, 0xf3, 0xf0, 0x67, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xc3, 0xfe, 0x8d, 0x82, 0xf0, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -305,6 +354,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.IsolatedBadDebts) > 0 { + for iNdEx := len(m.IsolatedBadDebts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IsolatedBadDebts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } if len(m.SpecialPairs) > 0 { for iNdEx := len(m.SpecialPairs) - 1; iNdEx >= 0; iNdEx-- { { @@ -435,6 +498,73 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *IsolatedBadDebt) 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 *IsolatedBadDebt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IsolatedBadDebt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.InterestAccrued.Size() + i -= size + if _, err := m.InterestAccrued.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.InterestScalar.Size() + i -= size + if _, err := m.InterestScalar.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *AdjustedBorrow) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -662,6 +792,35 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.IsolatedBadDebts) > 0 { + for _, e := range m.IsolatedBadDebts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *IsolatedBadDebt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.InterestScalar.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.InterestAccrued.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -1086,6 +1245,256 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IsolatedBadDebts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IsolatedBadDebts = append(m.IsolatedBadDebts, IsolatedBadDebt{}) + if err := m.IsolatedBadDebts[len(m.IsolatedBadDebts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsolatedBadDebt) 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 ErrIntOverflowGenesis + } + 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: IsolatedBadDebt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsolatedBadDebt: 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 ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InterestScalar", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InterestScalar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InterestAccrued", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InterestAccrued.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/leverage/types/genesis_test.go b/x/leverage/types/genesis_test.go index 7e8a7d9e2f..5cbeba4721 100644 --- a/x/leverage/types/genesis_test.go +++ b/x/leverage/types/genesis_test.go @@ -24,7 +24,7 @@ func TestGenesisValidation(t *testing.T) { *NewGenesisState( Params{ CompleteLiquidationThreshold: sdk.MustNewDecFromStr("-0.4"), - }, nil, nil, nil, nil, 0, nil, nil, nil, nil, + }, nil, nil, nil, nil, 0, nil, nil, nil, nil, nil, ), true, "complete liquidation threshold must be positive", diff --git a/x/leverage/types/isolate_bad_debts.go b/x/leverage/types/isolate_bad_debts.go new file mode 100644 index 0000000000..4bd35202f3 --- /dev/null +++ b/x/leverage/types/isolate_bad_debts.go @@ -0,0 +1,29 @@ +package types + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// BorrowWithInterest represents the borrows of a borrower with interest. +type BorrowWithInterest struct { + Denom string + Amount math.Int + InterestScalar sdk.Dec + InterestAccured math.Int +} + +// NewBorrowWithInterest creates a new instance of BorrowWithInterest. +func NewBorrowWithInterest( + denom string, + amount math.Int, + interestScalar sdk.Dec, + interestAccured math.Int, +) BorrowWithInterest { + return BorrowWithInterest{ + Denom: denom, + Amount: amount, + InterestScalar: interestScalar, + InterestAccured: interestAccured, + } +} diff --git a/x/leverage/types/keys.go b/x/leverage/types/keys.go index 32d2844849..4f390daf77 100644 --- a/x/leverage/types/keys.go +++ b/x/leverage/types/keys.go @@ -27,6 +27,7 @@ var ( KeyPrefixUtokenSupply = []byte{0x0A} KeyPrefixSpecialAssetPair = []byte{0x0B} KeyParams = []byte{0x0C} + KeyPrefixIsolatedBadDebt = []byte{0x0D} ) // KeyRegisteredToken returns a KVStore key for getting and setting a Token. @@ -127,3 +128,16 @@ func DenomFromKeyWithAddress(key, prefix []byte) string { func DenomFromKey(key, prefix []byte) string { return string(key[len(prefix) : len(key)-1]) } + +// KeyIsolatedBadDebt returns a KVStore key for tracking an address with unpaid bad debt +func KeyIsolatedBadDebt(denom string, borrower sdk.AccAddress) []byte { + // badDebtAddrPrefix | lengthprefixed(borrowerAddr) | denom | 0x00 for null-termination + return util.ConcatBytes(1, KeyIsolatedBadDebtNoDenom(borrower), []byte(denom)) +} + +// KeyIsolatedBadDebtNoDenom returns the common prefix used by all isolated bad debts +// associated with a given address. +func KeyIsolatedBadDebtNoDenom(borrower sdk.AccAddress) []byte { + // badDebtAddrPrefix | lengthprefixed(borrowerAddr) + return util.ConcatBytes(0, KeyPrefixIsolatedBadDebt, address.MustLengthPrefix(borrower)) +} diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index 3b9dde2ad6..a46b92cf9b 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -35,6 +35,314 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryLastInterestTime defines the request structure for the LastInterestTime +// gRPC service handler. +type QueryLastInterestTime struct { +} + +func (m *QueryLastInterestTime) Reset() { *m = QueryLastInterestTime{} } +func (m *QueryLastInterestTime) String() string { return proto.CompactTextString(m) } +func (*QueryLastInterestTime) ProtoMessage() {} +func (*QueryLastInterestTime) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{0} +} +func (m *QueryLastInterestTime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastInterestTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastInterestTime.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 *QueryLastInterestTime) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastInterestTime.Merge(m, src) +} +func (m *QueryLastInterestTime) XXX_Size() int { + return m.Size() +} +func (m *QueryLastInterestTime) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastInterestTime.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastInterestTime proto.InternalMessageInfo + +// QueryLastInterestTimeResponse defines the response structure for the LastInterestTime +// gRPC service handler. +type QueryLastInterestTimeResponse struct { + LastInterestTime int64 `protobuf:"varint,1,opt,name=last_interest_time,json=lastInterestTime,proto3" json:"last_interest_time,omitempty"` +} + +func (m *QueryLastInterestTimeResponse) Reset() { *m = QueryLastInterestTimeResponse{} } +func (m *QueryLastInterestTimeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLastInterestTimeResponse) ProtoMessage() {} +func (*QueryLastInterestTimeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{1} +} +func (m *QueryLastInterestTimeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastInterestTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastInterestTimeResponse.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 *QueryLastInterestTimeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastInterestTimeResponse.Merge(m, src) +} +func (m *QueryLastInterestTimeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLastInterestTimeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastInterestTimeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastInterestTimeResponse proto.InternalMessageInfo + +// QueryAllReserves defines the request structure for the Reserves +// gRPC service handler. +type QueryAllReserves struct { +} + +func (m *QueryAllReserves) Reset() { *m = QueryAllReserves{} } +func (m *QueryAllReserves) String() string { return proto.CompactTextString(m) } +func (*QueryAllReserves) ProtoMessage() {} +func (*QueryAllReserves) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{2} +} +func (m *QueryAllReserves) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllReserves) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllReserves.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 *QueryAllReserves) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllReserves.Merge(m, src) +} +func (m *QueryAllReserves) XXX_Size() int { + return m.Size() +} +func (m *QueryAllReserves) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllReserves.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllReserves proto.InternalMessageInfo + +// QueryAllReservesResponse defines the response structure for the Reserves +// gRPC service handler. +type QueryAllReservesResponse struct { + Reserves []types.Coin `protobuf:"bytes,1,rep,name=reserves,proto3" json:"reserves"` +} + +func (m *QueryAllReservesResponse) Reset() { *m = QueryAllReservesResponse{} } +func (m *QueryAllReservesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllReservesResponse) ProtoMessage() {} +func (*QueryAllReservesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{3} +} +func (m *QueryAllReservesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllReservesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllReservesResponse.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 *QueryAllReservesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllReservesResponse.Merge(m, src) +} +func (m *QueryAllReservesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllReservesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllReservesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllReservesResponse proto.InternalMessageInfo + +// QueryInterestScalars defines the request structure for the InterestScalars +// gRPC service handler. +type QueryInterestScalars struct { +} + +func (m *QueryInterestScalars) Reset() { *m = QueryInterestScalars{} } +func (m *QueryInterestScalars) String() string { return proto.CompactTextString(m) } +func (*QueryInterestScalars) ProtoMessage() {} +func (*QueryInterestScalars) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{4} +} +func (m *QueryInterestScalars) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInterestScalars) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInterestScalars.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 *QueryInterestScalars) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInterestScalars.Merge(m, src) +} +func (m *QueryInterestScalars) XXX_Size() int { + return m.Size() +} +func (m *QueryInterestScalars) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInterestScalars.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInterestScalars proto.InternalMessageInfo + +// QueryInterestScalarsResponse defines the response structure for the InterestScalars +// gRPC service handler. +type QueryInterestScalarsResponse struct { + InterestScalars []InterestScalar `protobuf:"bytes,1,rep,name=interest_scalars,json=interestScalars,proto3" json:"interest_scalars"` +} + +func (m *QueryInterestScalarsResponse) Reset() { *m = QueryInterestScalarsResponse{} } +func (m *QueryInterestScalarsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInterestScalarsResponse) ProtoMessage() {} +func (*QueryInterestScalarsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{5} +} +func (m *QueryInterestScalarsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInterestScalarsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInterestScalarsResponse.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 *QueryInterestScalarsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInterestScalarsResponse.Merge(m, src) +} +func (m *QueryInterestScalarsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryInterestScalarsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInterestScalarsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInterestScalarsResponse proto.InternalMessageInfo + +// QueryIsolatedBadDebts defines the request structure for the IsolatedBadDebts +// gRPC service handler. +type QueryIsolatedBadDebts struct { +} + +func (m *QueryIsolatedBadDebts) Reset() { *m = QueryIsolatedBadDebts{} } +func (m *QueryIsolatedBadDebts) String() string { return proto.CompactTextString(m) } +func (*QueryIsolatedBadDebts) ProtoMessage() {} +func (*QueryIsolatedBadDebts) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{6} +} +func (m *QueryIsolatedBadDebts) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIsolatedBadDebts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIsolatedBadDebts.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 *QueryIsolatedBadDebts) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIsolatedBadDebts.Merge(m, src) +} +func (m *QueryIsolatedBadDebts) XXX_Size() int { + return m.Size() +} +func (m *QueryIsolatedBadDebts) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIsolatedBadDebts.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIsolatedBadDebts proto.InternalMessageInfo + +// QueryIsolatedBadDebtsResponse defines the response structure for the IsolatedBadDebts +// gRPC service handler. +type QueryIsolatedBadDebtsResponse struct { + IsolatedBadDebts []IsolatedBadDebt `protobuf:"bytes,1,rep,name=isolated_bad_debts,json=isolatedBadDebts,proto3" json:"isolated_bad_debts"` +} + +func (m *QueryIsolatedBadDebtsResponse) Reset() { *m = QueryIsolatedBadDebtsResponse{} } +func (m *QueryIsolatedBadDebtsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIsolatedBadDebtsResponse) ProtoMessage() {} +func (*QueryIsolatedBadDebtsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{7} +} +func (m *QueryIsolatedBadDebtsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIsolatedBadDebtsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIsolatedBadDebtsResponse.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 *QueryIsolatedBadDebtsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIsolatedBadDebtsResponse.Merge(m, src) +} +func (m *QueryIsolatedBadDebtsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIsolatedBadDebtsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIsolatedBadDebtsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIsolatedBadDebtsResponse proto.InternalMessageInfo + // QueryParams defines the request structure for the Params gRPC service // handler. type QueryParams struct { @@ -44,7 +352,7 @@ func (m *QueryParams) Reset() { *m = QueryParams{} } func (m *QueryParams) String() string { return proto.CompactTextString(m) } func (*QueryParams) ProtoMessage() {} func (*QueryParams) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{0} + return fileDescriptor_1e8137dcabb0ccc7, []int{8} } func (m *QueryParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -83,7 +391,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{1} + return fileDescriptor_1e8137dcabb0ccc7, []int{9} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,7 +430,7 @@ func (m *QueryRegisteredTokens) Reset() { *m = QueryRegisteredTokens{} } func (m *QueryRegisteredTokens) String() string { return proto.CompactTextString(m) } func (*QueryRegisteredTokens) ProtoMessage() {} func (*QueryRegisteredTokens) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{2} + return fileDescriptor_1e8137dcabb0ccc7, []int{10} } func (m *QueryRegisteredTokens) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +469,7 @@ func (m *QueryRegisteredTokensResponse) Reset() { *m = QueryRegisteredTo func (m *QueryRegisteredTokensResponse) String() string { return proto.CompactTextString(m) } func (*QueryRegisteredTokensResponse) ProtoMessage() {} func (*QueryRegisteredTokensResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{3} + return fileDescriptor_1e8137dcabb0ccc7, []int{11} } func (m *QueryRegisteredTokensResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,7 +507,7 @@ func (m *QueryRegisteredTokensWithMarkets) Reset() { *m = QueryRegistere func (m *QueryRegisteredTokensWithMarkets) String() string { return proto.CompactTextString(m) } func (*QueryRegisteredTokensWithMarkets) ProtoMessage() {} func (*QueryRegisteredTokensWithMarkets) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{4} + return fileDescriptor_1e8137dcabb0ccc7, []int{12} } func (m *QueryRegisteredTokensWithMarkets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -240,7 +548,7 @@ func (m *QueryRegisteredTokensWithMarketsResponse) Reset() { func (m *QueryRegisteredTokensWithMarketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryRegisteredTokensWithMarketsResponse) ProtoMessage() {} func (*QueryRegisteredTokensWithMarketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{5} + return fileDescriptor_1e8137dcabb0ccc7, []int{13} } func (m *QueryRegisteredTokensWithMarketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -281,7 +589,7 @@ func (m *TokenMarket) Reset() { *m = TokenMarket{} } func (m *TokenMarket) String() string { return proto.CompactTextString(m) } func (*TokenMarket) ProtoMessage() {} func (*TokenMarket) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{6} + return fileDescriptor_1e8137dcabb0ccc7, []int{14} } func (m *TokenMarket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -321,7 +629,7 @@ func (m *QuerySpecialAssets) Reset() { *m = QuerySpecialAssets{} } func (m *QuerySpecialAssets) String() string { return proto.CompactTextString(m) } func (*QuerySpecialAssets) ProtoMessage() {} func (*QuerySpecialAssets) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{7} + return fileDescriptor_1e8137dcabb0ccc7, []int{15} } func (m *QuerySpecialAssets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +668,7 @@ func (m *QuerySpecialAssetsResponse) Reset() { *m = QuerySpecialAssetsRe func (m *QuerySpecialAssetsResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpecialAssetsResponse) ProtoMessage() {} func (*QuerySpecialAssetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{8} + return fileDescriptor_1e8137dcabb0ccc7, []int{16} } func (m *QuerySpecialAssetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -398,7 +706,7 @@ func (m *QueryMarketSummary) Reset() { *m = QueryMarketSummary{} } func (m *QueryMarketSummary) String() string { return proto.CompactTextString(m) } func (*QueryMarketSummary) ProtoMessage() {} func (*QueryMarketSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{9} + return fileDescriptor_1e8137dcabb0ccc7, []int{17} } func (m *QueryMarketSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -474,7 +782,7 @@ func (m *QueryMarketSummaryResponse) Reset() { *m = QueryMarketSummaryRe func (m *QueryMarketSummaryResponse) String() string { return proto.CompactTextString(m) } func (*QueryMarketSummaryResponse) ProtoMessage() {} func (*QueryMarketSummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{10} + return fileDescriptor_1e8137dcabb0ccc7, []int{18} } func (m *QueryMarketSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,7 +820,7 @@ func (m *QueryAccountBalances) Reset() { *m = QueryAccountBalances{} } func (m *QueryAccountBalances) String() string { return proto.CompactTextString(m) } func (*QueryAccountBalances) ProtoMessage() {} func (*QueryAccountBalances) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{11} + return fileDescriptor_1e8137dcabb0ccc7, []int{19} } func (m *QueryAccountBalances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +863,7 @@ func (m *QueryAccountBalancesResponse) Reset() { *m = QueryAccountBalanc func (m *QueryAccountBalancesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountBalancesResponse) ProtoMessage() {} func (*QueryAccountBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{12} + return fileDescriptor_1e8137dcabb0ccc7, []int{20} } func (m *QueryAccountBalancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -593,7 +901,7 @@ func (m *QueryAccountSummary) Reset() { *m = QueryAccountSummary{} } func (m *QueryAccountSummary) String() string { return proto.CompactTextString(m) } func (*QueryAccountSummary) ProtoMessage() {} func (*QueryAccountSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{13} + return fileDescriptor_1e8137dcabb0ccc7, []int{21} } func (m *QueryAccountSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +970,7 @@ func (m *QueryAccountSummaryResponse) Reset() { *m = QueryAccountSummary func (m *QueryAccountSummaryResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountSummaryResponse) ProtoMessage() {} func (*QueryAccountSummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{14} + return fileDescriptor_1e8137dcabb0ccc7, []int{22} } func (m *QueryAccountSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -701,7 +1009,7 @@ func (m *QueryAccountSummaries) Reset() { *m = QueryAccountSummaries{} } func (m *QueryAccountSummaries) String() string { return proto.CompactTextString(m) } func (*QueryAccountSummaries) ProtoMessage() {} func (*QueryAccountSummaries) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{15} + return fileDescriptor_1e8137dcabb0ccc7, []int{23} } func (m *QueryAccountSummaries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -740,7 +1048,7 @@ func (m *AccountSummary) Reset() { *m = AccountSummary{} } func (m *AccountSummary) String() string { return proto.CompactTextString(m) } func (*AccountSummary) ProtoMessage() {} func (*AccountSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{16} + return fileDescriptor_1e8137dcabb0ccc7, []int{24} } func (m *AccountSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +1088,7 @@ func (m *QueryAccountSummariesResponse) Reset() { *m = QueryAccountSumma func (m *QueryAccountSummariesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountSummariesResponse) ProtoMessage() {} func (*QueryAccountSummariesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{17} + return fileDescriptor_1e8137dcabb0ccc7, []int{25} } func (m *QueryAccountSummariesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -817,7 +1125,7 @@ func (m *QueryLiquidationTargets) Reset() { *m = QueryLiquidationTargets func (m *QueryLiquidationTargets) String() string { return proto.CompactTextString(m) } func (*QueryLiquidationTargets) ProtoMessage() {} func (*QueryLiquidationTargets) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{18} + return fileDescriptor_1e8137dcabb0ccc7, []int{26} } func (m *QueryLiquidationTargets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -856,7 +1164,7 @@ func (m *QueryLiquidationTargetsResponse) Reset() { *m = QueryLiquidatio func (m *QueryLiquidationTargetsResponse) String() string { return proto.CompactTextString(m) } func (*QueryLiquidationTargetsResponse) ProtoMessage() {} func (*QueryLiquidationTargetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{19} + return fileDescriptor_1e8137dcabb0ccc7, []int{27} } func (m *QueryLiquidationTargetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +1202,7 @@ func (m *QueryBadDebts) Reset() { *m = QueryBadDebts{} } func (m *QueryBadDebts) String() string { return proto.CompactTextString(m) } func (*QueryBadDebts) ProtoMessage() {} func (*QueryBadDebts) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{20} + return fileDescriptor_1e8137dcabb0ccc7, []int{28} } func (m *QueryBadDebts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -933,7 +1241,7 @@ func (m *QueryBadDebtsResponse) Reset() { *m = QueryBadDebtsResponse{} } func (m *QueryBadDebtsResponse) String() string { return proto.CompactTextString(m) } func (*QueryBadDebtsResponse) ProtoMessage() {} func (*QueryBadDebtsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{21} + return fileDescriptor_1e8137dcabb0ccc7, []int{29} } func (m *QueryBadDebtsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -974,7 +1282,7 @@ func (m *QueryMaxWithdraw) Reset() { *m = QueryMaxWithdraw{} } func (m *QueryMaxWithdraw) String() string { return proto.CompactTextString(m) } func (*QueryMaxWithdraw) ProtoMessage() {} func (*QueryMaxWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{22} + return fileDescriptor_1e8137dcabb0ccc7, []int{30} } func (m *QueryMaxWithdraw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1015,7 +1323,7 @@ func (m *QueryMaxWithdrawResponse) Reset() { *m = QueryMaxWithdrawRespon func (m *QueryMaxWithdrawResponse) String() string { return proto.CompactTextString(m) } func (*QueryMaxWithdrawResponse) ProtoMessage() {} func (*QueryMaxWithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{23} + return fileDescriptor_1e8137dcabb0ccc7, []int{31} } func (m *QueryMaxWithdrawResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1056,7 +1364,7 @@ func (m *QueryMaxBorrow) Reset() { *m = QueryMaxBorrow{} } func (m *QueryMaxBorrow) String() string { return proto.CompactTextString(m) } func (*QueryMaxBorrow) ProtoMessage() {} func (*QueryMaxBorrow) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{24} + return fileDescriptor_1e8137dcabb0ccc7, []int{32} } func (m *QueryMaxBorrow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1095,7 +1403,7 @@ func (m *QueryMaxBorrowResponse) Reset() { *m = QueryMaxBorrowResponse{} func (m *QueryMaxBorrowResponse) String() string { return proto.CompactTextString(m) } func (*QueryMaxBorrowResponse) ProtoMessage() {} func (*QueryMaxBorrowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{25} + return fileDescriptor_1e8137dcabb0ccc7, []int{33} } func (m *QueryMaxBorrowResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1143,7 +1451,7 @@ func (m *QueryInspect) Reset() { *m = QueryInspect{} } func (m *QueryInspect) String() string { return proto.CompactTextString(m) } func (*QueryInspect) ProtoMessage() {} func (*QueryInspect) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{26} + return fileDescriptor_1e8137dcabb0ccc7, []int{34} } func (m *QueryInspect) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1181,7 +1489,7 @@ func (m *QueryInspectAccount) Reset() { *m = QueryInspectAccount{} } func (m *QueryInspectAccount) String() string { return proto.CompactTextString(m) } func (*QueryInspectAccount) ProtoMessage() {} func (*QueryInspectAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{27} + return fileDescriptor_1e8137dcabb0ccc7, []int{35} } func (m *QueryInspectAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1221,7 +1529,7 @@ func (m *QueryInspectResponse) Reset() { *m = QueryInspectResponse{} } func (m *QueryInspectResponse) String() string { return proto.CompactTextString(m) } func (*QueryInspectResponse) ProtoMessage() {} func (*QueryInspectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{28} + return fileDescriptor_1e8137dcabb0ccc7, []int{36} } func (m *QueryInspectResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1259,7 +1567,7 @@ func (m *QueryInspectAccountResponse) Reset() { *m = QueryInspectAccount func (m *QueryInspectAccountResponse) String() string { return proto.CompactTextString(m) } func (*QueryInspectAccountResponse) ProtoMessage() {} func (*QueryInspectAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{29} + return fileDescriptor_1e8137dcabb0ccc7, []int{37} } func (m *QueryInspectAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1305,7 +1613,7 @@ func (m *InspectAccount) Reset() { *m = InspectAccount{} } func (m *InspectAccount) String() string { return proto.CompactTextString(m) } func (*InspectAccount) ProtoMessage() {} func (*InspectAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{30} + return fileDescriptor_1e8137dcabb0ccc7, []int{38} } func (m *InspectAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1348,7 +1656,7 @@ func (m *RiskInfo) Reset() { *m = RiskInfo{} } func (m *RiskInfo) String() string { return proto.CompactTextString(m) } func (*RiskInfo) ProtoMessage() {} func (*RiskInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{31} + return fileDescriptor_1e8137dcabb0ccc7, []int{39} } func (m *RiskInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1389,7 +1697,7 @@ func (m *DecBalances) Reset() { *m = DecBalances{} } func (m *DecBalances) String() string { return proto.CompactTextString(m) } func (*DecBalances) ProtoMessage() {} func (*DecBalances) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{32} + return fileDescriptor_1e8137dcabb0ccc7, []int{40} } func (m *DecBalances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1435,7 +1743,7 @@ func (m *PositionBalance) Reset() { *m = PositionBalance{} } func (m *PositionBalance) String() string { return proto.CompactTextString(m) } func (*PositionBalance) ProtoMessage() {} func (*PositionBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{33} + return fileDescriptor_1e8137dcabb0ccc7, []int{41} } func (m *PositionBalance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1465,6 +1773,14 @@ func (m *PositionBalance) XXX_DiscardUnknown() { var xxx_messageInfo_PositionBalance proto.InternalMessageInfo func init() { + proto.RegisterType((*QueryLastInterestTime)(nil), "umee.leverage.v1.QueryLastInterestTime") + proto.RegisterType((*QueryLastInterestTimeResponse)(nil), "umee.leverage.v1.QueryLastInterestTimeResponse") + proto.RegisterType((*QueryAllReserves)(nil), "umee.leverage.v1.QueryAllReserves") + proto.RegisterType((*QueryAllReservesResponse)(nil), "umee.leverage.v1.QueryAllReservesResponse") + proto.RegisterType((*QueryInterestScalars)(nil), "umee.leverage.v1.QueryInterestScalars") + proto.RegisterType((*QueryInterestScalarsResponse)(nil), "umee.leverage.v1.QueryInterestScalarsResponse") + proto.RegisterType((*QueryIsolatedBadDebts)(nil), "umee.leverage.v1.QueryIsolatedBadDebts") + proto.RegisterType((*QueryIsolatedBadDebtsResponse)(nil), "umee.leverage.v1.QueryIsolatedBadDebtsResponse") proto.RegisterType((*QueryParams)(nil), "umee.leverage.v1.QueryParams") proto.RegisterType((*QueryParamsResponse)(nil), "umee.leverage.v1.QueryParamsResponse") proto.RegisterType((*QueryRegisteredTokens)(nil), "umee.leverage.v1.QueryRegisteredTokens") @@ -1504,145 +1820,160 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 2207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x4a, 0x16, 0x25, 0x3d, 0xea, 0x73, 0x2c, 0xd9, 0x6b, 0xca, 0xa2, 0xe4, 0xb5, 0xf5, - 0x11, 0x27, 0x22, 0x2d, 0x05, 0x30, 0x9a, 0x7e, 0x8b, 0x52, 0xd3, 0x2a, 0x90, 0x03, 0x79, 0x1d, - 0x3b, 0x70, 0xd2, 0x86, 0x18, 0x92, 0x63, 0x6a, 0xa1, 0xe5, 0x2e, 0xbd, 0xb3, 0x94, 0xc5, 0x02, - 0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e, 0x40, 0x48, 0x64, 0x36, 0x2e, 0x92, 0xd0, 0x04, 0x6e, 0x71, 0x02, 0x59, 0x74, 0xbd, - 0x33, 0x01, 0x71, 0xa5, 0xa3, 0x10, 0xc6, 0x54, 0x65, 0x9c, 0xed, 0x02, 0x2d, 0xe7, 0x33, 0x6b, - 0xe7, 0xcf, 0x6b, 0xc3, 0x37, 0xb8, 0xe1, 0x45, 0x74, 0x2d, 0x69, 0xd8, 0x91, 0xa6, 0x3e, 0x4b, - 0x16, 0x7e, 0xab, 0xe7, 0xa3, 0x4b, 0xb1, 0xae, 0xa9, 0xdc, 0xb9, 0x4a, 0x3d, 0x2f, 0x95, 0x25, - 0x97, 0x4d, 0x99, 0x38, 0x85, 0xf7, 0x5f, 0xfc, 0x2b, 0x3b, 0xf4, 0xe2, 0x65, 0xd6, 0xf8, 0xfc, - 0x65, 0xd6, 0xf8, 0xe7, 0xcb, 0xac, 0xf1, 0x8b, 0x57, 0xd9, 0xa1, 0xcf, 0x5f, 0x65, 0x87, 0xfe, - 0xf6, 0x2a, 0x3b, 0xf4, 0xd1, 0x9d, 0x48, 0xe7, 0xc1, 0xa0, 0x36, 0x3d, 0x12, 0x3e, 0xf3, 0x83, - 0x63, 0x81, 0x7b, 0x72, 0x37, 0x7f, 0xda, 0x02, 0xe7, 0x7d, 0x48, 0x29, 0xc5, 0xff, 0xb5, 0xfd, - 0xf6, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xde, 0xb2, 0xe8, 0x2c, 0xe8, 0x1f, 0x00, 0x00, + // 2443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0xf6, 0x48, 0x6b, 0x4a, 0x2a, 0xea, 0x41, 0xb7, 0x65, 0x9b, 0xa6, 0x6d, 0x4a, 0x1e, 0xdb, + 0xb2, 0xd6, 0x6b, 0x91,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x77, 0x24, 0xf4, 0x87, 0x22, + 0x0e, 0xc3, 0x43, 0x7f, 0xf5, 0x6a, 0x61, 0xbe, 0x1b, 0xa4, 0xd1, 0x2c, 0xa2, 0x6c, 0x7c, 0x17, + 0x1f, 0x5a, 0x34, 0x60, 0xe4, 0x53, 0x00, 0xde, 0xed, 0x74, 0x9c, 0xfd, 0xda, 0xea, 0xd6, 0xe3, + 0xe2, 0x51, 0x69, 0xef, 0x1b, 0x87, 0xb6, 0x17, 0x62, 0xd0, 0xce, 0xbe, 0x35, 0xa5, 0x7e, 0xaf, + 0x6e, 0x3d, 0x16, 0xe0, 0x75, 0xcf, 0xf7, 0xbd, 0x67, 0x12, 0x3c, 0x37, 0x2a, 0x38, 0x62, 0x48, + 0x70, 0xf5, 0x5b, 0x80, 0x7f, 0x04, 0x93, 0xd2, 0x92, 0xcd, 0x9a, 0xc5, 0x09, 0xbd, 0x04, 0xc3, + 0x42, 0x6f, 0xb8, 0x81, 0xa5, 0xf5, 0x05, 0x16, 0xbe, 0x20, 0x9a, 0xc5, 0xc9, 0xd1, 0xb0, 0x42, + 0x7d, 0xf2, 0x31, 0x40, 0xc3, 0x73, 0xc4, 0xc1, 0xea, 0x53, 0xa7, 0x38, 0x35, 0x12, 0x5a, 0x04, + 0x41, 0x70, 0x53, 0x4e, 0xb3, 0x66, 0x11, 0x46, 0xe3, 0x16, 0xea, 0x93, 0x4d, 0x98, 0x72, 0xec, + 0xa7, 0x5d, 0xbb, 0x69, 0x07, 0xfb, 0xc5, 0xfc, 0x48, 0x60, 0x3d, 0x00, 0xf2, 0x00, 0x66, 0xdb, + 0x74, 0xcf, 0x6e, 0x77, 0xdb, 0x35, 0x65, 0xa1, 0x38, 0x3d, 0x12, 0xe4, 0x0c, 0xa2, 0xac, 0x49, + 0x10, 0xf2, 0x43, 0x20, 0x21, 0x6c, 0x24, 0x90, 0x33, 0x23, 0x41, 0x1f, 0x43, 0xa4, 0xdb, 0xbd, + 0x78, 0x7e, 0x0a, 0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 0xbc, 0xd7, 0x44, 0x0c, 0x7f, 0xff, + 0xe5, 0xc2, 0xf2, 0x10, 0xce, 0x09, 0x05, 0x1e, 0x39, 0x09, 0x77, 0x62, 0xa7, 0xd7, 0xd8, 0xff, + 0xdf, 0x54, 0xf4, 0x68, 0x6b, 0x45, 0x8e, 0xb6, 0xf1, 0xb7, 0xe0, 0x55, 0x08, 0x6e, 0x56, 0xb1, + 0x92, 0xc5, 0xf0, 0x86, 0xd5, 0x43, 0xf6, 0x82, 0x3c, 0xcf, 0xc1, 0x99, 0x3e, 0x1a, 0x91, 0x02, + 0x7c, 0x36, 0x0c, 0x59, 0x6d, 0x97, 0x3a, 0x5d, 0x75, 0xb9, 0x39, 0xdc, 0xf6, 0x15, 0xfb, 0x6a, + 0x26, 0x44, 0x79, 0x28, 0x40, 0x44, 0x62, 0xf7, 0xc2, 0x83, 0xc0, 0x63, 0x23, 0x01, 0xcf, 0xf5, + 0x70, 0x14, 0xf4, 0x03, 0x98, 0x0d, 0xc3, 0x81, 0xc0, 0xe3, 0xa3, 0x31, 0x0e, 0x51, 0x14, 0xec, + 0x5d, 0x98, 0xc6, 0xd7, 0xb3, 0x63, 0xb7, 0xed, 0x00, 0x2b, 0x96, 0x43, 0x17, 0x43, 0x0a, 0x63, + 0x53, 0x40, 0x90, 0x06, 0x9c, 0x50, 0x07, 0xb3, 0xbc, 0xa6, 0xd6, 0x82, 0x6d, 0x9f, 0xf1, 0x6d, + 0xcf, 0x69, 0x62, 0x75, 0x72, 0x58, 0xec, 0xf9, 0x08, 0xd8, 0xfd, 0x10, 0x8b, 0x7c, 0x06, 0xc7, + 0x79, 0xc7, 0x0b, 0x6a, 0x89, 0x55, 0xcc, 0x8d, 0x14, 0x93, 0x63, 0x02, 0xea, 0x5e, 0x6c, 0x25, + 0xeb, 0x70, 0x42, 0xe2, 0xa7, 0x96, 0x73, 0x62, 0x24, 0x0b, 0x92, 0xec, 0xed, 0xc4, 0x92, 0x86, + 0x3e, 0x24, 0xd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, 0x3b, 0x08, 0x4b, 0x83, 0x4b, 0xdd, 0x50, 0xae, + 0x54, 0x19, 0x4e, 0x4e, 0xb3, 0xba, 0x22, 0x59, 0x5d, 0x24, 0x66, 0x9a, 0x55, 0x58, 0xf9, 0xd6, + 0x43, 0x0e, 0x5f, 0xa4, 0x8b, 0xf6, 0x4b, 0x43, 0x55, 0xe0, 0xa5, 0xc3, 0x15, 0xea, 0xe6, 0xbb, + 0x92, 0xd4, 0x05, 0x72, 0x3e, 0x9b, 0x54, 0x18, 0xab, 0x5f, 0x19, 0x50, 0x48, 0xdd, 0x52, 0x2e, + 0x0f, 0x63, 0xce, 0x66, 0xd9, 0x19, 0x9b, 0x75, 0x21, 0x18, 0x22, 0x5c, 0x5c, 0x53, 0xfb, 0x9d, + 0x01, 0x24, 0x5d, 0x85, 0x93, 0x77, 0x33, 0x6c, 0xa6, 0x45, 0x4b, 0xd7, 0x87, 0x16, 0xd5, 0x04, + 0x57, 0x24, 0xc1, 0xcb, 0xe4, 0x52, 0x9a, 0x60, 0xec, 0x6a, 0x8d, 0x64, 0xf6, 0x61, 0x32, 0x2c, + 0xed, 0xc9, 0x42, 0x86, 0xb5, 0x50, 0xa0, 0x74, 0xf9, 0x00, 0x01, 0x4d, 0xe2, 0x82, 0x24, 0x71, + 0x8e, 0x9c, 0x49, 0x93, 0xd0, 0xff, 0xb3, 0x24, 0x3f, 0x36, 0x20, 0x1f, 0xbd, 0x02, 0x98, 0x99, + 0xd9, 0xa4, 0x65, 0x4a, 0x57, 0x0e, 0x96, 0xd1, 0x24, 0x96, 0x24, 0x89, 0x45, 0x52, 0xee, 0x97, + 0x6f, 0x7b, 0xba, 0xc3, 0x49, 0x3e, 0x87, 0xa9, 0x5e, 0x71, 0xbd, 0x98, 0x6d, 0x40, 0x49, 0x94, + 0x96, 0x0f, 0x92, 0xd0, 0x04, 0x2e, 0x4a, 0x02, 0x65, 0x72, 0xb6, 0x3f, 0x01, 0xf5, 0x4a, 0x27, + 0x01, 0x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0x56, 0x5c, 0x16, 0x3c, 0xf3, 0xfc, 0x1d, 0x05, 0xbd, 0x7b, + 0xb3, 0xba, 0xd7, 0xc3, 0x97, 0x37, 0xdc, 0x7a, 0x4e, 0x7e, 0x25, 0xf3, 0xfe, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x83, 0x59, 0xe9, 0x55, 0x33, 0x24, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1690,6 +2021,14 @@ type QueryClient interface { Inspect(ctx context.Context, in *QueryInspect, opts ...grpc.CallOption) (*QueryInspectResponse, error) // InspectAccount runs the inspect query on a single address InspectAccount(ctx context.Context, in *QueryInspectAccount, opts ...grpc.CallOption) (*QueryInspectAccountResponse, error) + // IsolatedBadDebts returns all isolated bad debts. + IsolatedBadDebts(ctx context.Context, in *QueryIsolatedBadDebts, opts ...grpc.CallOption) (*QueryIsolatedBadDebtsResponse, error) + // InterestScalars returns all interest scalars. + InterestScalars(ctx context.Context, in *QueryInterestScalars, opts ...grpc.CallOption) (*QueryInterestScalarsResponse, error) + // AllReserves returns all reserves. + AllReserves(ctx context.Context, in *QueryAllReserves, opts ...grpc.CallOption) (*QueryAllReservesResponse, error) + // LastInterestTime returns the last interest time. + LastInterestTime(ctx context.Context, in *QueryLastInterestTime, opts ...grpc.CallOption) (*QueryLastInterestTimeResponse, error) } type queryClient struct { @@ -1826,18 +2165,54 @@ func (c *queryClient) InspectAccount(ctx context.Context, in *QueryInspectAccoun return out, nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Params queries the parameters of the x/leverage module. - Params(context.Context, *QueryParams) (*QueryParamsResponse, error) - // RegisteredTokens queries for all the registered tokens. - RegisteredTokens(context.Context, *QueryRegisteredTokens) (*QueryRegisteredTokensResponse, error) - // RegisteredTokensWithMarkets queries for all the registered tokens and their market summaries. - RegisteredTokensWithMarkets(context.Context, *QueryRegisteredTokensWithMarkets) (*QueryRegisteredTokensWithMarketsResponse, error) - // SpecialAssets queries for all special asset pairs. - SpecialAssets(context.Context, *QuerySpecialAssets) (*QuerySpecialAssetsResponse, error) - // MarketSummary queries a base asset's current borrowing and supplying conditions. - MarketSummary(context.Context, *QueryMarketSummary) (*QueryMarketSummaryResponse, error) +func (c *queryClient) IsolatedBadDebts(ctx context.Context, in *QueryIsolatedBadDebts, opts ...grpc.CallOption) (*QueryIsolatedBadDebtsResponse, error) { + out := new(QueryIsolatedBadDebtsResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/IsolatedBadDebts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) InterestScalars(ctx context.Context, in *QueryInterestScalars, opts ...grpc.CallOption) (*QueryInterestScalarsResponse, error) { + out := new(QueryInterestScalarsResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/InterestScalars", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllReserves(ctx context.Context, in *QueryAllReserves, opts ...grpc.CallOption) (*QueryAllReservesResponse, error) { + out := new(QueryAllReservesResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/AllReserves", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) LastInterestTime(ctx context.Context, in *QueryLastInterestTime, opts ...grpc.CallOption) (*QueryLastInterestTimeResponse, error) { + out := new(QueryLastInterestTimeResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/LastInterestTime", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries the parameters of the x/leverage module. + Params(context.Context, *QueryParams) (*QueryParamsResponse, error) + // RegisteredTokens queries for all the registered tokens. + RegisteredTokens(context.Context, *QueryRegisteredTokens) (*QueryRegisteredTokensResponse, error) + // RegisteredTokensWithMarkets queries for all the registered tokens and their market summaries. + RegisteredTokensWithMarkets(context.Context, *QueryRegisteredTokensWithMarkets) (*QueryRegisteredTokensWithMarketsResponse, error) + // SpecialAssets queries for all special asset pairs. + SpecialAssets(context.Context, *QuerySpecialAssets) (*QuerySpecialAssetsResponse, error) + // MarketSummary queries a base asset's current borrowing and supplying conditions. + MarketSummary(context.Context, *QueryMarketSummary) (*QueryMarketSummaryResponse, error) // AccountBalances queries an account's current supply, collateral, and borrow positions. AccountBalances(context.Context, *QueryAccountBalances) (*QueryAccountBalancesResponse, error) // AccountSummary queries USD values representing an account's total positions and borrowing limits. It requires oracle prices to return successfully. @@ -1861,6 +2236,14 @@ type QueryServer interface { Inspect(context.Context, *QueryInspect) (*QueryInspectResponse, error) // InspectAccount runs the inspect query on a single address InspectAccount(context.Context, *QueryInspectAccount) (*QueryInspectAccountResponse, error) + // IsolatedBadDebts returns all isolated bad debts. + IsolatedBadDebts(context.Context, *QueryIsolatedBadDebts) (*QueryIsolatedBadDebtsResponse, error) + // InterestScalars returns all interest scalars. + InterestScalars(context.Context, *QueryInterestScalars) (*QueryInterestScalarsResponse, error) + // AllReserves returns all reserves. + AllReserves(context.Context, *QueryAllReserves) (*QueryAllReservesResponse, error) + // LastInterestTime returns the last interest time. + LastInterestTime(context.Context, *QueryLastInterestTime) (*QueryLastInterestTimeResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1909,6 +2292,18 @@ func (*UnimplementedQueryServer) Inspect(ctx context.Context, req *QueryInspect) func (*UnimplementedQueryServer) InspectAccount(ctx context.Context, req *QueryInspectAccount) (*QueryInspectAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InspectAccount not implemented") } +func (*UnimplementedQueryServer) IsolatedBadDebts(ctx context.Context, req *QueryIsolatedBadDebts) (*QueryIsolatedBadDebtsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsolatedBadDebts not implemented") +} +func (*UnimplementedQueryServer) InterestScalars(ctx context.Context, req *QueryInterestScalars) (*QueryInterestScalarsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InterestScalars not implemented") +} +func (*UnimplementedQueryServer) AllReserves(ctx context.Context, req *QueryAllReserves) (*QueryAllReservesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllReserves not implemented") +} +func (*UnimplementedQueryServer) LastInterestTime(ctx context.Context, req *QueryLastInterestTime) (*QueryLastInterestTimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastInterestTime not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2166,6 +2561,78 @@ func _Query_InspectAccount_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_IsolatedBadDebts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIsolatedBadDebts) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IsolatedBadDebts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/IsolatedBadDebts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IsolatedBadDebts(ctx, req.(*QueryIsolatedBadDebts)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_InterestScalars_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryInterestScalars) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).InterestScalars(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/InterestScalars", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InterestScalars(ctx, req.(*QueryInterestScalars)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllReserves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllReserves) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllReserves(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/AllReserves", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllReserves(ctx, req.(*QueryAllReserves)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_LastInterestTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastInterestTime) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LastInterestTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/LastInterestTime", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastInterestTime(ctx, req.(*QueryLastInterestTime)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.leverage.v1.Query", HandlerType: (*QueryServer)(nil), @@ -2226,12 +2693,28 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "InspectAccount", Handler: _Query_InspectAccount_Handler, }, + { + MethodName: "IsolatedBadDebts", + Handler: _Query_IsolatedBadDebts_Handler, + }, + { + MethodName: "InterestScalars", + Handler: _Query_InterestScalars_Handler, + }, + { + MethodName: "AllReserves", + Handler: _Query_AllReserves_Handler, + }, + { + MethodName: "LastInterestTime", + Handler: _Query_LastInterestTime_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/leverage/v1/query.proto", } -func (m *QueryParams) Marshal() (dAtA []byte, err error) { +func (m *QueryLastInterestTime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2241,12 +2724,12 @@ func (m *QueryParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLastInterestTime) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLastInterestTime) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2254,7 +2737,7 @@ func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryLastInterestTimeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2264,30 +2747,25 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLastInterestTimeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLastInterestTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.LastInterestTime != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.LastInterestTime)) + i-- + dAtA[i] = 0x8 } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryRegisteredTokens) Marshal() (dAtA []byte, err error) { +func (m *QueryAllReserves) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2297,27 +2775,20 @@ func (m *QueryRegisteredTokens) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryRegisteredTokens) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllReserves) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRegisteredTokens) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllReserves) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseDenom))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *QueryRegisteredTokensResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllReservesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2327,20 +2798,20 @@ func (m *QueryRegisteredTokensResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryRegisteredTokensResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllReservesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRegisteredTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllReservesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Registry) > 0 { - for iNdEx := len(m.Registry) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Reserves) > 0 { + for iNdEx := len(m.Reserves) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Registry[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Reserves[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2354,7 +2825,7 @@ func (m *QueryRegisteredTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryRegisteredTokensWithMarkets) Marshal() (dAtA []byte, err error) { +func (m *QueryInterestScalars) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2364,12 +2835,12 @@ func (m *QueryRegisteredTokensWithMarkets) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryRegisteredTokensWithMarkets) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryInterestScalars) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRegisteredTokensWithMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryInterestScalars) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2377,7 +2848,7 @@ func (m *QueryRegisteredTokensWithMarkets) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryRegisteredTokensWithMarketsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryInterestScalarsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2387,20 +2858,20 @@ func (m *QueryRegisteredTokensWithMarketsResponse) Marshal() (dAtA []byte, err e return dAtA[:n], nil } -func (m *QueryRegisteredTokensWithMarketsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryInterestScalarsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryRegisteredTokensWithMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryInterestScalarsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Markets) > 0 { - for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + if len(m.InterestScalars) > 0 { + for iNdEx := len(m.InterestScalars) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.InterestScalars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2414,7 +2885,7 @@ func (m *QueryRegisteredTokensWithMarketsResponse) MarshalToSizedBuffer(dAtA []b return len(dAtA) - i, nil } -func (m *TokenMarket) Marshal() (dAtA []byte, err error) { +func (m *QueryIsolatedBadDebts) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2424,40 +2895,57 @@ func (m *TokenMarket) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TokenMarket) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryIsolatedBadDebts) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TokenMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryIsolatedBadDebts) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + return len(dAtA) - i, nil +} + +func (m *QueryIsolatedBadDebtsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0x12 - { - size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + return dAtA[:n], nil +} + +func (m *QueryIsolatedBadDebtsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIsolatedBadDebtsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IsolatedBadDebts) > 0 { + for iNdEx := len(m.IsolatedBadDebts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IsolatedBadDebts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QuerySpecialAssets) Marshal() (dAtA []byte, err error) { +func (m *QueryParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2467,27 +2955,20 @@ func (m *QuerySpecialAssets) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QuerySpecialAssets) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QuerySpecialAssets) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *QuerySpecialAssetsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2497,34 +2978,30 @@ func (m *QuerySpecialAssetsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QuerySpecialAssetsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QuerySpecialAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Pairs) > 0 { - for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryMarketSummary) Marshal() (dAtA []byte, err error) { +func (m *QueryRegisteredTokens) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2534,27 +3011,27 @@ func (m *QueryMarketSummary) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryMarketSummary) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRegisteredTokens) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMarketSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRegisteredTokens) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseDenom))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryMarketSummaryResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryRegisteredTokensResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2564,24 +3041,261 @@ func (m *QueryMarketSummaryResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryMarketSummaryResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRegisteredTokensResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMarketSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRegisteredTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Errors) > 0 { - i -= len(m.Errors) - copy(dAtA[i:], m.Errors) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Errors))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 + if len(m.Registry) > 0 { + for iNdEx := len(m.Registry) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Registry[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryRegisteredTokensWithMarkets) 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 *QueryRegisteredTokensWithMarkets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRegisteredTokensWithMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryRegisteredTokensWithMarketsResponse) 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 *QueryRegisteredTokensWithMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRegisteredTokensWithMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TokenMarket) 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 *TokenMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QuerySpecialAssets) 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 *QuerySpecialAssets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpecialAssets) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpecialAssetsResponse) 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 *QuerySpecialAssetsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpecialAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketSummary) 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 *QueryMarketSummary) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketSummary) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketSummaryResponse) 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 *QueryMarketSummaryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Errors) > 0 { + i -= len(m.Errors) + copy(dAtA[i:], m.Errors) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Errors))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 } if m.OracleHistoricPrice != nil { { @@ -3799,7 +4513,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryParams) Size() (n int) { +func (m *QueryLastInterestTime) Size() (n int) { if m == nil { return 0 } @@ -3808,31 +4522,124 @@ func (m *QueryParams) Size() (n int) { return n } -func (m *QueryParamsResponse) Size() (n int) { +func (m *QueryLastInterestTimeResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.LastInterestTime != 0 { + n += 1 + sovQuery(uint64(m.LastInterestTime)) + } return n } -func (m *QueryRegisteredTokens) Size() (n int) { +func (m *QueryAllReserves) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } -func (m *QueryRegisteredTokensResponse) Size() (n int) { +func (m *QueryAllReservesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reserves) > 0 { + for _, e := range m.Reserves { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryInterestScalars) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryInterestScalarsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.InterestScalars) > 0 { + for _, e := range m.InterestScalars { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryIsolatedBadDebts) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryIsolatedBadDebtsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.IsolatedBadDebts) > 0 { + for _, e := range m.IsolatedBadDebts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryRegisteredTokens) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRegisteredTokensResponse) Size() (n int) { if m == nil { return 0 } @@ -4393,6 +5200,527 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryLastInterestTime) 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: QueryLastInterestTime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastInterestTime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryLastInterestTimeResponse) 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: QueryLastInterestTimeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastInterestTimeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastInterestTime", wireType) + } + m.LastInterestTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastInterestTime |= int64(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 *QueryAllReserves) 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: QueryAllReserves: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllReserves: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryAllReservesResponse) 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: QueryAllReservesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllReservesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reserves = append(m.Reserves, types.Coin{}) + if err := m.Reserves[len(m.Reserves)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInterestScalars) 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: QueryInterestScalars: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInterestScalars: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryInterestScalarsResponse) 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: QueryInterestScalarsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInterestScalarsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InterestScalars", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InterestScalars = append(m.InterestScalars, InterestScalar{}) + if err := m.InterestScalars[len(m.InterestScalars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIsolatedBadDebts) 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: QueryIsolatedBadDebts: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIsolatedBadDebts: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryIsolatedBadDebtsResponse) 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: QueryIsolatedBadDebtsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIsolatedBadDebtsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IsolatedBadDebts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IsolatedBadDebts = append(m.IsolatedBadDebts, IsolatedBadDebt{}) + if err := m.IsolatedBadDebts[len(m.IsolatedBadDebts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/leverage/types/query.pb.gw.go b/x/leverage/types/query.pb.gw.go index 9d9dc203bb..2e02a1654a 100644 --- a/x/leverage/types/query.pb.gw.go +++ b/x/leverage/types/query.pb.gw.go @@ -465,6 +465,78 @@ func local_request_Query_InspectAccount_0(ctx context.Context, marshaler runtime } +func request_Query_IsolatedBadDebts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIsolatedBadDebts + var metadata runtime.ServerMetadata + + msg, err := client.IsolatedBadDebts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_IsolatedBadDebts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIsolatedBadDebts + var metadata runtime.ServerMetadata + + msg, err := server.IsolatedBadDebts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_InterestScalars_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInterestScalars + var metadata runtime.ServerMetadata + + msg, err := client.InterestScalars(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_InterestScalars_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInterestScalars + var metadata runtime.ServerMetadata + + msg, err := server.InterestScalars(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AllReserves_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllReserves + var metadata runtime.ServerMetadata + + msg, err := client.AllReserves(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllReserves_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllReserves + var metadata runtime.ServerMetadata + + msg, err := server.AllReserves(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastInterestTime_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastInterestTime + var metadata runtime.ServerMetadata + + msg, err := client.LastInterestTime(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastInterestTime_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastInterestTime + var metadata runtime.ServerMetadata + + msg, err := server.LastInterestTime(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. @@ -793,6 +865,98 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_IsolatedBadDebts_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_IsolatedBadDebts_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_IsolatedBadDebts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_InterestScalars_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_InterestScalars_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_InterestScalars_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllReserves_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_AllReserves_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_AllReserves_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastInterestTime_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_LastInterestTime_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_LastInterestTime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1114,6 +1278,86 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_IsolatedBadDebts_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_IsolatedBadDebts_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_IsolatedBadDebts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_InterestScalars_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_InterestScalars_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_InterestScalars_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllReserves_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_AllReserves_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_AllReserves_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastInterestTime_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_LastInterestTime_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_LastInterestTime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1145,6 +1389,14 @@ var ( pattern_Query_Inspect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "inspect"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_InspectAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "inspect-account"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_IsolatedBadDebts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "isolated_bad_debts"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_InterestScalars_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "interest_scalars"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllReserves_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "all_reserves"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_LastInterestTime_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "last_interest_time"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1175,4 +1427,12 @@ var ( forward_Query_Inspect_0 = runtime.ForwardResponseMessage forward_Query_InspectAccount_0 = runtime.ForwardResponseMessage + + forward_Query_IsolatedBadDebts_0 = runtime.ForwardResponseMessage + + forward_Query_InterestScalars_0 = runtime.ForwardResponseMessage + + forward_Query_AllReserves_0 = runtime.ForwardResponseMessage + + forward_Query_LastInterestTime_0 = runtime.ForwardResponseMessage ) diff --git a/x/leverage/types/tx.go b/x/leverage/types/tx.go index 57cfd8892d..eb5b597003 100644 --- a/x/leverage/types/tx.go +++ b/x/leverage/types/tx.go @@ -309,3 +309,32 @@ func validateSenderAndDenom(sender string, denom string) error { } return sdk.ValidateDenom(denom) } + +func NewMsgRepayIsolatedBadDebt( + fromAddr sdk.AccAddress, + borrowerAddr sdk.AccAddress, + asset sdk.Coin, + repayInterest bool, +) *MsgRepayIsolatedBadDebt { + return &MsgRepayIsolatedBadDebt{ + From: fromAddr.String(), + Borrower: borrowerAddr.String(), + Asset: asset, + RepayInterest: repayInterest, + } +} + +func (msg *MsgRepayIsolatedBadDebt) ValidateBasic() error { + return validateSenderAndAsset(msg.From, &msg.Asset) +} + +func (msg *MsgRepayIsolatedBadDebt) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.From) +} + +// LegacyMsg.Type implementations +func (msg MsgRepayIsolatedBadDebt) Route() string { return "" } +func (msg MsgRepayIsolatedBadDebt) Type() string { return sdk.MsgTypeURL(&msg) } +func (msg MsgRepayIsolatedBadDebt) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} diff --git a/x/leverage/types/tx.pb.go b/x/leverage/types/tx.pb.go index d34f777a23..498651ed1f 100644 --- a/x/leverage/types/tx.pb.go +++ b/x/leverage/types/tx.pb.go @@ -32,6 +32,93 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// MsgRepayIsolatedBadDebt represents a user's request to repay isolated bad debts. +type MsgRepayIsolatedBadDebt struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Borrower string `protobuf:"bytes,2,opt,name=borrower,proto3" json:"borrower,omitempty"` + Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"` + RepayInterest bool `protobuf:"varint,4,opt,name=repay_interest,json=repayInterest,proto3" json:"repay_interest,omitempty"` +} + +func (m *MsgRepayIsolatedBadDebt) Reset() { *m = MsgRepayIsolatedBadDebt{} } +func (m *MsgRepayIsolatedBadDebt) String() string { return proto.CompactTextString(m) } +func (*MsgRepayIsolatedBadDebt) ProtoMessage() {} +func (*MsgRepayIsolatedBadDebt) Descriptor() ([]byte, []int) { + return fileDescriptor_72683128ee6e8843, []int{0} +} +func (m *MsgRepayIsolatedBadDebt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRepayIsolatedBadDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRepayIsolatedBadDebt.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 *MsgRepayIsolatedBadDebt) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRepayIsolatedBadDebt.Merge(m, src) +} +func (m *MsgRepayIsolatedBadDebt) XXX_Size() int { + return m.Size() +} +func (m *MsgRepayIsolatedBadDebt) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRepayIsolatedBadDebt.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRepayIsolatedBadDebt proto.InternalMessageInfo + +func (*MsgRepayIsolatedBadDebt) XXX_MessageName() string { + return "umee.leverage.v1.MsgRepayIsolatedBadDebt" +} + +// MsgRepayIsolatedBadDebtResponse defines the Msg/RepayIsolatedBadDebt response type. +type MsgRepayIsolatedBadDebtResponse struct { + Asset types.Coin `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset"` +} + +func (m *MsgRepayIsolatedBadDebtResponse) Reset() { *m = MsgRepayIsolatedBadDebtResponse{} } +func (m *MsgRepayIsolatedBadDebtResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRepayIsolatedBadDebtResponse) ProtoMessage() {} +func (*MsgRepayIsolatedBadDebtResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_72683128ee6e8843, []int{1} +} +func (m *MsgRepayIsolatedBadDebtResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRepayIsolatedBadDebtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRepayIsolatedBadDebtResponse.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 *MsgRepayIsolatedBadDebtResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRepayIsolatedBadDebtResponse.Merge(m, src) +} +func (m *MsgRepayIsolatedBadDebtResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRepayIsolatedBadDebtResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRepayIsolatedBadDebtResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRepayIsolatedBadDebtResponse proto.InternalMessageInfo + +func (*MsgRepayIsolatedBadDebtResponse) XXX_MessageName() string { + return "umee.leverage.v1.MsgRepayIsolatedBadDebtResponse" +} + // MsgSupply represents a user's request to supply assets to the module. type MsgSupply struct { // Supplier is the account address supplying assets and the signer of the message. @@ -43,7 +130,7 @@ func (m *MsgSupply) Reset() { *m = MsgSupply{} } func (m *MsgSupply) String() string { return proto.CompactTextString(m) } func (*MsgSupply) ProtoMessage() {} func (*MsgSupply) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{0} + return fileDescriptor_72683128ee6e8843, []int{2} } func (m *MsgSupply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -88,7 +175,7 @@ func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } func (m *MsgWithdraw) String() string { return proto.CompactTextString(m) } func (*MsgWithdraw) ProtoMessage() {} func (*MsgWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{1} + return fileDescriptor_72683128ee6e8843, []int{3} } func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +220,7 @@ func (m *MsgMaxWithdraw) Reset() { *m = MsgMaxWithdraw{} } func (m *MsgMaxWithdraw) String() string { return proto.CompactTextString(m) } func (*MsgMaxWithdraw) ProtoMessage() {} func (*MsgMaxWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{2} + return fileDescriptor_72683128ee6e8843, []int{4} } func (m *MsgMaxWithdraw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -178,7 +265,7 @@ func (m *MsgCollateralize) Reset() { *m = MsgCollateralize{} } func (m *MsgCollateralize) String() string { return proto.CompactTextString(m) } func (*MsgCollateralize) ProtoMessage() {} func (*MsgCollateralize) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{3} + return fileDescriptor_72683128ee6e8843, []int{5} } func (m *MsgCollateralize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -223,7 +310,7 @@ func (m *MsgDecollateralize) Reset() { *m = MsgDecollateralize{} } func (m *MsgDecollateralize) String() string { return proto.CompactTextString(m) } func (*MsgDecollateralize) ProtoMessage() {} func (*MsgDecollateralize) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{4} + return fileDescriptor_72683128ee6e8843, []int{6} } func (m *MsgDecollateralize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -269,7 +356,7 @@ func (m *MsgBorrow) Reset() { *m = MsgBorrow{} } func (m *MsgBorrow) String() string { return proto.CompactTextString(m) } func (*MsgBorrow) ProtoMessage() {} func (*MsgBorrow) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{5} + return fileDescriptor_72683128ee6e8843, []int{7} } func (m *MsgBorrow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -315,7 +402,7 @@ func (m *MsgMaxBorrow) Reset() { *m = MsgMaxBorrow{} } func (m *MsgMaxBorrow) String() string { return proto.CompactTextString(m) } func (*MsgMaxBorrow) ProtoMessage() {} func (*MsgMaxBorrow) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{6} + return fileDescriptor_72683128ee6e8843, []int{8} } func (m *MsgMaxBorrow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +448,7 @@ func (m *MsgRepay) Reset() { *m = MsgRepay{} } func (m *MsgRepay) String() string { return proto.CompactTextString(m) } func (*MsgRepay) ProtoMessage() {} func (*MsgRepay) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{7} + return fileDescriptor_72683128ee6e8843, []int{9} } func (m *MsgRepay) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +503,7 @@ func (m *MsgLiquidate) Reset() { *m = MsgLiquidate{} } func (m *MsgLiquidate) String() string { return proto.CompactTextString(m) } func (*MsgLiquidate) ProtoMessage() {} func (*MsgLiquidate) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{8} + return fileDescriptor_72683128ee6e8843, []int{10} } func (m *MsgLiquidate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +558,7 @@ func (m *MsgLeveragedLiquidate) Reset() { *m = MsgLeveragedLiquidate{} } func (m *MsgLeveragedLiquidate) String() string { return proto.CompactTextString(m) } func (*MsgLeveragedLiquidate) ProtoMessage() {} func (*MsgLeveragedLiquidate) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{9} + return fileDescriptor_72683128ee6e8843, []int{11} } func (m *MsgLeveragedLiquidate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -515,7 +602,7 @@ func (m *MsgSupplyCollateral) Reset() { *m = MsgSupplyCollateral{} } func (m *MsgSupplyCollateral) String() string { return proto.CompactTextString(m) } func (*MsgSupplyCollateral) ProtoMessage() {} func (*MsgSupplyCollateral) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{10} + return fileDescriptor_72683128ee6e8843, []int{12} } func (m *MsgSupplyCollateral) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -558,7 +645,7 @@ func (m *MsgSupplyResponse) Reset() { *m = MsgSupplyResponse{} } func (m *MsgSupplyResponse) String() string { return proto.CompactTextString(m) } func (*MsgSupplyResponse) ProtoMessage() {} func (*MsgSupplyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{11} + return fileDescriptor_72683128ee6e8843, []int{13} } func (m *MsgSupplyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -601,7 +688,7 @@ func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} } func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawResponse) ProtoMessage() {} func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{12} + return fileDescriptor_72683128ee6e8843, []int{14} } func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -646,7 +733,7 @@ func (m *MsgMaxWithdrawResponse) Reset() { *m = MsgMaxWithdrawResponse{} func (m *MsgMaxWithdrawResponse) String() string { return proto.CompactTextString(m) } func (*MsgMaxWithdrawResponse) ProtoMessage() {} func (*MsgMaxWithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{13} + return fileDescriptor_72683128ee6e8843, []int{15} } func (m *MsgMaxWithdrawResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -687,7 +774,7 @@ func (m *MsgCollateralizeResponse) Reset() { *m = MsgCollateralizeRespon func (m *MsgCollateralizeResponse) String() string { return proto.CompactTextString(m) } func (*MsgCollateralizeResponse) ProtoMessage() {} func (*MsgCollateralizeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{14} + return fileDescriptor_72683128ee6e8843, []int{16} } func (m *MsgCollateralizeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -728,7 +815,7 @@ func (m *MsgDecollateralizeResponse) Reset() { *m = MsgDecollateralizeRe func (m *MsgDecollateralizeResponse) String() string { return proto.CompactTextString(m) } func (*MsgDecollateralizeResponse) ProtoMessage() {} func (*MsgDecollateralizeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{15} + return fileDescriptor_72683128ee6e8843, []int{17} } func (m *MsgDecollateralizeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -769,7 +856,7 @@ func (m *MsgBorrowResponse) Reset() { *m = MsgBorrowResponse{} } func (m *MsgBorrowResponse) String() string { return proto.CompactTextString(m) } func (*MsgBorrowResponse) ProtoMessage() {} func (*MsgBorrowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{16} + return fileDescriptor_72683128ee6e8843, []int{18} } func (m *MsgBorrowResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -812,7 +899,7 @@ func (m *MsgMaxBorrowResponse) Reset() { *m = MsgMaxBorrowResponse{} } func (m *MsgMaxBorrowResponse) String() string { return proto.CompactTextString(m) } func (*MsgMaxBorrowResponse) ProtoMessage() {} func (*MsgMaxBorrowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{17} + return fileDescriptor_72683128ee6e8843, []int{19} } func (m *MsgMaxBorrowResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -855,7 +942,7 @@ func (m *MsgRepayResponse) Reset() { *m = MsgRepayResponse{} } func (m *MsgRepayResponse) String() string { return proto.CompactTextString(m) } func (*MsgRepayResponse) ProtoMessage() {} func (*MsgRepayResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{18} + return fileDescriptor_72683128ee6e8843, []int{20} } func (m *MsgRepayResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -905,7 +992,7 @@ func (m *MsgLiquidateResponse) Reset() { *m = MsgLiquidateResponse{} } func (m *MsgLiquidateResponse) String() string { return proto.CompactTextString(m) } func (*MsgLiquidateResponse) ProtoMessage() {} func (*MsgLiquidateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{19} + return fileDescriptor_72683128ee6e8843, []int{21} } func (m *MsgLiquidateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -952,7 +1039,7 @@ func (m *MsgLeveragedLiquidateResponse) Reset() { *m = MsgLeveragedLiqui func (m *MsgLeveragedLiquidateResponse) String() string { return proto.CompactTextString(m) } func (*MsgLeveragedLiquidateResponse) ProtoMessage() {} func (*MsgLeveragedLiquidateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{20} + return fileDescriptor_72683128ee6e8843, []int{22} } func (m *MsgLeveragedLiquidateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -995,7 +1082,7 @@ func (m *MsgSupplyCollateralResponse) Reset() { *m = MsgSupplyCollateral func (m *MsgSupplyCollateralResponse) String() string { return proto.CompactTextString(m) } func (*MsgSupplyCollateralResponse) ProtoMessage() {} func (*MsgSupplyCollateralResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{21} + return fileDescriptor_72683128ee6e8843, []int{23} } func (m *MsgSupplyCollateralResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1044,7 +1131,7 @@ type MsgGovUpdateRegistry struct { func (m *MsgGovUpdateRegistry) Reset() { *m = MsgGovUpdateRegistry{} } func (*MsgGovUpdateRegistry) ProtoMessage() {} func (*MsgGovUpdateRegistry) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{22} + return fileDescriptor_72683128ee6e8843, []int{24} } func (m *MsgGovUpdateRegistry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,7 +1172,7 @@ func (m *MsgGovUpdateRegistryResponse) Reset() { *m = MsgGovUpdateRegist func (m *MsgGovUpdateRegistryResponse) String() string { return proto.CompactTextString(m) } func (*MsgGovUpdateRegistryResponse) ProtoMessage() {} func (*MsgGovUpdateRegistryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{23} + return fileDescriptor_72683128ee6e8843, []int{25} } func (m *MsgGovUpdateRegistryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1142,7 +1229,7 @@ type MsgGovUpdateSpecialAssets struct { func (m *MsgGovUpdateSpecialAssets) Reset() { *m = MsgGovUpdateSpecialAssets{} } func (*MsgGovUpdateSpecialAssets) ProtoMessage() {} func (*MsgGovUpdateSpecialAssets) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{24} + return fileDescriptor_72683128ee6e8843, []int{26} } func (m *MsgGovUpdateSpecialAssets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1183,7 +1270,7 @@ func (m *MsgGovUpdateSpecialAssetsResponse) Reset() { *m = MsgGovUpdateS func (m *MsgGovUpdateSpecialAssetsResponse) String() string { return proto.CompactTextString(m) } func (*MsgGovUpdateSpecialAssetsResponse) ProtoMessage() {} func (*MsgGovUpdateSpecialAssetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{25} + return fileDescriptor_72683128ee6e8843, []int{27} } func (m *MsgGovUpdateSpecialAssetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1226,7 +1313,7 @@ type MsgGovSetParams struct { func (m *MsgGovSetParams) Reset() { *m = MsgGovSetParams{} } func (*MsgGovSetParams) ProtoMessage() {} func (*MsgGovSetParams) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{26} + return fileDescriptor_72683128ee6e8843, []int{28} } func (m *MsgGovSetParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1267,7 +1354,7 @@ func (m *MsgGovSetParamsResponse) Reset() { *m = MsgGovSetParamsResponse func (m *MsgGovSetParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgGovSetParamsResponse) ProtoMessage() {} func (*MsgGovSetParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_72683128ee6e8843, []int{27} + return fileDescriptor_72683128ee6e8843, []int{29} } func (m *MsgGovSetParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1300,6 +1387,8 @@ func (*MsgGovSetParamsResponse) XXX_MessageName() string { return "umee.leverage.v1.MsgGovSetParamsResponse" } func init() { + proto.RegisterType((*MsgRepayIsolatedBadDebt)(nil), "umee.leverage.v1.MsgRepayIsolatedBadDebt") + proto.RegisterType((*MsgRepayIsolatedBadDebtResponse)(nil), "umee.leverage.v1.MsgRepayIsolatedBadDebtResponse") proto.RegisterType((*MsgSupply)(nil), "umee.leverage.v1.MsgSupply") proto.RegisterType((*MsgWithdraw)(nil), "umee.leverage.v1.MsgWithdraw") proto.RegisterType((*MsgMaxWithdraw)(nil), "umee.leverage.v1.MsgMaxWithdraw") @@ -1333,84 +1422,90 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/tx.proto", fileDescriptor_72683128ee6e8843) } var fileDescriptor_72683128ee6e8843 = []byte{ - // 1228 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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76, 0x10, 0x25, 0xb2, 0xd3, 0xa7, 0x21, 0x3b, 0xa0, 0xe1, 0x36, 0x14, - 0x5d, 0x5f, 0x68, 0x07, 0x59, 0x5e, 0x39, 0x97, 0x4e, 0x47, 0xe8, 0x21, 0x2e, 0xc0, 0x94, 0x8b, - 0x76, 0x35, 0x57, 0xdf, 0xa4, 0x75, 0x98, 0x20, 0xf4, 0x25, 0xba, 0xb7, 0x46, 0xaa, 0xf1, 0x28, - 0x0b, 0x2f, 0xf9, 0x72, 0x59, 0x6f, 0xea, 0xa1, 0xee, 0x77, 0xe2, 0xba, 0x6b, 0xe5, 0x3f, 0x7f, - 0x5f, 0x9a, 0x61, 0xf1, 0xef, 0xe8, 0xba, 0x8b, 0x30, 0x6e, 0x7a, 0xae, 0x69, 0x19, 0x7d, 0x19, - 0xbd, 0x39, 0x98, 0xd1, 0x08, 0xbf, 0x30, 0xd7, 0x0a, 0x94, 0x88, 0x72, 0xa6, 0x35, 0x47, 0x0b, - 0x45, 0xb6, 0x88, 0xd4, 0x14, 0xd9, 0x88, 0xf7, 0xa1, 0xd8, 0xd1, 0xf6, 0x36, 0x89, 0x53, 0x39, - 0x4f, 0x42, 0xab, 0x7e, 0x51, 0xfe, 0x7e, 0x52, 0xb9, 0x6e, 0x98, 0xde, 0x76, 0x77, 0x4b, 0x6d, - 0xd9, 0x1d, 0x36, 0xbe, 0xd8, 0x9f, 0x25, 0xac, 0xef, 0x54, 0xbd, 0x7d, 0x07, 0x61, 0x75, 0x0d, - 0xb5, 0x1a, 0x85, 0x8e, 0xb6, 0x47, 0x5e, 0x0e, 0x65, 0x1b, 0x2e, 0xf0, 0x01, 0x15, 0x36, 0xe8, - 0x38, 0x06, 0xc9, 0x06, 0x9c, 0xe7, 0x91, 0x1a, 0x08, 0x3b, 0xb6, 0x85, 0x91, 0x78, 0x0b, 0x0a, - 0x2e, 0x6a, 0x21, 0xb3, 0x87, 0x74, 0x12, 0x27, 0x05, 0x1d, 0x77, 0x50, 0x1a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21, 0x68, 0x2c, 0x8a, 0x1e, 0x99, 0xc4, 0x1c, 0xcc, - 0x0e, 0xc8, 0x0b, 0xa4, 0xaf, 0xfc, 0x02, 0x90, 0xab, 0x63, 0x43, 0x5c, 0x87, 0x49, 0x76, 0x5b, - 0xb8, 0x14, 0x0f, 0xc8, 0x3b, 0x56, 0xba, 0x3a, 0xc2, 0xc8, 0x9b, 0x78, 0x03, 0x0a, 0xfc, 0xd0, - 0x7e, 0x25, 0xd1, 0x21, 0x30, 0x4b, 0xd7, 0x46, 0x9a, 0x39, 0xe3, 0x67, 0x50, 0x8a, 0xde, 0x04, - 0xe6, 0x13, 0xbd, 0x22, 0x08, 0x69, 0xf1, 0x24, 0x04, 0xa7, 0xde, 0x84, 0x33, 0xfd, 0x17, 0x04, - 0x25, 0xd1, 0xb5, 0x0f, 0x23, 0xdd, 0x38, 0x19, 0xc3, 0x03, 0x20, 0x38, 0x37, 0x78, 0x35, 0x78, - 0x39, 0xd1, 0x7d, 0x00, 0x25, 0xbd, 0x9e, 0x06, 0xc5, 0xc3, 0xac, 0xc3, 0x24, 0x3b, 0xb5, 0x27, - 0x3f, 0x40, 0x6a, 0x1c, 0xf2, 0x00, 0x07, 0x3e, 0xc7, 0x4d, 0x28, 0x86, 0x97, 0x00, 0x79, 0x58, - 0x29, 0x19, 0xe3, 0xf5, 0xd1, 0xf6, 0xc8, 0x68, 0xcf, 0xb3, 0x7b, 0x41, 0xa2, 0x03, 0xb1, 0x49, - 0xca, 0x70, 0x5b, 0x54, 0x5d, 0xe4, 0x02, 0x90, 0xe8, 0xc0, 0xed, 0x43, 0xd4, 0xc5, 0xbf, 0x84, - 0x16, 0x88, 0x09, 0xc7, 0xf4, 0x57, 0x92, 0xbd, 0x63, 0x40, 0xa9, 0x9a, 0x12, 0xc8, 0xe3, 0x6d, - 0xc3, 0x74, 0xec, 0xf0, 0x7b, 0x6d, 0x44, 0x73, 0x85, 0x30, 0x69, 0x29, 0x15, 0x8c, 0x47, 0xda, - 0x81, 0xf3, 0xf1, 0xaf, 0x60, 0x72, 0x59, 0x62, 0x38, 0x49, 0x4d, 0x87, 0xe3, 0xc1, 0x1e, 0xc0, - 0xc5, 0x21, 0xdf, 0x8e, 0xd7, 0x46, 0x33, 0xf5, 0x81, 0xa5, 0x9b, 0xa7, 0x00, 0xf3, 0xd8, 0x5f, - 0xc0, 0x54, 0xdf, 0x04, 0x5e, 0x18, 0x46, 0xc2, 0x21, 0xd2, 0xab, 0x27, 0x42, 0x02, 0xf6, 0x5a, - 0xe3, 0xf0, 0x5f, 0x39, 0x73, 0x78, 0x24, 0x0b, 0x8f, 0x8f, 0x64, 0xe1, 0x9f, 0x23, 0x59, 0xf8, - 0xf1, 0x58, 0xce, 0x1c, 0x1e, 0xcb, 0xc2, 0xe3, 0x63, 0x39, 0xf3, 0xd7, 0xb1, 0x9c, 0xf9, 0xfc, - 0x8d, 0xc8, 0x25, 0xc8, 0xa7, 0x5d, 0xb2, 0x90, 0xb7, 0x6b, 0xbb, 0x3b, 0x64, 0x51, 0xed, 0xad, - 0x56, 0xf7, 0xc2, 0x5f, 0x6c, 0xc8, 0x95, 0x68, 0x6b, 0x92, 0xfc, 0x58, 0x73, 0xf3, 0x69, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x84, 0xae, 0x8c, 0x87, 0x66, 0x12, 0x00, 0x00, + // 1324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x8f, 0xf3, 0x67, 0x95, 0xbc, 0x6c, 0xdb, 0xad, 0xbb, 0xb4, 0x59, 0xb7, 0x75, 0xb2, 0x2e, + 0x2d, 0xdb, 0xd2, 0x75, 0xd8, 0x16, 0x0a, 0xa2, 0x14, 0x68, 0xba, 0x52, 0xd5, 0x96, 0x48, 0x55, + 0x02, 0xe2, 0x8f, 0x80, 0xe0, 0xc4, 0x53, 0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, 0x75, 0xd1, 0x27, 0xa1, + 0x05, 0x62, 0xcc, 0x6b, 0xfa, 0x2b, 0xf1, 0xde, 0x11, 0xa0, 0x54, 0x4d, 0x08, 0xe4, 0xf1, 0x36, + 0x60, 0x21, 0xf2, 0xf2, 0x7b, 0x76, 0x4a, 0x71, 0x05, 0x30, 0x69, 0x35, 0x11, 0x8c, 0x47, 0xda, + 0x84, 0xa3, 0xd1, 0xa7, 0x60, 0x7c, 0x5a, 0x22, 0x38, 0x49, 0x4d, 0x86, 0xe3, 0xc1, 0xee, 0xc3, + 0xf1, 0x09, 0xcf, 0x8e, 0x57, 0xa7, 0x33, 0x8d, 0x80, 0xa5, 0xcb, 0x33, 0x80, 0x79, 0xec, 0xcf, + 0x61, 0x7e, 0xa4, 0x03, 0x2f, 0x4f, 0x22, 0xe1, 0x10, 0xe9, 0xfc, 0xbe, 0x10, 0xce, 0xee, 0xc2, + 0x62, 0xec, 0x57, 0xa8, 0xf3, 0x93, 0x4f, 0xec, 0x18, 0x54, 0x5a, 0x4b, 0x0c, 0xf5, 0xa3, 0xd6, + 0x1a, 0xbb, 0xff, 0xc8, 0xa9, 0xdd, 0xa7, 0xb2, 0xf0, 0xf8, 0xa9, 0x2c, 0xfc, 0xfd, 0x54, 0x16, + 0xbe, 0xdf, 0x93, 0x53, 0xbb, 0x7b, 0xb2, 0xf0, 0x78, 0x4f, 0x4e, 0xfd, 0xb1, 0x27, 0xa7, 0x3e, + 0x7b, 0x2d, 0x74, 0xf5, 0xf2, 0xe8, 0x57, 0x2d, 0xe4, 0x6e, 0xd9, 0xce, 0x26, 0x19, 0x54, 0x87, + 0x57, 0xaa, 0xdb, 0xc1, 0xf7, 0x35, 0x72, 0x11, 0x6b, 0xcf, 0x91, 0x4f, 0x6b, 0x97, 0xff, 0x0f, + 0x00, 0x00, 0xff, 0xff, 0x8e, 0xa8, 0x87, 0xf1, 0x14, 0x14, 0x00, 0x00, } func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool { @@ -1588,6 +1683,8 @@ type MsgClient interface { GovUpdateSpecialAssets(ctx context.Context, in *MsgGovUpdateSpecialAssets, opts ...grpc.CallOption) (*MsgGovUpdateSpecialAssetsResponse, error) // GovSetParams is used by governance proposals to update parameters. GovSetParams(ctx context.Context, in *MsgGovSetParams, opts ...grpc.CallOption) (*MsgGovSetParamsResponse, error) + // RepayIsolatedBadDebt allows a user to repay isolated bad debts. + RepayIsolatedBadDebt(ctx context.Context, in *MsgRepayIsolatedBadDebt, opts ...grpc.CallOption) (*MsgRepayIsolatedBadDebtResponse, error) } type msgClient struct { @@ -1724,6 +1821,15 @@ func (c *msgClient) GovSetParams(ctx context.Context, in *MsgGovSetParams, opts return out, nil } +func (c *msgClient) RepayIsolatedBadDebt(ctx context.Context, in *MsgRepayIsolatedBadDebt, opts ...grpc.CallOption) (*MsgRepayIsolatedBadDebtResponse, error) { + out := new(MsgRepayIsolatedBadDebtResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Msg/RepayIsolatedBadDebt", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // Supply moves tokens from user balance to the module for lending or collateral. @@ -1775,6 +1881,8 @@ type MsgServer interface { GovUpdateSpecialAssets(context.Context, *MsgGovUpdateSpecialAssets) (*MsgGovUpdateSpecialAssetsResponse, error) // GovSetParams is used by governance proposals to update parameters. GovSetParams(context.Context, *MsgGovSetParams) (*MsgGovSetParamsResponse, error) + // RepayIsolatedBadDebt allows a user to repay isolated bad debts. + RepayIsolatedBadDebt(context.Context, *MsgRepayIsolatedBadDebt) (*MsgRepayIsolatedBadDebtResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1823,6 +1931,9 @@ func (*UnimplementedMsgServer) GovUpdateSpecialAssets(ctx context.Context, req * func (*UnimplementedMsgServer) GovSetParams(ctx context.Context, req *MsgGovSetParams) (*MsgGovSetParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GovSetParams not implemented") } +func (*UnimplementedMsgServer) RepayIsolatedBadDebt(ctx context.Context, req *MsgRepayIsolatedBadDebt) (*MsgRepayIsolatedBadDebtResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RepayIsolatedBadDebt not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -2080,6 +2191,24 @@ func _Msg_GovSetParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_RepayIsolatedBadDebt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRepayIsolatedBadDebt) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RepayIsolatedBadDebt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Msg/RepayIsolatedBadDebt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RepayIsolatedBadDebt(ctx, req.(*MsgRepayIsolatedBadDebt)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.leverage.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -2140,11 +2269,105 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "GovSetParams", Handler: _Msg_GovSetParams_Handler, }, + { + MethodName: "RepayIsolatedBadDebt", + Handler: _Msg_RepayIsolatedBadDebt_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/leverage/v1/tx.proto", } +func (m *MsgRepayIsolatedBadDebt) 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 *MsgRepayIsolatedBadDebt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRepayIsolatedBadDebt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RepayInterest { + i-- + if m.RepayInterest { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Borrower) > 0 { + i -= len(m.Borrower) + copy(dAtA[i:], m.Borrower) + i = encodeVarintTx(dAtA, i, uint64(len(m.Borrower))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRepayIsolatedBadDebtResponse) 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 *MsgRepayIsolatedBadDebtResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRepayIsolatedBadDebtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *MsgSupply) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3237,6 +3460,39 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *MsgRepayIsolatedBadDebt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Borrower) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Asset.Size() + n += 1 + l + sovTx(uint64(l)) + if m.RepayInterest { + n += 2 + } + return n +} + +func (m *MsgRepayIsolatedBadDebtResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Asset.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + func (m *MsgSupply) Size() (n int) { if m == nil { return 0 @@ -3655,6 +3911,256 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *MsgRepayIsolatedBadDebt) 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 ErrIntOverflowTx + } + 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: MsgRepayIsolatedBadDebt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRepayIsolatedBadDebt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Borrower", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Borrower = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Asset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RepayInterest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RepayInterest = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRepayIsolatedBadDebtResponse) 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 ErrIntOverflowTx + } + 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: MsgRepayIsolatedBadDebtResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRepayIsolatedBadDebtResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Asset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgSupply) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/uibc/mocks/leverage_noop.go b/x/uibc/mocks/leverage_noop.go index 96304a856e..ba75053357 100644 --- a/x/uibc/mocks/leverage_noop.go +++ b/x/uibc/mocks/leverage_noop.go @@ -74,3 +74,8 @@ func (l lvgNoop) GovSetParams(context.Context, *ltypes.MsgGovSetParams, ) (*ltypes.MsgGovSetParamsResponse, error) { return nil, nil } + +func (l lvgNoop) RepayIsolatedBadDebt(context.Context, *ltypes.MsgRepayIsolatedBadDebt, +) (*ltypes.MsgRepayIsolatedBadDebtResponse, error) { + return nil, nil +}