mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
cli: use capital letter for Usage
To unified cli help only capital letter is used in Usage field. Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
25dddc33cd
commit
2f5c26f14b
12 changed files with 97 additions and 97 deletions
|
@ -49,18 +49,18 @@ const RPCEndpointFlag = "rpc-endpoint"
|
|||
// Wallet is a set of flags used for wallet operations.
|
||||
var Wallet = []cli.Flag{cli.StringFlag{
|
||||
Name: "wallet, w",
|
||||
Usage: "wallet to use to get the key for transaction signing; conflicts with --wallet-config flag",
|
||||
Usage: "Wallet to use to get the key for transaction signing; conflicts with --wallet-config flag",
|
||||
}, cli.StringFlag{
|
||||
Name: "wallet-config",
|
||||
Usage: "path to wallet config to use to get the key for transaction signing; conflicts with --wallet flag"},
|
||||
Usage: "Path to wallet config to use to get the key for transaction signing; conflicts with --wallet flag"},
|
||||
}
|
||||
|
||||
// Network is a set of flags for choosing the network to operate on
|
||||
// (privnet/mainnet/testnet).
|
||||
var Network = []cli.Flag{
|
||||
cli.BoolFlag{Name: "privnet, p", Usage: "use private network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "mainnet, m", Usage: "use mainnet network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "testnet, t", Usage: "use testnet network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "privnet, p", Usage: "Use private network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "mainnet, m", Usage: "Use mainnet network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "testnet, t", Usage: "Use testnet network configuration (if --config-file option is not specified)"},
|
||||
cli.BoolFlag{Name: "unittest", Hidden: true},
|
||||
}
|
||||
|
||||
|
@ -86,27 +86,27 @@ var Historic = cli.StringFlag{
|
|||
// Config is a flag for commands that use node configuration.
|
||||
var Config = cli.StringFlag{
|
||||
Name: "config-path",
|
||||
Usage: "path to directory with per-network configuration files (may be overridden by --config-file option for the configuration file)",
|
||||
Usage: "Path to directory with per-network configuration files (may be overridden by --config-file option for the configuration file)",
|
||||
}
|
||||
|
||||
// ConfigFile is a flag for commands that use node configuration and provide
|
||||
// path to the specific config file instead of config path.
|
||||
var ConfigFile = cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Usage: "path to the node configuration file (overrides --config-path option)",
|
||||
Usage: "Path to the node configuration file (overrides --config-path option)",
|
||||
}
|
||||
|
||||
// RelativePath is a flag for commands that use node configuration and provide
|
||||
// a prefix to all relative paths in config files.
|
||||
var RelativePath = cli.StringFlag{
|
||||
Name: "relative-path",
|
||||
Usage: "a prefix to all relative paths in the node configuration file",
|
||||
Usage: "Prefix to all relative paths in the node configuration file",
|
||||
}
|
||||
|
||||
// Debug is a flag for commands that allow node in debug mode usage.
|
||||
var Debug = cli.BoolFlag{
|
||||
Name: "debug, d",
|
||||
Usage: "enable debug logging (LOTS of output, overrides configuration)",
|
||||
Usage: "Enable debug logging (LOTS of output, overrides configuration)",
|
||||
}
|
||||
|
||||
var errNoEndpoint = errors.New("no RPC endpoint specified, use option '--" + RPCEndpointFlag + "' or '-r'")
|
||||
|
|
|
@ -43,7 +43,7 @@ func NewCommands() []cli.Command {
|
|||
cfgWithCountFlags = append(cfgWithCountFlags,
|
||||
cli.UintFlag{
|
||||
Name: "count, c",
|
||||
Usage: "number of blocks to be processed (default or 0: all chain)",
|
||||
Usage: "Number of blocks to be processed (default or 0: all chain)",
|
||||
},
|
||||
)
|
||||
var cfgCountOutFlags = make([]cli.Flag, len(cfgWithCountFlags))
|
||||
|
@ -51,7 +51,7 @@ func NewCommands() []cli.Command {
|
|||
cfgCountOutFlags = append(cfgCountOutFlags,
|
||||
cli.UintFlag{
|
||||
Name: "start, s",
|
||||
Usage: "block number to start from (default: 0)",
|
||||
Usage: "Block number to start from (default: 0)",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "out, o",
|
||||
|
@ -67,11 +67,11 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
cli.StringFlag{
|
||||
Name: "dump",
|
||||
Usage: "directory for storing JSON dumps",
|
||||
Usage: "Directory for storing JSON dumps",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "incremental, n",
|
||||
Usage: "use if dump is incremental",
|
||||
Usage: "Use if dump is incremental",
|
||||
},
|
||||
)
|
||||
var cfgHeightFlags = make([]cli.Flag, len(cfgFlags)+1)
|
||||
|
@ -84,32 +84,32 @@ func NewCommands() []cli.Command {
|
|||
return []cli.Command{
|
||||
{
|
||||
Name: "node",
|
||||
Usage: "start a NeoGo node",
|
||||
Usage: "Start a NeoGo node",
|
||||
UsageText: "neo-go node [--config-path path] [-d] [-p/-m/-t] [--config-file file]",
|
||||
Action: startServer,
|
||||
Flags: cfgFlags,
|
||||
},
|
||||
{
|
||||
Name: "db",
|
||||
Usage: "database manipulations",
|
||||
Usage: "Database manipulations",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "dump",
|
||||
Usage: "dump blocks (starting with block #1) to the file",
|
||||
Usage: "Dump blocks (starting with block #1) to the file",
|
||||
UsageText: "neo-go db dump -o file [-s start] [-c count] [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||
Action: dumpDB,
|
||||
Flags: cfgCountOutFlags,
|
||||
},
|
||||
{
|
||||
Name: "restore",
|
||||
Usage: "restore blocks from the file",
|
||||
Usage: "Restore blocks from the file",
|
||||
UsageText: "neo-go db restore -i file [--dump] [-n] [-c count] [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||
Action: restoreDB,
|
||||
Flags: cfgCountInFlags,
|
||||
},
|
||||
{
|
||||
Name: "reset",
|
||||
Usage: "reset database to the previous state",
|
||||
Usage: "Reset database to the previous state",
|
||||
UsageText: "neo-go db reset --height height [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||
Action: resetDB,
|
||||
Flags: cfgHeightFlags,
|
||||
|
|
|
@ -36,7 +36,7 @@ var generatorFlags = []cli.Flag{
|
|||
|
||||
var generateWrapperCmd = cli.Command{
|
||||
Name: "generate-wrapper",
|
||||
Usage: "generate wrapper to use in other contracts",
|
||||
Usage: "Generate wrapper to use in other contracts",
|
||||
UsageText: "neo-go contract generate-wrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]",
|
||||
Description: `Generates a Go wrapper to use it in other smart contracts. If the
|
||||
--hash flag is provided, CALLT instruction is used for the target contract
|
||||
|
@ -50,7 +50,7 @@ var generateWrapperCmd = cli.Command{
|
|||
|
||||
var generateRPCWrapperCmd = cli.Command{
|
||||
Name: "generate-rpcwrapper",
|
||||
Usage: "generate RPC wrapper to use for data reads",
|
||||
Usage: "Generate RPC wrapper to use for data reads",
|
||||
UsageText: "neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]",
|
||||
Action: contractGenerateRPCWrapper,
|
||||
Flags: generatorFlags,
|
||||
|
|
|
@ -45,7 +45,7 @@ var (
|
|||
errFileExist = errors.New("A file with given smart-contract name already exists")
|
||||
addressFlag = flags.AddressFlag{
|
||||
Name: addressFlagName,
|
||||
Usage: "address to use as transaction signee (and gas source)",
|
||||
Usage: "Address to use as transaction signee (and gas source)",
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -108,28 +108,28 @@ func NewCommands() []cli.Command {
|
|||
manifestAddGroupFlags := append([]cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "sender, s",
|
||||
Usage: "deploy transaction sender",
|
||||
Usage: "Deploy transaction sender",
|
||||
},
|
||||
flags.AddressFlag{
|
||||
Name: addressFlagName, // use the same name for handler code unification.
|
||||
Usage: "account to sign group with",
|
||||
Usage: "Account to sign group with",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "nef, n",
|
||||
Usage: "path to the NEF file",
|
||||
Usage: "Path to the NEF file",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "manifest, m",
|
||||
Usage: "path to the manifest",
|
||||
Usage: "Path to the manifest",
|
||||
},
|
||||
}, options.Wallet...)
|
||||
return []cli.Command{{
|
||||
Name: "contract",
|
||||
Usage: "compile - debug - deploy smart contracts",
|
||||
Usage: "Compile - debug - deploy smart contracts",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "compile",
|
||||
Usage: "compile a smart contract to a .nef file",
|
||||
Usage: "Compile a smart contract to a .nef file",
|
||||
UsageText: "neo-go contract compile -i path [-o nef] [-v] [-d] [-m manifest] [-c yaml] [--bindings file] [--no-standards] [--no-events] [--no-permissions] [--guess-eventtypes]",
|
||||
Description: `Compiles given smart contract to a .nef file and emits other associated
|
||||
information (manifest, bindings configuration, debug information files) if
|
||||
|
@ -167,29 +167,29 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
cli.BoolFlag{
|
||||
Name: "no-standards",
|
||||
Usage: "do not check compliance with supported standards",
|
||||
Usage: "Do not check compliance with supported standards",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "no-events",
|
||||
Usage: "do not check emitted events with the manifest",
|
||||
Usage: "Do not check emitted events with the manifest",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "no-permissions",
|
||||
Usage: "do not check if invoked contracts are allowed in manifest",
|
||||
Usage: "Do not check if invoked contracts are allowed in manifest",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "guess-eventtypes",
|
||||
Usage: "guess event types for smart-contract bindings configuration from the code usages",
|
||||
Usage: "Guess event types for smart-contract bindings configuration from the code usages",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "bindings",
|
||||
Usage: "output file for smart-contract bindings configuration",
|
||||
Usage: "Output file for smart-contract bindings configuration",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "deploy",
|
||||
Usage: "deploy a smart contract (.nef with description)",
|
||||
Usage: "Deploy a smart contract (.nef with description)",
|
||||
UsageText: "neo-go contract deploy -r endpoint -w wallet [-a address] [-g gas] [-e sysgas] --in contract.nef --manifest contract.manifest.json [--out file] [--force] [--await] [data]",
|
||||
Description: `Deploys given contract into the chain. The gas parameter is for additional
|
||||
gas to be added as a network fee to prioritize the transaction. The data
|
||||
|
@ -204,7 +204,7 @@ func NewCommands() []cli.Command {
|
|||
generateRPCWrapperCmd,
|
||||
{
|
||||
Name: "invokefunction",
|
||||
Usage: "invoke deployed contract on the blockchain",
|
||||
Usage: "Invoke deployed contract on the blockchain",
|
||||
UsageText: "neo-go contract invokefunction -r endpoint -w wallet [-a address] [-g gas] [-e sysgas] [--out file] [--force] [--await] scripthash [method] [arguments...] [--] [signers...]",
|
||||
Description: `Executes given (as a script hash) deployed script with the given method,
|
||||
arguments and signers. Sender is included in the list of signers by default
|
||||
|
@ -219,7 +219,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "testinvokefunction",
|
||||
Usage: "invoke deployed contract on the blockchain (test mode)",
|
||||
Usage: "Invoke deployed contract on the blockchain (test mode)",
|
||||
UsageText: "neo-go contract testinvokefunction -r endpoint [--historic index/hash] scripthash [method] [arguments...] [--] [signers...]",
|
||||
Description: `Executes given (as a script hash) deployed script with the given method,
|
||||
arguments and signers (sender is not included by default). If no method is given
|
||||
|
@ -250,63 +250,63 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "init",
|
||||
Usage: "initialize a new smart-contract in a directory with boiler plate code",
|
||||
Usage: "Initialize a new smart-contract in a directory with boiler plate code",
|
||||
UsageText: "neo-go contract init -n name [--skip-details]",
|
||||
Action: initSmartContract,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "name, n",
|
||||
Usage: "name of the smart-contract to be initialized",
|
||||
Usage: "Name of the smart-contract to be initialized",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "skip-details, skip",
|
||||
Usage: "skip filling in the projects and contract details",
|
||||
Usage: "Skip filling in the projects and contract details",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "inspect",
|
||||
Usage: "creates a user readable dump of the program instructions",
|
||||
Usage: "Creates a user readable dump of the program instructions",
|
||||
UsageText: "neo-go contract inspect -i file [-c]",
|
||||
Action: inspect,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "compile, c",
|
||||
Usage: "compile input file (it should be go code then)",
|
||||
Usage: "Compile input file (it should be go code then)",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "in, i",
|
||||
Usage: "input file of the program (either .go or .nef)",
|
||||
Usage: "Input file of the program (either .go or .nef)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "calc-hash",
|
||||
Usage: "calculates hash of a contract after deployment",
|
||||
Usage: "Calculates hash of a contract after deployment",
|
||||
UsageText: "neo-go contract calc-hash -i nef -m manifest -s address",
|
||||
Action: calcHash,
|
||||
Flags: []cli.Flag{
|
||||
flags.AddressFlag{
|
||||
Name: "sender, s",
|
||||
Usage: "sender script hash or address",
|
||||
Usage: "Sender script hash or address",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "in",
|
||||
Usage: "path to NEF file",
|
||||
Usage: "Path to NEF file",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "manifest, m",
|
||||
Usage: "path to manifest file",
|
||||
Usage: "Path to manifest file",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "manifest",
|
||||
Usage: "manifest-related commands",
|
||||
Usage: "Manifest-related commands",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "add-group",
|
||||
Usage: "adds group to the manifest",
|
||||
Usage: "Adds group to the manifest",
|
||||
UsageText: "neo-go contract manifest add-group -w wallet [--wallet-config path] -n nef -m manifest -a address -s address",
|
||||
Action: manifestAddGroup,
|
||||
Flags: manifestAddGroupFlags,
|
||||
|
|
|
@ -23,17 +23,17 @@ var (
|
|||
// GasFlag is a flag used for the additional network fee.
|
||||
GasFlag = flags.Fixed8Flag{
|
||||
Name: "gas, g",
|
||||
Usage: "network fee to add to the transaction (prioritizing it)",
|
||||
Usage: "Network fee to add to the transaction (prioritizing it)",
|
||||
}
|
||||
// SysGasFlag is a flag used for the additional system fee.
|
||||
SysGasFlag = flags.Fixed8Flag{
|
||||
Name: "sysgas, e",
|
||||
Usage: "system fee to add to the transaction (compensating for execution)",
|
||||
Usage: "System fee to add to the transaction (compensating for execution)",
|
||||
}
|
||||
// OutFlag is a flag used for file output.
|
||||
OutFlag = cli.StringFlag{
|
||||
Name: "out",
|
||||
Usage: "file (JSON) to put signature context with a transaction to",
|
||||
Usage: "File (JSON) to put signature context with a transaction to",
|
||||
}
|
||||
// ForceFlag is a flag used to force transaction send.
|
||||
ForceFlag = cli.BoolFlag{
|
||||
|
@ -43,7 +43,7 @@ var (
|
|||
// AwaitFlag is a flag used to wait for the transaction to be included in a block.
|
||||
AwaitFlag = cli.BoolFlag{
|
||||
Name: "await",
|
||||
Usage: "wait for the transaction to be included in a block",
|
||||
Usage: "Wait for the transaction to be included in a block",
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ func NewCommands() []cli.Command {
|
|||
txCancelFlags := append([]cli.Flag{
|
||||
flags.AddressFlag{
|
||||
Name: "address, a",
|
||||
Usage: "address to use as conflicting transaction signee (and gas source)",
|
||||
Usage: "Address to use as conflicting transaction signee (and gas source)",
|
||||
},
|
||||
txctx.GasFlag,
|
||||
txctx.AwaitFlag,
|
||||
|
@ -95,11 +95,11 @@ func NewCommands() []cli.Command {
|
|||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "in, i",
|
||||
Usage: "input file containing base64- or hex- encoded script representation",
|
||||
Usage: "Input file containing base64- or hex- encoded script representation",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "hex",
|
||||
Usage: "use hex encoding and do not check base64",
|
||||
Usage: "Use hex encoding and do not check base64",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@ func NewCommands() []cli.Command {
|
|||
cfgFlags = append(cfgFlags, options.Network...)
|
||||
return []cli.Command{{
|
||||
Name: "vm",
|
||||
Usage: "start the virtual machine",
|
||||
Usage: "Start the virtual machine",
|
||||
Action: startVMPrompt,
|
||||
Flags: cfgFlags,
|
||||
}}
|
||||
|
|
|
@ -48,7 +48,7 @@ func newNEP11Commands() []cli.Command {
|
|||
return []cli.Command{
|
||||
{
|
||||
Name: "balance",
|
||||
Usage: "get address balance",
|
||||
Usage: "Get address balance",
|
||||
UsageText: "balance -w wallet [--wallet-config path] --rpc-endpoint <node> [--timeout <time>] [--address <address>] [--token <hash-or-name>] [--id <token-id>]",
|
||||
Description: `Prints NEP-11 balances for address and assets/IDs specified. By default (no
|
||||
address or token parameter) all tokens (NFT contracts) for all accounts in
|
||||
|
@ -70,14 +70,14 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "import",
|
||||
Usage: "import NEP-11 token to a wallet",
|
||||
Usage: "Import NEP-11 token to a wallet",
|
||||
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||
Action: importNEP11Token,
|
||||
Flags: importFlags,
|
||||
},
|
||||
{
|
||||
Name: "info",
|
||||
Usage: "print imported NEP-11 token info",
|
||||
Usage: "Print imported NEP-11 token info",
|
||||
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||
Action: printNEP11Info,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -88,7 +88,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "remove",
|
||||
Usage: "remove NEP-11 token from the wallet",
|
||||
Usage: "Remove NEP-11 token from the wallet",
|
||||
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||
Action: removeNEP11Token,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -100,7 +100,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "transfer",
|
||||
Usage: "transfer NEP-11 tokens",
|
||||
Usage: "Transfer NEP-11 tokens",
|
||||
UsageText: "transfer -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --id <token-id> [--amount string] [--await] [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
||||
Action: transferNEP11,
|
||||
Flags: transferFlags,
|
||||
|
@ -116,7 +116,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "properties",
|
||||
Usage: "print properties of NEP-11 token",
|
||||
Usage: "Print properties of NEP-11 token",
|
||||
UsageText: "properties --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||
Action: printNEP11Properties,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -127,7 +127,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "ownerOf",
|
||||
Usage: "print owner of non-divisible NEP-11 token with the specified ID",
|
||||
Usage: "Print owner of non-divisible NEP-11 token with the specified ID",
|
||||
UsageText: "ownerOf --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||
Action: printNEP11NDOwner,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -138,7 +138,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "ownerOfD",
|
||||
Usage: "print set of owners of divisible NEP-11 token with the specified ID (" + maxIters + " will be printed at max)",
|
||||
Usage: "Print set of owners of divisible NEP-11 token with the specified ID (" + maxIters + " will be printed at max)",
|
||||
UsageText: "ownerOfD --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||
Action: printNEP11DOwner,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -149,7 +149,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "tokensOf",
|
||||
Usage: "print list of tokens IDs for the specified NFT owner (" + maxIters + " will be printed at max)",
|
||||
Usage: "Print list of tokens IDs for the specified NFT owner (" + maxIters + " will be printed at max)",
|
||||
UsageText: "tokensOf --rpc-endpoint <node> [--timeout <time>] --token <hash> --address <addr> [--historic <block/hash>]",
|
||||
Action: printNEP11TokensOf,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -160,7 +160,7 @@ func newNEP11Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "tokens",
|
||||
Usage: "print list of tokens IDs minted by the specified NFT (optional method; " + maxIters + " will be printed at max)",
|
||||
Usage: "Print list of tokens IDs minted by the specified NFT (optional method; " + maxIters + " will be printed at max)",
|
||||
UsageText: "tokens --rpc-endpoint <node> [--timeout <time>] --token <hash> [--historic <block/hash>]",
|
||||
Action: printNEP11Tokens,
|
||||
Flags: append([]cli.Flag{
|
||||
|
|
|
@ -98,7 +98,7 @@ func newNEP17Commands() []cli.Command {
|
|||
return []cli.Command{
|
||||
{
|
||||
Name: "balance",
|
||||
Usage: "get address balance",
|
||||
Usage: "Get address balance",
|
||||
UsageText: "balance -w wallet [--wallet-config path] --rpc-endpoint <node> [--timeout <time>] [--address <address>] [--token <hash-or-name>]",
|
||||
Description: `Prints NEP-17 balances for address and tokens specified. By default (no
|
||||
address or token parameter) all tokens for all accounts in the specified wallet
|
||||
|
@ -118,14 +118,14 @@ func newNEP17Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "import",
|
||||
Usage: "import NEP-17 token to a wallet",
|
||||
Usage: "Import NEP-17 token to a wallet",
|
||||
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||
Action: importNEP17Token,
|
||||
Flags: importFlags,
|
||||
},
|
||||
{
|
||||
Name: "info",
|
||||
Usage: "print imported NEP-17 token info",
|
||||
Usage: "Print imported NEP-17 token info",
|
||||
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||
Action: printNEP17Info,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -136,7 +136,7 @@ func newNEP17Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "remove",
|
||||
Usage: "remove NEP-17 token from the wallet",
|
||||
Usage: "Remove NEP-17 token from the wallet",
|
||||
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||
Action: removeNEP17Token,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -148,7 +148,7 @@ func newNEP17Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "transfer",
|
||||
Usage: "transfer NEP-17 tokens",
|
||||
Usage: "Transfer NEP-17 tokens",
|
||||
UsageText: "transfer -w wallet [--wallet-config path] [--await] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --amount string [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
||||
Action: transferNEP17,
|
||||
Flags: transferFlags,
|
||||
|
@ -163,7 +163,7 @@ func newNEP17Commands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "multitransfer",
|
||||
Usage: "transfer NEP-17 tokens to multiple recipients",
|
||||
Usage: "Transfer NEP-17 tokens to multiple recipients",
|
||||
UsageText: `multitransfer -w wallet [--wallet-config path] [--await] --rpc-endpoint <node> --timeout <time> --from <addr>` +
|
||||
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
|
||||
Action: multiTransferNEP17,
|
||||
|
|
|
@ -19,7 +19,7 @@ func newValidatorCommands() []cli.Command {
|
|||
return []cli.Command{
|
||||
{
|
||||
Name: "register",
|
||||
Usage: "register as a new candidate",
|
||||
Usage: "Register as a new candidate",
|
||||
UsageText: "register -w <path> -r <rpc> -a <addr> [-g gas] [-e sysgas] [--out file] [--force] [--await]",
|
||||
Action: handleRegister,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -38,7 +38,7 @@ func newValidatorCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "unregister",
|
||||
Usage: "unregister self as a candidate",
|
||||
Usage: "Unregister self as a candidate",
|
||||
UsageText: "unregister -w <path> -r <rpc> -a <addr> [-g gas] [-e sysgas] [--out file] [--force] [--await]",
|
||||
Action: handleUnregister,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -57,7 +57,7 @@ func newValidatorCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "vote",
|
||||
Usage: "vote for a validator",
|
||||
Usage: "Vote for a validator",
|
||||
UsageText: "vote -w <path> -r <rpc> [-s <timeout>] [-g gas] [-e sysgas] -a <addr> [-c <public key>] [--out file] [--force] [--await]",
|
||||
Description: `Votes for a validator by calling "vote" method of a NEO native
|
||||
contract. Do not provide candidate argument to perform unvoting. If --await flag is
|
||||
|
|
|
@ -65,7 +65,7 @@ var (
|
|||
}
|
||||
inFlag = cli.StringFlag{
|
||||
Name: "in",
|
||||
Usage: "file with JSON transaction",
|
||||
Usage: "File with JSON transaction",
|
||||
}
|
||||
fromAddrFlag = flags.AddressFlag{
|
||||
Name: "from",
|
||||
|
@ -107,18 +107,18 @@ func NewCommands() []cli.Command {
|
|||
signFlags = append(signFlags, options.RPC...)
|
||||
return []cli.Command{{
|
||||
Name: "wallet",
|
||||
Usage: "create, open and manage a Neo wallet",
|
||||
Usage: "Create, open and manage a Neo wallet",
|
||||
Subcommands: []cli.Command{
|
||||
{
|
||||
Name: "claim",
|
||||
Usage: "claim GAS",
|
||||
Usage: "Claim GAS",
|
||||
UsageText: "neo-go wallet claim -w wallet [--wallet-config path] [-g gas] [-e sysgas] -a address -r endpoint [-s timeout] [--out file] [--force] [--await]",
|
||||
Action: claimGas,
|
||||
Flags: claimFlags,
|
||||
},
|
||||
{
|
||||
Name: "init",
|
||||
Usage: "create a new wallet",
|
||||
Usage: "Create a new wallet",
|
||||
UsageText: "neo-go wallet init -w wallet [--wallet-config path] [-a]",
|
||||
Action: createWallet,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -132,20 +132,20 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "change-password",
|
||||
Usage: "change password for accounts",
|
||||
Usage: "Change password for accounts",
|
||||
UsageText: "neo-go wallet change-password -w wallet -a address",
|
||||
Action: changePassword,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
flags.AddressFlag{
|
||||
Name: "address, a",
|
||||
Usage: "address to change password for",
|
||||
Usage: "Address to change password for",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "convert",
|
||||
Usage: "convert addresses from existing Neo Legacy NEP6-wallet to Neo N3 format",
|
||||
Usage: "Convert addresses from existing Neo Legacy NEP6-wallet to Neo N3 format",
|
||||
UsageText: "neo-go wallet convert -w legacywallet [--wallet-config path] -o n3wallet",
|
||||
Action: convertWallet,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -153,13 +153,13 @@ func NewCommands() []cli.Command {
|
|||
walletConfigFlag,
|
||||
cli.StringFlag{
|
||||
Name: "out, o",
|
||||
Usage: "where to write converted wallet",
|
||||
Usage: "Where to write converted wallet",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "create",
|
||||
Usage: "add an account to the existing wallet",
|
||||
Usage: "Add an account to the existing wallet",
|
||||
UsageText: "neo-go wallet create -w wallet [--wallet-config path]",
|
||||
Action: addAccount,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -169,7 +169,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "dump",
|
||||
Usage: "check and dump an existing Neo wallet",
|
||||
Usage: "Check and dump an existing Neo wallet",
|
||||
UsageText: "neo-go wallet dump -w wallet [--wallet-config path] [-d]",
|
||||
Description: `Prints the given wallet (via -w option or via wallet configuration file) in JSON
|
||||
format to the standard output. If -d is given, private keys are unencrypted and
|
||||
|
@ -185,7 +185,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "dump-keys",
|
||||
Usage: "dump public keys for account",
|
||||
Usage: "Dump public keys for account",
|
||||
UsageText: "neo-go wallet dump-keys -w wallet [--wallet-config path] [-a address]",
|
||||
Action: dumpKeys,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -193,13 +193,13 @@ func NewCommands() []cli.Command {
|
|||
walletConfigFlag,
|
||||
flags.AddressFlag{
|
||||
Name: "address, a",
|
||||
Usage: "address to print public keys for",
|
||||
Usage: "Address to print public keys for",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "export",
|
||||
Usage: "export keys for address",
|
||||
Usage: "Export keys for address",
|
||||
UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<address>]",
|
||||
Description: `Prints the key for the given account to the standard output. It uses NEP-2
|
||||
encrypted format by default (the way NEP-6 wallets store it) or WIF format if
|
||||
|
@ -216,7 +216,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "import",
|
||||
Usage: "import WIF of a standard signature contract",
|
||||
Usage: "Import WIF of a standard signature contract",
|
||||
UsageText: "import -w wallet [--wallet-config path] --wif <wif> [--name <account_name>]",
|
||||
Action: importWallet,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -235,7 +235,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "import-multisig",
|
||||
Usage: "import multisig contract",
|
||||
Usage: "Import multisig contract",
|
||||
UsageText: "import-multisig -w wallet [--wallet-config path] [--wif <wif>] [--name <account_name>] --min <m>" +
|
||||
" [<pubkey1> [<pubkey2> [...]]]",
|
||||
Description: `Imports a standard multisignature contract with "m out of n" signatures required where "m" is
|
||||
|
@ -262,7 +262,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "import-deployed",
|
||||
Usage: "import deployed contract",
|
||||
Usage: "Import deployed contract",
|
||||
UsageText: "import-deployed -w wallet [--wallet-config path] --wif <wif> --contract <hash> [--name <account_name>]",
|
||||
Action: importDeployed,
|
||||
Flags: append([]cli.Flag{
|
||||
|
@ -281,7 +281,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "remove",
|
||||
Usage: "remove an account from the wallet",
|
||||
Usage: "Remove an account from the wallet",
|
||||
UsageText: "remove -w wallet [--wallet-config path] [--force] --address <addr>",
|
||||
Action: removeAccount,
|
||||
Flags: []cli.Flag{
|
||||
|
@ -296,7 +296,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "sign",
|
||||
Usage: "cosign transaction with multisig/contract/additional account",
|
||||
Usage: "Cosign transaction with multisig/contract/additional account",
|
||||
UsageText: "sign -w wallet [--wallet-config path] --address <address> --in <file.in> [--out <file.out>] [-r <endpoint>] [--await]",
|
||||
Description: `Signs the given (in file.in) context (which must be a transaction
|
||||
signing context) for the given address using the given wallet. This command can
|
||||
|
@ -312,7 +312,7 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "strip-keys",
|
||||
Usage: "remove private keys for all accounts",
|
||||
Usage: "Remove private keys for all accounts",
|
||||
UsageText: "neo-go wallet strip-keys -w wallet [--wallet-config path] [--force]",
|
||||
Description: `Removes private keys for all accounts from the given wallet. Notice,
|
||||
this is a very dangerous action (you can lose keys if you don't have a wallet
|
||||
|
@ -329,17 +329,17 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
{
|
||||
Name: "nep17",
|
||||
Usage: "work with NEP-17 contracts",
|
||||
Usage: "Work with NEP-17 contracts",
|
||||
Subcommands: newNEP17Commands(),
|
||||
},
|
||||
{
|
||||
Name: "nep11",
|
||||
Usage: "work with NEP-11 contracts",
|
||||
Usage: "Work with NEP-11 contracts",
|
||||
Subcommands: newNEP11Commands(),
|
||||
},
|
||||
{
|
||||
Name: "candidate",
|
||||
Usage: "work with candidates",
|
||||
Usage: "Work with candidates",
|
||||
Subcommands: newValidatorCommands(),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -169,7 +169,7 @@ func main() {
|
|||
ctl.Flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "ignore-height, g",
|
||||
Usage: "ignore height difference",
|
||||
Usage: "Ignore height difference",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue