github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/02-client/client/cli/cli.go (about) 1 package cli 2 3 import ( 4 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/client" 5 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec" 6 interfacetypes "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec/types" 7 "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/02-client/types" 8 "github.com/spf13/cobra" 9 ) 10 11 // GetQueryCmd returns the query commands for IBC clients 12 func GetQueryCmd(cdc *codec.CodecProxy, reg interfacetypes.InterfaceRegistry) *cobra.Command { 13 queryCmd := &cobra.Command{ 14 Use: types.SubModuleName, 15 Short: "IBC client query subcommands", 16 DisableFlagParsing: true, 17 SuggestionsMinimumDistance: 2, 18 RunE: client.ValidateCmd, 19 } 20 21 queryCmd.AddCommand( 22 GetCmdQueryClientStates(cdc, reg), 23 GetCmdQueryClientState(cdc, reg), 24 GetCmdQueryClientStatus(cdc, reg), 25 GetCmdQueryConsensusStates(cdc, reg), 26 GetCmdQueryConsensusStateHeights(cdc, reg), 27 GetCmdQueryConsensusState(cdc, reg), 28 GetCmdQueryHeader(cdc, reg), 29 GetCmdSelfConsensusState(cdc, reg), 30 GetCmdParams(cdc, reg), 31 ) 32 33 return queryCmd 34 } 35 36 // NewTxCmd returns the command to create and handle IBC clients 37 func NewTxCmd(cdc *codec.CodecProxy, reg interfacetypes.InterfaceRegistry) *cobra.Command { 38 txCmd := &cobra.Command{ 39 Use: types.SubModuleName, 40 Short: "IBC client transaction subcommands", 41 DisableFlagParsing: true, 42 SuggestionsMinimumDistance: 2, 43 RunE: client.ValidateCmd, 44 } 45 46 txCmd.AddCommand( 47 NewCreateClientCmd(cdc, reg), 48 NewUpdateClientCmd(cdc, reg), 49 NewSubmitMisbehaviourCmd(cdc, reg), 50 NewUpgradeClientCmd(cdc, reg), 51 ) 52 53 return txCmd 54 }