Skip to content

Commit

Permalink
remove Route and Type
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Aug 30, 2024
1 parent dba67e6 commit 039954f
Showing 1 changed file with 0 additions and 92 deletions.
92 changes: 0 additions & 92 deletions x/ccv/provider/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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
//
Expand Down

0 comments on commit 039954f

Please sign in to comment.