Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/core/02-client/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/gogoproto/proto"

errorsmod "cosmossdk.io/errors"
Expand All @@ -14,6 +16,12 @@ import (
"github.com/cosmos/ibc-go/v10/modules/core/exported"
)

// RegisterLegacyAminoCodec registers the necessary interfaces and concrete types
// on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
legacy.RegisterAminoMsg(cdc, &MsgRecoverClient{}, "cosmos-sdk/MsgRecoverClient")
}

// RegisterInterfaces registers the client interfaces to protobuf Any.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterInterface(
Expand Down
115 changes: 59 additions & 56 deletions modules/core/02-client/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions modules/core/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ func (AppModule) IsOnePerModuleType() {}
// IsAppModule implements the appmodule.AppModule interface.
func (AppModule) IsAppModule() {}

// RegisterLegacyAminoCodec does nothing. IBC does not support amino.
func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino) {}
// RegisterLegacyAminoCodec implements AppModuleBasic interface.
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
clienttypes.RegisterLegacyAminoCodec(cdc)
}

// DefaultGenesis returns default genesis state as raw bytes for the ibc
// module.
Expand Down
2 changes: 2 additions & 0 deletions proto/ibc/core/client/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package ibc.core.client.v1;

option go_package = "github.com/cosmos/ibc-go/v10/modules/core/02-client/types";

import "amino/amino.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos/upgrade/v1beta1/upgrade.proto";
import "gogoproto/gogo.proto";
Expand Down Expand Up @@ -127,6 +128,7 @@ message MsgSubmitMisbehaviourResponse {}

// MsgRecoverClient defines the message used to recover a frozen or expired client.
message MsgRecoverClient {
option (amino.name) = "cosmos-sdk/MsgRecoverClient";
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signer";

Expand Down
Loading