-
Notifications
You must be signed in to change notification settings - Fork 579
/
cli.go
51 lines (43 loc) · 1.34 KB
/
cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cli
import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"
"github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"
)
// GetQueryCmd returns the query commands for IBC channels
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: types.SubModuleName,
Short: "IBC channel query subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
queryCmd.AddCommand(
GetCmdQueryChannels(),
GetCmdQueryChannel(),
GetCmdQueryConnectionChannels(),
GetCmdQueryChannelClientState(),
GetCmdQueryPacketCommitment(),
GetCmdQueryPacketCommitments(),
GetCmdQueryPacketReceipt(),
GetCmdQueryPacketAcknowledgement(),
GetCmdQueryUnreceivedPackets(),
GetCmdQueryUnreceivedAcks(),
GetCmdQueryNextSequenceReceive(),
// TODO: next sequence Send ?
)
return queryCmd
}
// NewTxCmd returns a CLI command handler for all x/ibc channel transaction commands.
func NewTxCmd() *cobra.Command {
txCmd := &cobra.Command{
Use: types.SubModuleName,
Short: "IBC channel transaction subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
txCmd.AddCommand()
return txCmd
}