-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.go
43 lines (36 loc) · 829 Bytes
/
commands.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
package cli
import (
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
)
const (
storeGov = "gov"
)
func AddCommands(cmd *cobra.Command, cdc *codec.Codec) {
govCmd := &cobra.Command{
Use: "gov",
Short: "gov commands",
}
govCmd.AddCommand(
client.PostCommands(
GetCmdDeposit(cdc),
GetCmdSubmitProposal(cdc),
GetCmdSubmitListProposal(cdc),
GetCmdSubmitDelistProposal(cdc),
GetCmdVote(cdc),
)...,
)
govCmd.AddCommand(client.LineBreak)
govCmd.AddCommand(
client.GetCommands(
GetCmdQueryProposal(storeGov, cdc),
GetCmdQueryProposals(storeGov, cdc),
GetCmdQueryDeposit(storeGov, cdc),
GetCmdQueryDeposits(storeGov, cdc),
GetCmdQueryVote(storeGov, cdc),
GetCmdQueryVotes(storeGov, cdc),
)...,
)
cmd.AddCommand(govCmd)
}