refactor: remove .Type() and .Route() from msgs (#14751)

This commit is contained in:
Julien Robert
2023-01-24 17:03:06 +00:00
committed by GitHub
parent bc0386e996
commit 8dbdfea9ef
48 changed files with 409 additions and 769 deletions
+3 -12
View File
@@ -8,12 +8,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)
const (
TypeMsgUpdateParams = "update_params"
var (
_ sdk.Msg = &MsgUpdateParams{}
_ legacytx.LegacyMsg = &MsgUpdateParams{}
)
var _ legacytx.LegacyMsg = &MsgUpdateParams{}
// GetSigners returns the signer addresses that are expected to sign the result
// of GetSignBytes.
func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress {
@@ -27,14 +26,6 @@ func (msg MsgUpdateParams) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
}
func (msg MsgUpdateParams) Route() string {
return sdk.MsgTypeURL(&msg)
}
func (msg MsgUpdateParams) Type() string {
return sdk.MsgTypeURL(&msg)
}
// ValidateBasic performs basic MsgUpdateParams message validation.
func (msg MsgUpdateParams) ValidateBasic() error {
params := tmtypes.ConsensusParamsFromProto(msg.ToProtoConsensusParams())