Skip to content

Commit

Permalink
re-register proto ics read state
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Sep 23, 2024
1 parent ec916fc commit 30940f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/onomyd/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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),
Expand Down Expand Up @@ -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{},
)
}

0 comments on commit 30940f9

Please sign in to comment.