cosmos-sdk/cmd/commands/flags.go

132 lines
2.2 KiB
Go
Raw Normal View History

package commands
2017-01-29 15:32:38 -08:00
import (
"github.com/urfave/cli"
)
// start flags
var (
2017-01-30 06:27:02 -08:00
AddrFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "address",
Value: "tcp://0.0.0.0:46658",
Usage: "Listen address",
}
2017-01-30 06:27:02 -08:00
EyesFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "eyes",
Value: "local",
Usage: "MerkleEyes address, or 'local' for embedded",
}
// TODO: move to config file
// eyesCacheSizePtr := flag.Int("eyes-cache-size", 10000, "MerkleEyes db cache size, for embedded")
2017-01-30 06:27:02 -08:00
DirFlag = cli.StringFlag{
2017-01-29 21:27:57 -08:00
Name: "dir",
Value: ".",
Usage: "Root directory",
2017-01-29 15:32:38 -08:00
}
2017-01-30 06:27:02 -08:00
InProcTMFlag = cli.BoolFlag{
2017-01-29 15:32:38 -08:00
Name: "in-proc",
Usage: "Run Tendermint in-process with the App",
}
)
// tx flags
var (
2017-01-30 06:27:02 -08:00
NodeFlag = cli.StringFlag{
2017-01-29 18:41:37 -08:00
Name: "node",
2017-01-29 15:32:38 -08:00
Value: "tcp://localhost:46657",
Usage: "Tendermint RPC address",
}
2017-01-30 06:27:02 -08:00
ToFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "to",
Value: "",
Usage: "Destination address for the transaction",
}
2017-01-30 06:27:02 -08:00
AmountFlag = cli.IntFlag{
2017-01-29 15:32:38 -08:00
Name: "amount",
Value: 0,
Usage: "Amount of coins to send in the transaction",
}
2017-01-30 06:27:02 -08:00
FromFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "from",
2017-02-07 13:10:17 -08:00
Value: "key.json",
2017-01-29 15:32:38 -08:00
Usage: "Path to a private key to sign the transaction",
}
2017-01-30 06:27:02 -08:00
SeqFlag = cli.IntFlag{
2017-01-29 15:32:38 -08:00
Name: "sequence",
Value: 0,
Usage: "Sequence number for the account",
}
2017-01-30 06:27:02 -08:00
CoinFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "coin",
2017-02-12 22:15:01 -08:00
Value: "mycoin",
2017-01-29 15:32:38 -08:00
Usage: "Specify a coin denomination",
}
2017-01-30 06:27:02 -08:00
GasFlag = cli.IntFlag{
2017-01-29 15:32:38 -08:00
Name: "gas",
Value: 0,
Usage: "The amount of gas for the transaction",
}
2017-01-30 06:27:02 -08:00
FeeFlag = cli.IntFlag{
2017-01-29 15:32:38 -08:00
Name: "fee",
Value: 0,
Usage: "The transaction fee",
}
2017-01-30 06:27:02 -08:00
DataFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "data",
Value: "",
Usage: "Data to send with the transaction",
}
2017-01-30 06:27:02 -08:00
NameFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "name",
Value: "",
Usage: "Plugin to send the transaction to",
}
2017-01-30 06:27:02 -08:00
ChainIDFlag = cli.StringFlag{
2017-01-29 15:32:38 -08:00
Name: "chain_id",
Value: "test_chain_id",
Usage: "ID of the chain for replay protection",
}
2017-01-29 18:41:37 -08:00
)
2017-01-29 19:45:21 -08:00
// proof flags
var (
2017-01-30 06:27:02 -08:00
ProofFlag = cli.StringFlag{
2017-01-29 19:45:21 -08:00
Name: "proof",
Usage: "hex-encoded IAVL proof",
Value: "",
}
2017-01-30 06:27:02 -08:00
KeyFlag = cli.StringFlag{
2017-01-29 19:45:21 -08:00
Name: "key",
Usage: "key to the IAVL tree",
Value: "",
}
2017-01-30 06:27:02 -08:00
ValueFlag = cli.StringFlag{
2017-01-29 19:45:21 -08:00
Name: "value",
Usage: "value in the IAVL tree",
Value: "",
}
2017-01-30 06:27:02 -08:00
RootFlag = cli.StringFlag{
2017-01-29 19:45:21 -08:00
Name: "root",
Usage: "root hash of the IAVL tree",
Value: "",
}
)