From 018de33843f4d308b42a6dcc0e13f07962202181 Mon Sep 17 00:00:00 2001 From: Chandragupta Singh Date: Mon, 6 Feb 2023 21:54:56 +0530 Subject: [PATCH] stability fees tx cmd added --- proto/comdex/vault/v1beta1/tx.proto | 7 + x/vault/client/cli/tx.go | 27 ++ x/vault/expected/keeper.go | 3 + x/vault/handler.go | 3 + x/vault/keeper/msg_server.go | 56 ++++ x/vault/types/codec.go | 2 + x/vault/types/keys.go | 23 +- x/vault/types/msg.go | 42 +++ x/vault/types/tx.pb.go | 436 ++++++++++++++++++++++++---- x/vault/types/vault.pb.go | 2 +- 10 files changed, 532 insertions(+), 69 deletions(-) diff --git a/proto/comdex/vault/v1beta1/tx.proto b/proto/comdex/vault/v1beta1/tx.proto index c9cdca40f..4aab8af47 100644 --- a/proto/comdex/vault/v1beta1/tx.proto +++ b/proto/comdex/vault/v1beta1/tx.proto @@ -189,6 +189,12 @@ message MsgVaultInterestCalcRequest { } message MsgVaultInterestCalcResponse{} +// need to remove later +message MsgCorrectStabilityFeesRequest { + string from = 1 [ (gogoproto.moretags) = "yaml:\"from\"" ]; +} + +message MsgCorrectStabilityFeesResponse{} service Msg { rpc MsgCreate(MsgCreateRequest) returns (MsgCreateResponse); @@ -202,4 +208,5 @@ service Msg { rpc MsgDepositStableMint(MsgDepositStableMintRequest) returns (MsgDepositStableMintResponse); rpc MsgWithdrawStableMint(MsgWithdrawStableMintRequest) returns (MsgWithdrawStableMintResponse); rpc MsgVaultInterestCalc(MsgVaultInterestCalcRequest) returns (MsgVaultInterestCalcResponse); + rpc MsgCorrectStabilityFees(MsgCorrectStabilityFeesRequest) returns (MsgCorrectStabilityFeesResponse); // need to remove later } diff --git a/x/vault/client/cli/tx.go b/x/vault/client/cli/tx.go index f71f0c89a..51d8bb55b 100644 --- a/x/vault/client/cli/tx.go +++ b/x/vault/client/cli/tx.go @@ -36,6 +36,7 @@ func GetTxCmd() *cobra.Command { DepositStableMint(), WithdrawStableMint(), CalculateInterest(), + CorrectStabilityFees(), ) return cmd @@ -500,3 +501,29 @@ func CalculateInterest() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } + +// need to remove later +func CorrectStabilityFees() *cobra.Command { + cmd := &cobra.Command{ + Use: "correct-fees", + Short: "correct stability fees", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgCorrectStabilityFeesRequest(ctx.FromAddress) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(ctx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} \ No newline at end of file diff --git a/x/vault/expected/keeper.go b/x/vault/expected/keeper.go index b0ba1b0d8..29e12cd6a 100644 --- a/x/vault/expected/keeper.go +++ b/x/vault/expected/keeper.go @@ -3,6 +3,7 @@ package expected import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/comdex-official/comdex/app/wasm/bindings" assettypes "github.com/comdex-official/comdex/x/asset/types" esmtypes "github.com/comdex-official/comdex/x/esm/types" rewardstypes "github.com/comdex-official/comdex/x/rewards/types" @@ -26,6 +27,8 @@ type AssetKeeper interface { GetPair(ctx sdk.Context, id uint64) (assettypes.Pair, bool) GetApp(ctx sdk.Context, id uint64) (assettypes.AppData, bool) GetPairsVault(ctx sdk.Context, pairID uint64) (assettypes.ExtendedPairVault, bool) + SetPairsVault(ctx sdk.Context, app assettypes.ExtendedPairVault) + WasmUpdatePairsVault(ctx sdk.Context, updatePairVault *bindings.MsgUpdatePairsVault) error } type MarketKeeper interface { diff --git a/x/vault/handler.go b/x/vault/handler.go index 9838f7164..19eb20f3d 100644 --- a/x/vault/handler.go +++ b/x/vault/handler.go @@ -48,6 +48,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgVaultInterestCalcRequest: res, err := server.MsgVaultInterestCalc(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgCorrectStabilityFeesRequest: // need to remove later + res, err := server.MsgCorrectStabilityFees(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) default: return nil, errors.Wrapf(types.ErrorUnknownMsgType, "%T", msg) } diff --git a/x/vault/keeper/msg_server.go b/x/vault/keeper/msg_server.go index bdefa6d30..775927a38 100644 --- a/x/vault/keeper/msg_server.go +++ b/x/vault/keeper/msg_server.go @@ -2,10 +2,12 @@ package keeper import ( "context" + "fmt" "strconv" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/comdex-official/comdex/app/wasm/bindings" collectortypes "github.com/comdex-official/comdex/x/collector/types" esmtypes "github.com/comdex-official/comdex/x/esm/types" rewardstypes "github.com/comdex-official/comdex/x/rewards/types" @@ -1451,3 +1453,57 @@ func (k msgServer) MsgVaultInterestCalc(c context.Context, msg *types.MsgVaultIn return &types.MsgVaultInterestCalcResponse{}, nil } + +// need to remove later +func (k msgServer) MsgCorrectStabilityFees(c context.Context, msg *types.MsgCorrectStabilityFeesRequest) (*types.MsgCorrectStabilityFeesResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + if msg.From == "comdex1ma05aft9x20xjx2jd4spms03rcuewk5r0elvx7" { + extPairs := []*bindings.MsgUpdatePairsVault{ + { + AppID: 2, ExtPairID: 2, StabilityFee: sdk.MustNewDecFromStr("0.01"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(250000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("1.4"), + MinUsdValueLeft: 100000, + }, + { + AppID: 2, ExtPairID: 3, StabilityFee: sdk.MustNewDecFromStr("0.005"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(350000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("1.7"), + MinUsdValueLeft: 100000, + }, + { + AppID: 2, ExtPairID: 4, StabilityFee: sdk.MustNewDecFromStr("0.0025"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(400000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("2"), + MinUsdValueLeft: 100000, + }, + { + AppID: 2, ExtPairID: 5, StabilityFee: sdk.MustNewDecFromStr("0.01"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(250000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("1.5"), + MinUsdValueLeft: 100000, + }, + { + AppID: 2, ExtPairID: 6, StabilityFee: sdk.MustNewDecFromStr("0.005"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(350000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("1.8"), + MinUsdValueLeft: 100000, + }, + { + AppID: 2, ExtPairID: 7, StabilityFee: sdk.MustNewDecFromStr("0.0025"), ClosingFee: sdk.ZeroDec(), LiquidationPenalty: sdk.MustNewDecFromStr("0.15"), + DrawDownFee: sdk.MustNewDecFromStr("0.005"), IsVaultActive: true, DebtCeiling: sdk.NewInt(400000000000), DebtFloor: sdk.NewInt(50000000), MinCr: sdk.MustNewDecFromStr("2.1"), + MinUsdValueLeft: 100000, + }, + } + for _, extPair := range extPairs { + err := k.asset.WasmUpdatePairsVault(ctx, extPair) + if err != nil { + fmt.Println("err in updating extended pair ", extPair.ExtPairID) + } + } + stAtomPair, found := k.asset.GetPairsVault(ctx, 11) + if found { + stAtomPair.PairId = 9 + k.asset.SetPairsVault(ctx, stAtomPair) + } + } else { + return &types.MsgCorrectStabilityFeesResponse{}, types.ErrorInvalidFrom + } + + return &types.MsgCorrectStabilityFeesResponse{}, nil +} diff --git a/x/vault/types/codec.go b/x/vault/types/codec.go index 2375c26cb..52a907a24 100644 --- a/x/vault/types/codec.go +++ b/x/vault/types/codec.go @@ -21,6 +21,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgDepositStableMintRequest{}, "comdex/vault/MsgDepositStableMintRequest", nil) cdc.RegisterConcrete(&MsgWithdrawStableMintRequest{}, "comdex/vault/MsgWithdrawStableMintRequest", nil) cdc.RegisterConcrete(&MsgVaultInterestCalcRequest{}, "comdex/vault/MsgVaultInterestCalcRequest", nil) + cdc.RegisterConcrete(&MsgCorrectStabilityFeesRequest{}, "comdex/vault/MsgCorrectStabilityFeesRequest", nil) // need to remove later } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -37,6 +38,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgDepositStableMintRequest{}, &MsgWithdrawStableMintRequest{}, &MsgVaultInterestCalcRequest{}, + &MsgCorrectStabilityFeesRequest{}, // need to remove later ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/vault/types/keys.go b/x/vault/types/keys.go index ffd88ae7e..f82e1fed6 100644 --- a/x/vault/types/keys.go +++ b/x/vault/types/keys.go @@ -12,17 +12,18 @@ const ( ) var ( - TypeMsgCreateRequest = ModuleName + ":create" - TypeMsgDepositRequest = ModuleName + ":deposit" - TypeMsgWithdrawRequest = ModuleName + ":withdraw" - TypeMsgDrawRequest = ModuleName + ":draw" - TypeMsgRepayRequest = ModuleName + ":repay" - TypeMsgLiquidateRequest = ModuleName + ":liquidate" - TypeMsgDepositDrawRequest = ModuleName + ":deposit_draw" - TypeMsgCreateStableMintRequest = ModuleName + ":create_stablemint" - TypeMsgDepositStableMintRequest = ModuleName + ":deposit_stablemint" - TypeMsgWithdrawStableMintRequest = ModuleName + ":withdraw_stablemint" - TypeMsgVaultInterestCalcRequest = ModuleName + ":calculate_interest" + TypeMsgCreateRequest = ModuleName + ":create" + TypeMsgDepositRequest = ModuleName + ":deposit" + TypeMsgWithdrawRequest = ModuleName + ":withdraw" + TypeMsgDrawRequest = ModuleName + ":draw" + TypeMsgRepayRequest = ModuleName + ":repay" + TypeMsgLiquidateRequest = ModuleName + ":liquidate" + TypeMsgDepositDrawRequest = ModuleName + ":deposit_draw" + TypeMsgCreateStableMintRequest = ModuleName + ":create_stablemint" + TypeMsgDepositStableMintRequest = ModuleName + ":deposit_stablemint" + TypeMsgWithdrawStableMintRequest = ModuleName + ":withdraw_stablemint" + TypeMsgVaultInterestCalcRequest = ModuleName + ":calculate_interest" + TypeMsgCorrectStabilityFeesRequest = ModuleName + ":correct-fees" // need to remove later ) var ( diff --git a/x/vault/types/msg.go b/x/vault/types/msg.go index 8709aa9c4..32ff1d0e7 100644 --- a/x/vault/types/msg.go +++ b/x/vault/types/msg.go @@ -16,6 +16,7 @@ var ( _ sdk.Msg = (*MsgDepositStableMintRequest)(nil) _ sdk.Msg = (*MsgWithdrawStableMintRequest)(nil) _ sdk.Msg = (*MsgVaultInterestCalcRequest)(nil) + _ sdk.Msg = (*MsgCorrectStabilityFeesRequest)(nil) ) func NewMsgCreateRequest( @@ -616,3 +617,44 @@ func (m *MsgVaultInterestCalcRequest) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{from} } + +// need to remove later +func NewMsgCorrectStabilityFeesRequest( + from sdk.AccAddress, +) *MsgCorrectStabilityFeesRequest { + return &MsgCorrectStabilityFeesRequest{ + From: from.String(), + } +} + +func (m *MsgCorrectStabilityFeesRequest) Route() string { + return RouterKey +} + +func (m *MsgCorrectStabilityFeesRequest) Type() string { + return TypeMsgCorrectStabilityFeesRequest +} + +func (m *MsgCorrectStabilityFeesRequest) ValidateBasic() error { + if m.From == "" { + return errors.Wrap(ErrorInvalidFrom, "from cannot be empty") + } + if _, err := sdk.AccAddressFromBech32(m.From); err != nil { + return errors.Wrapf(ErrorInvalidFrom, "%s", err) + } + + return nil +} + +func (m *MsgCorrectStabilityFeesRequest) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m)) +} + +func (m *MsgCorrectStabilityFeesRequest) GetSigners() []sdk.AccAddress { + from, err := sdk.AccAddressFromBech32(m.From) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{from} +} diff --git a/x/vault/types/tx.pb.go b/x/vault/types/tx.pb.go index 846478ccc..cb5f1112c 100644 --- a/x/vault/types/tx.pb.go +++ b/x/vault/types/tx.pb.go @@ -872,6 +872,80 @@ func (m *MsgVaultInterestCalcResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVaultInterestCalcResponse proto.InternalMessageInfo +// need to remove later +type MsgCorrectStabilityFeesRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" yaml:"from"` +} + +func (m *MsgCorrectStabilityFeesRequest) Reset() { *m = MsgCorrectStabilityFeesRequest{} } +func (m *MsgCorrectStabilityFeesRequest) String() string { return proto.CompactTextString(m) } +func (*MsgCorrectStabilityFeesRequest) ProtoMessage() {} +func (*MsgCorrectStabilityFeesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4b7a3c3b9b1a607e, []int{22} +} +func (m *MsgCorrectStabilityFeesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCorrectStabilityFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCorrectStabilityFeesRequest.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 *MsgCorrectStabilityFeesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCorrectStabilityFeesRequest.Merge(m, src) +} +func (m *MsgCorrectStabilityFeesRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgCorrectStabilityFeesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCorrectStabilityFeesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCorrectStabilityFeesRequest proto.InternalMessageInfo + +type MsgCorrectStabilityFeesResponse struct { +} + +func (m *MsgCorrectStabilityFeesResponse) Reset() { *m = MsgCorrectStabilityFeesResponse{} } +func (m *MsgCorrectStabilityFeesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCorrectStabilityFeesResponse) ProtoMessage() {} +func (*MsgCorrectStabilityFeesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4b7a3c3b9b1a607e, []int{23} +} +func (m *MsgCorrectStabilityFeesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCorrectStabilityFeesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCorrectStabilityFeesResponse.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 *MsgCorrectStabilityFeesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCorrectStabilityFeesResponse.Merge(m, src) +} +func (m *MsgCorrectStabilityFeesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCorrectStabilityFeesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCorrectStabilityFeesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCorrectStabilityFeesResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreateRequest)(nil), "comdex.vault.v1beta1.MsgCreateRequest") proto.RegisterType((*MsgCreateResponse)(nil), "comdex.vault.v1beta1.MsgCreateResponse") @@ -895,68 +969,73 @@ func init() { proto.RegisterType((*MsgWithdrawStableMintResponse)(nil), "comdex.vault.v1beta1.MsgWithdrawStableMintResponse") proto.RegisterType((*MsgVaultInterestCalcRequest)(nil), "comdex.vault.v1beta1.MsgVaultInterestCalcRequest") proto.RegisterType((*MsgVaultInterestCalcResponse)(nil), "comdex.vault.v1beta1.MsgVaultInterestCalcResponse") + proto.RegisterType((*MsgCorrectStabilityFeesRequest)(nil), "comdex.vault.v1beta1.MsgCorrectStabilityFeesRequest") + proto.RegisterType((*MsgCorrectStabilityFeesResponse)(nil), "comdex.vault.v1beta1.MsgCorrectStabilityFeesResponse") } func init() { proto.RegisterFile("comdex/vault/v1beta1/tx.proto", fileDescriptor_4b7a3c3b9b1a607e) } var fileDescriptor_4b7a3c3b9b1a607e = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x98, 0xcf, 0x6e, 0xe2, 0x46, - 0x18, 0xc0, 0xb1, 0x43, 0xd2, 0x30, 0x11, 0x4d, 0x98, 0x90, 0x88, 0x3a, 0xc5, 0x4e, 0xdd, 0x36, - 0xa5, 0x87, 0xd8, 0x25, 0xb9, 0x55, 0x95, 0xaa, 0x40, 0x2f, 0x1c, 0xa2, 0xb6, 0xae, 0x94, 0xa8, - 0x55, 0x25, 0x64, 0xf0, 0x84, 0x58, 0x05, 0x8f, 0x8b, 0xc7, 0x69, 0x52, 0xa9, 0x52, 0x1f, 0xa1, - 0x0f, 0xd0, 0x07, 0x68, 0xf7, 0x49, 0x72, 0xda, 0xcd, 0xee, 0x29, 0xda, 0x83, 0xb5, 0x21, 0x6f, - 0xc0, 0x61, 0x8f, 0xab, 0x15, 0xe3, 0x21, 0xd8, 0x60, 0x70, 0xd0, 0x92, 0x43, 0xb4, 0x9c, 0x80, - 0x6f, 0xbe, 0x7f, 0xfe, 0x7d, 0xe3, 0x6f, 0xbe, 0x01, 0xe4, 0xeb, 0xb8, 0x65,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, 0x02, 0x30, 0xd8, 0xd8, 0x70, 0xbc, 0x59, 0xf8, 0x02, 0x27, 0x14, 0xe2, 0x15, 0x59, 0x80, - 0x1a, 0x58, 0x09, 0x14, 0x0d, 0x8e, 0x37, 0x1c, 0xba, 0xb8, 0x08, 0x5f, 0xde, 0x43, 0x93, 0xc5, - 0x38, 0x02, 0x1f, 0xb0, 0xe9, 0x11, 0x7e, 0x36, 0x3e, 0xb1, 0x80, 0xef, 0xcf, 0x63, 0xb4, 0x98, - 0xdf, 0x9f, 0xc1, 0x72, 0x7f, 0x60, 0x82, 0xe3, 0x4d, 0x82, 0x13, 0xaa, 0xb0, 0x13, 0xa7, 0x16, - 0x72, 0x4d, 0xc7, 0x8f, 0x09, 0xae, 0x83, 0x63, 0xd9, 0x04, 0xd7, 0xa1, 0x29, 0x06, 0x92, 0xe0, - 0x8d, 0x9b, 0x1d, 0xb5, 0x50, 0x89, 0x2b, 0x58, 0x78, 0xda, 0x11, 0xd4, 0x7b, 0xeb, 0xb3, 0xa8, - 0x7f, 0xd2, 0x9b, 0xd2, 0xf0, 0x21, 0x05, 0xbf, 0x8a, 0xd9, 0x88, 0x23, 0x9d, 0x52, 0x28, 0x4e, - 0x61, 0xc1, 0x62, 0xff, 0x05, 0xb2, 0x51, 0xdd, 0x19, 0x16, 0xe3, 0x1e, 0x62, 0x34, 0xfa, 0xde, - 0x34, 0x26, 0x2c, 0xfc, 0xdf, 0x1c, 0xd8, 0x88, 0x6c, 0x4c, 0x70, 0x2f, 0x76, 0x0f, 0x8f, 0x66, - 0xb0, 0x3f, 0x95, 0x4d, 0x88, 0xc0, 0x48, 0x33, 0x99, 0x40, 0x60, 0x5c, 0x93, 0x9c, 0x40, 0x60, - 0x6c, 0xaf, 0x2a, 0xfd, 0x78, 0x79, 0x23, 0x26, 0xfe, 0xeb, 0x88, 0x89, 0xcb, 0x8e, 0xc8, 0x5d, - 0x75, 0x44, 0xee, 0x55, 0x47, 0xe4, 0xfe, 0xb9, 0x15, 0x13, 0x57, 0xb7, 0x62, 0xe2, 0xfa, 0x56, - 0x4c, 0xfc, 0xa2, 0x86, 0x0e, 0x90, 0x9e, 0xff, 0x5d, 0x7c, 0x72, 0x62, 0xd6, 0x4d, 0xbd, 0xc9, - 0x7e, 0xab, 0xfd, 0x7f, 0x01, 0xe9, 0x69, 0x52, 0x5b, 0xa2, 0xff, 0xea, 0xed, 0xbf, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0x50, 0x76, 0xdc, 0x27, 0x22, 0x14, 0x00, 0x00, + // 943 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x98, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xc0, 0x63, 0x37, 0x2d, 0xdb, 0x57, 0x95, 0x6e, 0xa7, 0xd9, 0x25, 0x78, 0xa9, 0xbd, 0x6b, + 0xa0, 0x94, 0xc3, 0xda, 0xb4, 0x0b, 0x17, 0x84, 0x84, 0x36, 0x05, 0xa4, 0x1c, 0x2a, 0xc0, 0x48, + 0x5d, 0x81, 0x90, 0x22, 0x27, 0x9e, 0x66, 0x2d, 0x12, 0x8f, 0xb1, 0xc7, 0x4b, 0x83, 0x84, 0xc4, + 0x89, 0x33, 0x1f, 0x80, 0x0f, 0x80, 0x38, 0xf2, 0x29, 0x7a, 0x82, 0x85, 0xd3, 0x8a, 0x83, 0xc5, + 0xa6, 0xdf, 0x20, 0x07, 0x8e, 0x08, 0x79, 0x3c, 0x69, 0xec, 0xc4, 0x8e, 0xd7, 0x22, 0x7b, 0x58, + 0x6d, 0x4e, 0x49, 0xde, 0xbc, 0x7f, 0xfe, 0xbd, 0xf1, 0x9b, 0x37, 0x81, 0xdd, 0x0e, 0xe9, 0x5b, + 0xf8, 0x4c, 0x7f, 0x60, 0x06, 0x3d, 0xaa, 0x3f, 0x38, 0x68, 0x63, 0x6a, 0x1e, 0xe8, 0xf4, 0x4c, + 0x73, 0x3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f0, 0x52, 0x4e, 0x3f, 0x43, 0x6f, 0xe7, 0xd7, 0x33, 0xbf, 0x8b, 0x4a, + 0xef, 0x94, 0xb4, 0x8a, 0x13, 0x69, 0x7c, 0x7a, 0xfe, 0x58, 0xae, 0xfc, 0x3c, 0x94, 0x2b, 0xe7, + 0x43, 0x59, 0x78, 0x38, 0x94, 0x85, 0xbf, 0x87, 0xb2, 0xf0, 0xe3, 0x85, 0x5c, 0x79, 0x78, 0x21, + 0x57, 0x1e, 0x5d, 0xc8, 0x95, 0x2f, 0xf4, 0xd4, 0x99, 0x19, 0x85, 0xb8, 0x4d, 0x4e, 0x4f, 0xed, + 0x8e, 0x6d, 0xf6, 0xf8, 0x6f, 0x7d, 0xfc, 0xc7, 0x27, 0x3b, 0x40, 0xdb, 0x6b, 0xec, 0x8f, 0xcc, + 0x3b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x2e, 0xc8, 0x4c, 0x15, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -982,6 +1061,7 @@ type MsgClient interface { MsgDepositStableMint(ctx context.Context, in *MsgDepositStableMintRequest, opts ...grpc.CallOption) (*MsgDepositStableMintResponse, error) MsgWithdrawStableMint(ctx context.Context, in *MsgWithdrawStableMintRequest, opts ...grpc.CallOption) (*MsgWithdrawStableMintResponse, error) MsgVaultInterestCalc(ctx context.Context, in *MsgVaultInterestCalcRequest, opts ...grpc.CallOption) (*MsgVaultInterestCalcResponse, error) + MsgCorrectStabilityFees(ctx context.Context, in *MsgCorrectStabilityFeesRequest, opts ...grpc.CallOption) (*MsgCorrectStabilityFeesResponse, error) } type msgClient struct { @@ -1091,6 +1171,15 @@ func (c *msgClient) MsgVaultInterestCalc(ctx context.Context, in *MsgVaultIntere return out, nil } +func (c *msgClient) MsgCorrectStabilityFees(ctx context.Context, in *MsgCorrectStabilityFeesRequest, opts ...grpc.CallOption) (*MsgCorrectStabilityFeesResponse, error) { + out := new(MsgCorrectStabilityFeesResponse) + err := c.cc.Invoke(ctx, "/comdex.vault.v1beta1.Msg/MsgCorrectStabilityFees", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { MsgCreate(context.Context, *MsgCreateRequest) (*MsgCreateResponse, error) @@ -1104,6 +1193,7 @@ type MsgServer interface { MsgDepositStableMint(context.Context, *MsgDepositStableMintRequest) (*MsgDepositStableMintResponse, error) MsgWithdrawStableMint(context.Context, *MsgWithdrawStableMintRequest) (*MsgWithdrawStableMintResponse, error) MsgVaultInterestCalc(context.Context, *MsgVaultInterestCalcRequest) (*MsgVaultInterestCalcResponse, error) + MsgCorrectStabilityFees(context.Context, *MsgCorrectStabilityFeesRequest) (*MsgCorrectStabilityFeesResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1143,6 +1233,9 @@ func (*UnimplementedMsgServer) MsgWithdrawStableMint(ctx context.Context, req *M func (*UnimplementedMsgServer) MsgVaultInterestCalc(ctx context.Context, req *MsgVaultInterestCalcRequest) (*MsgVaultInterestCalcResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MsgVaultInterestCalc not implemented") } +func (*UnimplementedMsgServer) MsgCorrectStabilityFees(ctx context.Context, req *MsgCorrectStabilityFeesRequest) (*MsgCorrectStabilityFeesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgCorrectStabilityFees not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1346,6 +1439,24 @@ func _Msg_MsgVaultInterestCalc_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_MsgCorrectStabilityFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCorrectStabilityFeesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).MsgCorrectStabilityFees(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/comdex.vault.v1beta1.Msg/MsgCorrectStabilityFees", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).MsgCorrectStabilityFees(ctx, req.(*MsgCorrectStabilityFeesRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "comdex.vault.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -1394,6 +1505,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "MsgVaultInterestCalc", Handler: _Msg_MsgVaultInterestCalc_Handler, }, + { + MethodName: "MsgCorrectStabilityFees", + Handler: _Msg_MsgCorrectStabilityFees_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "comdex/vault/v1beta1/tx.proto", @@ -2232,6 +2347,59 @@ func (m *MsgVaultInterestCalcResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *MsgCorrectStabilityFeesRequest) 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 *MsgCorrectStabilityFeesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCorrectStabilityFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCorrectStabilityFeesResponse) 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 *MsgCorrectStabilityFeesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCorrectStabilityFeesResponse) 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 @@ -2595,6 +2763,28 @@ func (m *MsgVaultInterestCalcResponse) Size() (n int) { return n } +func (m *MsgCorrectStabilityFeesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCorrectStabilityFeesResponse) 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 } @@ -4963,6 +5153,138 @@ func (m *MsgVaultInterestCalcResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCorrectStabilityFeesRequest) 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: MsgCorrectStabilityFeesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCorrectStabilityFeesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 *MsgCorrectStabilityFeesResponse) 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: MsgCorrectStabilityFeesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCorrectStabilityFeesResponse: 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 diff --git a/x/vault/types/vault.pb.go b/x/vault/types/vault.pb.go index 4f2cc36e0..06e24f432 100644 --- a/x/vault/types/vault.pb.go +++ b/x/vault/types/vault.pb.go @@ -28,7 +28,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -//app_vault_type_id will be the key for the KVStore for this value. +// app_vault_type_id will be the key for the KVStore for this value. type Vault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` AppId uint64 `protobuf:"varint,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" yaml:"app_id"`