restructure to remove deps on example

This commit is contained in:
rigelrozanski
2018-03-01 02:36:57 +00:00
parent 5bc5135c1b
commit 3be46395cf
12 changed files with 154 additions and 118 deletions
+10 -3
View File
@@ -14,7 +14,11 @@ import (
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/version"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/commands"
bankcmd "github.com/cosmos/cosmos-sdk/x/bank/commands"
"github.com/cosmos/cosmos-sdk/examples/basecoin/app"
"github.com/cosmos/cosmos-sdk/examples/basecoin/types"
)
// gaiacliCmd is the entry point for this binary
@@ -33,20 +37,23 @@ func main() {
// disable sorting
cobra.EnableCommandSorting = false
// get the codec
cdc := app.MakeCodec()
// add standard rpc, and tx commands
rpc.AddCommands(basecliCmd)
basecliCmd.AddCommand(client.LineBreak)
tx.AddCommands(basecliCmd)
tx.AddCommands(basecliCmd, cdc)
basecliCmd.AddCommand(client.LineBreak)
// add query/post commands (custom to binary)
basecliCmd.AddCommand(
client.GetCommands(
bankcmd.GetAccountCmd("main"),
authcmd.GetAccountCmd("main", cdc, types.GetParseAccount(cdc)),
)...)
basecliCmd.AddCommand(
client.PostCommands(
bankcmd.SendTxCommand(),
bankcmd.SendTxCmd(cdc),
)...)
// add proxy, version and key info