-
Notifications
You must be signed in to change notification settings - Fork 338
/
flags.go
48 lines (39 loc) · 1.82 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
// Copyright (c) 2016-2021 Shanghai Bianjie AI Technology Inc. (licensed under the Apache License, Version 2.0)
// Modifications Copyright (c) 2021-present Crypto.org (licensed under the Apache License, Version 2.0)
package cli
import (
flag "github.com/spf13/pflag"
)
const (
FlagTokenName = "name"
FlagTokenURI = "uri"
FlagTokenData = "data"
FlagRecipient = "recipient"
FlagOwner = "owner"
FlagDenomName = "name"
FlagDenomID = "denom-id"
FlagSchema = "schema"
FlagDenomURI = "uri"
)
var (
FsIssueDenom = flag.NewFlagSet("", flag.ContinueOnError)
FsMintNFT = flag.NewFlagSet("", flag.ContinueOnError)
FsEditNFT = flag.NewFlagSet("", flag.ContinueOnError)
FsTransferNFT = flag.NewFlagSet("", flag.ContinueOnError)
FsQuerySupply = flag.NewFlagSet("", flag.ContinueOnError)
FsQueryOwner = flag.NewFlagSet("", flag.ContinueOnError)
)
func init() {
FsIssueDenom.String(FlagSchema, "", "Denom data structure definition")
FsIssueDenom.String(FlagDenomName, "", "The name of the denom")
FsIssueDenom.String(FlagDenomURI, "", "URI of the denom")
FsMintNFT.String(FlagTokenURI, "", "URI for supplemental off-chain tokenData (should return a JSON object)")
FsMintNFT.String(FlagRecipient, "", "Receiver of the nft, if not filled, the default is the sender of the transaction")
FsMintNFT.String(FlagTokenData, "", "The origin data of the nft")
FsMintNFT.String(FlagTokenName, "", "The name of the nft")
FsEditNFT.String(FlagTokenURI, "[do-not-modify]", "URI for the supplemental off-chain token data (should return a JSON object)")
FsEditNFT.String(FlagTokenData, "[do-not-modify]", "The token data of the nft")
FsEditNFT.String(FlagTokenName, "[do-not-modify]", "The name of the nft")
FsQuerySupply.String(FlagOwner, "", "The owner of the nft")
FsQueryOwner.String(FlagDenomID, "", "The name of the collection")
}