From b0149c1f04503a2e01f954aea317e4d534d8512d Mon Sep 17 00:00:00 2001 From: emidev98 Date: Mon, 23 Oct 2023 07:36:07 +0200 Subject: [PATCH] fix: update proto gov v1 compatibility --- docs/proto/proto-docs.md | 2 + proto/alliance/alliance/gov.proto | 140 +++++++++--------- proto/alliance/alliance/tx.proto | 8 +- x/alliance/types/gov.go | 68 ++++++--- x/alliance/types/gov.pb.go | 149 +++++++++++++++---- x/alliance/types/msg.go | 30 ---- x/alliance/types/tx.pb.go | 234 ++++++++++++++++++++++-------- 7 files changed, 412 insertions(+), 219 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 2912e7ab..98496c37 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -1392,6 +1392,8 @@ Params | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | the title of the update proposal | +| `description` | [string](#string) | | the description of the proposal | | `authority` | [string](#string) | | | | `params` | [Params](#alliance.alliance.Params) | | | diff --git a/proto/alliance/alliance/gov.proto b/proto/alliance/alliance/gov.proto index 9317582c..f7af2bf8 100644 --- a/proto/alliance/alliance/gov.proto +++ b/proto/alliance/alliance/gov.proto @@ -3,93 +3,87 @@ package alliance.alliance; import "alliance/alliance/alliance.proto"; import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; option go_package = "github.com/terra-money/alliance/x/alliance/types"; message MsgCreateAllianceProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - // Denom of the asset. It could either be a native token or an IBC token - string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; - // The reward weight specifies the ratio of rewards that will be given to each alliance asset - // It does not need to sum to 1. rate = weight / total_weight - // Native asset is always assumed to have a weight of 1. - string reward_weight = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // A positive take rate is used for liquid staking derivatives. It defines an annualized reward rate that - // will be redirected to the distribution rewards pool - string take_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + option (gogoproto.equal) = false; - string reward_change_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; + // Denom of the asset. It could either be a native token or an IBC token + string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; + // The reward weight specifies the ratio of rewards that will be given to each alliance asset + // It does not need to sum to 1. rate = weight / total_weight + // Native asset is always assumed to have a weight of 1. + string reward_weight = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // A positive take rate is used for liquid staking derivatives. It defines an annualized reward rate that + // will be redirected to the distribution rewards pool + string take_rate = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; - google.protobuf.Duration reward_change_interval = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true - ]; + string reward_change_rate = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; - // set a bound of weight range to limit how much reward weights can scale. - RewardWeightRange reward_weight_range = 8 [ - (gogoproto.nullable) = false - ]; + google.protobuf.Duration reward_change_interval = 7 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; + + // set a bound of weight range to limit how much reward weights can scale. + RewardWeightRange reward_weight_range = 8 [(gogoproto.nullable) = false]; } - -message MsgUpdateAllianceProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - // Denom of the asset. It could either be a native token or an IBC token - string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; - // The reward weight specifies the ratio of rewards that will be given to each alliance asset - // It does not need to sum to 1. rate = weight / total_weight - // Native asset is always assumed to have a weight of 1. - string reward_weight = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; +message MsgUpdateAllianceProposal { + option (gogoproto.equal) = false; - string take_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; + // Denom of the asset. It could either be a native token or an IBC token + string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; + // The reward weight specifies the ratio of rewards that will be given to each alliance asset + // It does not need to sum to 1. rate = weight / total_weight + // Native asset is always assumed to have a weight of 1. + string reward_weight = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; - string reward_change_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string take_rate = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; - google.protobuf.Duration reward_change_interval = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true - ]; + string reward_change_rate = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + google.protobuf.Duration reward_change_interval = 7 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; } message MsgDeleteAllianceProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; -} - \ No newline at end of file + option (gogoproto.equal) = false; + + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; + string denom = 3 [(gogoproto.moretags) = "yaml:\"denom\""]; +} \ No newline at end of file diff --git a/proto/alliance/alliance/tx.proto b/proto/alliance/alliance/tx.proto index 01d18761..869cea55 100644 --- a/proto/alliance/alliance/tx.proto +++ b/proto/alliance/alliance/tx.proto @@ -84,9 +84,13 @@ message MsgClaimDelegationRewardsResponse {} message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - Params params = 2 [(gogoproto.nullable) = false]; + string authority = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + Params params = 4 [(gogoproto.nullable) = false]; } message MsgUpdateParamsResponse {} diff --git a/x/alliance/types/gov.go b/x/alliance/types/gov.go index 1f87dc94..52ad1de2 100644 --- a/x/alliance/types/gov.go +++ b/x/alliance/types/gov.go @@ -3,6 +3,7 @@ package types import ( "time" + sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "google.golang.org/grpc/codes" @@ -10,23 +11,63 @@ import ( ) const ( - ProposalTypeCreateAlliance = "msg_create_alliance_proposal" - ProposalTypeUpdateAlliance = "msg_update_alliance_proposal" - ProposalTypeDeleteAlliance = "msg_delete_alliance_proposal" + ProposalTypeUpdateAllianceParams = "msg_update_alliance_params" + ProposalTypeCreateAlliance = "msg_create_alliance_proposal" + ProposalTypeUpdateAlliance = "msg_update_alliance_proposal" + ProposalTypeDeleteAlliance = "msg_delete_alliance_proposal" ) var ( + _ govtypes.Content = &MsgUpdateParams{} _ govtypes.Content = &MsgCreateAllianceProposal{} _ govtypes.Content = &MsgUpdateAllianceProposal{} _ govtypes.Content = &MsgDeleteAllianceProposal{} ) func init() { + govtypes.RegisterProposalType(ProposalTypeUpdateAllianceParams) govtypes.RegisterProposalType(ProposalTypeCreateAlliance) govtypes.RegisterProposalType(ProposalTypeUpdateAlliance) govtypes.RegisterProposalType(ProposalTypeDeleteAlliance) } +func NewMsgUpdateParams(title, description string, + rewardDelayTime, takeRateClaimInterval time.Duration, + lastTakeRateClaimTime time.Time) govtypes.Content { + return &MsgUpdateParams{ + Title: title, + Description: description, + Params: Params{ + RewardDelayTime: rewardDelayTime, + TakeRateClaimInterval: takeRateClaimInterval, + LastTakeRateClaimTime: lastTakeRateClaimTime, + }, + } +} +func (msg *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return sdkerrors.Wrap(err, "invalid authority address") + } + if err := ValidatePositiveDuration(msg.Params.RewardDelayTime); err != nil { + return err + } + return ValidatePositiveDuration(msg.Params.TakeRateClaimInterval) +} + +func (msg MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + panic("Authority is not valid") + } + return []sdk.AccAddress{signer} +} +func (m *MsgUpdateParams) ProposalRoute() string { return RouterKey } +func (m *MsgUpdateParams) ProposalType() string { return ProposalTypeCreateAlliance } + func NewMsgCreateAllianceProposal(title, description, denom string, rewardWeight sdk.Dec, rewardWeightRange RewardWeightRange, takeRate sdk.Dec, rewardChangeRate sdk.Dec, rewardChangeInterval time.Duration) govtypes.Content { return &MsgCreateAllianceProposal{ Title: title, @@ -39,11 +80,8 @@ func NewMsgCreateAllianceProposal(title, description, denom string, rewardWeight RewardChangeInterval: rewardChangeInterval, } } -func (m *MsgCreateAllianceProposal) GetTitle() string { return m.Title } -func (m *MsgCreateAllianceProposal) GetDescription() string { return m.Description } -func (m *MsgCreateAllianceProposal) ProposalRoute() string { return RouterKey } -func (m *MsgCreateAllianceProposal) ProposalType() string { return ProposalTypeCreateAlliance } - +func (m *MsgCreateAllianceProposal) ProposalRoute() string { return RouterKey } +func (m *MsgCreateAllianceProposal) ProposalType() string { return ProposalTypeCreateAlliance } func (m *MsgCreateAllianceProposal) ValidateBasic() error { if m.Denom == "" { return status.Errorf(codes.InvalidArgument, "Alliance denom must have a value") @@ -96,11 +134,8 @@ func NewMsgUpdateAllianceProposal(title, description, denom string, rewardWeight RewardChangeInterval: rewardChangeInterval, } } -func (m *MsgUpdateAllianceProposal) GetTitle() string { return m.Title } -func (m *MsgUpdateAllianceProposal) GetDescription() string { return m.Description } -func (m *MsgUpdateAllianceProposal) ProposalRoute() string { return RouterKey } -func (m *MsgUpdateAllianceProposal) ProposalType() string { return ProposalTypeUpdateAlliance } - +func (m *MsgUpdateAllianceProposal) ProposalRoute() string { return RouterKey } +func (m *MsgUpdateAllianceProposal) ProposalType() string { return ProposalTypeUpdateAlliance } func (m *MsgUpdateAllianceProposal) ValidateBasic() error { if m.Denom == "" { return status.Errorf(codes.InvalidArgument, "Alliance denom must have a value") @@ -132,11 +167,8 @@ func NewMsgDeleteAllianceProposal(title, description, denom string) govtypes.Con Denom: denom, } } -func (m *MsgDeleteAllianceProposal) GetTitle() string { return m.Title } -func (m *MsgDeleteAllianceProposal) GetDescription() string { return m.Description } -func (m *MsgDeleteAllianceProposal) ProposalRoute() string { return RouterKey } -func (m *MsgDeleteAllianceProposal) ProposalType() string { return ProposalTypeDeleteAlliance } - +func (m *MsgDeleteAllianceProposal) ProposalRoute() string { return RouterKey } +func (m *MsgDeleteAllianceProposal) ProposalType() string { return ProposalTypeDeleteAlliance } func (m *MsgDeleteAllianceProposal) ValidateBasic() error { if m.Denom == "" { return status.Errorf(codes.InvalidArgument, "Alliance denom must have a value") diff --git a/x/alliance/types/gov.pb.go b/x/alliance/types/gov.pb.go index 21b3892b..b90b9f27 100644 --- a/x/alliance/types/gov.pb.go +++ b/x/alliance/types/gov.pb.go @@ -10,6 +10,7 @@ import ( proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -81,6 +82,41 @@ func (m *MsgCreateAllianceProposal) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateAllianceProposal proto.InternalMessageInfo +func (m *MsgCreateAllianceProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *MsgCreateAllianceProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MsgCreateAllianceProposal) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *MsgCreateAllianceProposal) GetRewardChangeInterval() time.Duration { + if m != nil { + return m.RewardChangeInterval + } + return 0 +} + +func (m *MsgCreateAllianceProposal) GetRewardWeightRange() RewardWeightRange { + if m != nil { + return m.RewardWeightRange + } + return RewardWeightRange{} +} + type MsgUpdateAllianceProposal struct { // the title of the update proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -130,6 +166,34 @@ func (m *MsgUpdateAllianceProposal) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateAllianceProposal proto.InternalMessageInfo +func (m *MsgUpdateAllianceProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *MsgUpdateAllianceProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MsgUpdateAllianceProposal) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *MsgUpdateAllianceProposal) GetRewardChangeInterval() time.Duration { + if m != nil { + return m.RewardChangeInterval + } + return 0 +} + type MsgDeleteAllianceProposal struct { // the title of the update proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -171,6 +235,27 @@ func (m *MsgDeleteAllianceProposal) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeleteAllianceProposal proto.InternalMessageInfo +func (m *MsgDeleteAllianceProposal) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *MsgDeleteAllianceProposal) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MsgDeleteAllianceProposal) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + func init() { proto.RegisterType((*MsgCreateAllianceProposal)(nil), "alliance.alliance.MsgCreateAllianceProposal") proto.RegisterType((*MsgUpdateAllianceProposal)(nil), "alliance.alliance.MsgUpdateAllianceProposal") @@ -180,38 +265,38 @@ func init() { func init() { proto.RegisterFile("alliance/alliance/gov.proto", fileDescriptor_c66988d3be8665d9) } var fileDescriptor_c66988d3be8665d9 = []byte{ - // 483 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x6d, 0x9a, 0x94, 0xf4, 0x5a, 0xa4, 0xf6, 0x88, 0x90, 0x5b, 0x24, 0x3b, 0x8a, 0x50, - 0xd5, 0xa5, 0x67, 0x04, 0x5b, 0x37, 0xdc, 0x2c, 0x80, 0x90, 0x90, 0x11, 0x42, 0x54, 0x48, 0xd1, - 0xc5, 0x7e, 0x5c, 0xac, 0x9e, 0x7d, 0xd6, 0xf9, 0xd2, 0x92, 0x0f, 0x80, 0xc4, 0xc8, 0xc8, 0xd8, - 0x0f, 0xc2, 0x07, 0xe8, 0xd8, 0x11, 0x31, 0x84, 0x2a, 0x59, 0x98, 0xf9, 0x04, 0xe8, 0xce, 0x4e, - 0xe3, 0xd2, 0x2d, 0x03, 0x03, 0x62, 0xca, 0xbb, 0xf7, 0x7f, 0xf9, 0xdd, 0xe9, 0xff, 0x7f, 0x32, - 0xba, 0x4f, 0x39, 0x4f, 0x68, 0x16, 0x81, 0x7f, 0x55, 0x30, 0x71, 0x42, 0x72, 0x29, 0x94, 0xc0, - 0x5b, 0xf3, 0x1e, 0x99, 0x17, 0x3b, 0x9d, 0x9b, 0xf3, 0x57, 0x43, 0xe6, 0x4f, 0x3b, 0x6d, 0x26, - 0x98, 0x30, 0xa5, 0xaf, 0xab, 0xaa, 0xeb, 0x32, 0x21, 0x18, 0x07, 0xdf, 0x9c, 0x06, 0xa3, 0xf7, - 0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x76, 0xc7, 0xde, 0x5b, 0x7f, 0xb4, 0x4d, 0xca, - 0xf8, 0xc8, 0x3c, 0x3e, 0xd2, 0xab, 0xe2, 0x0b, 0x5a, 0xfa, 0xf2, 0x2f, 0x3f, 0x3c, 0x3b, 0x6c, - 0xd7, 0xb1, 0x4f, 0x2b, 0x00, 0x3e, 0x42, 0x77, 0xaf, 0x59, 0xdb, 0x97, 0x5a, 0x76, 0x5a, 0x86, - 0xfb, 0x80, 0xdc, 0xd8, 0x30, 0x12, 0xd6, 0x3c, 0x0c, 0xf5, 0x6c, 0xd0, 0xd0, 0x57, 0x84, 0x5b, - 0xf2, 0x4f, 0xe1, 0xa0, 0xf5, 0xe9, 0xcc, 0xb3, 0x7e, 0x9e, 0x79, 0x56, 0xf7, 0x72, 0xc5, 0xac, - 0xcf, 0xeb, 0x3c, 0xfe, 0xbf, 0x3e, 0xff, 0xd2, 0xfa, 0xd4, 0x22, 0xfe, 0x68, 0x9b, 0x88, 0x7b, - 0xc0, 0xe1, 0xef, 0x47, 0xbc, 0x78, 0x47, 0xf0, 0xec, 0x7c, 0xea, 0xda, 0x17, 0x53, 0xd7, 0xbe, - 0x9c, 0xba, 0xf6, 0xe7, 0x99, 0x6b, 0x5d, 0xcc, 0x5c, 0xeb, 0xdb, 0xcc, 0xb5, 0x8e, 0x1e, 0xd6, - 0x0c, 0x54, 0x20, 0x25, 0xdd, 0x4f, 0x45, 0x06, 0xe3, 0xc5, 0x97, 0xf2, 0xc3, 0xa2, 0x34, 0x76, - 0x0e, 0x56, 0x8d, 0x21, 0x8f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x42, 0x52, 0xc4, 0x1c, 0x86, - 0x05, 0x00, 0x00, + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0x77, 0x6d, 0x52, 0xd3, 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7b, 0x0d, 0x7d, 0x45, 0xb4, 0x21, 0x2e, 0x0b, 0x7b, 0x8d, 0xdf, 0x5f, + 0x02, 0xa7, 0xfb, 0x63, 0xc9, 0xac, 0xce, 0xeb, 0x32, 0xb9, 0x59, 0x9d, 0xff, 0x69, 0x75, 0x6c, + 0xbc, 0x1f, 0x5d, 0x13, 0x6f, 0x1f, 0x32, 0xf8, 0xf7, 0xf1, 0x56, 0x6f, 0xe8, 0x3d, 0x3b, 0x99, + 0xf9, 0xee, 0xe9, 0xcc, 0x77, 0x7f, 0xcd, 0x7c, 0xf7, 0xd3, 0xdc, 0x77, 0x4e, 0xe7, 0xbe, 0xf3, + 0x6d, 0xee, 0x3b, 0x07, 0x0f, 0x6b, 0x83, 0x53, 0x20, 0x04, 0xdd, 0xcd, 0x79, 0x01, 0x93, 0xf3, + 0xcf, 0xe7, 0x87, 0xf3, 0xd2, 0x8c, 0x71, 0xb8, 0x6c, 0x06, 0xf1, 0xf8, 0x6f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x3b, 0x90, 0xf8, 0x2c, 0x9b, 0x05, 0x00, 0x00, } func (m *MsgCreateAllianceProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/alliance/types/msg.go b/x/alliance/types/msg.go index b23a46e7..5ddf324f 100644 --- a/x/alliance/types/msg.go +++ b/x/alliance/types/msg.go @@ -22,7 +22,6 @@ var ( _ legacytx.LegacyMsg = &MsgRedelegate{} _ legacytx.LegacyMsg = &MsgUndelegate{} _ legacytx.LegacyMsg = &MsgClaimDelegationRewards{} - _ legacytx.LegacyMsg = &MsgUpdateParams{} _ legacytx.LegacyMsg = &MsgCreateAlliance{} _ legacytx.LegacyMsg = &MsgUpdateAlliance{} _ legacytx.LegacyMsg = &MsgDeleteAlliance{} @@ -33,7 +32,6 @@ var ( MsgUndelegateType = "msg_undelegate" MsgRedelegateType = "msg_redelegate" MsgClaimDelegationRewardsType = "claim_delegation_rewards" - MsgUpdateParamsType = "update_params" MsgCreateAllianceType = "create_alliance" MsgUpdateAllianceType = "update_alliance" MsgDeleteAllianceType = "delete_alliance" @@ -172,34 +170,6 @@ func (msg *MsgClaimDelegationRewards) GetSigners() []sdk.AccAddress { func (msg MsgClaimDelegationRewards) Type() string { return MsgClaimDelegationRewardsType } -func (msg *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return sdkerrors.Wrap(err, "invalid authority address") - } - if err := ValidatePositiveDuration(msg.Params.RewardDelayTime); err != nil { - return err - } - return ValidatePositiveDuration(msg.Params.TakeRateClaimInterval) -} - -func (msg MsgUpdateParams) Route() string { - return sdk.MsgTypeURL(&msg) -} - -func (msg MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { - signer, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { - panic("Authority is not valid") - } - return []sdk.AccAddress{signer} -} - -func (msg MsgUpdateParams) Type() string { return MsgUpdateParamsType } - func (msg *MsgCreateAlliance) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return sdkerrors.Wrap(err, "invalid authority address") diff --git a/x/alliance/types/tx.pb.go b/x/alliance/types/tx.pb.go index 3417d71d..34a4b51a 100644 --- a/x/alliance/types/tx.pb.go +++ b/x/alliance/types/tx.pb.go @@ -338,8 +338,12 @@ func (m *MsgClaimDelegationRewardsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClaimDelegationRewardsResponse proto.InternalMessageInfo type MsgUpdateParams struct { - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Params Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params"` } func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } @@ -375,6 +379,20 @@ func (m *MsgUpdateParams) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo +func (m *MsgUpdateParams) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *MsgUpdateParams) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + func (m *MsgUpdateParams) GetAuthority() string { if m != nil { return m.Authority @@ -752,66 +770,68 @@ func init() { func init() { proto.RegisterFile("alliance/alliance/tx.proto", fileDescriptor_caddd4794042022d) } var fileDescriptor_caddd4794042022d = []byte{ - // 941 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0xe3, 0xb6, 0x1b, 0xda, 0xd9, 0xee, 0xd2, 0xba, 0xed, 0x36, 0x35, 0x92, 0x13, 0x42, - 0x54, 0xaa, 0xd5, 0xd6, 0xa6, 0x0b, 0x02, 0xa9, 0xb7, 0x4d, 0xc3, 0x81, 0x1f, 0x91, 0x90, 0x2b, - 0x04, 0xac, 0x10, 0xd1, 0xc4, 0x1e, 0x1c, 0x6b, 0x6d, 0x4f, 0x34, 0x33, 0xc9, 0x6e, 0x24, 0x4e, - 0x70, 0xe1, 0x88, 0x38, 0x71, 0x41, 0x2c, 0xff, 0x01, 0x07, 0x4e, 0xfc, 0x05, 0x7b, 0x5c, 0x71, - 0x42, 0x1c, 0xb2, 0xa8, 0x3d, 0xc0, 0x99, 0x03, 0x67, 0x34, 0x9e, 0xb1, 0x63, 0x27, 0xf6, 0x26, - 0xbb, 0x42, 0xc0, 0x4a, 0x3d, 0xc5, 0xf6, 0x7b, 0xf3, 0x99, 0x37, 0xdf, 0xf7, 0xe6, 0xcd,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, 0x4b, 0xbb, 0xb1, 0x88, - 0x57, 0x7a, 0x96, 0xa9, 0x86, 0xd7, 0x78, 0x5c, 0x8c, 0xf3, 0x66, 0xc9, 0xdf, 0x5c, 0x7c, 0x96, - 0xa9, 0x8d, 0xd5, 0x28, 0xae, 0xcb, 0xf9, 0xb3, 0xe4, 0xef, 0x8f, 0xe6, 0xdb, 0x0f, 0xce, 0x74, - 0xe5, 0xe1, 0x99, 0xae, 0xfc, 0x76, 0xa6, 0x2b, 0x5f, 0x9d, 0xeb, 0xa5, 0x87, 0xe7, 0x7a, 0xe9, - 0x97, 0x73, 0xbd, 0x74, 0xfb, 0x95, 0x54, 0x7b, 0x62, 0x88, 0x10, 0x78, 0x18, 0xe0, 0x10, 0x8d, - 0x26, 0xff, 0x21, 0xef, 0xa5, 0xfe, 0x07, 0xf3, 0x66, 0xd5, 0x2d, 0x47, 0xed, 0xe6, 0xd5, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0xed, 0xcc, 0xf1, 0x5b, 0x29, 0x0f, 0x00, 0x00, + // 964 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0xdb, 0x6e, 0x68, 0xa7, 0xdd, 0xa5, 0x75, 0xdb, 0x6d, 0x6a, 0x24, 0x27, 0x84, 0xaa, + 0x54, 0xab, 0xad, 0x4d, 0x17, 0x04, 0x52, 0x6f, 0x9b, 0x96, 0x03, 0x3f, 0x2a, 0x21, 0x57, 0x08, + 0x58, 0x21, 0xa2, 0x89, 0x3d, 0xb8, 0xd6, 0xda, 0x9e, 0x68, 0x66, 0x92, 0xdd, 0x48, 0x9c, 0xe0, + 0xc2, 0x91, 0x23, 0x17, 0xc4, 0xf2, 0x1f, 0x70, 0xe0, 0xc4, 0x5f, 0xb0, 0xe2, 0xb4, 0xe2, 0x84, + 0x38, 0x64, 0x51, 0x7b, 0x80, 0x33, 0x07, 0xce, 0x68, 0x3c, 0xe3, 0x89, 0x9d, 0xd8, 0x9b, 0x2c, + 0x42, 0xfc, 0x90, 0x7a, 0x8a, 0xc7, 0xef, 0xcd, 0xf7, 0xde, 0xfb, 0xde, 0xe7, 0x37, 0x13, 0x60, + 0xc0, 0x30, 0x0c, 0x60, 0xec, 0x22, 0x5b, 0x3d, 0xb0, 0xfb, 0x56, 0x97, 0x60, 0x86, 0xf5, 0xb5, + 0xf4, 0x95, 0x95, 0x3e, 0x18, 0x1b, 0x3e, 0xf6, 0x71, 0x62, 0xb5, 0xf9, 0x93, 0x70, 0x34, 0xb6, + 0x5d, 0x4c, 0x23, 0x4c, 0xdb, 0xc2, 0x20, 0x16, 0xd2, 0xb4, 0x25, 0x56, 0x76, 0x44, 0x7d, 0xbb, + 0x7f, 0xc0, 0x7f, 0xa4, 0xc1, 0x94, 0x86, 0x0e, 0xa4, 0xc8, 0xee, 0x1f, 0x74, 0x10, 0x83, 0x07, + 0xb6, 0x8b, 0x83, 0x38, 0xb5, 0x4f, 0x26, 0xd6, 0x85, 0x04, 0x46, 0x29, 0x70, 0x63, 0xd2, 0xae, + 0xd2, 0x95, 0x08, 0x3e, 0xc6, 0x7e, 0x88, 0xec, 0x64, 0xd5, 0xe9, 0x7d, 0x6c, 0x7b, 0x3d, 0x02, + 0x59, 0x80, 0x65, 0x84, 0xe6, 0xd7, 0x73, 0x60, 0xf9, 0x84, 0xfa, 0xc7, 0x28, 0x44, 0x3e, 0x64, + 0x48, 0x7f, 0x1d, 0xac, 0x79, 0xe2, 0x19, 0x93, 0x36, 0xf4, 0x3c, 0x82, 0x28, 0xad, 0x69, 0x0d, + 0x6d, 0x6f, 0xa9, 0x55, 0xfb, 0xf1, 0xbb, 0xfd, 0x0d, 0x59, 0xd7, 0x6d, 0x61, 0x39, 0x65, 0x24, + 0x88, 0x7d, 0x67, 0x55, 0x6d, 0x91, 0xef, 0x39, 0x4c, 0x1f, 0x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, 0xae, 0x9a, 0x25, + 0xc8, 0x23, 0x8f, 0x32, 0xe4, 0xc9, 0xbb, 0x98, 0xfe, 0x09, 0xb8, 0x5e, 0x72, 0xea, 0xdf, 0x2c, + 0xc6, 0x28, 0xf6, 0x36, 0x5e, 0x79, 0x1a, 0x6f, 0x15, 0xfd, 0x23, 0xb0, 0x92, 0x3b, 0x6c, 0x9b, + 0x25, 0x79, 0x67, 0x7c, 0x8c, 0x1b, 0xd3, 0x7d, 0x14, 0xbe, 0x07, 0xae, 0x8d, 0x1d, 0x72, 0x3b, + 0x25, 0x79, 0xe6, 0xbc, 0x8c, 0x9b, 0xb3, 0x78, 0x65, 0xa3, 0x8c, 0x0d, 0xbc, 0x9d, 0x27, 0xe5, + 0x38, 0x2d, 0x4a, 0xf1, 0xc7, 0xc5, 0xa3, 0x8c, 0x7d, 0x58, 0x3b, 0xe5, 0xba, 0x9c, 0x1e, 0xa5, + 0xf8, 0xfb, 0x68, 0xbd, 0xf9, 0xf0, 0xdc, 0xd4, 0x1e, 0x9d, 0x9b, 0xda, 0x2f, 0xe7, 0xa6, 0xf6, + 0xc5, 0x85, 0x59, 0x79, 0x74, 0x61, 0x56, 0x7e, 0xba, 0x30, 0x2b, 0x77, 0x5e, 0xca, 0x8c, 0x27, + 0x86, 0x08, 0x81, 0xfb, 0x11, 0x8e, 0xd1, 0x60, 0xf4, 0xdf, 0xf3, 0x7e, 0xe6, 0xff, 0x33, 0x1f, + 0x56, 0x9d, 0x6a, 0x32, 0x6e, 0x5e, 0xfe, 0x33, 0x00, 0x00, 0xff, 0xff, 0x29, 0x84, 0x8a, 0xce, + 0x61, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1459,12 +1479,26 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 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] = 0x1a + } + 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] = 0x12 + } + 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] = 0xa } return len(dAtA) - i, nil @@ -1894,6 +1928,14 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = 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)) + } l = len(m.Authority) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2863,6 +2905,70 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + 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 2: + 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 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } @@ -2894,7 +3000,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) }