-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.go
44 lines (37 loc) · 1.29 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
package cli
import (
"github.com/furyaxyz/fuxchain/libs/cosmos-sdk/client"
"github.com/furyaxyz/fuxchain/libs/cosmos-sdk/codec"
interfacetypes "github.com/furyaxyz/fuxchain/libs/cosmos-sdk/codec/types"
"github.com/spf13/cobra"
)
// GetQueryCmd returns the query commands for IBC connections
func GetQueryCmd(cdc *codec.CodecProxy, reg interfacetypes.InterfaceRegistry) *cobra.Command {
queryCmd := &cobra.Command{
Use: "ibc-transfer",
Short: "IBC fungible token transfer query subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}
queryCmd.AddCommand(
GetCmdQueryDenomTrace(cdc, reg),
GetCmdQueryDenomTraces(cdc, reg),
GetCmdParams(cdc, reg),
GetCmdQueryEscrowAddress(cdc, reg),
)
return queryCmd
}
// NewTxCmd returns the transaction commands for IBC fungible token transfer
func NewTxCmd(cdc *codec.CodecProxy, reg interfacetypes.InterfaceRegistry) *cobra.Command {
txCmd := &cobra.Command{
Use: "ibc-transfer",
Short: "IBC fungible token transfer transaction subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
txCmd.AddCommand(
NewTransferTxCmd(cdc, reg),
)
return txCmd
}