From 30940f9e8d01bbd66d5abb46171d3043d4262ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDongLieu=E2=80=9D?= Date: Mon, 23 Sep 2024 11:15:25 +0700 Subject: [PATCH] re-register proto ics read state --- cmd/onomyd/cmd/cmd.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/onomyd/cmd/cmd.go b/cmd/onomyd/cmd/cmd.go index e6f507fc..9ddfbde5 100644 --- a/cmd/onomyd/cmd/cmd.go +++ b/cmd/onomyd/cmd/cmd.go @@ -12,6 +12,10 @@ import ( "github.com/tendermint/tendermint/libs/cli" "github.com/onomyprotocol/onomy/app" + + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + ibcprovidertypes "github.com/cosmos/interchain-security/x/ccv/provider/types" ) // NewRootCmd initiates the cli for onomy chain. @@ -24,6 +28,8 @@ func NewRootCmd() (*cobra.Command, cosmoscmd.EncodingConfig) { app.ModuleBasics, app.New, ) + // pull request #171 refactor: Remove ics. So we need re-register proto can read state + RegisterInterfacesICSProvider(encodingConfig.InterfaceRegistry) rootCmd.AddCommand( server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler), @@ -52,3 +58,11 @@ func WrapBridgeCommands(defaultNodeHome, rootCmd string, cmds []*cobra.Command) return cmd } + +// // pull request #171 refactor: Remove ics. So we need re-register proto can read state +func RegisterInterfacesICSProvider(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*govtypes.Content)(nil), + &ibcprovidertypes.ConsumerAdditionProposal{}, + ) +}