Skip to content

Commit

Permalink
remove deprecated GetSignBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Aug 30, 2024
1 parent 85d5fd3 commit 0e4ba5e
Showing 1 changed file with 0 additions and 65 deletions.
65 changes: 0 additions & 65 deletions x/ccv/provider/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ func (msg MsgAssignConsumerKey) Type() string {
return TypeMsgAssignConsumerKey
}

// GetSignBytes returns the message bytes to sign over.
func (msg MsgAssignConsumerKey) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// ValidateBasic implements the sdk.HasValidateBasic interface.
func (msg MsgAssignConsumerKey) ValidateBasic() error {
if err := validateDeprecatedChainId(msg.ChainId); err != nil {
Expand Down Expand Up @@ -186,12 +180,6 @@ func (msg MsgSubmitConsumerMisbehaviour) ValidateBasic() error {
return nil
}

// Type implements the sdk.Msg interface.
func (msg MsgSubmitConsumerMisbehaviour) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

func NewMsgSubmitConsumerDoubleVoting(
submitter sdk.AccAddress,
ev *tmtypes.DuplicateVoteEvidence,
Expand Down Expand Up @@ -233,12 +221,6 @@ func (msg MsgSubmitConsumerDoubleVoting) ValidateBasic() error {
return nil
}

// Type implements the sdk.Msg interface.
func (msg MsgSubmitConsumerDoubleVoting) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// NewMsgOptIn creates a new NewMsgOptIn instance.
func NewMsgOptIn(consumerId string, providerValidatorAddress sdk.ValAddress, consumerConsensusPubKey, signer string) (*MsgOptIn, error) {
return &MsgOptIn{
Expand Down Expand Up @@ -297,12 +279,6 @@ func (msg MsgOptOut) Type() string {
// Route implements the sdk.Msg interface.
func (msg MsgOptOut) Route() string { return RouterKey }

// GetSignBytes returns the message bytes to sign over.
func (msg MsgOptOut) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// ValidateBasic implements the sdk.HasValidateBasic interface.
func (msg MsgOptOut) ValidateBasic() error {
if err := validateDeprecatedChainId(msg.ChainId); err != nil {
Expand Down Expand Up @@ -365,11 +341,6 @@ func (msg MsgSetConsumerCommissionRate) ValidateBasic() error {
return nil
}

func (msg MsgSetConsumerCommissionRate) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// NewMsgCreateConsumer creates a new MsgCreateConsumer instance
func NewMsgCreateConsumer(signer string, chainId string, metadata ConsumerMetadata,
initializationParameters *ConsumerInitializationParameters, powerShapingParameters *PowerShapingParameters) (*MsgCreateConsumer, error) {
Expand Down Expand Up @@ -419,12 +390,6 @@ func (msg MsgCreateConsumer) ValidateBasic() error {
return nil
}

// Type implements the sdk.Msg interface.
func (msg MsgCreateConsumer) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// NewMsgUpdateConsumer creates a new MsgUpdateConsumer instance
func NewMsgUpdateConsumer(signer string, consumerId string, ownerAddress string, metadata *ConsumerMetadata,
initializationParameters *ConsumerInitializationParameters, powerShapingParameters *PowerShapingParameters) (*MsgUpdateConsumer, error) {
Expand Down Expand Up @@ -475,12 +440,6 @@ func (msg MsgUpdateConsumer) ValidateBasic() error {
return nil
}

// Type implements the sdk.Msg interface.
func (msg MsgUpdateConsumer) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// NewMsgRemoveConsumer creates a new MsgRemoveConsumer instance
func NewMsgRemoveConsumer(signer string, consumerId string, stopTime time.Time) (*MsgRemoveConsumer, error) {
return &MsgRemoveConsumer{
Expand All @@ -506,39 +465,15 @@ func (msg MsgRemoveConsumer) ValidateBasic() error {
return nil
}

// Type implements the sdk.Msg interface.
func (msg MsgRemoveConsumer) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// Route implements the sdk.Msg interface.
func (msg MsgConsumerAddition) Route() string { return RouterKey }

// Type implements the sdk.Msg interface.
func (msg MsgConsumerAddition) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// Route implements the sdk.Msg interface.
func (msg MsgConsumerModification) Route() string { return RouterKey }

// Type implements the sdk.Msg interface.
func (msg MsgConsumerModification) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

// Route implements the sdk.Msg interface.
func (msg MsgConsumerRemoval) Route() string { return RouterKey }

// Type implements the sdk.Msg interface.
func (msg MsgConsumerRemoval) GetSignBytes() []byte {
bz := ccvtypes.ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}

//
// Validation methods
//
Expand Down

0 comments on commit 0e4ba5e

Please sign in to comment.