From 039954f8f11a38ceaca7805bd0764cbb3c720de2 Mon Sep 17 00:00:00 2001 From: mpoke Date: Fri, 30 Aug 2024 19:54:26 +0200 Subject: [PATCH] remove Route and Type --- x/ccv/provider/types/msg.go | 92 ------------------------------------- 1 file changed, 92 deletions(-) diff --git a/x/ccv/provider/types/msg.go b/x/ccv/provider/types/msg.go index aa58c6fcb4..c2949393be 100644 --- a/x/ccv/provider/types/msg.go +++ b/x/ccv/provider/types/msg.go @@ -21,18 +21,7 @@ import ( ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" ) -// provider message types const ( - TypeMsgAssignConsumerKey = "assign_consumer_key" - TypeMsgSubmitConsumerMisbehaviour = "submit_consumer_misbehaviour" - TypeMsgSubmitConsumerDoubleVoting = "submit_consumer_double_vote" - TypeMsgCreateConsumer = "create_consumer" - TypeMsgUpdateConsumer = "update_consumer" - TypeMsgRemoveConsumer = "remove_consumer" - TypeMsgOptIn = "opt_in" - TypeMsgOptOut = "opt_out" - TypeMsgSetConsumerCommissionRate = "set_consumer_commission_rate" - // MaxNameLength defines the maximum consumer name length MaxNameLength = 50 // MaxDescriptionLength defines the maximum consumer description length @@ -82,14 +71,6 @@ func NewMsgAssignConsumerKey(consumerId string, providerValidatorAddress sdk.Val }, nil } -// Route implements the sdk.Msg interface. -func (msg MsgAssignConsumerKey) Route() string { return RouterKey } - -// Type implements the sdk.Msg interface. -func (msg MsgAssignConsumerKey) Type() string { - return TypeMsgAssignConsumerKey -} - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgAssignConsumerKey) ValidateBasic() error { if err := validateDeprecatedChainId(msg.ChainId); err != nil { @@ -160,14 +141,6 @@ func NewMsgSubmitConsumerMisbehaviour( }, nil } -// Route implements the sdk.Msg interface. -func (msg MsgSubmitConsumerMisbehaviour) Route() string { return RouterKey } - -// Type implements the sdk.Msg interface. -func (msg MsgSubmitConsumerMisbehaviour) Type() string { - return TypeMsgSubmitConsumerMisbehaviour -} - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgSubmitConsumerMisbehaviour) ValidateBasic() error { if err := ValidateConsumerId(msg.ConsumerId); err != nil { @@ -192,14 +165,6 @@ func NewMsgSubmitConsumerDoubleVoting( }, nil } -// Route implements the sdk.Msg interface. -func (msg MsgSubmitConsumerDoubleVoting) Route() string { return RouterKey } - -// Type implements the sdk.Msg interface. -func (msg MsgSubmitConsumerDoubleVoting) Type() string { - return TypeMsgSubmitConsumerDoubleVoting -} - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgSubmitConsumerDoubleVoting) ValidateBasic() error { if dve, err := cmttypes.DuplicateVoteEvidenceFromProto(msg.DuplicateVoteEvidence); err != nil { @@ -231,14 +196,6 @@ func NewMsgOptIn(consumerId string, providerValidatorAddress sdk.ValAddress, con }, nil } -// Type implements the sdk.Msg interface. -func (msg MsgOptIn) Type() string { - return TypeMsgOptIn -} - -// Route implements the sdk.Msg interface. -func (msg MsgOptIn) Route() string { return RouterKey } - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgOptIn) ValidateBasic() error { if err := validateDeprecatedChainId(msg.ChainId); err != nil { @@ -271,14 +228,6 @@ func NewMsgOptOut(consumerId string, providerValidatorAddress sdk.ValAddress, si }, nil } -// Type implements the sdk.Msg interface. -func (msg MsgOptOut) Type() string { - return TypeMsgOptOut -} - -// Route implements the sdk.Msg interface. -func (msg MsgOptOut) Route() string { return RouterKey } - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgOptOut) ValidateBasic() error { if err := validateDeprecatedChainId(msg.ChainId); err != nil { @@ -311,14 +260,6 @@ func NewMsgSetConsumerCommissionRate( } } -func (msg MsgSetConsumerCommissionRate) Route() string { - return RouterKey -} - -func (msg MsgSetConsumerCommissionRate) Type() string { - return TypeMsgSetConsumerCommissionRate -} - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgSetConsumerCommissionRate) ValidateBasic() error { if err := validateDeprecatedChainId(msg.ChainId); err != nil { @@ -353,14 +294,6 @@ func NewMsgCreateConsumer(signer string, chainId string, metadata ConsumerMetada }, nil } -// Type implements the sdk.Msg interface. -func (msg MsgCreateConsumer) Type() string { - return TypeMsgCreateConsumer -} - -// Route implements the sdk.Msg interface. -func (msg MsgCreateConsumer) Route() string { return RouterKey } - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgCreateConsumer) ValidateBasic() error { if err := ValidateStringField("ChainId", msg.ChainId, cmttypes.MaxChainIDLen); err != nil { @@ -403,14 +336,6 @@ func NewMsgUpdateConsumer(signer string, consumerId string, ownerAddress string, }, nil } -// Type implements the sdk.Msg interface. -func (msg MsgUpdateConsumer) Type() string { - return TypeMsgUpdateConsumer -} - -// Route implements the sdk.Msg interface. -func (msg MsgUpdateConsumer) Route() string { return RouterKey } - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgUpdateConsumer) ValidateBasic() error { if err := ValidateConsumerId(msg.ConsumerId); err != nil { @@ -449,14 +374,6 @@ func NewMsgRemoveConsumer(signer string, consumerId string, stopTime time.Time) }, nil } -// Type implements the sdk.Msg interface. -func (msg MsgRemoveConsumer) Type() string { - return TypeMsgRemoveConsumer -} - -// Route implements the sdk.Msg interface. -func (msg MsgRemoveConsumer) Route() string { return RouterKey } - // ValidateBasic implements the sdk.HasValidateBasic interface. func (msg MsgRemoveConsumer) ValidateBasic() error { if err := ValidateConsumerId(msg.ConsumerId); err != nil { @@ -465,15 +382,6 @@ func (msg MsgRemoveConsumer) ValidateBasic() error { return nil } -// Route implements the sdk.Msg interface. -func (msg MsgConsumerAddition) Route() string { return RouterKey } - -// Route implements the sdk.Msg interface. -func (msg MsgConsumerModification) Route() string { return RouterKey } - -// Route implements the sdk.Msg interface. -func (msg MsgConsumerRemoval) Route() string { return RouterKey } - // // Validation methods //