cli: refactor usage field

Unified style is with lowercase letter.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
Ekaterina Pavlova 2024-06-07 11:00:14 +03:00
parent cf4d4a2611
commit e95d87779b
11 changed files with 85 additions and 85 deletions

View file

@ -30,44 +30,44 @@ func NewCommands() []cli.Command {
queryTxFlags := append([]cli.Flag{ queryTxFlags := append([]cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
Name: "verbose, v", Name: "verbose, v",
Usage: "Output full tx info and execution logs", Usage: "output full tx info and execution logs",
}, },
}, options.RPC...) }, options.RPC...)
return []cli.Command{{ return []cli.Command{{
Name: "query", Name: "query",
Usage: "Query data from RPC node", Usage: "query data from RPC node",
Subcommands: []cli.Command{ Subcommands: []cli.Command{
{ {
Name: "candidates", Name: "candidates",
Usage: "Get candidates and votes", Usage: "get candidates and votes",
UsageText: "neo-go query candidates -r endpoint [-s timeout]", UsageText: "neo-go query candidates -r endpoint [-s timeout]",
Action: queryCandidates, Action: queryCandidates,
Flags: options.RPC, Flags: options.RPC,
}, },
{ {
Name: "committee", Name: "committee",
Usage: "Get committee list", Usage: "get committee list",
UsageText: "neo-go query committee -r endpoint [-s timeout]", UsageText: "neo-go query committee -r endpoint [-s timeout]",
Action: queryCommittee, Action: queryCommittee,
Flags: options.RPC, Flags: options.RPC,
}, },
{ {
Name: "height", Name: "height",
Usage: "Get node height", Usage: "get node height",
UsageText: "neo-go query height -r endpoint [-s timeout]", UsageText: "neo-go query height -r endpoint [-s timeout]",
Action: queryHeight, Action: queryHeight,
Flags: options.RPC, Flags: options.RPC,
}, },
{ {
Name: "tx", Name: "tx",
Usage: "Query transaction status", Usage: "query transaction status",
UsageText: "neo-go query tx <hash> -r endpoint [-s timeout] [-v]", UsageText: "neo-go query tx <hash> -r endpoint [-s timeout] [-v]",
Action: queryTx, Action: queryTx,
Flags: queryTxFlags, Flags: queryTxFlags,
}, },
{ {
Name: "voter", Name: "voter",
Usage: "Print NEO holder account state", Usage: "print NEO holder account state",
UsageText: "neo-go query voter <address> -r endpoint [-s timeout]", UsageText: "neo-go query voter <address> -r endpoint [-s timeout]",
Action: queryVoter, Action: queryVoter,
Flags: options.RPC, Flags: options.RPC,

View file

@ -55,7 +55,7 @@ func NewCommands() []cli.Command {
}, },
cli.StringFlag{ cli.StringFlag{
Name: "out, o", Name: "out, o",
Usage: "Output file (stdout if not given)", Usage: "output file (stdout if not given)",
}, },
) )
var cfgCountInFlags = make([]cli.Flag, len(cfgWithCountFlags)) var cfgCountInFlags = make([]cli.Flag, len(cfgWithCountFlags))
@ -63,7 +63,7 @@ func NewCommands() []cli.Command {
cfgCountInFlags = append(cfgCountInFlags, cfgCountInFlags = append(cfgCountInFlags,
cli.StringFlag{ cli.StringFlag{
Name: "in, i", Name: "in, i",
Usage: "Input file (stdin if not given)", Usage: "input file (stdin if not given)",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "dump", Name: "dump",
@ -78,7 +78,7 @@ func NewCommands() []cli.Command {
copy(cfgHeightFlags, cfgFlags) copy(cfgHeightFlags, cfgFlags)
cfgHeightFlags[len(cfgHeightFlags)-1] = cli.UintFlag{ cfgHeightFlags[len(cfgHeightFlags)-1] = cli.UintFlag{
Name: "height", Name: "height",
Usage: "Height of the state to reset DB to", Usage: "height of the state to reset DB to",
Required: true, Required: true,
} }
return []cli.Command{ return []cli.Command{

View file

@ -16,21 +16,21 @@ import (
var generatorFlags = []cli.Flag{ var generatorFlags = []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "config, c", Name: "config, c",
Usage: "Configuration file to use", Usage: "configuration file to use",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "manifest, m", Name: "manifest, m",
Required: true, Required: true,
Usage: "Read contract manifest (*.manifest.json) file", Usage: "read contract manifest (*.manifest.json) file",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "out, o", Name: "out, o",
Required: true, Required: true,
Usage: "Output of the compiled wrapper", Usage: "output of the compiled wrapper",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "hash", Name: "hash",
Usage: "Smart-contract hash. If not passed, the wrapper will be designed for dynamic hash usage", Usage: "smart-contract hash. If not passed, the wrapper will be designed for dynamic hash usage",
}, },
} }

View file

@ -78,7 +78,7 @@ func NewCommands() []cli.Command {
testInvokeScriptFlags := []cli.Flag{ testInvokeScriptFlags := []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "in, i", Name: "in, i",
Usage: "Input location of the .nef file that needs to be invoked", Usage: "input location of the .nef file that needs to be invoked",
}, },
options.Historic, options.Historic,
} }
@ -98,11 +98,11 @@ func NewCommands() []cli.Command {
deployFlags := append(invokeFunctionFlags, []cli.Flag{ deployFlags := append(invokeFunctionFlags, []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "in, i", Name: "in, i",
Usage: "Input file for the smart contract (*.nef)", Usage: "input file for the smart contract (*.nef)",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "manifest, m", Name: "manifest, m",
Usage: "Manifest input file (*.manifest.json)", Usage: "manifest input file (*.manifest.json)",
}, },
}...) }...)
manifestAddGroupFlags := append([]cli.Flag{ manifestAddGroupFlags := append([]cli.Flag{
@ -143,27 +143,27 @@ func NewCommands() []cli.Command {
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "in, i", Name: "in, i",
Usage: "Input file for the smart contract to be compiled (*.go file or directory)", Usage: "input file for the smart contract to be compiled (*.go file or directory)",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "out, o", Name: "out, o",
Usage: "Output of the compiled contract", Usage: "output of the compiled contract",
}, },
cli.BoolFlag{ cli.BoolFlag{
Name: "verbose, v", Name: "verbose, v",
Usage: "Print out additional information after a compiling", Usage: "print out additional information after a compiling",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "debug, d", Name: "debug, d",
Usage: "Emit debug info in a separate file", Usage: "emit debug info in a separate file",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "manifest, m", Name: "manifest, m",
Usage: "Emit contract manifest (*.manifest.json) file into separate file using configuration input file (*.yml)", Usage: "emit contract manifest (*.manifest.json) file into separate file using configuration input file (*.yml)",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "config, c", Name: "config, c",
Usage: "Configuration input file (*.yml)", Usage: "configuration input file (*.yml)",
}, },
cli.BoolFlag{ cli.BoolFlag{
Name: "no-standards", Name: "no-standards",
@ -239,7 +239,7 @@ func NewCommands() []cli.Command {
}, },
{ {
Name: "testinvokescript", Name: "testinvokescript",
Usage: "Invoke compiled AVM code in NEF format on the blockchain (test mode, not creating a transaction for it)", Usage: "invoke compiled AVM code in NEF format on the blockchain (test mode, not creating a transaction for it)",
UsageText: "neo-go contract testinvokescript -r endpoint -i input.nef [--historic index/hash] [signers...]", UsageText: "neo-go contract testinvokescript -r endpoint -i input.nef [--historic index/hash] [signers...]",
Description: `Executes given compiled AVM instructions in NEF format with the given set of Description: `Executes given compiled AVM instructions in NEF format with the given set of
signers not included sender by default. See testinvokefunction documentation signers not included sender by default. See testinvokefunction documentation

View file

@ -38,7 +38,7 @@ var (
// ForceFlag is a flag used to force transaction send. // ForceFlag is a flag used to force transaction send.
ForceFlag = cli.BoolFlag{ ForceFlag = cli.BoolFlag{
Name: "force", Name: "force",
Usage: "Do not ask for a confirmation (and ignore errors)", Usage: "do not ask for a confirmation (and ignore errors)",
} }
// AwaitFlag is a flag used to wait for the transaction to be included in a block. // AwaitFlag is a flag used to wait for the transaction to be included in a block.
AwaitFlag = cli.BoolFlag{ AwaitFlag = cli.BoolFlag{

View file

@ -30,11 +30,11 @@ func NewCommands() []cli.Command {
return []cli.Command{ return []cli.Command{
{ {
Name: "util", Name: "util",
Usage: "Various helper commands", Usage: "various helper commands",
Subcommands: []cli.Command{ Subcommands: []cli.Command{
{ {
Name: "convert", Name: "convert",
Usage: "Convert provided argument into other possible formats", Usage: "convert provided argument into other possible formats",
UsageText: `convert <arg> UsageText: `convert <arg>
<arg> is an argument which is tried to be interpreted as an item of different types <arg> is an argument which is tried to be interpreted as an item of different types
@ -43,7 +43,7 @@ func NewCommands() []cli.Command {
}, },
{ {
Name: "sendtx", Name: "sendtx",
Usage: "Send complete transaction stored in a context file", Usage: "send complete transaction stored in a context file",
UsageText: "sendtx [-r <endpoint>] <file.in> [--await]", UsageText: "sendtx [-r <endpoint>] <file.in> [--await]",
Description: `Sends the transaction from the given context file to the given RPC node if it's Description: `Sends the transaction from the given context file to the given RPC node if it's
completely signed and ready. This command expects a ContractParametersContext completely signed and ready. This command expects a ContractParametersContext
@ -56,7 +56,7 @@ func NewCommands() []cli.Command {
}, },
{ {
Name: "canceltx", Name: "canceltx",
Usage: "Cancel transaction by sending conflicting transaction", Usage: "cancel transaction by sending conflicting transaction",
UsageText: "canceltx <txid> -r <endpoint> --wallet <wallet> [--account <account>] [--wallet-config <path>] [--gas <gas>] [--await]", UsageText: "canceltx <txid> -r <endpoint> --wallet <wallet> [--account <account>] [--wallet-config <path>] [--gas <gas>] [--await]",
Description: `Aims to prevent a transaction from being added to the blockchain by dispatching a more Description: `Aims to prevent a transaction from being added to the blockchain by dispatching a more
prioritized conflicting transaction to the specified RPC node. The input for this command should prioritized conflicting transaction to the specified RPC node. The input for this command should
@ -76,7 +76,7 @@ func NewCommands() []cli.Command {
}, },
{ {
Name: "txdump", Name: "txdump",
Usage: "Dump transaction stored in file", Usage: "dump transaction stored in file",
UsageText: "txdump [-r <endpoint>] <file.in>", UsageText: "txdump [-r <endpoint>] <file.in>",
Action: txDump, Action: txDump,
Flags: txDumpFlags, Flags: txDumpFlags,
@ -89,7 +89,7 @@ func NewCommands() []cli.Command {
}, },
{ {
Name: "ops", Name: "ops",
Usage: "Pretty-print VM opcodes of the given base64- or hex- encoded script (base64 is checked first). If the input file is specified, then the script is taken from the file.", Usage: "pretty-print VM opcodes of the given base64- or hex- encoded script (base64 is checked first). If the input file is specified, then the script is taken from the file.",
UsageText: "ops <base64/hex-encoded script> [-i path-to-file] [--hex]", UsageText: "ops <base64/hex-encoded script> [-i path-to-file] [--hex]",
Action: handleOps, Action: handleOps,
Flags: []cli.Flag{ Flags: []cli.Flag{

View file

@ -72,7 +72,7 @@ const (
var ( var (
historicFlag = cli.IntFlag{ historicFlag = cli.IntFlag{
Name: historicFlagFullName, Name: historicFlagFullName,
Usage: "Height for historic script invocation (for MPT-enabled blockchain configuration with KeepOnlyLatestState setting disabled). " + Usage: "height for historic script invocation (for MPT-enabled blockchain configuration with KeepOnlyLatestState setting disabled). " +
"Assuming that block N-th is specified as an argument, the historic invocation is based on the storage state of height N and fake currently-accepting block with index N+1.", "Assuming that block N-th is specified as an argument, the historic invocation is based on the storage state of height N and fake currently-accepting block with index N+1.",
} }
gasFlag = cli.Int64Flag{ gasFlag = cli.Int64Flag{
@ -81,28 +81,28 @@ var (
} }
hashFlag = cli.StringFlag{ hashFlag = cli.StringFlag{
Name: hashFlagFullName, Name: hashFlagFullName,
Usage: "Smart-contract hash in LE form or address", Usage: "smart-contract hash in LE form or address",
} }
) )
var commands = []cli.Command{ var commands = []cli.Command{
{ {
Name: "exit", Name: "exit",
Usage: "Exit the VM prompt", Usage: "exit the VM prompt",
UsageText: "exit", UsageText: "exit",
Description: "Exit the VM prompt.", Description: "Exit the VM prompt.",
Action: handleExit, Action: handleExit,
}, },
{ {
Name: "ip", Name: "ip",
Usage: "Show current instruction", Usage: "show current instruction",
UsageText: "ip", UsageText: "ip",
Description: "Show current instruction.", Description: "Show current instruction.",
Action: handleIP, Action: handleIP,
}, },
{ {
Name: "break", Name: "break",
Usage: "Place a breakpoint", Usage: "place a breakpoint",
UsageText: `break <ip>`, UsageText: `break <ip>`,
Description: `<ip> is mandatory parameter. Description: `<ip> is mandatory parameter.
@ -112,7 +112,7 @@ Example:
}, },
{ {
Name: "jump", Name: "jump",
Usage: "Jump to the specified instruction (absolute IP value)", Usage: "jump to the specified instruction (absolute IP value)",
UsageText: `jump <ip>`, UsageText: `jump <ip>`,
Description: `<ip> is mandatory parameter (absolute IP value). Description: `<ip> is mandatory parameter (absolute IP value).
@ -122,42 +122,42 @@ Example:
}, },
{ {
Name: "estack", Name: "estack",
Usage: "Show evaluation stack contents", Usage: "show evaluation stack contents",
UsageText: "estack", UsageText: "estack",
Description: "Show evaluation stack contents.", Description: "Show evaluation stack contents.",
Action: handleXStack, Action: handleXStack,
}, },
{ {
Name: "istack", Name: "istack",
Usage: "Show invocation stack contents", Usage: "show invocation stack contents",
UsageText: "istack", UsageText: "istack",
Description: "Show invocation stack contents.", Description: "Show invocation stack contents.",
Action: handleXStack, Action: handleXStack,
}, },
{ {
Name: "sslot", Name: "sslot",
Usage: "Show static slot contents", Usage: "show static slot contents",
UsageText: "sslot", UsageText: "sslot",
Description: "Show static slot contents.", Description: "Show static slot contents.",
Action: handleSlots, Action: handleSlots,
}, },
{ {
Name: "lslot", Name: "lslot",
Usage: "Show local slot contents", Usage: "show local slot contents",
UsageText: "lslot", UsageText: "lslot",
Description: "Show local slot contents", Description: "Show local slot contents",
Action: handleSlots, Action: handleSlots,
}, },
{ {
Name: "aslot", Name: "aslot",
Usage: "Show arguments slot contents", Usage: "show arguments slot contents",
UsageText: "aslot", UsageText: "aslot",
Description: "Show arguments slot contents.", Description: "Show arguments slot contents.",
Action: handleSlots, Action: handleSlots,
}, },
{ {
Name: "loadnef", Name: "loadnef",
Usage: "Load a NEF (possibly with a contract hash) into the VM optionally using provided scoped signers in the context", Usage: "load a NEF (possibly with a contract hash) into the VM optionally using provided scoped signers in the context",
UsageText: `loadnef [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [<manifest>] [-- <signer-with-scope>, ...]`, UsageText: `loadnef [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [<manifest>] [-- <signer-with-scope>, ...]`,
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag}, Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
Description: `<file> parameter is mandatory, <manifest> parameter (if omitted) will Description: `<file> parameter is mandatory, <manifest> parameter (if omitted) will
@ -172,7 +172,7 @@ Example:
}, },
{ {
Name: "loadbase64", Name: "loadbase64",
Usage: "Load a base64-encoded script string into the VM optionally attaching to it provided signers with scopes", Usage: "load a base64-encoded script string into the VM optionally attaching to it provided signers with scopes",
UsageText: `loadbase64 [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`, UsageText: `loadbase64 [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
Flags: []cli.Flag{historicFlag, gasFlag}, Flags: []cli.Flag{historicFlag, gasFlag},
Description: `<string> is mandatory parameter. Description: `<string> is mandatory parameter.
@ -185,7 +185,7 @@ Example:
}, },
{ {
Name: "loadhex", Name: "loadhex",
Usage: "Load a hex-encoded script string into the VM optionally attaching to it provided signers with scopes", Usage: "load a hex-encoded script string into the VM optionally attaching to it provided signers with scopes",
UsageText: `loadhex [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`, UsageText: `loadhex [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
Flags: []cli.Flag{historicFlag, gasFlag}, Flags: []cli.Flag{historicFlag, gasFlag},
Description: `<string> is mandatory parameter. Description: `<string> is mandatory parameter.
@ -198,7 +198,7 @@ Example:
}, },
{ {
Name: "loadgo", Name: "loadgo",
Usage: "Compile and load a Go file with the manifest into the VM optionally attaching to it provided signers with scopes and setting provided hash", Usage: "compile and load a Go file with the manifest into the VM optionally attaching to it provided signers with scopes and setting provided hash",
UsageText: `loadgo [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [-- <signer-with-scope>, ...]`, UsageText: `loadgo [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [-- <signer-with-scope>, ...]`,
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag}, Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
Description: `<file> is mandatory parameter. Description: `<file> is mandatory parameter.
@ -211,7 +211,7 @@ Example:
}, },
{ {
Name: "loadtx", Name: "loadtx",
Usage: "Load transaction into the VM from chain or from parameter context file", Usage: "load transaction into the VM from chain or from parameter context file",
UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`, UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`,
Flags: []cli.Flag{historicFlag, gasFlag}, Flags: []cli.Flag{historicFlag, gasFlag},
Description: `Load transaction into the VM from chain or from parameter context file. Description: `Load transaction into the VM from chain or from parameter context file.
@ -228,7 +228,7 @@ Example:
}, },
{ {
Name: "loaddeployed", Name: "loaddeployed",
Usage: "Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes", Usage: "load deployed contract into the VM from chain optionally attaching to it provided signers with scopes",
UsageText: `loaddeployed [--historic <height>] [--gas <int>] <hash-or-address-or-id> [-- <signer-with-scope>, ...]`, UsageText: `loaddeployed [--historic <height>] [--gas <int>] <hash-or-address-or-id> [-- <signer-with-scope>, ...]`,
Flags: []cli.Flag{historicFlag, gasFlag}, Flags: []cli.Flag{historicFlag, gasFlag},
Description: `Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes. Description: `Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes.
@ -244,7 +244,7 @@ Example:
}, },
{ {
Name: "reset", Name: "reset",
Usage: "Unload compiled script from the VM and reset context to proper (possibly, historic) state", Usage: "unload compiled script from the VM and reset context to proper (possibly, historic) state",
UsageText: "reset", UsageText: "reset",
Flags: []cli.Flag{historicFlag}, Flags: []cli.Flag{historicFlag},
Description: "Unload compiled script from the VM and reset context to proper (possibly, historic) state.", Description: "Unload compiled script from the VM and reset context to proper (possibly, historic) state.",
@ -252,7 +252,7 @@ Example:
}, },
{ {
Name: "parse", Name: "parse",
Usage: "Parse provided argument and convert it into other possible formats", Usage: "parse provided argument and convert it into other possible formats",
UsageText: `parse <arg>`, UsageText: `parse <arg>`,
Description: `<arg> is an argument which is tried to be interpreted as an item of different types Description: `<arg> is an argument which is tried to be interpreted as an item of different types
and converted to other formats. Strings are escaped and output in quotes.`, and converted to other formats. Strings are escaped and output in quotes.`,
@ -260,7 +260,7 @@ and converted to other formats. Strings are escaped and output in quotes.`,
}, },
{ {
Name: "run", Name: "run",
Usage: "Usage Execute the current loaded script", Usage: "usage Execute the current loaded script",
UsageText: `run [<method> [<parameter>...]]`, UsageText: `run [<method> [<parameter>...]]`,
Description: `<method> is a contract method, specified in manifest. It can be '_' which will push Description: `<method> is a contract method, specified in manifest. It can be '_' which will push
parameters onto the stack and execute from the current offset. parameters onto the stack and execute from the current offset.
@ -275,14 +275,14 @@ Example:
}, },
{ {
Name: "cont", Name: "cont",
Usage: "Continue execution of the current loaded script", Usage: "continue execution of the current loaded script",
UsageText: "cont", UsageText: "cont",
Description: "Continue execution of the current loaded script.", Description: "Continue execution of the current loaded script.",
Action: handleCont, Action: handleCont,
}, },
{ {
Name: "step", Name: "step",
Usage: "Step (n) instruction in the program", Usage: "step (n) instruction in the program",
UsageText: `step [<n>]`, UsageText: `step [<n>]`,
Description: `<n> is optional parameter to specify number of instructions to run. Description: `<n> is optional parameter to specify number of instructions to run.
@ -292,7 +292,7 @@ Example:
}, },
{ {
Name: "stepinto", Name: "stepinto",
Usage: "Stepinto instruction to take in the debugger", Usage: "stepinto instruction to take in the debugger",
UsageText: "stepinto", UsageText: "stepinto",
Description: `Stepinto instruction to take in the debugger. Description: `Stepinto instruction to take in the debugger.
@ -302,7 +302,7 @@ Example:
}, },
{ {
Name: "stepout", Name: "stepout",
Usage: "Stepout instruction to take in the debugger", Usage: "stepout instruction to take in the debugger",
UsageText: "stepout", UsageText: "stepout",
Description: `Stepout instruction to take in the debugger. Description: `Stepout instruction to take in the debugger.
@ -312,7 +312,7 @@ Example:
}, },
{ {
Name: "stepover", Name: "stepover",
Usage: "Stepover instruction to take in the debugger", Usage: "stepover instruction to take in the debugger",
UsageText: "stepover", UsageText: "stepover",
Description: `Stepover instruction to take in the debugger. Description: `Stepover instruction to take in the debugger.
@ -322,26 +322,26 @@ Example:
}, },
{ {
Name: "ops", Name: "ops",
Usage: "Dump opcodes of the current loaded program", Usage: "dump opcodes of the current loaded program",
UsageText: "ops", UsageText: "ops",
Description: "Dump opcodes of the current loaded program", Description: "Dump opcodes of the current loaded program",
Action: handleOps, Action: handleOps,
}, },
{ {
Name: "events", Name: "events",
Usage: "Dump events emitted by the current loaded program", Usage: "dump events emitted by the current loaded program",
UsageText: "events", UsageText: "events",
Description: "Dump events emitted by the current loaded program", Description: "Dump events emitted by the current loaded program",
Action: handleEvents, Action: handleEvents,
}, },
{ {
Name: "env", Name: "env",
Usage: "Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration)", Usage: "dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration)",
UsageText: `env [-v]`, UsageText: `env [-v]`,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
Name: verboseFlagFullName + ",v", Name: verboseFlagFullName + ",v",
Usage: "Print the whole blockchain node configuration.", Usage: "print the whole blockchain node configuration.",
}, },
}, },
Description: `Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration). Description: `Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration).
@ -352,16 +352,16 @@ Example:
}, },
{ {
Name: "storage", Name: "storage",
Usage: "Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation", Usage: "dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation",
UsageText: `storage <hash-or-address-or-id> [<prefix>] [--backwards] [--diff]`, UsageText: `storage <hash-or-address-or-id> [<prefix>] [--backwards] [--diff]`,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
Name: backwardsFlagFullName + ",b", Name: backwardsFlagFullName + ",b",
Usage: "Backwards traversal direction", Usage: "backwards traversal direction",
}, },
cli.BoolFlag{ cli.BoolFlag{
Name: diffFlagFullName + ",d", Name: diffFlagFullName + ",d",
Usage: "Dump only those storage items that were added or changed during the current script invocation. Note that this call won't show removed storage items, use 'changes' command for that.", Usage: "dump only those storage items that were added or changed during the current script invocation. Note that this call won't show removed storage items, use 'changes' command for that.",
}, },
}, },
Description: `Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation. Description: `Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation.
@ -378,7 +378,7 @@ Example:
}, },
{ {
Name: "changes", Name: "changes",
Usage: "Dump storage changes as is at the current stage of loaded script invocation", Usage: "dump storage changes as is at the current stage of loaded script invocation",
UsageText: `changes [<hash-or-address-or-id> [<prefix>]]`, UsageText: `changes [<hash-or-address-or-id> [<prefix>]]`,
Description: `Dump storage changes as is at the current stage of loaded script invocation. Description: `Dump storage changes as is at the current stage of loaded script invocation.
If no script is loaded or executed, then no changes are present. If no script is loaded or executed, then no changes are present.

View file

@ -26,7 +26,7 @@ func newNEP11Commands() []cli.Command {
maxIters := strconv.Itoa(config.DefaultMaxIteratorResultItems) maxIters := strconv.Itoa(config.DefaultMaxIteratorResultItems)
tokenAddressFlag := flags.AddressFlag{ tokenAddressFlag := flags.AddressFlag{
Name: "token", Name: "token",
Usage: "Token contract address or hash in LE", Usage: "token contract address or hash in LE",
} }
ownerAddressFlag := flags.AddressFlag{ ownerAddressFlag := flags.AddressFlag{
Name: "address", Name: "address",

View file

@ -41,7 +41,7 @@ type transferTarget struct {
var ( var (
tokenFlag = cli.StringFlag{ tokenFlag = cli.StringFlag{
Name: "token", Name: "token",
Usage: "Token to use (hash or name (for NEO/GAS or imported tokens))", Usage: "token to use (hash or name (for NEO/GAS or imported tokens))",
} }
baseBalanceFlags = []cli.Flag{ baseBalanceFlags = []cli.Flag{
walletPathFlag, walletPathFlag,
@ -49,7 +49,7 @@ var (
tokenFlag, tokenFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "address, a", Name: "address, a",
Usage: "Address to use", Usage: "address to use",
}, },
} }
importFlags = append([]cli.Flag{ importFlags = append([]cli.Flag{
@ -57,7 +57,7 @@ var (
walletConfigFlag, walletConfigFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "token", Name: "token",
Usage: "Token contract address or hash in LE", Usage: "token contract address or hash in LE",
}, },
}, options.RPC...) }, options.RPC...)
baseTransferFlags = []cli.Flag{ baseTransferFlags = []cli.Flag{
@ -73,7 +73,7 @@ var (
txctx.AwaitFlag, txctx.AwaitFlag,
cli.StringFlag{ cli.StringFlag{
Name: "amount", Name: "amount",
Usage: "Amount of asset to send", Usage: "amount of asset to send",
}, },
} }
multiTransferFlags = append([]cli.Flag{ multiTransferFlags = append([]cli.Flag{

View file

@ -32,7 +32,7 @@ func newValidatorCommands() []cli.Command {
txctx.AwaitFlag, txctx.AwaitFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "address, a", Name: "address, a",
Usage: "Address to register", Usage: "address to register",
}, },
}, options.RPC...), }, options.RPC...),
}, },

View file

@ -49,11 +49,11 @@ var (
var ( var (
walletPathFlag = cli.StringFlag{ walletPathFlag = cli.StringFlag{
Name: "wallet, w", Name: "wallet, w",
Usage: "Path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.", Usage: "path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.",
} }
walletConfigFlag = cli.StringFlag{ walletConfigFlag = cli.StringFlag{
Name: "wallet-config", Name: "wallet-config",
Usage: "Path to the wallet config file; conflicts with --wallet flag.", Usage: "path to the wallet config file; conflicts with --wallet flag.",
} }
wifFlag = cli.StringFlag{ wifFlag = cli.StringFlag{
Name: "wif", Name: "wif",
@ -61,7 +61,7 @@ var (
} }
decryptFlag = cli.BoolFlag{ decryptFlag = cli.BoolFlag{
Name: "decrypt, d", Name: "decrypt, d",
Usage: "Decrypt encrypted keys.", Usage: "decrypt encrypted keys.",
} }
inFlag = cli.StringFlag{ inFlag = cli.StringFlag{
Name: "in", Name: "in",
@ -69,11 +69,11 @@ var (
} }
fromAddrFlag = flags.AddressFlag{ fromAddrFlag = flags.AddressFlag{
Name: "from", Name: "from",
Usage: "Address to send an asset from", Usage: "address to send an asset from",
} }
toAddrFlag = flags.AddressFlag{ toAddrFlag = flags.AddressFlag{
Name: "to", Name: "to",
Usage: "Address to send an asset to", Usage: "address to send an asset to",
} }
) )
@ -89,7 +89,7 @@ func NewCommands() []cli.Command {
txctx.AwaitFlag, txctx.AwaitFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "address, a", Name: "address, a",
Usage: "Address to claim GAS for", Usage: "address to claim GAS for",
}, },
} }
claimFlags = append(claimFlags, options.RPC...) claimFlags = append(claimFlags, options.RPC...)
@ -101,7 +101,7 @@ func NewCommands() []cli.Command {
inFlag, inFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "address, a", Name: "address, a",
Usage: "Address to use", Usage: "address to use",
}, },
} }
signFlags = append(signFlags, options.RPC...) signFlags = append(signFlags, options.RPC...)
@ -126,7 +126,7 @@ func NewCommands() []cli.Command {
walletConfigFlag, walletConfigFlag,
cli.BoolFlag{ cli.BoolFlag{
Name: "account, a", Name: "account, a",
Usage: "Create a new account", Usage: "create a new account",
}, },
}, },
}, },
@ -225,11 +225,11 @@ func NewCommands() []cli.Command {
wifFlag, wifFlag,
cli.StringFlag{ cli.StringFlag{
Name: "name, n", Name: "name, n",
Usage: "Optional account name", Usage: "optional account name",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "contract", Name: "contract",
Usage: "Verification script for custom contracts", Usage: "verification script for custom contracts",
}, },
}, },
}, },
@ -252,11 +252,11 @@ func NewCommands() []cli.Command {
wifFlag, wifFlag,
cli.StringFlag{ cli.StringFlag{
Name: "name, n", Name: "name, n",
Usage: "Optional account name", Usage: "optional account name",
}, },
cli.IntFlag{ cli.IntFlag{
Name: "min, m", Name: "min, m",
Usage: "Minimal number of signatures", Usage: "minimal number of signatures",
}, },
}, },
}, },
@ -271,11 +271,11 @@ func NewCommands() []cli.Command {
wifFlag, wifFlag,
cli.StringFlag{ cli.StringFlag{
Name: "name, n", Name: "name, n",
Usage: "Optional account name", Usage: "optional account name",
}, },
flags.AddressFlag{ flags.AddressFlag{
Name: "contract, c", Name: "contract, c",
Usage: "Contract hash or address", Usage: "contract hash or address",
}, },
}, options.RPC...), }, options.RPC...),
}, },
@ -290,7 +290,7 @@ func NewCommands() []cli.Command {
txctx.ForceFlag, txctx.ForceFlag,
flags.AddressFlag{ flags.AddressFlag{
Name: "address, a", Name: "address, a",
Usage: "Account address or hash in LE form to be removed", Usage: "account address or hash in LE form to be removed",
}, },
}, },
}, },