From 2f1b8bdf2b8925776ae2ba85ba67d6dcd6311c7c Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Mon, 17 Jul 2023 08:59:33 -0600 Subject: [PATCH] feat: add special asset pairs --- proto/umee/leverage/v1/genesis.proto | 1 + proto/umee/leverage/v1/leverage.proto | 22 + proto/umee/leverage/v1/query.proto | 17 + proto/umee/leverage/v1/tx.proto | 24 + swagger/swagger.yaml | 134 ++++++ x/leverage/client/cli/query.go | 26 + x/leverage/client/tests/tests.go | 10 + x/leverage/keeper/genesis.go | 5 + x/leverage/keeper/grpc_query.go | 16 + x/leverage/keeper/iter.go | 6 + x/leverage/keeper/msg_server.go | 27 ++ x/leverage/keeper/token.go | 25 + x/leverage/simulation/genesis.go | 1 + x/leverage/types/errors.go | 6 +- x/leverage/types/genesis.go | 14 + x/leverage/types/genesis.pb.go | 135 ++++-- x/leverage/types/genesis_test.go | 2 +- x/leverage/types/keys.go | 7 + x/leverage/types/leverage.pb.go | 413 +++++++++++++--- x/leverage/types/msgs.go | 76 ++- x/leverage/types/msgs_test.go | 4 +- x/leverage/types/query.pb.go | 593 ++++++++++++++++++----- x/leverage/types/query.pb.gw.go | 65 +++ x/leverage/types/token.go | 38 +- x/leverage/types/tx.pb.go | 655 +++++++++++++++++++++++--- 25 files changed, 2010 insertions(+), 312 deletions(-) diff --git a/proto/umee/leverage/v1/genesis.proto b/proto/umee/leverage/v1/genesis.proto index e80b66543d..3267f51514 100644 --- a/proto/umee/leverage/v1/genesis.proto +++ b/proto/umee/leverage/v1/genesis.proto @@ -26,6 +26,7 @@ message GenesisState { (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + repeated SpecialAssetPair special_pairs = 10 [(gogoproto.nullable) = false]; } // AdjustedBorrow is a borrow struct used in the leverage module's genesis diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index d659e0e431..25844e5692 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -249,3 +249,25 @@ message Token { (gogoproto.moretags) = "yaml:\"historic_medians\"" ]; } + +// SpecialAssetPair defines a special (increased) CollateralWeight used when a specified Collateral is used +// to collateralize a specified Borrow. This association is one-way (so it does not work in reverse). +message SpecialAssetPair { + option (gogoproto.equal) = true; + + // Collateral is the denomination of the collateral base token. + string collateral = 1; + + // Borrow is the denomination of the borrowed base token. + string borrow = 2; + + // Collateral Weight defines what portion of the total value of the asset + // can contribute to a users borrowing power. For special asset pairs, this + // also overrides the borrowed asset's collateral weight when eveluating borrow + // factor. + string collateral_weight = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"collateral_weight\"" + ]; +} diff --git a/proto/umee/leverage/v1/query.proto b/proto/umee/leverage/v1/query.proto index 995cdafd33..a937e6f088 100644 --- a/proto/umee/leverage/v1/query.proto +++ b/proto/umee/leverage/v1/query.proto @@ -24,6 +24,12 @@ service Query { option (google.api.http).get = "/umee/leverage/v1/registered_tokens"; } + // SpecialAssetPairs queries for all special asset pairs. + rpc SpecialAssetPairs(QuerySpecialAssetPairs) + returns (QuerySpecialAssetPairsResponse) { + option (google.api.http).get = "/umee/leverage/v1/special_asset_pairs"; + } + // MarketSummary queries a base asset's current borrowing and supplying conditions. rpc MarketSummary(QueryMarketSummary) returns (QueryMarketSummaryResponse) { @@ -100,6 +106,17 @@ message QueryRegisteredTokensResponse { repeated Token registry = 1 [(gogoproto.nullable) = false]; } +// QuerySpecialAssetPairs defines the request structure for the SpecialAssetPairs +// gRPC service handler. +message QuerySpecialAssetPairs { +} + +// QuerySpecialAssetPairsResponse defines the response structure for the +// SpecialAssetPairs gRPC service handler. +message QuerySpecialAssetPairsResponse { + repeated SpecialAssetPair pairs = 1 [(gogoproto.nullable) = false]; +} + // QueryMarketSummary defines the request structure for the MarketSummary gRPC service handler. message QueryMarketSummary { string denom = 1; diff --git a/proto/umee/leverage/v1/tx.proto b/proto/umee/leverage/v1/tx.proto index 2019ee8a57..49f1be7c0a 100644 --- a/proto/umee/leverage/v1/tx.proto +++ b/proto/umee/leverage/v1/tx.proto @@ -66,6 +66,11 @@ service Msg { // GovUpdateRegistry adds new tokens to the token registry or // updates existing tokens with new settings. rpc GovUpdateRegistry(MsgGovUpdateRegistry) returns (MsgGovUpdateRegistryResponse); + + // GovUpdateSpecialAssetPairs adds, updates, or removes special asset pairs. Note that a special asset + // pair can be removed by setting its special collateral weight to the collateral weight of the base + // asset. + rpc GovUpdateSpecialAssetPairs(MsgGovUpdateSpecialAssetPairs) returns (MsgGovUpdateSpecialAssetPairsResponse); } // MsgSupply represents a user's request to supply assets to the module. @@ -264,3 +269,22 @@ message MsgGovUpdateRegistry { // MsgGovUpdateRegistryResponse defines the Msg/GovUpdateRegistry response type. message MsgGovUpdateRegistryResponse {} + +// MsgGovUpdateSpecialAssetPairs defines the Msg/GovUpdateSpecialAssetPairs request type. +message MsgGovUpdateSpecialAssetPairs { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string title = 2; + string description = 3; + // pairs are new or updated special asset pairs. Updating a special asset pair's + // collateral weight to match that of its base asset deletes it indead. + repeated SpecialAssetPair pairs = 4 [(gogoproto.nullable) = false]; +} + +// MsgGovUpdateSpecialAssetPairsResponse defines the Msg/GovUpdateSpecialAssetPairs response type. +message MsgGovUpdateSpecialAssetPairsResponse {} diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 3375474216..68cb3b592c 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1281,6 +1281,77 @@ paths: type: string tags: - Query + /umee/leverage/v1/special_asset_pairs: + get: + summary: SpecialAssetPairs queries for all special asset pairs. + operationId: SpecialAssetPairs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + pairs: + type: array + items: + type: object + properties: + collateral: + type: string + description: >- + Collateral is the denomination of the collateral base + token. + borrow: + type: string + description: Borrow is the denomination of the borrowed base token. + collateral_weight: + type: string + description: >- + Collateral Weight defines what portion of the total + value of the asset + + can contribute to a users borrowing power. For special + asset pairs, this + + also overrides the borrowed asset's collateral weight + when eveluating borrow + + factor. + description: >- + SpecialAssetPair defines a special (increased) + CollateralWeight used when a specified Collateral is used + + to collateralize a specified Borrow. This association is + one-way (so it does not work in reverse). + description: >- + QuerySpecialAssetPairsResponse defines the response structure for + the + + SpecialAssetPairs gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query /umee/historacle/v1/avg_price/{denom}: get: summary: QueryAvgPrice returns avg price of a given denom (required). @@ -4484,6 +4555,42 @@ definitions: description: |- QueryRegisteredTokensResponse defines the response structure for the RegisteredTokens gRPC service handler. + umee.leverage.v1.QuerySpecialAssetPairsResponse: + type: object + properties: + pairs: + type: array + items: + type: object + properties: + collateral: + type: string + description: Collateral is the denomination of the collateral base token. + borrow: + type: string + description: Borrow is the denomination of the borrowed base token. + collateral_weight: + type: string + description: >- + Collateral Weight defines what portion of the total value of the + asset + + can contribute to a users borrowing power. For special asset + pairs, this + + also overrides the borrowed asset's collateral weight when + eveluating borrow + + factor. + description: >- + SpecialAssetPair defines a special (increased) CollateralWeight used + when a specified Collateral is used + + to collateralize a specified Borrow. This association is one-way (so + it does not work in reverse). + description: |- + QuerySpecialAssetPairsResponse defines the response structure for the + SpecialAssetPairs gRPC service handler. umee.leverage.v1.RiskInfo: type: object properties: @@ -4502,6 +4609,33 @@ definitions: description: >- RiskInfo defines a borrower's account health without requiring sdk.Dec formatting. + umee.leverage.v1.SpecialAssetPair: + type: object + properties: + collateral: + type: string + description: Collateral is the denomination of the collateral base token. + borrow: + type: string + description: Borrow is the denomination of the borrowed base token. + collateral_weight: + type: string + description: >- + Collateral Weight defines what portion of the total value of the asset + + can contribute to a users borrowing power. For special asset pairs, + this + + also overrides the borrowed asset's collateral weight when eveluating + borrow + + factor. + description: >- + SpecialAssetPair defines a special (increased) CollateralWeight used when + a specified Collateral is used + + to collateralize a specified Borrow. This association is one-way (so it + does not work in reverse). umee.leverage.v1.Token: type: object properties: diff --git a/x/leverage/client/cli/query.go b/x/leverage/client/cli/query.go index 2ecc148e24..3a564f5e2d 100644 --- a/x/leverage/client/cli/query.go +++ b/x/leverage/client/cli/query.go @@ -30,6 +30,7 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand( GetCmdQueryParams(), GetCmdQueryRegisteredTokens(), + GetCmdQuerySpecialAssetPairs(), GetCmdQueryMarketSummary(), GetCmdQueryAccountBalances(), GetCmdQueryAccountSummary(), @@ -95,6 +96,31 @@ func GetCmdQueryRegisteredTokens() *cobra.Command { return cmd } +// GetCmdQuerySpecialAssetPairs creates a Cobra command to query for all +// the special asset pairs in the x/leverage module. +func GetCmdQuerySpecialAssetPairs() *cobra.Command { + cmd := &cobra.Command{ + Use: "special-pairs", + Args: cobra.NoArgs, + Short: "Query for all currently registered special asset pairs", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QuerySpecialAssetPairs{} + resp, err := queryClient.SpecialAssetPairs(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetCmdQueryMarketSummary creates a Cobra command to query for the // Market Summary of a specific token. func GetCmdQueryMarketSummary() *cobra.Command { diff --git a/x/leverage/client/tests/tests.go b/x/leverage/client/tests/tests.go index 8d7f2201d0..750703dda6 100644 --- a/x/leverage/client/tests/tests.go +++ b/x/leverage/client/tests/tests.go @@ -95,6 +95,16 @@ func (s *IntegrationTests) TestLeverageScenario() { }, ErrMsg: "", }, + { + Name: "query special asset pairs", + Command: cli.GetCmdQuerySpecialAssetPairs(), + Args: []string{}, + Response: &types.QuerySpecialAssetPairsResponse{}, + ExpectedResponse: &types.QuerySpecialAssetPairsResponse{ + Pairs: []types.SpecialAssetPair{}, + }, + ErrMsg: "", + }, { Name: "query registered token info by base_denom", Command: cli.GetCmdQueryRegisteredTokens(), diff --git a/x/leverage/keeper/genesis.go b/x/leverage/keeper/genesis.go index 18c1626769..2b0d03d0a7 100644 --- a/x/leverage/keeper/genesis.go +++ b/x/leverage/keeper/genesis.go @@ -43,6 +43,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { for _, rate := range genState.InterestScalars { util.Panic(k.setInterestScalar(ctx, rate.Denom, rate.Scalar)) } + + for _, pair := range genState.SpecialPairs { + util.Panic(k.SetSpecialAssetPair(ctx, pair)) + } } // ExportGenesis returns the x/leverage module's exported genesis state. @@ -57,6 +61,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.getAllBadDebts(ctx), k.getAllInterestScalars(ctx), k.GetAllUTokenSupply(ctx), + k.GetAllSpecialAssetPairs(ctx), ) } diff --git a/x/leverage/keeper/grpc_query.go b/x/leverage/keeper/grpc_query.go index 16ad0d4621..26efa69c0a 100644 --- a/x/leverage/keeper/grpc_query.go +++ b/x/leverage/keeper/grpc_query.go @@ -61,6 +61,22 @@ func (q Querier) RegisteredTokens( }, nil } +func (q Querier) SpecialAssetPairs( + goCtx context.Context, + req *types.QuerySpecialAssetPairs, +) (*types.QuerySpecialAssetPairsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + pairs := q.Keeper.GetAllSpecialAssetPairs(ctx) + + return &types.QuerySpecialAssetPairsResponse{ + Pairs: pairs, + }, nil +} + func (q Querier) MarketSummary( goCtx context.Context, req *types.QueryMarketSummary, diff --git a/x/leverage/keeper/iter.go b/x/leverage/keeper/iter.go index 0795a3b0d1..ca86161c3b 100644 --- a/x/leverage/keeper/iter.go +++ b/x/leverage/keeper/iter.go @@ -42,6 +42,12 @@ func (k Keeper) GetAllRegisteredTokens(ctx sdk.Context) []types.Token { return store.MustLoadAll[*types.Token](ctx.KVStore(k.storeKey), types.KeyPrefixRegisteredToken) } +// GetAllSpecialAssetPairs returns all the special asset pairs from the x/leverage +// module's KVStore. +func (k Keeper) GetAllSpecialAssetPairs(ctx sdk.Context) []types.SpecialAssetPair { + return store.MustLoadAll[*types.SpecialAssetPair](ctx.KVStore(k.storeKey), types.KeyPrefixSpecialAssetPair) +} + // GetBorrowerBorrows returns an sdk.Coins object containing all open borrows // associated with an address. func (k Keeper) GetBorrowerBorrows(ctx sdk.Context, borrowerAddr sdk.AccAddress) sdk.Coins { diff --git a/x/leverage/keeper/msg_server.go b/x/leverage/keeper/msg_server.go index 01d2973662..036c1f7bf4 100644 --- a/x/leverage/keeper/msg_server.go +++ b/x/leverage/keeper/msg_server.go @@ -569,3 +569,30 @@ func (s msgServer) GovUpdateRegistry( return &types.MsgGovUpdateRegistryResponse{}, nil } + +// GovUpdateSpecialAssetPairs adds, updates, or deletes special asset pairs. +func (s msgServer) GovUpdateSpecialAssetPairs( + goCtx context.Context, + msg *types.MsgGovUpdateSpecialAssetPairs, +) (*types.MsgGovUpdateSpecialAssetPairsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + for _, pair := range msg.Pairs { + token, err := s.keeper.GetTokenSettings(ctx, pair.Collateral) + if err != nil { + return nil, err + } + + if pair.CollateralWeight.Equal(token.CollateralWeight) { + // setting a special collateral weight equal to regular collateral weight deletes + // the special pair instead, since no special weight is needed in that case + s.keeper.DeleteSpecialAssetPair(ctx, pair.Collateral, pair.Borrow) + } else { + if err := s.keeper.SetSpecialAssetPair(ctx, pair); err != nil { + return nil, err + } + } + } + + return &types.MsgGovUpdateSpecialAssetPairsResponse{}, nil +} diff --git a/x/leverage/keeper/token.go b/x/leverage/keeper/token.go index c83be27106..6b7ed3565c 100644 --- a/x/leverage/keeper/token.go +++ b/x/leverage/keeper/token.go @@ -71,6 +71,31 @@ func (k Keeper) GetTokenSettings(ctx sdk.Context, denom string) (types.Token, er return token, err } +// SetSpecialAssetPair stores a SpecialAssetPair into the x/leverage module's KVStore. +func (k Keeper) SetSpecialAssetPair(ctx sdk.Context, pair types.SpecialAssetPair) error { + if err := pair.Validate(); err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + key := types.KeySpecialAssetPair(pair.Collateral, pair.Borrow) + + bz, err := k.cdc.Marshal(&pair) + if err != nil { + return err + } + + store.Set(key, bz) + return nil +} + +// DeleteSpecialAssetPair removes a SpecialAssetPair from the x/leverage module's KVStore. +func (k Keeper) DeleteSpecialAssetPair(ctx sdk.Context, collateralDenom, borrowDenom string) { + store := ctx.KVStore(k.storeKey) + key := types.KeySpecialAssetPair(collateralDenom, borrowDenom) + store.Delete(key) +} + // SaveOrUpdateTokenSettingsToRegistry adds new tokens or updates the new tokens settings to registry. // It requires maps of the currently registered base and symbol denoms, so it can prevent duplicates of either. func (k Keeper) SaveOrUpdateTokenSettingsToRegistry( diff --git a/x/leverage/simulation/genesis.go b/x/leverage/simulation/genesis.go index 1d56177a07..2bfc962822 100644 --- a/x/leverage/simulation/genesis.go +++ b/x/leverage/simulation/genesis.go @@ -92,6 +92,7 @@ func RandomizedGenState(simState *module.SimulationState) { []types.BadDebt{}, []types.InterestScalar{}, sdk.Coins{}, + []types.SpecialAssetPair{}, ) bz, err := json.MarshalIndent(&leverageGenesis.Params, "", " ") diff --git a/x/leverage/types/errors.go b/x/leverage/types/errors.go index 231c317670..bb3ca312fd 100644 --- a/x/leverage/types/errors.go +++ b/x/leverage/types/errors.go @@ -25,8 +25,10 @@ var ( ModuleName, 206, "collateral weight of Token is zero: can't be used as a collateral", ) - ErrDuplicateToken = errors.Register(ModuleName, 207, "duplicate token") - ErrEmptyAddAndUpdateTokens = errors.Register(ModuleName, 208, "empty add and update tokens") + ErrDuplicateToken = errors.Register(ModuleName, 207, "duplicate token") + ErrEmptyAddAndUpdateTokens = errors.Register(ModuleName, 208, "empty add and update tokens") + ErrEmptyUpdateSpecialAssetPairs = errors.Register(ModuleName, 209, "empty update special asset pairs") + ErrDuplicatePair = errors.Register(ModuleName, 210, "duplicate special asset pair") // 3XX = User Positions ErrInsufficientBalance = errors.Register(ModuleName, 300, "insufficient balance") diff --git a/x/leverage/types/genesis.go b/x/leverage/types/genesis.go index e884600ceb..65b4b5c375 100644 --- a/x/leverage/types/genesis.go +++ b/x/leverage/types/genesis.go @@ -18,6 +18,7 @@ func NewGenesisState( badDebts []BadDebt, interestScalars []InterestScalar, uTokenSupply sdk.Coins, + specialPairs []SpecialAssetPair, ) *GenesisState { return &GenesisState{ Params: params, @@ -29,6 +30,7 @@ func NewGenesisState( BadDebts: badDebts, InterestScalars: interestScalars, UtokenSupply: uTokenSupply, + SpecialPairs: specialPairs, } } @@ -48,6 +50,9 @@ func (gs GenesisState) Validate() error { return err } + if err := validateRegistryTokenDenoms(gs.Registry); err != nil { + return err + } for _, token := range gs.Registry { if err := token.Validate(); err != nil { return err @@ -98,6 +103,15 @@ func (gs GenesisState) Validate() error { } } + if err := validateSpecialAssetPairDenoms(gs.SpecialPairs); err != nil { + return err + } + for _, pair := range gs.SpecialPairs { + if err := pair.Validate(); err != nil { + return err + } + } + return gs.UtokenSupply.Validate() } diff --git a/x/leverage/types/genesis.pb.go b/x/leverage/types/genesis.pb.go index 080a14a31c..52acb6f17c 100644 --- a/x/leverage/types/genesis.pb.go +++ b/x/leverage/types/genesis.pb.go @@ -36,6 +36,7 @@ type GenesisState struct { BadDebts []BadDebt `protobuf:"bytes,7,rep,name=bad_debts,json=badDebts,proto3" json:"bad_debts"` 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"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -241,45 +242,47 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/genesis.proto", fileDescriptor_a51f71666aa8f549) } var fileDescriptor_a51f71666aa8f549 = []byte{ - // 601 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0x8e, 0xfb, 0x27, 0x6d, 0xb6, 0xfd, 0xf5, 0x57, 0xad, 0x2a, 0xb1, 0x54, 0x95, 0x13, 0xe5, - 0x80, 0x72, 0xa0, 0x76, 0x5b, 0x04, 0xa8, 0x88, 0x0b, 0x6e, 0x05, 0xe2, 0x82, 0x20, 0xed, 0x89, - 0x4b, 0xb4, 0xb6, 0x07, 0x63, 0x6a, 0x7b, 0xad, 0x9d, 0x75, 0x4a, 0xdf, 0x82, 0xe7, 0xe0, 0xc8, - 0x53, 0xf4, 0xd8, 0x23, 0xe2, 0x50, 0xa0, 0x7d, 0x11, 0xe4, 0xdd, 0x4d, 0xda, 0x34, 0x50, 0x71, - 0xe0, 0x64, 0xcf, 0xce, 0xf7, 0x7d, 0x33, 0x3b, 0xdf, 0x68, 0x89, 0x5b, 0xe5, 0x00, 0x7e, 0x06, - 0x43, 0x90, 0x3c, 0x01, 0x7f, 0xb8, 0xed, 0x27, 0x50, 0x00, 0xa6, 0xe8, 0x95, 0x52, 0x28, 0x41, - 0x57, 0xeb, 0xbc, 0x37, 0xca, 0x7b, 0xc3, 0xed, 0x75, 0x37, 0x12, 0x98, 0x0b, 0xf4, 0x43, 0x8e, - 0x35, 0x3e, 0x04, 0xc5, 0xb7, 0xfd, 0x48, 0xa4,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x82, 0xac, 0x4c, 0xda, 0x73, 0x85, 0x73, 0xae, 0xe1, 0xe8, 0x73, - 0xd2, 0x34, 0x3e, 0x1b, 0x7a, 0xe0, 0xd5, 0x0d, 0x7c, 0x3b, 0x6f, 0xdf, 0xfb, 0x8b, 0xd9, 0xef, - 0x43, 0xd4, 0xb7, 0xec, 0xe0, 0xd5, 0xe9, 0x4f, 0xb7, 0x71, 0x7a, 0xe1, 0x3a, 0x67, 0x17, 0xae, - 0xf3, 0xe3, 0xc2, 0x75, 0x3e, 0x5d, 0xba, 0x8d, 0xb3, 0x4b, 0xb7, 0xf1, 0xf5, 0xd2, 0x6d, 0xbc, - 0xdd, 0xba, 0xa6, 0x56, 0xaf, 0xd1, 0x66, 0x01, 0xea, 0x58, 0xc8, 0x23, 0x1d, 0xf8, 0xc3, 0x87, - 0xfe, 0xc7, 0xab, 0xa7, 0x49, 0x6b, 0x87, 0x4d, 0xfd, 0xfe, 0x3c, 0xf8, 0x15, 0x00, 0x00, 0xff, - 0xff, 0xcd, 0x8e, 0xd7, 0xd1, 0x0a, 0x05, 0x00, 0x00, + // 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, 0x11, 0xa0, 0x22, 0x36, 0x75, 0x2b, 0x10, 0x0b, 0x50, 0x49, 0xba, 0x62, + 0x63, 0x8d, 0xed, 0x83, 0x31, 0xb5, 0x3d, 0xd6, 0x9c, 0x49, 0x4a, 0x97, 0xbc, 0x01, 0xcf, 0xc1, + 0x93, 0x74, 0xd9, 0x25, 0x62, 0x51, 0xa0, 0x7d, 0x11, 0xe4, 0x99, 0x49, 0xda, 0x34, 0x10, 0xb1, + 0x60, 0x95, 0xcc, 0x9c, 0xef, 0x32, 0xe7, 0x7c, 0x33, 0x26, 0x4e, 0x3f, 0x07, 0xf0, 0x32, 0x18, + 0x80, 0x60, 0x09, 0x78, 0x83, 0x1d, 0x2f, 0x81, 0x02, 0x30, 0x45, 0xb7, 0x14, 0x5c, 0x72, 0xba, + 0x56, 0xd5, 0xdd, 0x61, 0xdd, 0x1d, 0xec, 0x6c, 0x38, 0x11, 0xc7, 0x9c, 0xa3, 0x17, 0x32, 0xac, + 0xf0, 0x21, 0x48, 0xb6, 0xe3, 0x45, 0x3c, 0x2d, 0x34, 0x63, 0xa3, 0x39, 0xa1, 0x38, 0x62, 0x6b, + 0xc0, 0x7a, 0xc2, 0x13, 0xae, 0xfe, 0x7a, 0xd5, 0x3f, 0xbd, 0xdb, 0xfe, 0x54, 0x27, 0xcb, 0x2f, + 0xb4, 0x75, 0x4f, 0x32, 0x09, 0xf4, 0x31, 0xa9, 0x97, 0x4c, 0xb0, 0x1c, 0x6d, 0xab, 0x65, 0x75, + 0x96, 0x76, 0x6d, 0xf7, 0xee, 0x51, 0xdc, 0x23, 0x55, 0xf7, 0xe7, 0xce, 0x2f, 0x9b, 0xb5, 0xae, + 0x41, 0xd3, 0x3d, 0xb2, 0x28, 0x20, 0x49, 0x51, 0x8a, 0x33, 0x7b, 0xa6, 0x35, 0xdb, 0x59, 0xda, + 0xfd, 0x7f, 0x92, 0x79, 0xcc, 0x4f, 0xa0, 0x30, 0xc4, 0x11, 0x9c, 0xbe, 0x21, 0x6b, 0x2c, 0xfe, + 0xd0, 0x47, 0x09, 0x71, 0x10, 0x72, 0x21, 0xf8, 0x29, 0xda, 0xb3, 0x4a, 0xa2, 0x35, 0x29, 0xb1, + 0x6f, 0x90, 0xbe, 0x02, 0x1a, 0xad, 0xff, 0xd8, 0xd8, 0x2e, 0x52, 0x9f, 0x90, 0x88, 0x67, 0x19, + 0x93, 0x20, 0x58, 0x66, 0xcf, 0x29, 0xb1, 0xcd, 0x49, 0xb1, 0x83, 0x11, 0xc6, 0x08, 0xdd, 0x62, + 0xd1, 0xa4, 0xea, 0x08, 0x41, 0x0c, 0x00, 0xed, 0x79, 0xa5, 0x70, 0xcf, 0xd5, 0x21, 0xb8, 0x55, + 0x08, 0xae, 0x09, 0xc1, 0x3d, 0xe0, 0x69, 0xe1, 0x6f, 0x57, 0xf4, 0x2f, 0xdf, 0x9b, 0x9d, 0x24, + 0x95, 0xef, 0xfb, 0xa1, 0x1b, 0xf1, 0xdc, 0x33, 0x89, 0xe9, 0x9f, 0x2d, 0x8c, 0x4f, 0x3c, 0x79, + 0x56, 0x02, 0x2a, 0x02, 0x76, 0x47, 0xe2, 0xf4, 0x01, 0xa1, 0x19, 0x43, 0x19, 0xa4, 0x85, 0x04, + 0x01, 0x28, 0x03, 0x99, 0xe6, 0x60, 0xd7, 0x5b, 0x56, 0x67, 0xb6, 0xbb, 0x56, 0x55, 0x5e, 0x9a, + 0xc2, 0x71, 0x9a, 0x03, 0x7d, 0x46, 0x1a, 0x21, 0x8b, 0x83, 0x18, 0x42, 0x89, 0xf6, 0x82, 0x39, + 0xd7, 0x44, 0x67, 0x3e, 0x8b, 0x0f, 0x21, 0x94, 0xc3, 0x59, 0x87, 0x7a, 0x89, 0xd5, 0xac, 0x47, + 0x36, 0x18, 0xb1, 0x8c, 0x09, 0xb4, 0x17, 0xff, 0x34, 0xeb, 0xa1, 0x6f, 0x4f, 0x01, 0x87, 0xb3, + 0x4e, 0xc7, 0x76, 0x91, 0x96, 0x64, 0xa5, 0x2f, 0xab, 0x60, 0x03, 0xec, 0x97, 0x65, 0x76, 0x66, + 0x37, 0xfe, 0xfd, 0xb0, 0x96, 0xb5, 0x43, 0x4f, 0x19, 0xd0, 0x57, 0x64, 0x05, 0x4b, 0x88, 0x52, + 0x96, 0x05, 0x25, 0x4b, 0x05, 0xda, 0x44, 0x39, 0xb6, 0x27, 0x3b, 0xe8, 0x69, 0xd8, 0x3e, 0x22, + 0xc8, 0x23,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0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -302,6 +305,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SpecialPairs) > 0 { + for iNdEx := len(m.SpecialPairs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpecialPairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } if len(m.UtokenSupply) > 0 { for iNdEx := len(m.UtokenSupply) - 1; iNdEx >= 0; iNdEx-- { { @@ -639,6 +656,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.SpecialPairs) > 0 { + for _, e := range m.SpecialPairs { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -1029,6 +1052,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpecialPairs", 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.SpecialPairs = append(m.SpecialPairs, SpecialAssetPair{}) + if err := m.SpecialPairs[len(m.SpecialPairs)-1].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 4333c0678d..7e8a7d9e2f 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, 0, nil, nil, nil, nil, ), true, "complete liquidation threshold must be positive", diff --git a/x/leverage/types/keys.go b/x/leverage/types/keys.go index 5b159d447c..84d283d0d0 100644 --- a/x/leverage/types/keys.go +++ b/x/leverage/types/keys.go @@ -25,6 +25,7 @@ var ( KeyPrefixInterestScalar = []byte{0x08} KeyPrefixAdjustedTotalBorrow = []byte{0x09} KeyPrefixUtokenSupply = []byte{0x0A} + KeyPrefixSpecialAssetPair = []byte{0x0B} ) // KeyRegisteredToken returns a KVStore key for getting and setting a Token. @@ -33,6 +34,12 @@ func KeyRegisteredToken(baseTokenDenom string) []byte { return util.ConcatBytes(1, KeyPrefixRegisteredToken, []byte(baseTokenDenom)) } +// KeySpecialAssetPair returns a KVStore key for getting and setting a SpecialAssetPair. +func KeySpecialAssetPair(collateral, borrow string) []byte { + // pairprefix | collateralDenom | 0x00 | borrowDenom | 0x00 for null-termination + return util.ConcatBytes(1, KeyPrefixSpecialAssetPair, []byte(collateral), []byte{0}, []byte(borrow)) +} + // KeyAdjustedBorrow returns a KVStore key for getting and setting an // adjusted borrow for a denom and borrower address. func KeyAdjustedBorrow(borrowerAddr sdk.AccAddress, tokenDenom string) []byte { diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 36686319c5..6ee4657165 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -239,73 +239,124 @@ func (m *Token) XXX_DiscardUnknown() { var xxx_messageInfo_Token proto.InternalMessageInfo +// SpecialAssetPair defines a special (increased) CollateralWeight used when a specified Collateral is used +// to collateralize a specified Borrow. This association is one-way (so it does not work in reverse). +type SpecialAssetPair struct { + // Collateral is the denomination of the collateral base token. + Collateral string `protobuf:"bytes,1,opt,name=collateral,proto3" json:"collateral,omitempty"` + // Borrow is the denomination of the borrowed base token. + Borrow string `protobuf:"bytes,2,opt,name=borrow,proto3" json:"borrow,omitempty"` + // Collateral Weight defines what portion of the total value of the asset + // can contribute to a users borrowing power. For special asset pairs, this + // also overrides the borrowed asset's collateral weight when eveluating borrow + // factor. + CollateralWeight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=collateral_weight,json=collateralWeight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"collateral_weight" yaml:"collateral_weight"` +} + +func (m *SpecialAssetPair) Reset() { *m = SpecialAssetPair{} } +func (m *SpecialAssetPair) String() string { return proto.CompactTextString(m) } +func (*SpecialAssetPair) ProtoMessage() {} +func (*SpecialAssetPair) Descriptor() ([]byte, []int) { + return fileDescriptor_8cb1bf9ea641ecc6, []int{2} +} +func (m *SpecialAssetPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpecialAssetPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpecialAssetPair.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 *SpecialAssetPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpecialAssetPair.Merge(m, src) +} +func (m *SpecialAssetPair) XXX_Size() int { + return m.Size() +} +func (m *SpecialAssetPair) XXX_DiscardUnknown() { + xxx_messageInfo_SpecialAssetPair.DiscardUnknown(m) +} + +var xxx_messageInfo_SpecialAssetPair proto.InternalMessageInfo + func init() { proto.RegisterType((*Params)(nil), "umee.leverage.v1.Params") proto.RegisterType((*Token)(nil), "umee.leverage.v1.Token") + proto.RegisterType((*SpecialAssetPair)(nil), "umee.leverage.v1.SpecialAssetPair") } func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 926 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x6f, 0x1b, 0x37, - 0x14, 0xd6, 0xb5, 0xb6, 0x6b, 0x33, 0xb1, 0x24, 0x9f, 0x65, 0xe7, 0xd0, 0xb8, 0x3a, 0x83, 0x40, - 0x0b, 0x2f, 0xb1, 0x1a, 0xb4, 0x5d, 0x3c, 0xca, 0x81, 0x1b, 0x17, 0x71, 0xda, 0xd2, 0x29, 0x02, - 0x74, 0x39, 0x50, 0xa7, 0x17, 0x89, 0x10, 0xef, 0xa8, 0x92, 0xd4, 0x2f, 0x2f, 0x1d, 0x8a, 0x4e, - 0x5d, 0x3a, 0x76, 0x29, 0x90, 0x3f, 0xa5, 0xa3, 0xc7, 0x8c, 0x45, 0x07, 0xa1, 0xb5, 0x97, 0x0e, - 0x9d, 0xfc, 0x17, 0x14, 0x47, 0x9e, 0x74, 0x27, 0x47, 0x09, 0x20, 0x28, 0x93, 0x8e, 0xdf, 0x7b, - 0xfa, 0xbe, 0x8f, 0xe4, 0x7b, 0x24, 0x91, 0xdf, 0x8b, 0x00, 0x6a, 0x1c, 0xfa, 0x20, 0x69, 0x0b, - 0x6a, 0xfd, 0x87, 0xd3, 0xef, 0xc3, 0xae, 0x14, 0x5a, 0xb8, 0xe5, 0x24, 0xe1, 0x70, 0x0a, 0xf6, - 0x1f, 0x7e, 0x58, 0x69, 0x89, 0x96, 0x30, 0xc1, 0x5a, 0xf2, 0x65, 0xf3, 0xf0, 0x1f, 0xab, 0x68, - 0xed, 0x1b, 0x2a, 0x69, 0xa4, 0xdc, 0xdf, 0x1d, 0x54, 0x0d, 0x45, 0xd4, 0xe5, 0xa0, 0x21, 0xe0, - 0xec, 0x87, 0x1e, 0x6b, 0x52, 0xcd, 0x44, 0x1c, 0xe8, 0xb6,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8, 0xf5, 0xbf, 0xa8, 0x0d, 0xb3, 0x57, 0xab, 0x99, 0x41, 0x63, 0xcd, 0x3c, 0x44, 0x3f, - 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xcb, 0x95, 0xa4, 0xd3, 0x0a, 0x00, 0x00, + // 969 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xbf, 0x6f, 0x1b, 0x37, + 0x14, 0xd6, 0xb5, 0xb6, 0x6b, 0x33, 0xb1, 0x25, 0x9f, 0x65, 0xe7, 0xd0, 0xb8, 0x3a, 0x83, 0x40, + 0x0b, 0x2f, 0xb1, 0x1a, 0xb4, 0x5d, 0xbc, 0x55, 0x0e, 0xdc, 0xb8, 0x88, 0xd3, 0x94, 0x4e, 0x11, + 0xa0, 0xcb, 0x81, 0x3a, 0xbd, 0x48, 0x84, 0x78, 0x47, 0x95, 0xa4, 0x7e, 0x79, 0xe9, 0x50, 0x74, + 0xea, 0xd2, 0xb1, 0x4b, 0x81, 0xfc, 0x29, 0x1d, 0xdd, 0x2d, 0x63, 0xd1, 0x41, 0x68, 0xed, 0xa5, + 0x43, 0x27, 0xff, 0x05, 0xc5, 0x91, 0x27, 0xdd, 0xc9, 0x51, 0x03, 0x08, 0x0a, 0x90, 0x49, 0xc7, + 0xef, 0x3d, 0x7d, 0xdf, 0x47, 0xf2, 0x91, 0x8f, 0xc8, 0xef, 0x46, 0x00, 0x55, 0x0e, 0x3d, 0x90, + 0xb4, 0x09, 0xd5, 0xde, 0xfd, 0xc9, 0xf7, 0x41, 0x47, 0x0a, 0x2d, 0xdc, 0x52, 0x92, 0x70, 0x30, + 0x01, 0x7b, 0xf7, 0xdf, 0x2f, 0x37, 0x45, 0x53, 0x98, 0x60, 0x35, 0xf9, 0xb2, 0x79, 0xf8, 0xb7, + 0x65, 0xb4, 0xf2, 0x84, 0x4a, 0x1a, 0x29, 0xf7, 0x57, 0x07, 0x55, 0x42, 0x11, 0x75, 0x38, 0x68, + 0x08, 0x38, 0xfb, 0xae, 0xcb, 0x1a, 0x54, 0x33, 0x11, 0x07, 0xba, 0x25, 0x41, 0xb5, 0x04, 0x6f, + 0x78, 0xef, 0xec, 0x39, 0xfb, 0x6b, 0xb5, 0x67, 0x17, 0x23, 0xbf, 0xf0, 0xe7, 0xc8, 0xff, 0xa8, + 0xc9, 0x74, 0xab, 0x5b, 0x3f, 0x08, 0x45, 0x54, 0x0d, 0x85, 0x8a, 0x84, 0x4a, 0x7f, 0xee, 0xa9, + 0x46, 0xbb, 0xaa, 0x87, 0x1d, 0x50, 0x07, 0x0f, 0x20, 0xbc, 0x1e, 0xf9, 0x1f, 0x0e, 0x69, 0xc4, + 0x0f, 0xf1, 0xeb, 0xd9, 0x31, 0xd9, 0x1d, 0x27, 0x3c, 0xca, 0xe2, 0x4f, 0xc7, 0x61, 0xf7, 0x7b, + 0x54, 0x8e, 0x58, 0xcc, 0xa2, 0x6e, 0x14, 0x84, 0x5c, 0x28, 0x08, 0x9e, 0xd3, 0x50, 0x0b, 0xe9, + 0xbd, 0x6b, 0x4c, 0x9d, 0xce, 0x6d, 0xea, 0xae, 0x35, 0x35, 0x8b, 0x13, 0x13, 0x37, 0x85, 0x8f, + 0x12, 0xf4, 0xd8, 0x80, 0x89, 0x01, 0x21, 0x69, 0xc8, 0x21, 0x90, 0xd0, 0xa7, 0xb2, 0x31, 0x36, + 0xb0, 0xb4, 0x98, 0x81, 0x59, 0x9c, 0x98, 0xb8, 0x16, 0x26, 0x06, 0x4d, 0x0d, 0xfc, 0xe8, 0xa0, + 0x1d, 0x15, 0x51, 0xce, 0xa7, 0x16, 0x50, 0xb1, 0x73, 0xf0, 0x96, 0x8d, 0x87, 0xaf, 0xe6, 0xf6, + 0xf0, 0x81, 0xf5, 0x30, 0x9b, 0x15, 0x93, 0xb2, 0x09, 0xe4, 0xb6, 0xe3, 0x8c, 0x9d, 0x83, 0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x77, 0x17, 0xad, + 0xd5, 0x39, 0x0d, 0xdb, 0x9c, 0x29, 0xed, 0x6d, 0x24, 0x0c, 0x24, 0x03, 0x4c, 0xf7, 0xa4, 0x83, + 0x20, 0x77, 0x51, 0xa8, 0x16, 0x95, 0xe0, 0x15, 0x17, 0xec, 0x9e, 0x33, 0x38, 0x93, 0xee, 0x49, + 0x07, 0x47, 0x13, 0xf4, 0x2c, 0x01, 0x4d, 0xd3, 0x48, 0xb2, 0xed, 0x4a, 0x4c, 0x95, 0x68, 0x69, + 0xb1, 0xa6, 0x31, 0x9b, 0x15, 0x93, 0x64, 0xc2, 0x76, 0x95, 0xf3, 0xd5, 0xfa, 0x93, 0x83, 0xbc, + 0x88, 0xc5, 0x79, 0xd7, 0xb6, 0x9e, 0x98, 0x1e, 0x7a, 0x9b, 0xc6, 0xc9, 0xd7, 0x73, 0x3b, 0xf1, + 0x27, 0x6f, 0x89, 0x99, 0xbc, 0x98, 0xec, 0x44, 0x2c, 0xce, 0x56, 0xe4, 0xd1, 0x38, 0xe0, 0xd6, + 0x11, 0xca, 0xec, 0x7b, 0xae, 0x91, 0x3f, 0x9a, 0x43, 0xfe, 0x24, 0xd6, 0x59, 0x83, 0xcb, 0x98, + 0x30, 0x59, 0x9b, 0x4c, 0xde, 0x3d, 0x46, 0xa5, 0x16, 0x53, 0x5a, 0x48, 0x16, 0x06, 0x11, 0x34, + 0x18, 0x8d, 0x95, 0xb7, 0x65, 0xaa, 0xfc, 0x6e, 0x76, 0xce, 0x6f, 0x66, 0x60, 0x52, 0x1c, 0x43, + 0xa7, 0x16, 0x39, 0x5c, 0xfa, 0xe7, 0x85, 0xef, 0xe0, 0xdf, 0x1d, 0x54, 0x3a, 0xeb, 0x40, 0xc8, + 0x28, 0xff, 0x5c, 0x29, 0xd0, 0x4f, 0x28, 0x93, 0x6e, 0x05, 0xa1, 0x6c, 0xde, 0xb6, 0xf3, 0x92, + 0x1c, 0xe2, 0xee, 0xa0, 0x95, 0xb4, 0xb4, 0x4d, 0x6f, 0x25, 0xe9, 0xe8, 0xad, 0xf5, 0x42, 0x3b, + 0x97, 0xda, 0xe3, 0x8b, 0xbf, 0x2b, 0x85, 0x8b, 0xcb, 0x8a, 0xf3, 0xf2, 0xb2, 0xe2, 0xfc, 0x75, + 0x59, 0x71, 0x7e, 0xbe, 0xaa, 0x14, 0x5e, 0x5e, 0x55, 0x0a, 0x7f, 0x5c, 0x55, 0x0a, 0xdf, 0x7e, + 0x9c, 0x53, 0x4e, 0x9e, 0xd3, 0xf7, 0x62, 0xd0, 0x7d, 0x21, 0xdb, 0x66, 0x50, 0xed, 0x7d, 0x56, + 0x1d, 0x64, 0x2f, 0x70, 0xe3, 0xa3, 0xbe, 0x62, 0x1e, 0xd5, 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, + 0xff, 0x3e, 0x85, 0x9a, 0xc0, 0x9f, 0x0b, 0x00, 0x00, } func (this *Token) Equal(that interface{}) bool { @@ -386,6 +437,36 @@ func (this *Token) Equal(that interface{}) bool { } return true } +func (this *SpecialAssetPair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SpecialAssetPair) + if !ok { + that2, ok := that.(SpecialAssetPair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Collateral != that1.Collateral { + return false + } + if this.Borrow != that1.Borrow { + return false + } + if !this.CollateralWeight.Equal(that1.CollateralWeight) { + return false + } + return true +} func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -664,6 +745,53 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SpecialAssetPair) 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 *SpecialAssetPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpecialAssetPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CollateralWeight.Size() + i -= size + if _, err := m.CollateralWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintLeverage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Borrow) > 0 { + i -= len(m.Borrow) + copy(dAtA[i:], m.Borrow) + i = encodeVarintLeverage(dAtA, i, uint64(len(m.Borrow))) + i-- + dAtA[i] = 0x12 + } + if len(m.Collateral) > 0 { + i -= len(m.Collateral) + copy(dAtA[i:], m.Collateral) + i = encodeVarintLeverage(dAtA, i, uint64(len(m.Collateral))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintLeverage(dAtA []byte, offset int, v uint64) int { offset -= sovLeverage(v) base := offset @@ -750,6 +878,25 @@ func (m *Token) Size() (n int) { return n } +func (m *SpecialAssetPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Collateral) + if l > 0 { + n += 1 + l + sovLeverage(uint64(l)) + } + l = len(m.Borrow) + if l > 0 { + n += 1 + l + sovLeverage(uint64(l)) + } + l = m.CollateralWeight.Size() + n += 1 + l + sovLeverage(uint64(l)) + return n +} + func sovLeverage(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1596,6 +1743,154 @@ func (m *Token) Unmarshal(dAtA []byte) error { } return nil } +func (m *SpecialAssetPair) 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 ErrIntOverflowLeverage + } + 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: SpecialAssetPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpecialAssetPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeverage + } + 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 ErrInvalidLengthLeverage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLeverage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Collateral = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Borrow", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeverage + } + 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 ErrInvalidLengthLeverage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLeverage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Borrow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeverage + } + 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 ErrInvalidLengthLeverage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLeverage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CollateralWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLeverage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeverage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipLeverage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/leverage/types/msgs.go b/x/leverage/types/msgs.go index 67f931fcff..b732ac3e6d 100644 --- a/x/leverage/types/msgs.go +++ b/x/leverage/types/msgs.go @@ -8,10 +8,13 @@ import ( "gopkg.in/yaml.v3" ) -var _ sdk.Msg = &MsgGovUpdateRegistry{} +var ( + _ sdk.Msg = &MsgGovUpdateRegistry{} + _ sdk.Msg = &MsgGovUpdateSpecialAssetPairs{} +) -// NewMsgUpdateRegistry will create a new MsgUpdateRegistry instance -func NewMsgUpdateRegistry(authority, title, description string, updateTokens, addTokens []Token) *MsgGovUpdateRegistry { +// NewMsgGovUpdateRegistry will create a new MsgUpdateRegistry instance +func NewMsgGovUpdateRegistry(authority, title, description string, updateTokens, addTokens []Token) *MsgGovUpdateRegistry { return &MsgGovUpdateRegistry{ Title: title, Description: description, @@ -85,3 +88,70 @@ func validateRegistryTokenDenoms(tokens []Token) error { } return nil } + +// NewMsgGovUpdateSpecialAssetPairs will create a new MsgGovUpdateSpecialAssetPairs instance +func NewMsgGovUpdateSpecialAssetPairs(authority, title, description string, pairs []SpecialAssetPair, +) *MsgGovUpdateSpecialAssetPairs { + return &MsgGovUpdateSpecialAssetPairs{ + Title: title, + Description: description, + Authority: authority, + Pairs: pairs, + } +} + +// Type implements Msg interface +func (msg MsgGovUpdateSpecialAssetPairs) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovUpdateSpecialAssetPairs) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// ValidateBasic implements Msg +func (msg MsgGovUpdateSpecialAssetPairs) ValidateBasic() error { + if err := checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority); err != nil { + return err + } + + if len(msg.Pairs) == 0 { + return ErrEmptyUpdateSpecialAssetPairs + } + + if err := validateSpecialAssetPairDenoms(msg.Pairs); err != nil { + return err + } + + for _, pair := range msg.Pairs { + if err := pair.Validate(); err != nil { + return errors.Wrapf(err, "special asset pair [%s, %s]", pair.Collateral, pair.Borrow) + } + } + + return nil +} + +// GetSignBytes implements Msg +func (msg MsgGovUpdateSpecialAssetPairs) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// GetSigners implements Msg +func (msg MsgGovUpdateSpecialAssetPairs) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// validateSpecialAssetPairDenoms returns error if duplicate special asset pairs exist. +func validateSpecialAssetPairDenoms(pairs []SpecialAssetPair) error { + assetPairs := map[string]bool{} + for _, pair := range pairs { + s := pair.Collateral + "," + pair.Borrow + if _, ok := assetPairs[s]; ok { + return ErrDuplicatePair.Wrapf("[%s, %s]", pair.Collateral, pair.Borrow) + } + assetPairs[s] = true + } + return nil +} diff --git a/x/leverage/types/msgs_test.go b/x/leverage/types/msgs_test.go index 181bf7e906..bedfc3651b 100644 --- a/x/leverage/types/msgs_test.go +++ b/x/leverage/types/msgs_test.go @@ -138,7 +138,7 @@ func TestMsgGovUpdateRegistryOtherFunctionality(t *testing.T) { MaxSupply: sdk.NewInt(100_000_000000), HistoricMedians: 24, } - msg := types.NewMsgUpdateRegistry( + msg := types.NewMsgGovUpdateRegistry( authtypes.NewModuleAddress(govtypes.ModuleName).String(), "title", "description", []types.Token{umee}, []types.Token{}, ) @@ -172,3 +172,5 @@ updatetokens: tassert.NotNil(t, msg.GetSignBytes(), "sign byte shouldn't be nil") tassert.NotEmpty(t, msg.GetSigners(), "signers shouldn't be empty") } + +// TODO : tests for MsgGovUpdateSpecialAssetPairs diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index 15648bad23..0fc9dab229 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -187,6 +187,83 @@ func (m *QueryRegisteredTokensResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryRegisteredTokensResponse proto.InternalMessageInfo +// QuerySpecialAssetPairs defines the request structure for the SpecialAssetPairs +// gRPC service handler. +type QuerySpecialAssetPairs struct { +} + +func (m *QuerySpecialAssetPairs) Reset() { *m = QuerySpecialAssetPairs{} } +func (m *QuerySpecialAssetPairs) String() string { return proto.CompactTextString(m) } +func (*QuerySpecialAssetPairs) ProtoMessage() {} +func (*QuerySpecialAssetPairs) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{4} +} +func (m *QuerySpecialAssetPairs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpecialAssetPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpecialAssetPairs.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 *QuerySpecialAssetPairs) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpecialAssetPairs.Merge(m, src) +} +func (m *QuerySpecialAssetPairs) XXX_Size() int { + return m.Size() +} +func (m *QuerySpecialAssetPairs) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpecialAssetPairs.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpecialAssetPairs proto.InternalMessageInfo + +// QuerySpecialAssetPairsResponse defines the response structure for the +// SpecialAssetPairs gRPC service handler. +type QuerySpecialAssetPairsResponse struct { + Pairs []SpecialAssetPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` +} + +func (m *QuerySpecialAssetPairsResponse) Reset() { *m = QuerySpecialAssetPairsResponse{} } +func (m *QuerySpecialAssetPairsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpecialAssetPairsResponse) ProtoMessage() {} +func (*QuerySpecialAssetPairsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{5} +} +func (m *QuerySpecialAssetPairsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpecialAssetPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpecialAssetPairsResponse.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 *QuerySpecialAssetPairsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpecialAssetPairsResponse.Merge(m, src) +} +func (m *QuerySpecialAssetPairsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpecialAssetPairsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpecialAssetPairsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpecialAssetPairsResponse proto.InternalMessageInfo + // QueryMarketSummary defines the request structure for the MarketSummary gRPC service handler. type QueryMarketSummary struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` @@ -196,7 +273,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{4} + return fileDescriptor_1e8137dcabb0ccc7, []int{6} } func (m *QueryMarketSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +349,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{5} + return fileDescriptor_1e8137dcabb0ccc7, []int{7} } func (m *QueryMarketSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,7 +387,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{6} + return fileDescriptor_1e8137dcabb0ccc7, []int{8} } func (m *QueryAccountBalances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,7 +430,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{7} + return fileDescriptor_1e8137dcabb0ccc7, []int{9} } func (m *QueryAccountBalancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -391,7 +468,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{8} + return fileDescriptor_1e8137dcabb0ccc7, []int{10} } func (m *QueryAccountSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,7 +526,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{9} + return fileDescriptor_1e8137dcabb0ccc7, []int{11} } func (m *QueryAccountSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -486,7 +563,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{10} + return fileDescriptor_1e8137dcabb0ccc7, []int{12} } func (m *QueryLiquidationTargets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -525,7 +602,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{11} + return fileDescriptor_1e8137dcabb0ccc7, []int{13} } func (m *QueryLiquidationTargetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -563,7 +640,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{12} + return fileDescriptor_1e8137dcabb0ccc7, []int{14} } func (m *QueryBadDebts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -602,7 +679,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{13} + return fileDescriptor_1e8137dcabb0ccc7, []int{15} } func (m *QueryBadDebtsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -643,7 +720,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{14} + return fileDescriptor_1e8137dcabb0ccc7, []int{16} } func (m *QueryMaxWithdraw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -684,7 +761,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{15} + return fileDescriptor_1e8137dcabb0ccc7, []int{17} } func (m *QueryMaxWithdrawResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -725,7 +802,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{16} + return fileDescriptor_1e8137dcabb0ccc7, []int{18} } func (m *QueryMaxBorrow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -764,7 +841,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{17} + return fileDescriptor_1e8137dcabb0ccc7, []int{19} } func (m *QueryMaxBorrowResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -812,7 +889,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{18} + return fileDescriptor_1e8137dcabb0ccc7, []int{20} } func (m *QueryInspect) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -850,7 +927,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{19} + return fileDescriptor_1e8137dcabb0ccc7, []int{21} } func (m *QueryInspectResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -893,7 +970,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{20} + return fileDescriptor_1e8137dcabb0ccc7, []int{22} } func (m *InspectAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -936,7 +1013,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{21} + return fileDescriptor_1e8137dcabb0ccc7, []int{23} } func (m *RiskInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -977,7 +1054,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{22} + return fileDescriptor_1e8137dcabb0ccc7, []int{24} } func (m *DecBalances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1011,6 +1088,8 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "umee.leverage.v1.QueryParamsResponse") proto.RegisterType((*QueryRegisteredTokens)(nil), "umee.leverage.v1.QueryRegisteredTokens") proto.RegisterType((*QueryRegisteredTokensResponse)(nil), "umee.leverage.v1.QueryRegisteredTokensResponse") + proto.RegisterType((*QuerySpecialAssetPairs)(nil), "umee.leverage.v1.QuerySpecialAssetPairs") + proto.RegisterType((*QuerySpecialAssetPairsResponse)(nil), "umee.leverage.v1.QuerySpecialAssetPairsResponse") proto.RegisterType((*QueryMarketSummary)(nil), "umee.leverage.v1.QueryMarketSummary") proto.RegisterType((*QueryMarketSummaryResponse)(nil), "umee.leverage.v1.QueryMarketSummaryResponse") proto.RegisterType((*QueryAccountBalances)(nil), "umee.leverage.v1.QueryAccountBalances") @@ -1035,114 +1114,118 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 1700 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xdf, 0x6f, 0x1b, 0xc5, - 0x16, 0xc7, 0xb3, 0x49, 0x9b, 0x1f, 0xc7, 0x71, 0x92, 0x4e, 0xd3, 0x74, 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8b, 0xeb, 0xd9, 0x75, 0x6a, - 0x4e, 0x24, 0x2a, 0x96, 0xc3, 0x42, 0x53, 0x9c, 0xb1, 0x46, 0x11, 0xc8, 0x82, 0x53, 0x3c, 0x31, - 0xb3, 0x42, 0xbb, 0x1c, 0x6d, 0x04, 0x24, 0xdc, 0xf0, 0x5d, 0x5b, 0x54, 0x27, 0x87, 0x3d, 0xba, - 0xd3, 0x31, 0xd8, 0x7d, 0xc9, 0x32, 0xce, 0xc0, 0x69, 0xb6, 0xbe, 0x6b, 0xb1, 0x4e, 0x1c, 0x54, - 0x49, 0x14, 0x1a, 0xff, 0x85, 0x5c, 0x97, 0x2e, 0xb5, 0xfc, 0x3a, 0x8c, 0x44, 0xfc, 0x11, 0x3b, - 0x8d, 0x63, 0xa6, 0x6c, 0x1a, 0x93, 0x90, 0x66, 0x83, 0x4b, 0xd8, 0x5e, 0x25, 0x95, 0x28, 0x34, - 0x4c, 0x51, 0x4b, 0xcb, 0x07, 0xb1, 0x5a, 0xb8, 0x83, 0x41, 0xf7, 0x7e, 0xa2, 0x14, 0x16, 0x83, - 0x44, 0x31, 0xac, 0x9c, 0x94, 0x60, 0x4a, 0x94, 0xb7, 0xdb, 0x2a, 0xb3, 0x76, 0xdd, 0xcb, 0xed, - 0x1a, 0x79, 0x30, 0x5e, 0x23, 0xff, 0xae, 0x81, 0xbe, 0x17, 0xa2, 0xb4, 0x11, 0x18, 0xe1, 0x17, - 0x4e, 0x78, 0x14, 0xd9, 0x46, 0xb2, 0x91, 0x05, 0xc3, 0x11, 0xf7, 0x72, 0x04, 0x89, 0x46, 0xa0, - 0x8d, 0x37, 0x60, 0x42, 0xce, 0x53, 0xdc, 0x71, 0x87, 0x0d, 0xd5, 0x33, 0x98, 0xe9, 0x24, 0xa8, - 0x38, 0xb5, 0x27, 0xa0, 0x1d, 0xdd, 0x04, 0x3e, 0xd5, 0x60, 0x9c, 0xf9, 0xbf, 0xe5, 0x85, 0x75, - 0x62, 0x45, 0xf4, 0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da, 0xf2, 0x83, 0x4d, 0xce, 0x6b, 0xfe, 0xbb, 0xb8, 0xdd, 0x86, 0xb2, 0x94, - 0x5e, 0x19, 0x66, 0x5f, 0xa4, 0xaf, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x15, 0xc0, 0x9e, 0x39, - 0x58, 0x17, 0x00, 0x00, + // 1772 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcf, 0x6f, 0x1b, 0x5b, + 0x15, 0xc7, 0x33, 0xc9, 0xcb, 0xaf, 0x63, 0x3b, 0x3f, 0x6e, 0xd3, 0x74, 0x3a, 0x4d, 0x6c, 0x77, + 0xda, 0xa4, 0x79, 0x7d, 0xc4, 0x4e, 0xf2, 0x44, 0x25, 0x04, 0x02, 0xe2, 0x06, 0x44, 0x51, 0xde, + 0x53, 0x3a, 0x7d, 0x2d, 0x6a, 0x0b, 0x98, 0xeb, 0x99, 0x8b, 0x33, 0xca, 0x78, 0xc6, 0x9d, 0x3b, + 0x76, 0x62, 0xa4, 0x6e, 0x90, 0xd8, 0x01, 0x02, 0x21, 0x16, 0x2c, 0x40, 0x62, 0xcb, 0x5f, 0x92, + 0x65, 0x25, 0x36, 0x08, 0x89, 0x00, 0x2d, 0x62, 0xd1, 0x0d, 0xff, 0x00, 0x0b, 0x74, 0x7f, 0xcc, + 0xf5, 0x38, 0x63, 0xa7, 0x8e, 0x45, 0x56, 0xf6, 0x9d, 0x7b, 0xce, 0xe7, 0x7c, 0xe7, 0xcc, 0xbd, + 0xe7, 0x9e, 0x19, 0x58, 0x69, 0x35, 0x08, 0x29, 0x7b, 0xa4, 0x4d, 0x42, 0x5c, 0x27, 0xe5, 0xf6, + 0x76, 0xf9, 0x55, 0x8b, 0x84, 0x9d, 0x52, 0x33, 0x0c, 0xa2, 0x00, 0x2d, 0xb0, 0xd9, 0x52, 0x3c, + 0x5b, 0x6a, 0x6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80, 0x81, 0x12, 0x71, 0x87, 0x8b, 0x58, 0x45, 0xb7, 0xd2, 0x22, 0x6a, 0xd8, 0xa9, 0x3a, + 0x3c, 0xdc, 0xcf, 0x34, 0xc8, 0x24, 0x9b, 0x2b, 0x73, 0xe0, 0x92, 0x55, 0x36, 0xc6, 0xfd, 0x0f, + 0xdb, 0x28, 0x11, 0xeb, 0x5c, 0x44, 0x11, 0xe5, 0xfb, 0x2d, 0xea, 0x13, 0xf5, 0xde, 0x8d, 0x5e, + 0xc3, 0x6c, 0xb7, 0x6d, 0x29, 0x0e, 0x0e, 0x20, 0x2c, 0x8c, 0x8d, 0x0f, 0x59, 0x28, 0x01, 0x77, + 0xb9, 0x80, 0x3c, 0x5a, 0xe9, 0x2f, 0x40, 0x14, 0x67, 0x14, 0xc1, 0x74, 0xdc, 0x73, 0xe4, 0x07, + 0xa0, 0xe5, 0xbc, 0xb1, 0x7e, 0xf1, 0xbc, 0x0a, 0x7c, 0x9b, 0x07, 0xbe, 0x85, 0x6e, 0xa6, 0x03, + 0xbb, 0xc2, 0xb4, 0xf2, 0xf9, 0xe9, 0x3f, 0xf3, 0x63, 0xa7, 0x6f, 0xf3, 0xda, 0x9b, 0xb7, 0x79, + 0xed, 0x1f, 0x6f, 0xf3, 0xda, 0xaf, 0xde, 0xe5, 0xc7, 0xde, 0xbc, 0xcb, 0x8f, 0xfd, 0xe5, 0x5d, + 0x7e, 0xec, 0xc5, 0x56, 0xe2, 0x94, 0x61, 0x88, 0x4d, 0x9f, 0x44, 0xc7, 0x41, 0x78, 0x24, 0x78, + 0xed, 0x2f, 0x97, 0x4f, 0xba, 0x50, 0x7e, 0xe6, 0xd4, 0xa6, 0xf8, 0xe7, 0xfa, 0x4f, 0xff, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x18, 0xc4, 0xb0, 0x10, 0x75, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1161,6 +1244,8 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) // RegisteredTokens queries for all the registered tokens. RegisteredTokens(ctx context.Context, in *QueryRegisteredTokens, opts ...grpc.CallOption) (*QueryRegisteredTokensResponse, error) + // SpecialAssetPairs queries for all special asset pairs. + SpecialAssetPairs(ctx context.Context, in *QuerySpecialAssetPairs, opts ...grpc.CallOption) (*QuerySpecialAssetPairsResponse, error) // MarketSummary queries a base asset's current borrowing and supplying conditions. MarketSummary(ctx context.Context, in *QueryMarketSummary, opts ...grpc.CallOption) (*QueryMarketSummaryResponse, error) // AccountBalances queries an account's current supply, collateral, and borrow positions. @@ -1210,6 +1295,15 @@ func (c *queryClient) RegisteredTokens(ctx context.Context, in *QueryRegisteredT return out, nil } +func (c *queryClient) SpecialAssetPairs(ctx context.Context, in *QuerySpecialAssetPairs, opts ...grpc.CallOption) (*QuerySpecialAssetPairsResponse, error) { + out := new(QuerySpecialAssetPairsResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/SpecialAssetPairs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) MarketSummary(ctx context.Context, in *QueryMarketSummary, opts ...grpc.CallOption) (*QueryMarketSummaryResponse, error) { out := new(QueryMarketSummaryResponse) err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/MarketSummary", in, out, opts...) @@ -1288,6 +1382,8 @@ type QueryServer interface { Params(context.Context, *QueryParams) (*QueryParamsResponse, error) // RegisteredTokens queries for all the registered tokens. RegisteredTokens(context.Context, *QueryRegisteredTokens) (*QueryRegisteredTokensResponse, error) + // SpecialAssetPairs queries for all special asset pairs. + SpecialAssetPairs(context.Context, *QuerySpecialAssetPairs) (*QuerySpecialAssetPairsResponse, 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. @@ -1321,6 +1417,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) ( func (*UnimplementedQueryServer) RegisteredTokens(ctx context.Context, req *QueryRegisteredTokens) (*QueryRegisteredTokensResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisteredTokens not implemented") } +func (*UnimplementedQueryServer) SpecialAssetPairs(ctx context.Context, req *QuerySpecialAssetPairs) (*QuerySpecialAssetPairsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpecialAssetPairs not implemented") +} func (*UnimplementedQueryServer) MarketSummary(ctx context.Context, req *QueryMarketSummary) (*QueryMarketSummaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MarketSummary not implemented") } @@ -1386,6 +1485,24 @@ func _Query_RegisteredTokens_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_SpecialAssetPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpecialAssetPairs) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpecialAssetPairs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/SpecialAssetPairs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpecialAssetPairs(ctx, req.(*QuerySpecialAssetPairs)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_MarketSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryMarketSummary) if err := dec(in); err != nil { @@ -1542,6 +1659,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "RegisteredTokens", Handler: _Query_RegisteredTokens_Handler, }, + { + MethodName: "SpecialAssetPairs", + Handler: _Query_SpecialAssetPairs_Handler, + }, { MethodName: "MarketSummary", Handler: _Query_MarketSummary_Handler, @@ -1702,6 +1823,66 @@ func (m *QueryRegisteredTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QuerySpecialAssetPairs) 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 *QuerySpecialAssetPairs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpecialAssetPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySpecialAssetPairsResponse) 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 *QuerySpecialAssetPairsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpecialAssetPairsResponse) 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) @@ -2731,6 +2912,30 @@ func (m *QueryRegisteredTokensResponse) Size() (n int) { return n } +func (m *QuerySpecialAssetPairs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySpecialAssetPairsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryMarketSummary) Size() (n int) { if m == nil { return 0 @@ -3399,6 +3604,140 @@ func (m *QueryRegisteredTokensResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySpecialAssetPairs) 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: QuerySpecialAssetPairs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpecialAssetPairs: 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 *QuerySpecialAssetPairsResponse) 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: QuerySpecialAssetPairsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpecialAssetPairsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", 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.Pairs = append(m.Pairs, SpecialAssetPair{}) + if err := m.Pairs[len(m.Pairs)-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 *QueryMarketSummary) 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 c9ead1b7ce..846d5de4bd 100644 --- a/x/leverage/types/query.pb.gw.go +++ b/x/leverage/types/query.pb.gw.go @@ -87,6 +87,24 @@ func local_request_Query_RegisteredTokens_0(ctx context.Context, marshaler runti } +func request_Query_SpecialAssetPairs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySpecialAssetPairs + var metadata runtime.ServerMetadata + + msg, err := client.SpecialAssetPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SpecialAssetPairs_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySpecialAssetPairs + var metadata runtime.ServerMetadata + + msg, err := server.SpecialAssetPairs(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_MarketSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -391,6 +409,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SpecialAssetPairs_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_SpecialAssetPairs_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_SpecialAssetPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_MarketSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -656,6 +697,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SpecialAssetPairs_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_SpecialAssetPairs_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_SpecialAssetPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_MarketSummary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -824,6 +885,8 @@ var ( pattern_Query_RegisteredTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "registered_tokens"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_SpecialAssetPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "special_asset_pairs"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_MarketSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "market_summary"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AccountBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "account_balances"}, "", runtime.AssumeColonVerbOpt(false))) @@ -846,6 +909,8 @@ var ( forward_Query_RegisteredTokens_0 = runtime.ForwardResponseMessage + forward_Query_SpecialAssetPairs_0 = runtime.ForwardResponseMessage + forward_Query_MarketSummary_0 = runtime.ForwardResponseMessage forward_Query_AccountBalances_0 = runtime.ForwardResponseMessage diff --git a/x/leverage/types/token.go b/x/leverage/types/token.go index 8020ab7f61..556807440f 100644 --- a/x/leverage/types/token.go +++ b/x/leverage/types/token.go @@ -60,21 +60,9 @@ func ToTokenDenom(denom string) string { // Validate performs validation on an Token type returning an error if the Token // is invalid. func (t Token) Validate() error { - if err := sdk.ValidateDenom(t.BaseDenom); err != nil { + if err := validateBaseDenoms(t.BaseDenom, t.SymbolDenom); err != nil { return err } - if HasUTokenPrefix(t.BaseDenom) { - // prevent base asset denoms that start with "u/" - return ErrUToken.Wrap(t.BaseDenom) - } - - if err := sdk.ValidateDenom(t.SymbolDenom); err != nil { - return err - } - if HasUTokenPrefix(t.SymbolDenom) { - // prevent symbol denoms that start with "u/" - return ErrUToken.Wrap(t.SymbolDenom) - } one := sdk.OneDec() @@ -210,3 +198,27 @@ func DefaultRegistry() []Token { defaultUmeeToken(), } } + +// Validate performs validation on an SpecialAssetPair type +func (p SpecialAssetPair) Validate() error { + if err := validateBaseDenoms(p.Collateral, p.Borrow); err != nil { + return err + } + + // Collateral weight is non-negative and less than 1. + if p.CollateralWeight.IsNegative() || p.CollateralWeight.GTE(sdk.OneDec()) { + return fmt.Errorf("invalid collateral rate: %s", p.CollateralWeight) + } + + return nil +} + +// validateBaseDenoms ensures that one or more strings are valid token denoms without the uToken prefix +func validateBaseDenoms(denoms ...string) error { + for _, s := range denoms { + if err := ValidateBaseDenom(s); err != nil { + return err + } + } + return nil +} diff --git a/x/leverage/types/tx.pb.go b/x/leverage/types/tx.pb.go index 2cb9394199..e4da36daf9 100644 --- a/x/leverage/types/tx.pb.go +++ b/x/leverage/types/tx.pb.go @@ -1113,6 +1113,94 @@ var xxx_messageInfo_MsgGovUpdateRegistryResponse proto.InternalMessageInfo func (*MsgGovUpdateRegistryResponse) XXX_MessageName() string { return "umee.leverage.v1.MsgGovUpdateRegistryResponse" } + +// MsgGovUpdateSpecialAssetPairs defines the Msg/GovUpdateSpecialAssetPairs request type. +type MsgGovUpdateSpecialAssetPairs struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // pairs are new or updated special asset pairs. Updating a special asset pair's + // collateral weight to match that of its base asset deletes it indead. + Pairs []SpecialAssetPair `protobuf:"bytes,4,rep,name=pairs,proto3" json:"pairs"` +} + +func (m *MsgGovUpdateSpecialAssetPairs) Reset() { *m = MsgGovUpdateSpecialAssetPairs{} } +func (*MsgGovUpdateSpecialAssetPairs) ProtoMessage() {} +func (*MsgGovUpdateSpecialAssetPairs) Descriptor() ([]byte, []int) { + return fileDescriptor_72683128ee6e8843, []int{24} +} +func (m *MsgGovUpdateSpecialAssetPairs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovUpdateSpecialAssetPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovUpdateSpecialAssetPairs.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 *MsgGovUpdateSpecialAssetPairs) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovUpdateSpecialAssetPairs.Merge(m, src) +} +func (m *MsgGovUpdateSpecialAssetPairs) XXX_Size() int { + return m.Size() +} +func (m *MsgGovUpdateSpecialAssetPairs) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovUpdateSpecialAssetPairs.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovUpdateSpecialAssetPairs proto.InternalMessageInfo + +func (*MsgGovUpdateSpecialAssetPairs) XXX_MessageName() string { + return "umee.leverage.v1.MsgGovUpdateSpecialAssetPairs" +} + +// MsgGovUpdateSpecialAssetPairsResponse defines the Msg/GovUpdateSpecialAssetPairs response type. +type MsgGovUpdateSpecialAssetPairsResponse struct { +} + +func (m *MsgGovUpdateSpecialAssetPairsResponse) Reset() { *m = MsgGovUpdateSpecialAssetPairsResponse{} } +func (m *MsgGovUpdateSpecialAssetPairsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovUpdateSpecialAssetPairsResponse) ProtoMessage() {} +func (*MsgGovUpdateSpecialAssetPairsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_72683128ee6e8843, []int{25} +} +func (m *MsgGovUpdateSpecialAssetPairsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovUpdateSpecialAssetPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovUpdateSpecialAssetPairsResponse.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 *MsgGovUpdateSpecialAssetPairsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovUpdateSpecialAssetPairsResponse.Merge(m, src) +} +func (m *MsgGovUpdateSpecialAssetPairsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovUpdateSpecialAssetPairsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovUpdateSpecialAssetPairsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovUpdateSpecialAssetPairsResponse proto.InternalMessageInfo + +func (*MsgGovUpdateSpecialAssetPairsResponse) XXX_MessageName() string { + return "umee.leverage.v1.MsgGovUpdateSpecialAssetPairsResponse" +} func init() { proto.RegisterType((*MsgSupply)(nil), "umee.leverage.v1.MsgSupply") proto.RegisterType((*MsgWithdraw)(nil), "umee.leverage.v1.MsgWithdraw") @@ -1138,78 +1226,84 @@ func init() { proto.RegisterType((*MsgSupplyCollateralResponse)(nil), "umee.leverage.v1.MsgSupplyCollateralResponse") proto.RegisterType((*MsgGovUpdateRegistry)(nil), "umee.leverage.v1.MsgGovUpdateRegistry") proto.RegisterType((*MsgGovUpdateRegistryResponse)(nil), "umee.leverage.v1.MsgGovUpdateRegistryResponse") + proto.RegisterType((*MsgGovUpdateSpecialAssetPairs)(nil), "umee.leverage.v1.MsgGovUpdateSpecialAssetPairs") + proto.RegisterType((*MsgGovUpdateSpecialAssetPairsResponse)(nil), "umee.leverage.v1.MsgGovUpdateSpecialAssetPairsResponse") } func init() { proto.RegisterFile("umee/leverage/v1/tx.proto", fileDescriptor_72683128ee6e8843) } var fileDescriptor_72683128ee6e8843 = []byte{ - // 1044 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x8f, 0xdb, 0xc4, - 0x17, 0x8f, 0xb3, 0x3f, 0x94, 0xbc, 0x6c, 0xfb, 0xdd, 0xba, 0xfb, 0xa5, 0x59, 0xb7, 0x75, 0x82, - 0xa1, 0xb0, 0xaa, 0x58, 0x9b, 0x5d, 0x28, 0x20, 0xa0, 0x02, 0xd2, 0x4a, 0x95, 0x0a, 0x91, 0xaa, - 0x2c, 0x08, 0x81, 0x04, 0x8b, 0x13, 0x0f, 0x8e, 0xb5, 0x89, 0x27, 0x78, 0x26, 0xc9, 0x86, 0x23, - 0x27, 0x8e, 0x20, 0x71, 0xe0, 0xb8, 0x07, 0x8e, 0x1c, 0x38, 0xf0, 0x47, 0x2c, 0x82, 0x43, 0xc5, - 0x89, 0x13, 0x82, 0xdd, 0x03, 0xfc, 0x19, 0xc8, 0x33, 0xe3, 0xb1, 0x13, 0x7b, 0xb3, 0x2e, 0x25, - 0xb7, 0xcc, 0xbc, 0xcf, 0xfb, 0xbc, 0xcf, 0x7b, 0x93, 0xf7, 0xf2, 0x02, 0x9b, 0xc3, 0x3e, 0x42, - 0x56, 0x0f, 0x8d, 0x50, 0x60, 0xbb, 0xc8, 0x1a, 0xed, 0x58, 0xf4, 0xd0, 0x1c, 0x04, 0x98, 0x62, - 0x75, 0x3d, 0x34, 0x99, 0x91, 0xc9, 0x1c, 0xed, 0x68, 0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f6, 0xb0, 0xec, 0x07, 0xe4, 0xc6, 0x33, 0x1e, 0x70, 0x66, 0x5a, 0xef, 0x41, 0x39, 0x5e, - 0xeb, 0xf4, 0xb3, 0x4a, 0x29, 0x18, 0x9f, 0x99, 0x6f, 0x4f, 0x74, 0xfe, 0x8a, 0xd8, 0xf4, 0x32, - 0x1d, 0x98, 0x4d, 0x33, 0xce, 0xb6, 0x25, 0xd5, 0x25, 0x56, 0xba, 0x4c, 0x07, 0x69, 0x3f, 0x43, - 0x5d, 0x7a, 0x50, 0xfa, 0xa0, 0x66, 0x2c, 0x5e, 0xcf, 0x66, 0x7b, 0xa7, 0x80, 0x9a, 0x95, 0x13, - 0x28, 0xe3, 0x75, 0x61, 0x3d, 0xb5, 0x1b, 0xdd, 0x98, 0xd3, 0x5c, 0x31, 0x4c, 0xdb, 0xce, 0x05, - 0x93, 0x91, 0x0e, 0xe0, 0x52, 0x7a, 0x48, 0x66, 0x97, 0x25, 0x85, 0xd3, 0xcc, 0x7c, 0xb8, 0x28, - 0x58, 0xa3, 0x75, 0xfc, 0xa7, 0x5e, 0x38, 0x3e, 0xd1, 0x95, 0x87, 0x27, 0xba, 0xf2, 0xc7, 0x89, - 0xae, 0x7c, 0x75, 0xaa, 0x17, 0x8e, 0x4f, 0x75, 0xe5, 0xe1, 0xa9, 0x5e, 0xf8, 0xed, 0x54, 0x2f, - 0x7c, 0xf8, 0xbc, 0xeb, 0xd1, 0xee, 0xb0, 0x6d, 0x76, 0x70, 0xdf, 0x0a, 0xb9, 0xb7, 0x7d, 0x44, - 0xc7, 0x38, 0x38, 0x60, 0x07, 0x6b, 0x74, 0xcb, 0x3a, 0x8c, 0xff, 0xa9, 0xd2, 0xc9, 0x00, 0x91, - 0xf6, 0x2a, 0xfb, 0x93, 0xfa, 0xc2, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0xf4, 0x11, 0x45, - 0x5e, 0x0f, 0x00, 0x00, + // 1112 bytes of a gzipped FileDescriptorProto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, + 0xe8, 0xc8, 0x43, 0xa4, 0xb5, 0xc8, 0xfe, 0x44, 0x78, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x9b, 0x3c, 0x6f, 0x20, 0xfe, 0x10, 0x00, 0x00, } func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool { @@ -1258,6 +1352,44 @@ func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool { } return true } +func (this *MsgGovUpdateSpecialAssetPairs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovUpdateSpecialAssetPairs) + if !ok { + that2, ok := that.(MsgGovUpdateSpecialAssetPairs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.Pairs) != len(that1.Pairs) { + return false + } + for i := range this.Pairs { + if !this.Pairs[i].Equal(&that1.Pairs[i]) { + return false + } + } + return true +} // Reference imports to suppress errors if they are not otherwise used. var _ context.Context @@ -1312,6 +1444,10 @@ type MsgClient interface { // GovUpdateRegistry adds new tokens to the token registry or // updates existing tokens with new settings. GovUpdateRegistry(ctx context.Context, in *MsgGovUpdateRegistry, opts ...grpc.CallOption) (*MsgGovUpdateRegistryResponse, error) + // GovUpdateSpecialAssetPairs adds, updates, or removes special asset pairs. Note that a special asset + // pair can be removed by setting its special collateral weight to the collateral weight of the base + // asset. + GovUpdateSpecialAssetPairs(ctx context.Context, in *MsgGovUpdateSpecialAssetPairs, opts ...grpc.CallOption) (*MsgGovUpdateSpecialAssetPairsResponse, error) } type msgClient struct { @@ -1430,6 +1566,15 @@ func (c *msgClient) GovUpdateRegistry(ctx context.Context, in *MsgGovUpdateRegis return out, nil } +func (c *msgClient) GovUpdateSpecialAssetPairs(ctx context.Context, in *MsgGovUpdateSpecialAssetPairs, opts ...grpc.CallOption) (*MsgGovUpdateSpecialAssetPairsResponse, error) { + out := new(MsgGovUpdateSpecialAssetPairsResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Msg/GovUpdateSpecialAssetPairs", 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. @@ -1473,6 +1618,10 @@ type MsgServer interface { // GovUpdateRegistry adds new tokens to the token registry or // updates existing tokens with new settings. GovUpdateRegistry(context.Context, *MsgGovUpdateRegistry) (*MsgGovUpdateRegistryResponse, error) + // GovUpdateSpecialAssetPairs adds, updates, or removes special asset pairs. Note that a special asset + // pair can be removed by setting its special collateral weight to the collateral weight of the base + // asset. + GovUpdateSpecialAssetPairs(context.Context, *MsgGovUpdateSpecialAssetPairs) (*MsgGovUpdateSpecialAssetPairsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1515,6 +1664,9 @@ func (*UnimplementedMsgServer) SupplyCollateral(ctx context.Context, req *MsgSup func (*UnimplementedMsgServer) GovUpdateRegistry(ctx context.Context, req *MsgGovUpdateRegistry) (*MsgGovUpdateRegistryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GovUpdateRegistry not implemented") } +func (*UnimplementedMsgServer) GovUpdateSpecialAssetPairs(ctx context.Context, req *MsgGovUpdateSpecialAssetPairs) (*MsgGovUpdateSpecialAssetPairsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovUpdateSpecialAssetPairs not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1736,6 +1888,24 @@ func _Msg_GovUpdateRegistry_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_GovUpdateSpecialAssetPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovUpdateSpecialAssetPairs) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovUpdateSpecialAssetPairs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Msg/GovUpdateSpecialAssetPairs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovUpdateSpecialAssetPairs(ctx, req.(*MsgGovUpdateSpecialAssetPairs)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.leverage.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1788,6 +1958,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "GovUpdateRegistry", Handler: _Msg_GovUpdateRegistry_Handler, }, + { + MethodName: "GovUpdateSpecialAssetPairs", + Handler: _Msg_GovUpdateSpecialAssetPairs_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/leverage/v1/tx.proto", @@ -2720,6 +2894,87 @@ func (m *MsgGovUpdateRegistryResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *MsgGovUpdateSpecialAssetPairs) 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 *MsgGovUpdateSpecialAssetPairs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovUpdateSpecialAssetPairs) 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 = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovUpdateSpecialAssetPairsResponse) 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 *MsgGovUpdateSpecialAssetPairsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovUpdateSpecialAssetPairsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -3083,6 +3338,42 @@ func (m *MsgGovUpdateRegistryResponse) Size() (n int) { return n } +func (m *MsgGovUpdateSpecialAssetPairs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgGovUpdateSpecialAssetPairsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5689,6 +5980,236 @@ func (m *MsgGovUpdateRegistryResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgGovUpdateSpecialAssetPairs) 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: MsgGovUpdateSpecialAssetPairs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovUpdateSpecialAssetPairs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", 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.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", 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 + } + m.Pairs = append(m.Pairs, SpecialAssetPair{}) + if err := m.Pairs[len(m.Pairs)-1].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 *MsgGovUpdateSpecialAssetPairsResponse) 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: MsgGovUpdateSpecialAssetPairsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovUpdateSpecialAssetPairsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0