/
cmd.go
77 lines (70 loc) · 2.17 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package cli
import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/spf13/cobra"
)
var storeKey = "stake"
var scStoreKey = "sc"
func AddCommands(root *cobra.Command, cdc *codec.Codec) {
stakingCmd := &cobra.Command{
Use: "staking",
Short: "staking commands",
}
stakingCmd.AddCommand(
client.PostCommands(
GetCmdCreateValidator(cdc),
GetCmdRemoveValidator(cdc),
GetCmdCreateValidatorOpen(cdc),
GetCmdEditValidator(cdc),
GetCmdDelegate(cdc),
GetCmdRedelegate(storeKey, cdc),
GetCmdUnbond(storeKey, cdc),
)...,
)
stakingCmd.AddCommand(client.LineBreak)
stakingCmd.AddCommand(
client.GetCommands(
GetCmdQueryValidator(storeKey, cdc),
GetCmdQueryValidators(storeKey, cdc),
GetCmdQueryParams(storeKey, cdc),
GetCmdQueryDelegation(storeKey, cdc),
GetCmdQueryDelegations(storeKey, cdc),
GetCmdQueryPool(storeKey, cdc),
GetCmdQueryRedelegation(storeKey, cdc),
GetCmdQueryRedelegations(storeKey, cdc),
GetCmdQueryUnbondingDelegation(storeKey, cdc),
GetCmdQueryUnbondingDelegations(storeKey, cdc),
)...,
)
stakingCmd.AddCommand(client.LineBreak)
stakingCmd.AddCommand(
client.PostCommands(
GetCmdCreateSideChainValidator(cdc),
GetCmdEditSideChainValidator(cdc),
GetCmdSideChainDelegate(cdc),
GetCmdSideChainRedelegate(cdc),
GetCmdSideChainUnbond(cdc),
)...,
)
stakingCmd.AddCommand(client.LineBreak)
stakingCmd.AddCommand(
client.GetCommands(
GetCmdQuerySideParams(storeKey, cdc),
GetCmdQuerySideValidator(storeKey, cdc),
GetCmdQuerySideChainDelegation(storeKey, cdc),
GetCmdQuerySideChainDelegations(storeKey, cdc),
GetCmdQuerySideChainRedelegation(storeKey, cdc),
GetCmdQuerySideChainRedelegations(storeKey, cdc),
GetCmdQuerySideChainUnbondingDelegation(storeKey, cdc),
GetCmdQuerySideChainUnbondingDelegations(storeKey, cdc),
GetCmdQuerySideChainPool(storeKey, cdc),
GetCmdQuerySideChainUnbondingDelegationsByValidator(cdc),
GetCmdQuerySideChainReDelegationsByValidator(cdc),
GetCmdQuerySideChainTopValidators(cdc),
GetCmdQuerySideAllValidatorsCount(cdc),
GetCmdQueryCrossStakeInfoByAxcAddress(cdc),
)...,
)
root.AddCommand(stakingCmd)
}