diff --git a/x/rollapp/types/codec.go b/x/rollapp/types/codec.go index bd6db7f04..47b7c57d1 100644 --- a/x/rollapp/types/codec.go +++ b/x/rollapp/types/codec.go @@ -5,6 +5,7 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -35,5 +36,15 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(Amino) ) + +func init() { + RegisterCodec(Amino) + // Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be + // used to properly serialize MsgGrant and MsgExec instances + sdk.RegisterLegacyAminoCodec(Amino) + RegisterCodec(authzcodec.Amino) + + Amino.Seal() +}