-
Notifications
You must be signed in to change notification settings - Fork 55
/
flags.go
59 lines (41 loc) · 1.38 KB
/
flags.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
package cli
// DONTCOVER
import (
flag "github.com/spf13/pflag"
)
const (
FlagPairId = "pair-id"
FlagDisabled = "disabled"
FlagPoolCoinDenom = "pool-coin-denom"
FlagReserveAddress = "reserve-address"
FlagDenoms = "denoms"
FlagOrderLifespan = "order-lifespan"
FlagNumTicks = "num-ticks"
)
func flagSetPools() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagPairId, "", "The pair id")
fs.String(FlagDisabled, "", "Whether the pool is disabled or not")
return fs
}
func flagSetPool() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagPoolCoinDenom, "", "The denomination of the pool coin")
fs.String(FlagReserveAddress, "", "The bech-32 encoded address of the reserve account")
return fs
}
func flagSetPairs() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.StringSlice(FlagDenoms, []string{}, "Coin denominations to query")
return fs
}
func flagSetOrders() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagPairId, "", "The pair id")
return fs
}
func flagSetOrder() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.Duration(FlagOrderLifespan, 0, "Duration the order lives until it is expired; an order will be executed for at least one batch, even if the lifespan is 0; valid time units are ns|us|ms|s|m|h")
return fs
}