-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags.go
43 lines (34 loc) · 993 Bytes
/
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
package cli
import (
flag "github.com/spf13/pflag"
)
const (
FlagProofs = "proofs"
FlagIndex = "index"
FlagStartHeight = "start-height"
FlagEndHeight = "end-height"
FlagAmount = "amount"
FlagDenom = "denom"
)
func FlagsCreate() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.Int64(FlagStartHeight, 0, "Start height of the merkledrop")
fs.Int64(FlagEndHeight, 0, "End height of the merkledrop")
fs.String(FlagDenom, "", "Denom of the merkledrop")
return fs
}
func FlagClaimMerkledrop() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagProofs, "", "Merkle proofs of the merkledrop")
fs.Int64(FlagAmount, 0, "Amount of the merkledrop")
fs.Uint64(FlagIndex, 0, "Index of the merkledrop")
return fs
}
type accountInput struct {
Address string `json:"address"`
Amount string `json:"amount"`
Index uint64 `json:"index"`
}
type accountsInput struct {
Accounts []accountInput `json:"accounts"`
}