-
Notifications
You must be signed in to change notification settings - Fork 4
/
cmd.go
54 lines (47 loc) · 1.28 KB
/
cmd.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
52
53
54
package cli
import (
"fmt"
"github.com/Carina-labs/nova/x/icacontrol/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"
)
// GetTxCmd creates and returns the icacontrol tx command
func GetTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: types.ModuleName,
Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName),
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
cmd.AddCommand(
txRegisterZoneCmd(),
txDelegateTxCmd(),
txUndelegateTxCmd(),
txAutoStakingTxCmd(),
txTransferTxCmd(),
txDeleteZoneTxCmd(),
txChangeZoneInfoTxCmd(),
txAuthzGrantTxCmd(),
txAuthzRevokeTxCmd(),
txSetControllerAddrTxCmd(),
)
return cmd
}
// GetQueryCmd creates and returns the icacontrol query command
func GetQueryCmd() *cobra.Command {
cmd := &cobra.Command{
Use: types.ModuleName,
Short: "Querying commands for the icacontrol module",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
cmd.AddCommand(
queryAllZones(),
queryZone(),
queryAutoStakingVersion(),
queryAutoStakingCurrentVersion(),
)
return cmd
}