diff --git a/proto/reserve/vaults/tx.proto b/proto/reserve/vaults/tx.proto index 10c2b99..091195a 100644 --- a/proto/reserve/vaults/tx.proto +++ b/proto/reserve/vaults/tx.proto @@ -71,54 +71,56 @@ message MsgActiveCollateral { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "authority"; - string denom = 1; + string collateral_denom = 1; + string collateral_symbol = 2; - string min_collateral_ratio = 2 [ + string min_collateral_ratio = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string liquidation_ratio = 3 [ + string liquidation_ratio = 4 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string max_debt = 4 [ + string max_debt = 5 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string stability_fee = 5 [ + string stability_fee = 6 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string liquidation_penalty = 6 [ + string liquidation_penalty = 7 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string minting_fee = 7 [ + string minting_fee = 8 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - uint64 oracl_script = 8; + uint64 oracl_script = 9; + + string authority = 10 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - string authority = 9 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - string sym_bol = 10; string mint_denom = 11; + string mint_symbol = 12; } // MsgActiveCollateralResponse defines the Msg/ActiveCollateral response type. @@ -130,55 +132,56 @@ message MsgUpdatesCollateral { option (gogoproto.goproto_getters) = false; option (cosmos.msg.v1.signer) = "authority"; - string denom = 1; + string collateral_denom = 1; + string collateral_sym_bol = 2; - string min_collateral_ratio = 2 [ + string min_collateral_ratio = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string liquidation_ratio = 3 [ + string liquidation_ratio = 4 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string max_debt = 4 [ + string max_debt = 5 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string stability_fee = 5 [ + string stability_fee = 6 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string liquidation_penalty = 6 [ + string liquidation_penalty = 7 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - string minting_fee = 7 [ + string minting_fee = 8 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (amino.dont_omitempty) = true, (gogoproto.nullable) = false ]; - uint64 oracl_script = 8; + uint64 oracl_script = 9; - string authority = 9 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - string sym_bol = 10; - string mint_denom = 11; + string authority = 10 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string sym_bol = 11; + string mint_denom = 12; } // MsgActiveCollateralResponse defines the Msg/ActiveCollateral response type. diff --git a/script/proposal-vault-1.json b/script/proposal-vault-1.json index 321517a..71e6df4 100644 --- a/script/proposal-vault-1.json +++ b/script/proposal-vault-1.json @@ -1,26 +1,28 @@ { "messages": [{ "@type": "/reserve.vaults.MsgActiveCollateral", - "denom": "usdt", + "collateral_denom": "usdt", + "collateral_symbol":"usdt", "authority":"onomy10d07y265gmmuvt4z0w9aw880jnsr700jqr8n8k", "min_collateral_ratio": "0.5", "liquidation_ratio":"0.5", "max_debt":"1000000000000000000000000000", - "sym_bol": "usdt", "oracl_script": "44", "mint_denom": "nomUSD", + "mint_symbol":"USD", "stability_fee": "0.1" }, { "@type": "/reserve.vaults.MsgActiveCollateral", - "denom": "atom", + "collateral_denom": "atom", + "collateral_symbol":"ATOM", "authority":"onomy10d07y265gmmuvt4z0w9aw880jnsr700jqr8n8k", "min_collateral_ratio": "0.5", "liquidation_ratio":"0.5", "max_debt":"1000000000000000000000000000", - "sym_bol": "atom", "oracl_script": "44", "mint_denom": "nomUSD", + "mint_symbol":"USD", "stability_fee": "0.1" }], "deposit": "100000000stake", diff --git a/script/vaults-gov-test.sh b/script/vaults-gov-test.sh index 42999d8..90ee735 100755 --- a/script/vaults-gov-test.sh +++ b/script/vaults-gov-test.sh @@ -146,4 +146,3 @@ reserved tx vaults create-vault 1250000000atom 50000000nomUSD --home=$HOME/.rese # 02420E85EC300BE3E9219C5D8330207451F0D33764 # liquidationMap map[] # nextId 0 -# 10:26AM ERR panic recovered in runTx err="recovered: module account reserve does not exist: unknown address [cosmos/cosmos-sdk@v0.50.6/x/bank/keeper/keeper.go:286]\nstack:\ngoroutine 438 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:26 +0x64\ngithub.com/cosmos/cosmos-sdk/baseapp.NewBaseApp.newDefaultRecoveryMiddleware.func5({0x106011480, 0x140023cc840})\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/recovery.go:74 +0x24\ngithub.com/cosmos/cosmos-sdk/baseapp.NewBaseApp.newDefaultRecoveryMiddleware.newRecoveryMiddleware.func7({0x106011480?, 0x140023cc840?})\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/recovery.go:42 +0x38\ngithub.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x106011480, 0x140023cc840}, 0x14003c493d8?)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/recovery.go:31 +0x38\ngithub.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x106011480, 0x140023cc840}, 0x8?)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/recovery.go:36 +0x60\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1()\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/baseapp.go:837 +0xd4\npanic({0x106011480?, 0x140023cc840?})\n\t/usr/local/go/src/runtime/panic.go:785 +0x124\ngithub.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper.SendCoinsFromModuleToModule({{{{0x106376aa0, 0x14000d05160}, {0x1063259e0, 0x14001588318}, {0x10637e670, 0x14000355400}, {0x106364930, 0x1400208e620}, {0x140015946a8, {...}, ...}, ...}, ...}, ...}, ...)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/x/bank/keeper/keeper.go:286 +0x15c\ngithub.com/onomyprotocol/reserve/x/vaults/keeper.(*Keeper).CreateNewVault(0x14003c4aab8, {0x10635c228, 0x14006ab5080}, {0x140023664b0, 0x14, 0x15}, {{0x140019fcb80?, 0x1063259c0?}, {0x14001b59520?}}, {{0x140019fcbc0?, ...}, ...})\n\t/Users/donglieu/102024/main/reserve/x/vaults/keeper/vault.go:68 +0x3dc\ngithub.com/onomyprotocol/reserve/x/vaults/keeper.msgServer.CreateVault({{{0x106376aa0, 0x14000d05160}, {0x1063259e0, 0x140015883a0}, {0x1519327e8, 0x14000595688}, {0x10633ca60, 0x140015fd040}, {0x106336280, 0x14000be1c78}, ...}}, ...)\n\t/Users/donglieu/102024/main/reserve/x/vaults/keeper/msg_server.go:67 +0x74\ngithub.com/onomyprotocol/reserve/x/vaults/types._Msg_CreateVault_Handler.func1({0x10635c228?, 0x14006ab5080?}, {0x1061a5b00?, 0x14006296080?})\n\t/Users/donglieu/102024/main/reserve/x/vaults/types/tx.pb.go:1102 +0xd0\ngithub.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).registerMsgServiceHandler.func2.1({0x10635c0d8, 0x14003c68008}, {0x14003c4b098?, 0x103f592f0?}, 0x358?, 0x140011a5bc0)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/msg_service_router.go:175 +0x98\ngithub.com/onomyprotocol/reserve/x/vaults/types._Msg_CreateVault_Handler({0x1062c7640, 0x140012ca008}, {0x10635c0d8, 0x14003c68008}, 0x1063132e8, 0x14001b59580)\n\t/Users/donglieu/102024/main/reserve/x/vaults/types/tx.pb.go:1104 +0x148\ngithub.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).registerMsgServiceHandler.func2({{0x10635c0a0, 0x107e7b100}, {0x106377360, 0x14006296100}, {{0x0, 0x0}, {0x14001c322a0, 0x9}, 0x67, {0x60f9708, ...}, ...}, ...}, ...)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/msg_service_router.go:198 +0x2b0\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs(_, {{0x10635c0a0, 0x107e7b100}, {0x106377360, 0x14006296100}, {{0x0, 0x0}, {0x14001c322a0, 0x9}, 0x67, ...}, ...}, ...)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/baseapp.go:1010 +0x170\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0x140023fc248, 0x7, {0x140014f4140, 0x123, 0x123})\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/baseapp.go:948 +0xbf8\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).deliverTx(0x140023fc248, {0x140014f4140?, 0x123?, 0x14001a01540?})\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/baseapp.go:763 +0x88\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).internalFinalizeBlock(0x140023fc248, {0x10635c0a0, 0x107e7b100}, 0x14003c33b00)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/abci.go:790 +0xc2c\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).FinalizeBlock(0x140023fc248, 0x14003c33b00)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/baseapp/abci.go:884 +0x118\ngithub.com/cosmos/cosmos-sdk/server.cometABCIWrapper.FinalizeBlock(...)\n\t/Users/donglieu/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.6/server/cmt_abci.go:44\ngithub.com/cometbft/cometbft/abci/client.(*localClient).FinalizeBlock(0x14001688c20?, {0x10635c308?, 0x107e7b100?}, 0x10a8b0a68?)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/abci/client/local_client.go:185 +0xe4\ngithub.com/cometbft/cometbft/proxy.(*appConnConsensus).FinalizeBlock(0x14001a040c0, {0x10635c308, 0x107e7b100}, 0x14003c33b00)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/proxy/app_conn.go:104 +0x124\ngithub.com/cometbft/cometbft/state.(*BlockExecutor).applyBlock(_, {{{0xb, 0x0}, {0x14000a14069, 0x7}}, {0x14000a14080, 0x9}, 0x1, 0x66, {{0x140061a1b20, ...}, ...}, ...}, ...)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/state/execution.go:224 +0x410\ngithub.com/cometbft/cometbft/state.(*BlockExecutor).ApplyVerifiedBlock(...)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/state/execution.go:202\ngithub.com/cometbft/cometbft/consensus.(*State).finalizeCommit(0x1400248b508, 0x67)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:1772 +0x97c\ngithub.com/cometbft/cometbft/consensus.(*State).tryFinalizeCommit(0x1400248b508, 0x67)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:1682 +0x26c\ngithub.com/cometbft/cometbft/consensus.(*State).enterCommit.func1()\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:1617 +0x8c\ngithub.com/cometbft/cometbft/consensus.(*State).enterCommit(0x1400248b508, 0x67, 0x0)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:1655 +0xac0\ngithub.com/cometbft/cometbft/consensus.(*State).addVote(0x1400248b508, 0x14001334750, {0x14001004090, 0x28})\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:2335 +0x182c\ngithub.com/cometbft/cometbft/consensus.(*State).tryAddVote(0x1400248b508, 0x14001334750, {0x14001004090?, 0x103dd81c4?})\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:2067 +0x28\ngithub.com/cometbft/cometbft/consensus.(*State).handleMsg(0x1400248b508, {{0x10632e320, 0x14000e82200}, {0x14001004090, 0x28}})\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:929 +0x2fc\ngithub.com/cometbft/cometbft/consensus.(*State).receiveRoutine(0x1400248b508, 0x0)\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:836 +0x2b8\ncreated by github.com/cometbft/cometbft/consensus.(*State).OnStart in goroutine 372\n\t/Users/donglieu/go/pkg/mod/github.com/cometbft/cometbft@v0.38.12/consensus/state.go:398 +0xf0\n: panic" module=server \ No newline at end of file diff --git a/x/vaults/keeper/abci_test.go b/x/vaults/keeper/abci_test.go index 82dfefc..a036200 100644 --- a/x/vaults/keeper/abci_test.go +++ b/x/vaults/keeper/abci_test.go @@ -31,7 +31,7 @@ func (s *KeeperTestSuite) TestBeginBlock() { name: "success: one vault", setup: func() { // 100000000000atom debt 210000000nomUSD(get 200000000nomUSD + 10000000nomUSD MintingFee) err := s.k.ActiveCollateralAsset(s.Ctx, - denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("1.6"), + denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("1.6"), math.LegacyMustNewDecFromStr("1.5"), maxDebt, stabilityFee, types.DefaultMintingFee, @@ -62,7 +62,7 @@ func (s *KeeperTestSuite) TestBeginBlock() { name: "success: no vault, LastUpdateTime updates", setup: func() { // 100000000000atom debt 210000000nomUSD(get 200000000nomUSD + 10000000nomUSD MintingFee) err := s.k.ActiveCollateralAsset(s.Ctx, - denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("1.6"), + denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("1.6"), math.LegacyMustNewDecFromStr("1.5"), maxDebt, stabilityFee, types.DefaultMintingFee, diff --git a/x/vaults/keeper/keeper.go b/x/vaults/keeper/keeper.go index 412a7dd..ad3e06f 100644 --- a/x/vaults/keeper/keeper.go +++ b/x/vaults/keeper/keeper.go @@ -75,9 +75,10 @@ func (k Keeper) GetAuthority() string { func (k *Keeper) ActiveCollateralAsset( ctx context.Context, - denom string, - symbol string, - mintDenom string, + CollateralDenom string, + CollateralSymbol string, + MintDenom string, + MintSymbol string, minCollateralRatio math.LegacyDec, liquidationRatio math.LegacyDec, maxDebt math.Int, @@ -87,16 +88,16 @@ func (k *Keeper) ActiveCollateralAsset( oracleScript int64, ) error { // Check if asset alreay be actived - actived := k.IsActived(ctx, denom) + actived := k.IsActived(ctx, CollateralDenom) if actived { - return fmt.Errorf("denom %s already be actived", denom) + return fmt.Errorf("denom %s already be actived", CollateralDenom) } vm := types.VaultMamager{ - Denom: denom, - Symbol: symbol, + Denom: CollateralDenom, + Symbol: CollateralSymbol, Params: types.VaultMamagerParams{ - MintDenom: mintDenom, - MintSymbol: symbol, + MintDenom: MintDenom, + MintSymbol: MintSymbol, MinCollateralRatio: minCollateralRatio, LiquidationRatio: liquidationRatio, MaxDebt: maxDebt, @@ -106,12 +107,12 @@ func (k *Keeper) ActiveCollateralAsset( }, MintAvailable: maxDebt, } - err := k.OracleKeeper.AddNewSymbolToBandOracleRequest(ctx, denom, oracleScript) + err := k.OracleKeeper.AddNewSymbolToBandOracleRequest(ctx, CollateralSymbol, oracleScript) if err != nil { return err } - return k.VaultsManager.Set(ctx, denom, vm) + return k.VaultsManager.Set(ctx, CollateralDenom, vm) } func (k *Keeper) UpdatesCollateralAsset( diff --git a/x/vaults/keeper/keeper_test.go b/x/vaults/keeper/keeper_test.go index 99336fb..86f0601 100644 --- a/x/vaults/keeper/keeper_test.go +++ b/x/vaults/keeper/keeper_test.go @@ -26,6 +26,7 @@ func (s *KeeperTestSuite) SetupTest() { mockOK := mock.NewMockOracleKeeper() mockOK.SetPrice("atom", math.LegacyMustNewDecFromStr("8.0")) mockOK.SetPrice(types.DefaultMintDenoms[0], math.LegacyMustNewDecFromStr("1")) + mockOK.SetPrice("USD", math.LegacyMustNewDecFromStr("1")) s.App.VaultsKeeper.OracleKeeper = mockOK s.k = s.App.VaultsKeeper s.msgServer = keeper.NewMsgServerImpl(s.k) diff --git a/x/vaults/keeper/msg_server.go b/x/vaults/keeper/msg_server.go index 99cc260..c48dca3 100644 --- a/x/vaults/keeper/msg_server.go +++ b/x/vaults/keeper/msg_server.go @@ -45,7 +45,7 @@ func (k msgServer) ActiveCollateral(ctx context.Context, msg *types.MsgActiveCol return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) } - err = k.ActiveCollateralAsset(ctx, msg.Denom, msg.SymBol, msg.MintDenom, msg.MinCollateralRatio, msg.LiquidationRatio, msg.MaxDebt, msg.StabilityFee, msg.MintingFee, msg.LiquidationPenalty, int64(msg.OraclScript)) + err = k.ActiveCollateralAsset(ctx, msg.CollateralDenom, msg.CollateralSymbol, msg.MintDenom, msg.MintSymbol, msg.MinCollateralRatio, msg.LiquidationRatio, msg.MaxDebt, msg.StabilityFee, msg.MintingFee, msg.LiquidationPenalty, int64(msg.OraclScript)) if err != nil { return nil, err } @@ -64,7 +64,7 @@ func (k msgServer) UpdatesCollateral(ctx context.Context, msg *types.MsgUpdatesC return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) } - err = k.UpdatesCollateralAsset(ctx, msg.Denom, msg.MinCollateralRatio, msg.LiquidationRatio, msg.MaxDebt, msg.StabilityFee, msg.MintingFee, msg.LiquidationPenalty) + err = k.UpdatesCollateralAsset(ctx, msg.CollateralDenom, msg.MinCollateralRatio, msg.LiquidationRatio, msg.MaxDebt, msg.StabilityFee, msg.MintingFee, msg.LiquidationPenalty) if err != nil { return nil, err } diff --git a/x/vaults/keeper/vault.go b/x/vaults/keeper/vault.go index 3ba8966..a14f6c8 100644 --- a/x/vaults/keeper/vault.go +++ b/x/vaults/keeper/vault.go @@ -28,7 +28,7 @@ func (k *Keeper) CreateNewVault( return fmt.Errorf("%s was not actived", denom) } collateralSymbol := vm.Symbol - mintDenom := vm.Params.MintDenom + mintSymbol := vm.Params.MintSymbol allowedMintDenoms := k.GetAllowedMintDenoms(ctx) // TODO: Check if mint denom is allowed @@ -45,8 +45,7 @@ func (k *Keeper) CreateNewVault( } // Calculate collateral ratio - price := k.OracleKeeper.GetPrice(ctx, collateralSymbol, mintDenom) - fmt.Println(price, collateralSymbol, mintDenom) + price := k.OracleKeeper.GetPrice(ctx, collateralSymbol, mintSymbol) if price == nil || price.IsNil() { return errors.Wrapf(oracletypes.ErrInvalidOracle, "CreateNewVault: can not get price with base %s quote %s", denom, types.DefaultMintDenoms) } diff --git a/x/vaults/keeper/vaults_test.go b/x/vaults/keeper/vaults_test.go index 01a3484..23ed394 100644 --- a/x/vaults/keeper/vaults_test.go +++ b/x/vaults/keeper/vaults_test.go @@ -33,7 +33,7 @@ func (s *KeeperTestSuite) TestCreateNewVault() { collateral = sdk.NewCoin(denom, math.NewInt(10_000_000)) // 10 atom = 80$ maxDebt = math.NewInt(100_000_000) ) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("1.6"), math.LegacyMustNewDecFromStr("1.5"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("1.6"), math.LegacyMustNewDecFromStr("1.5"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) tests := []struct { @@ -166,7 +166,7 @@ func (s *KeeperTestSuite) TestRepayDebt() { maxDebt = math.NewInt(2000000000) mintedCoin = sdk.NewCoin(types.DefaultMintDenoms[0], math.NewInt(300000000)) ) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) tests := []struct { @@ -284,7 +284,7 @@ func (s *KeeperTestSuite) TestDepositToVault() { maxDebt = math.NewInt(2000000000) mintedCoin = sdk.NewCoin(types.DefaultMintDenoms[0], math.NewInt(200000000)) ) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) tests := []struct { @@ -407,7 +407,7 @@ func (s *KeeperTestSuite) TestWithdrawFromVault() { setup: func() { s.FundAccount(s.TestAccs[0], types.ModuleName, sdk.NewCoins(fund)) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) err = s.k.CreateNewVault(s.Ctx, s.TestAccs[0], coinMintToAcc, mintedCoin) @@ -443,7 +443,7 @@ func (s *KeeperTestSuite) TestWithdrawFromVault() { setup: func() { s.FundAccount(s.TestAccs[0], types.ModuleName, sdk.NewCoins(fund)) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) err = s.k.CreateNewVault(s.Ctx, s.TestAccs[0], coinMintToAcc, mintedCoin) @@ -460,7 +460,7 @@ func (s *KeeperTestSuite) TestWithdrawFromVault() { setup: func() { s.FundAccount(s.TestAccs[0], types.ModuleName, sdk.NewCoins(fund)) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) err = s.k.CreateNewVault(s.Ctx, s.TestAccs[0], coinMintToAcc, mintedCoin) @@ -477,7 +477,7 @@ func (s *KeeperTestSuite) TestWithdrawFromVault() { setup: func() { s.FundAccount(s.TestAccs[0], types.ModuleName, sdk.NewCoins(fund)) - err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, denom, denom, "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), maxDebt, types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) err = s.k.CreateNewVault(s.Ctx, s.TestAccs[0], coinMintToAcc, mintedCoin) @@ -709,7 +709,7 @@ func (s *KeeperTestSuite) TestLiquidate() { for _, t := range tests { s.Run(t.name, func() { s.SetupTest() - err := s.k.ActiveCollateralAsset(s.Ctx, "atom", "atom", "nomUSD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), math.NewInt(1000_000_000), types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) + err := s.k.ActiveCollateralAsset(s.Ctx, "atom", "atom", "nomUSD", "USD", math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.1"), math.NewInt(1000_000_000), types.DefaultStabilityFee, types.DefaultMintingFee, types.DefaultLiquidationPenalty, 1) s.Require().NoError(err) for _, vault := range t.liquidation.LiquidatingVaults { diff --git a/x/vaults/types/msgs.go b/x/vaults/types/msgs.go index 1d84379..b30614d 100644 --- a/x/vaults/types/msgs.go +++ b/x/vaults/types/msgs.go @@ -118,11 +118,11 @@ func (msg *MsgClose) ValidateBasic() error { } func (msg *MsgActiveCollateral) ValidateBasic() error { - if msg.Denom == "" { + if msg.CollateralDenom == "" { return fmt.Errorf("denom is empty") } - if msg.SymBol == "" { + if msg.CollateralSymbol == "" { return fmt.Errorf("symbol is empty") } @@ -130,6 +130,10 @@ func (msg *MsgActiveCollateral) ValidateBasic() error { return fmt.Errorf("mintDenom is empty") } + if msg.MintSymbol == "" { + return fmt.Errorf("mintSymbol is empty") + } + if msg.Authority == "" { return fmt.Errorf("authority is empty") } @@ -165,7 +169,7 @@ func (msg *MsgActiveCollateral) ValidateBasic() error { } func (msg *MsgUpdatesCollateral) ValidateBasic() error { - if msg.Denom == "" { + if msg.CollateralDenom == "" { return fmt.Errorf("denom is empty") } @@ -216,7 +220,7 @@ var _ govtypes.Content = &UpdatesCollateralProposal{} func NewMsgActiveCollateral(a *ActiveCollateralProposal) *MsgActiveCollateral { return &MsgActiveCollateral{ - Denom: a.ActiveCollateral.Denom, + CollateralDenom: a.ActiveCollateral.CollateralDenom, MinCollateralRatio: a.ActiveCollateral.MinCollateralRatio, LiquidationRatio: a.ActiveCollateral.LiquidationRatio, MaxDebt: a.ActiveCollateral.MaxDebt, @@ -225,14 +229,14 @@ func NewMsgActiveCollateral(a *ActiveCollateralProposal) *MsgActiveCollateral { MintingFee: a.ActiveCollateral.MintingFee, OraclScript: a.ActiveCollateral.OraclScript, Authority: a.ActiveCollateral.Authority, - SymBol: a.ActiveCollateral.SymBol, + CollateralSymbol: a.ActiveCollateral.CollateralSymbol, MintDenom: a.ActiveCollateral.MintDenom, } } func NewMsgUpdatesCollateral(u *UpdatesCollateralProposal) *MsgUpdatesCollateral { return &MsgUpdatesCollateral{ - Denom: u.UpdatesCollateral.Denom, + CollateralDenom: u.UpdatesCollateral.CollateralDenom, MinCollateralRatio: u.UpdatesCollateral.MinCollateralRatio, LiquidationRatio: u.UpdatesCollateral.LiquidationRatio, MaxDebt: u.UpdatesCollateral.MaxDebt, diff --git a/x/vaults/types/tx.pb.go b/x/vaults/types/tx.pb.go index c075494..8ce4ce5 100644 --- a/x/vaults/types/tx.pb.go +++ b/x/vaults/types/tx.pb.go @@ -130,17 +130,18 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgCreateValidator defines a SDK message for creating a new validator. type MsgActiveCollateral struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - MinCollateralRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_collateral_ratio,json=minCollateralRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_collateral_ratio"` - LiquidationRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=liquidation_ratio,json=liquidationRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_ratio"` - MaxDebt cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=max_debt,json=maxDebt,proto3,customtype=cosmossdk.io/math.Int" json:"max_debt"` - StabilityFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=stability_fee,json=stabilityFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stability_fee"` - LiquidationPenalty cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=liquidation_penalty,json=liquidationPenalty,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_penalty"` - MintingFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=minting_fee,json=mintingFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minting_fee"` - OraclScript uint64 `protobuf:"varint,8,opt,name=oracl_script,json=oraclScript,proto3" json:"oracl_script,omitempty"` - Authority string `protobuf:"bytes,9,opt,name=authority,proto3" json:"authority,omitempty"` - SymBol string `protobuf:"bytes,10,opt,name=sym_bol,json=symBol,proto3" json:"sym_bol,omitempty"` + CollateralDenom string `protobuf:"bytes,1,opt,name=collateral_denom,json=collateralDenom,proto3" json:"collateral_denom,omitempty"` + CollateralSymbol string `protobuf:"bytes,2,opt,name=collateral_symbol,json=collateralSymbol,proto3" json:"collateral_symbol,omitempty"` + MinCollateralRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=min_collateral_ratio,json=minCollateralRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_collateral_ratio"` + LiquidationRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=liquidation_ratio,json=liquidationRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_ratio"` + MaxDebt cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=max_debt,json=maxDebt,proto3,customtype=cosmossdk.io/math.Int" json:"max_debt"` + StabilityFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=stability_fee,json=stabilityFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stability_fee"` + LiquidationPenalty cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=liquidation_penalty,json=liquidationPenalty,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_penalty"` + MintingFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=minting_fee,json=mintingFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minting_fee"` + OraclScript uint64 `protobuf:"varint,9,opt,name=oracl_script,json=oraclScript,proto3" json:"oracl_script,omitempty"` + Authority string `protobuf:"bytes,10,opt,name=authority,proto3" json:"authority,omitempty"` MintDenom string `protobuf:"bytes,11,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` + MintSymbol string `protobuf:"bytes,12,opt,name=mint_symbol,json=mintSymbol,proto3" json:"mint_symbol,omitempty"` } func (m *MsgActiveCollateral) Reset() { *m = MsgActiveCollateral{} } @@ -215,17 +216,18 @@ var xxx_messageInfo_MsgActiveCollateralResponse proto.InternalMessageInfo // MsgCreateValidator defines a SDK message for creating a new validator. type MsgUpdatesCollateral struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - MinCollateralRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_collateral_ratio,json=minCollateralRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_collateral_ratio"` - LiquidationRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=liquidation_ratio,json=liquidationRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_ratio"` - MaxDebt cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=max_debt,json=maxDebt,proto3,customtype=cosmossdk.io/math.Int" json:"max_debt"` - StabilityFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=stability_fee,json=stabilityFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stability_fee"` - LiquidationPenalty cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=liquidation_penalty,json=liquidationPenalty,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_penalty"` - MintingFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=minting_fee,json=mintingFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minting_fee"` - OraclScript uint64 `protobuf:"varint,8,opt,name=oracl_script,json=oraclScript,proto3" json:"oracl_script,omitempty"` - Authority string `protobuf:"bytes,9,opt,name=authority,proto3" json:"authority,omitempty"` - SymBol string `protobuf:"bytes,10,opt,name=sym_bol,json=symBol,proto3" json:"sym_bol,omitempty"` - MintDenom string `protobuf:"bytes,11,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` + CollateralDenom string `protobuf:"bytes,1,opt,name=collateral_denom,json=collateralDenom,proto3" json:"collateral_denom,omitempty"` + CollateralSymBol string `protobuf:"bytes,2,opt,name=collateral_sym_bol,json=collateralSymBol,proto3" json:"collateral_sym_bol,omitempty"` + MinCollateralRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=min_collateral_ratio,json=minCollateralRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_collateral_ratio"` + LiquidationRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=liquidation_ratio,json=liquidationRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_ratio"` + MaxDebt cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=max_debt,json=maxDebt,proto3,customtype=cosmossdk.io/math.Int" json:"max_debt"` + StabilityFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=stability_fee,json=stabilityFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stability_fee"` + LiquidationPenalty cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=liquidation_penalty,json=liquidationPenalty,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidation_penalty"` + MintingFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=minting_fee,json=mintingFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minting_fee"` + OraclScript uint64 `protobuf:"varint,9,opt,name=oracl_script,json=oraclScript,proto3" json:"oracl_script,omitempty"` + Authority string `protobuf:"bytes,10,opt,name=authority,proto3" json:"authority,omitempty"` + SymBol string `protobuf:"bytes,11,opt,name=sym_bol,json=symBol,proto3" json:"sym_bol,omitempty"` + MintDenom string `protobuf:"bytes,12,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` } func (m *MsgUpdatesCollateral) Reset() { *m = MsgUpdatesCollateral{} } @@ -785,74 +787,77 @@ func init() { func init() { proto.RegisterFile("reserve/vaults/tx.proto", fileDescriptor_bbce2367024dc47b) } var fileDescriptor_bbce2367024dc47b = []byte{ - // 1057 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xd2, 0xd8, 0x8e, 0x9f, 0x43, 0x49, 0x26, 0x6e, 0xe2, 0x6c, 0xa8, 0x1d, 0x5c, 0x04, - 0x51, 0xa0, 0xbb, 0x4d, 0x2b, 0x55, 0x22, 0xe2, 0x40, 0x13, 0x0b, 0x29, 0xa2, 0x96, 0x2a, 0x57, - 0xa5, 0x08, 0x0e, 0xd6, 0x78, 0x77, 0xd8, 0x8c, 0xd8, 0xdd, 0x31, 0x3b, 0x93, 0x34, 0xbe, 0x21, - 0x4e, 0x88, 0x13, 0xf0, 0x0b, 0x7a, 0x04, 0x04, 0x52, 0x0e, 0xbd, 0xf0, 0x0f, 0x7a, 0xac, 0x7a, - 0xaa, 0x38, 0x54, 0x28, 0x39, 0x84, 0x2b, 0xff, 0x00, 0xed, 0xcc, 0x78, 0xbd, 0x76, 0x36, 0x69, - 0x50, 0x38, 0xe4, 0x90, 0x4b, 0x92, 0x99, 0xef, 0xbd, 0xef, 0x7d, 0xdf, 0x64, 0xde, 0xcc, 0x2c, - 0xcc, 0x47, 0x84, 0x93, 0x68, 0x87, 0xd8, 0x3b, 0x78, 0xdb, 0x17, 0xdc, 0x16, 0xbb, 0x56, 0x2f, - 0x62, 0x82, 0xa1, 0xcb, 0x1a, 0xb0, 0x14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x80, 0x5b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x17, 0x54, 0xb3, 0xcc, 0x0f, 0x00, - 0x00, + // 1110 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xc1, 0x6f, 0x1b, 0xc5, + 0x17, 0xf6, 0xfe, 0x9a, 0xd8, 0xf1, 0x73, 0x7e, 0x6d, 0x32, 0x49, 0x13, 0x67, 0x43, 0xed, 0xe0, + 0x22, 0x08, 0x69, 0xbb, 0xdb, 0xb4, 0x52, 0x25, 0x22, 0x0e, 0x34, 0xb1, 0x90, 0x22, 0x6a, 0xa9, + 0x72, 0x54, 0x8a, 0xe0, 0x60, 0x8d, 0x77, 0x87, 0xcd, 0x88, 0xdd, 0x1d, 0xb3, 0x33, 0x49, 0xe3, + 0x1b, 0xe2, 0x84, 0x38, 0xf1, 0x27, 0xf4, 0x08, 0x08, 0xa4, 0x1c, 0x7a, 0xe1, 0x3f, 0xe8, 0xb1, + 0xaa, 0x84, 0x54, 0x81, 0x54, 0xa1, 0xe4, 0x10, 0xae, 0xfc, 0x07, 0x68, 0x67, 0xc6, 0xeb, 0xb5, + 0xb3, 0x4e, 0x03, 0xe1, 0x90, 0x43, 0x2f, 0x89, 0x67, 0xbe, 0xf7, 0xbe, 0xf7, 0xbe, 0xf1, 0x7c, + 0xb3, 0xb3, 0x86, 0xf9, 0x88, 0x70, 0x12, 0xed, 0x12, 0x7b, 0x17, 0xef, 0xf8, 0x82, 0xdb, 0x62, + 0xcf, 0xea, 0x44, 0x4c, 0x30, 0x74, 0x51, 0x03, 0x96, 0x02, 0xcc, 0x59, 0x8f, 0x79, 0x4c, 0x42, + 0x76, 0xfc, 0x49, 0x45, 0x99, 0x8b, 0x43, 0xe9, 0x1d, 0x1c, 0xe1, 0x80, 0x6b, 0x70, 0x1a, 0x07, + 0x34, 0x64, 0xb6, 0xfc, 0xab, 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0x42, 0x16, 0x74, 0xe5, 0x3b, 0xb7, 0xc3, 0x7c, 0xbb, 0xff, 0x6e, 0xdb, 0xfb, 0xe9, + 0xa0, 0xdb, 0x21, 0xbc, 0x9d, 0x97, 0x01, 0xb7, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xef, 0xce, + 0xc8, 0xb1, 0x59, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1328,6 +1333,13 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MintSymbol) > 0 { + i -= len(m.MintSymbol) + copy(dAtA[i:], m.MintSymbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.MintSymbol))) + i-- + dAtA[i] = 0x62 + } if len(m.MintDenom) > 0 { i -= len(m.MintDenom) copy(dAtA[i:], m.MintDenom) @@ -1335,24 +1347,17 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x5a } - if len(m.SymBol) > 0 { - i -= len(m.SymBol) - copy(dAtA[i:], m.SymBol) - i = encodeVarintTx(dAtA, i, uint64(len(m.SymBol))) - i-- - dAtA[i] = 0x52 - } 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] = 0x4a + dAtA[i] = 0x52 } if m.OraclScript != 0 { i = encodeVarintTx(dAtA, i, uint64(m.OraclScript)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } { size := m.MintingFee.Size() @@ -1363,7 +1368,7 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 { size := m.LiquidationPenalty.Size() i -= size @@ -1373,7 +1378,7 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a { size := m.StabilityFee.Size() i -= size @@ -1383,7 +1388,7 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 { size := m.MaxDebt.Size() i -= size @@ -1393,7 +1398,7 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a { size := m.LiquidationRatio.Size() i -= size @@ -1403,7 +1408,7 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 { size := m.MinCollateralRatio.Size() i -= size @@ -1413,11 +1418,18 @@ func (m *MsgActiveCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + dAtA[i] = 0x1a + if len(m.CollateralSymbol) > 0 { + i -= len(m.CollateralSymbol) + copy(dAtA[i:], m.CollateralSymbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.CollateralSymbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.CollateralDenom) > 0 { + i -= len(m.CollateralDenom) + copy(dAtA[i:], m.CollateralDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.CollateralDenom))) i-- dAtA[i] = 0xa } @@ -1472,26 +1484,26 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.MintDenom) i = encodeVarintTx(dAtA, i, uint64(len(m.MintDenom))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 } if len(m.SymBol) > 0 { i -= len(m.SymBol) copy(dAtA[i:], m.SymBol) i = encodeVarintTx(dAtA, i, uint64(len(m.SymBol))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } 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] = 0x4a + dAtA[i] = 0x52 } if m.OraclScript != 0 { i = encodeVarintTx(dAtA, i, uint64(m.OraclScript)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } { size := m.MintingFee.Size() @@ -1502,7 +1514,7 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 { size := m.LiquidationPenalty.Size() i -= size @@ -1512,7 +1524,7 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a { size := m.StabilityFee.Size() i -= size @@ -1522,7 +1534,7 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 { size := m.MaxDebt.Size() i -= size @@ -1532,7 +1544,7 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a { size := m.LiquidationRatio.Size() i -= size @@ -1542,7 +1554,7 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 { size := m.MinCollateralRatio.Size() i -= size @@ -1552,11 +1564,18 @@ func (m *MsgUpdatesCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + dAtA[i] = 0x1a + if len(m.CollateralSymBol) > 0 { + i -= len(m.CollateralSymBol) + copy(dAtA[i:], m.CollateralSymBol) + i = encodeVarintTx(dAtA, i, uint64(len(m.CollateralSymBol))) + i-- + dAtA[i] = 0x12 + } + if len(m.CollateralDenom) > 0 { + i -= len(m.CollateralDenom) + copy(dAtA[i:], m.CollateralDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.CollateralDenom))) i-- dAtA[i] = 0xa } @@ -2030,7 +2049,11 @@ func (m *MsgActiveCollateral) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.CollateralDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CollateralSymbol) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2053,11 +2076,11 @@ func (m *MsgActiveCollateral) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.SymBol) + l = len(m.MintDenom) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.MintDenom) + l = len(m.MintSymbol) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2079,7 +2102,11 @@ func (m *MsgUpdatesCollateral) Size() (n int) { } var l int _ = l - l = len(m.Denom) + l = len(m.CollateralDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CollateralSymBol) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2483,7 +2510,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CollateralDenom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2511,9 +2538,41 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.CollateralDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralSymbol", 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.CollateralSymbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MinCollateralRatio", wireType) } @@ -2547,7 +2606,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LiquidationRatio", wireType) } @@ -2581,7 +2640,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MaxDebt", wireType) } @@ -2615,7 +2674,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StabilityFee", wireType) } @@ -2649,7 +2708,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LiquidationPenalty", wireType) } @@ -2683,7 +2742,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MintingFee", wireType) } @@ -2717,7 +2776,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OraclScript", wireType) } @@ -2736,7 +2795,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { break } } - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } @@ -2768,9 +2827,9 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { } m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SymBol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MintDenom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2798,11 +2857,11 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SymBol = string(dAtA[iNdEx:postIndex]) + m.MintDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MintDenom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MintSymbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2830,7 +2889,7 @@ func (m *MsgActiveCollateral) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MintDenom = string(dAtA[iNdEx:postIndex]) + m.MintSymbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2934,7 +2993,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CollateralDenom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2962,9 +3021,41 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.CollateralDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollateralSymBol", 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.CollateralSymBol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MinCollateralRatio", wireType) } @@ -2998,7 +3089,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LiquidationRatio", wireType) } @@ -3032,7 +3123,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MaxDebt", wireType) } @@ -3066,7 +3157,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StabilityFee", wireType) } @@ -3100,7 +3191,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LiquidationPenalty", wireType) } @@ -3134,7 +3225,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MintingFee", wireType) } @@ -3168,7 +3259,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OraclScript", wireType) } @@ -3187,7 +3278,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { break } } - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } @@ -3219,7 +3310,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { } m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SymBol", wireType) } @@ -3251,7 +3342,7 @@ func (m *MsgUpdatesCollateral) Unmarshal(dAtA []byte) error { } m.SymBol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MintDenom", wireType) }