-
Notifications
You must be signed in to change notification settings - Fork 7
/
registertxroutes.go
40 lines (34 loc) · 1017 Bytes
/
registertxroutes.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
package cli
import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/spf13/cobra"
"github.com/coinexchain/cet-sdk/modules/bancorlite/internal/types"
)
// GetQueryCmd returns the cli query commands for this module
func GetQueryCmd(cdc *codec.Codec) *cobra.Command {
// Group asset queries under a subcommand
bancorliteQueryCmd := &cobra.Command{
Use: types.StoreKey,
Short: "Querying commands for the bancorlite module",
}
bancorliteQueryCmd.AddCommand(client.GetCommands(
QueryParamsCmd(cdc),
QueryBancorInfoCmd(cdc),
QueryBancorListCmd(cdc),
)...)
return bancorliteQueryCmd
}
// GetTxCmd returns the transaction commands for this module
func GetTxCmd(cdc *codec.Codec) *cobra.Command {
bancorliteTxCmd := &cobra.Command{
Use: types.StoreKey,
Short: "bancorlite transactions subcommands",
}
bancorliteTxCmd.AddCommand(client.PostCommands(
BancorInitCmd(cdc),
BancorTradeCmd(cdc),
BancorCancelCmd(cdc),
)...)
return bancorliteTxCmd
}