github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/04-channel/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/04-channel/types" 8 "github.com/spf13/cobra" 9 ) 10 11 // GetQueryCmd returns the query commands for IBC channels 12 func GetQueryCmd(cdc *codec.CodecProxy, reg interfacetypes.InterfaceRegistry) *cobra.Command { 13 queryCmd := &cobra.Command{ 14 Use: types.SubModuleName, 15 Short: "IBC channel query subcommands", 16 DisableFlagParsing: true, 17 SuggestionsMinimumDistance: 2, 18 RunE: client.ValidateCmd, 19 } 20 21 queryCmd.AddCommand( 22 GetCmdQueryChannels(cdc, reg), 23 GetCmdQueryChannel(cdc, reg), 24 GetCmdQueryConnectionChannels(cdc, reg), 25 GetCmdQueryChannelClientState(cdc, reg), 26 GetCmdQueryPacketCommitment(cdc, reg), 27 GetCmdQueryPacketCommitments(cdc, reg), 28 GetCmdQueryPacketReceipt(cdc, reg), 29 GetCmdQueryPacketAcknowledgement(cdc, reg), 30 GetCmdQueryUnreceivedPackets(cdc, reg), 31 GetCmdQueryUnreceivedAcks(cdc, reg), 32 GetCmdQueryNextSequenceReceive(cdc, reg), 33 //// TODO: next sequence Send ? 34 ) 35 36 return queryCmd 37 } 38 39 // NewTxCmd returns a CLI command handler for all x/ibc channel transaction commands. 40 func NewTxCmd() *cobra.Command { 41 txCmd := &cobra.Command{ 42 Use: types.SubModuleName, 43 Short: "IBC channel transaction subcommands", 44 DisableFlagParsing: true, 45 SuggestionsMinimumDistance: 2, 46 RunE: client.ValidateCmd, 47 } 48 49 txCmd.AddCommand() 50 51 return txCmd 52 }