mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +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.
|
// Wallet is a set of flags used for wallet operations.
|
||||||
var Wallet = []cli.Flag{cli.StringFlag{
|
var Wallet = []cli.Flag{cli.StringFlag{
|
||||||
Name: "wallet, w",
|
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{
|
}, cli.StringFlag{
|
||||||
Name: "wallet-config",
|
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
|
// Network is a set of flags for choosing the network to operate on
|
||||||
// (privnet/mainnet/testnet).
|
// (privnet/mainnet/testnet).
|
||||||
var Network = []cli.Flag{
|
var Network = []cli.Flag{
|
||||||
cli.BoolFlag{Name: "privnet, p", Usage: "use private 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: "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: "testnet, t", Usage: "Use testnet network configuration (if --config-file option is not specified)"},
|
||||||
cli.BoolFlag{Name: "unittest", Hidden: true},
|
cli.BoolFlag{Name: "unittest", Hidden: true},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,27 +86,27 @@ var Historic = cli.StringFlag{
|
||||||
// Config is a flag for commands that use node configuration.
|
// Config is a flag for commands that use node configuration.
|
||||||
var Config = cli.StringFlag{
|
var Config = cli.StringFlag{
|
||||||
Name: "config-path",
|
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
|
// ConfigFile is a flag for commands that use node configuration and provide
|
||||||
// path to the specific config file instead of config path.
|
// path to the specific config file instead of config path.
|
||||||
var ConfigFile = cli.StringFlag{
|
var ConfigFile = cli.StringFlag{
|
||||||
Name: "config-file",
|
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
|
// RelativePath is a flag for commands that use node configuration and provide
|
||||||
// a prefix to all relative paths in config files.
|
// a prefix to all relative paths in config files.
|
||||||
var RelativePath = cli.StringFlag{
|
var RelativePath = cli.StringFlag{
|
||||||
Name: "relative-path",
|
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.
|
// Debug is a flag for commands that allow node in debug mode usage.
|
||||||
var Debug = cli.BoolFlag{
|
var Debug = cli.BoolFlag{
|
||||||
Name: "debug, d",
|
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'")
|
var errNoEndpoint = errors.New("no RPC endpoint specified, use option '--" + RPCEndpointFlag + "' or '-r'")
|
||||||
|
|
|
@ -43,7 +43,7 @@ func NewCommands() []cli.Command {
|
||||||
cfgWithCountFlags = append(cfgWithCountFlags,
|
cfgWithCountFlags = append(cfgWithCountFlags,
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "count, c",
|
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))
|
var cfgCountOutFlags = make([]cli.Flag, len(cfgWithCountFlags))
|
||||||
|
@ -51,7 +51,7 @@ func NewCommands() []cli.Command {
|
||||||
cfgCountOutFlags = append(cfgCountOutFlags,
|
cfgCountOutFlags = append(cfgCountOutFlags,
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "start, s",
|
Name: "start, s",
|
||||||
Usage: "block number to start from (default: 0)",
|
Usage: "Block number to start from (default: 0)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "out, o",
|
Name: "out, o",
|
||||||
|
@ -67,11 +67,11 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "dump",
|
Name: "dump",
|
||||||
Usage: "directory for storing JSON dumps",
|
Usage: "Directory for storing JSON dumps",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "incremental, n",
|
Name: "incremental, n",
|
||||||
Usage: "use if dump is incremental",
|
Usage: "Use if dump is incremental",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
var cfgHeightFlags = make([]cli.Flag, len(cfgFlags)+1)
|
var cfgHeightFlags = make([]cli.Flag, len(cfgFlags)+1)
|
||||||
|
@ -84,32 +84,32 @@ func NewCommands() []cli.Command {
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "node",
|
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]",
|
UsageText: "neo-go node [--config-path path] [-d] [-p/-m/-t] [--config-file file]",
|
||||||
Action: startServer,
|
Action: startServer,
|
||||||
Flags: cfgFlags,
|
Flags: cfgFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "db",
|
Name: "db",
|
||||||
Usage: "database manipulations",
|
Usage: "Database manipulations",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "dump",
|
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]",
|
UsageText: "neo-go db dump -o file [-s start] [-c count] [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||||
Action: dumpDB,
|
Action: dumpDB,
|
||||||
Flags: cfgCountOutFlags,
|
Flags: cfgCountOutFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "restore",
|
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]",
|
UsageText: "neo-go db restore -i file [--dump] [-n] [-c count] [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||||
Action: restoreDB,
|
Action: restoreDB,
|
||||||
Flags: cfgCountInFlags,
|
Flags: cfgCountInFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "reset",
|
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]",
|
UsageText: "neo-go db reset --height height [--config-path path] [-p/-m/-t] [--config-file file]",
|
||||||
Action: resetDB,
|
Action: resetDB,
|
||||||
Flags: cfgHeightFlags,
|
Flags: cfgHeightFlags,
|
||||||
|
|
|
@ -36,7 +36,7 @@ var generatorFlags = []cli.Flag{
|
||||||
|
|
||||||
var generateWrapperCmd = cli.Command{
|
var generateWrapperCmd = cli.Command{
|
||||||
Name: "generate-wrapper",
|
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>]",
|
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
|
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
|
--hash flag is provided, CALLT instruction is used for the target contract
|
||||||
|
@ -50,7 +50,7 @@ var generateWrapperCmd = cli.Command{
|
||||||
|
|
||||||
var generateRPCWrapperCmd = cli.Command{
|
var generateRPCWrapperCmd = cli.Command{
|
||||||
Name: "generate-rpcwrapper",
|
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>]",
|
UsageText: "neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]",
|
||||||
Action: contractGenerateRPCWrapper,
|
Action: contractGenerateRPCWrapper,
|
||||||
Flags: generatorFlags,
|
Flags: generatorFlags,
|
||||||
|
|
|
@ -45,7 +45,7 @@ var (
|
||||||
errFileExist = errors.New("A file with given smart-contract name already exists")
|
errFileExist = errors.New("A file with given smart-contract name already exists")
|
||||||
addressFlag = flags.AddressFlag{
|
addressFlag = flags.AddressFlag{
|
||||||
Name: addressFlagName,
|
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{
|
manifestAddGroupFlags := append([]cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "sender, s",
|
Name: "sender, s",
|
||||||
Usage: "deploy transaction sender",
|
Usage: "Deploy transaction sender",
|
||||||
},
|
},
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: addressFlagName, // use the same name for handler code unification.
|
Name: addressFlagName, // use the same name for handler code unification.
|
||||||
Usage: "account to sign group with",
|
Usage: "Account to sign group with",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "nef, n",
|
Name: "nef, n",
|
||||||
Usage: "path to the NEF file",
|
Usage: "Path to the NEF file",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "manifest, m",
|
Name: "manifest, m",
|
||||||
Usage: "path to the manifest",
|
Usage: "Path to the manifest",
|
||||||
},
|
},
|
||||||
}, options.Wallet...)
|
}, options.Wallet...)
|
||||||
return []cli.Command{{
|
return []cli.Command{{
|
||||||
Name: "contract",
|
Name: "contract",
|
||||||
Usage: "compile - debug - deploy smart contracts",
|
Usage: "Compile - debug - deploy smart contracts",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "compile",
|
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]",
|
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
|
Description: `Compiles given smart contract to a .nef file and emits other associated
|
||||||
information (manifest, bindings configuration, debug information files) if
|
information (manifest, bindings configuration, debug information files) if
|
||||||
|
@ -167,29 +167,29 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-standards",
|
Name: "no-standards",
|
||||||
Usage: "do not check compliance with supported standards",
|
Usage: "Do not check compliance with supported standards",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-events",
|
Name: "no-events",
|
||||||
Usage: "do not check emitted events with the manifest",
|
Usage: "Do not check emitted events with the manifest",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-permissions",
|
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{
|
cli.BoolFlag{
|
||||||
Name: "guess-eventtypes",
|
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{
|
cli.StringFlag{
|
||||||
Name: "bindings",
|
Name: "bindings",
|
||||||
Usage: "output file for smart-contract bindings configuration",
|
Usage: "Output file for smart-contract bindings configuration",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "deploy",
|
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]",
|
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
|
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
|
gas to be added as a network fee to prioritize the transaction. The data
|
||||||
|
@ -204,7 +204,7 @@ func NewCommands() []cli.Command {
|
||||||
generateRPCWrapperCmd,
|
generateRPCWrapperCmd,
|
||||||
{
|
{
|
||||||
Name: "invokefunction",
|
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...]",
|
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,
|
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
|
arguments and signers. Sender is included in the list of signers by default
|
||||||
|
@ -219,7 +219,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "testinvokefunction",
|
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...]",
|
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,
|
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
|
arguments and signers (sender is not included by default). If no method is given
|
||||||
|
@ -250,63 +250,63 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "init",
|
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]",
|
UsageText: "neo-go contract init -n name [--skip-details]",
|
||||||
Action: initSmartContract,
|
Action: initSmartContract,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "name, n",
|
Name: "name, n",
|
||||||
Usage: "name of the smart-contract to be initialized",
|
Usage: "Name of the smart-contract to be initialized",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "skip-details, skip",
|
Name: "skip-details, skip",
|
||||||
Usage: "skip filling in the projects and contract details",
|
Usage: "Skip filling in the projects and contract details",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "inspect",
|
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]",
|
UsageText: "neo-go contract inspect -i file [-c]",
|
||||||
Action: inspect,
|
Action: inspect,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "compile, c",
|
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{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
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",
|
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",
|
UsageText: "neo-go contract calc-hash -i nef -m manifest -s address",
|
||||||
Action: calcHash,
|
Action: calcHash,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "sender, s",
|
Name: "sender, s",
|
||||||
Usage: "sender script hash or address",
|
Usage: "Sender script hash or address",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in",
|
Name: "in",
|
||||||
Usage: "path to NEF file",
|
Usage: "Path to NEF file",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "manifest, m",
|
Name: "manifest, m",
|
||||||
Usage: "path to manifest file",
|
Usage: "Path to manifest file",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "manifest",
|
Name: "manifest",
|
||||||
Usage: "manifest-related commands",
|
Usage: "Manifest-related commands",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "add-group",
|
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",
|
UsageText: "neo-go contract manifest add-group -w wallet [--wallet-config path] -n nef -m manifest -a address -s address",
|
||||||
Action: manifestAddGroup,
|
Action: manifestAddGroup,
|
||||||
Flags: manifestAddGroupFlags,
|
Flags: manifestAddGroupFlags,
|
||||||
|
|
|
@ -23,17 +23,17 @@ var (
|
||||||
// GasFlag is a flag used for the additional network fee.
|
// GasFlag is a flag used for the additional network fee.
|
||||||
GasFlag = flags.Fixed8Flag{
|
GasFlag = flags.Fixed8Flag{
|
||||||
Name: "gas, g",
|
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 is a flag used for the additional system fee.
|
||||||
SysGasFlag = flags.Fixed8Flag{
|
SysGasFlag = flags.Fixed8Flag{
|
||||||
Name: "sysgas, e",
|
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 is a flag used for file output.
|
||||||
OutFlag = cli.StringFlag{
|
OutFlag = cli.StringFlag{
|
||||||
Name: "out",
|
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 is a flag used to force transaction send.
|
||||||
ForceFlag = cli.BoolFlag{
|
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 is a flag used to wait for the transaction to be included in a block.
|
||||||
AwaitFlag = cli.BoolFlag{
|
AwaitFlag = cli.BoolFlag{
|
||||||
Name: "await",
|
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{
|
txCancelFlags := append([]cli.Flag{
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
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.GasFlag,
|
||||||
txctx.AwaitFlag,
|
txctx.AwaitFlag,
|
||||||
|
@ -95,11 +95,11 @@ func NewCommands() []cli.Command {
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
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{
|
cli.BoolFlag{
|
||||||
Name: "hex",
|
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...)
|
cfgFlags = append(cfgFlags, options.Network...)
|
||||||
return []cli.Command{{
|
return []cli.Command{{
|
||||||
Name: "vm",
|
Name: "vm",
|
||||||
Usage: "start the virtual machine",
|
Usage: "Start the virtual machine",
|
||||||
Action: startVMPrompt,
|
Action: startVMPrompt,
|
||||||
Flags: cfgFlags,
|
Flags: cfgFlags,
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -48,7 +48,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "balance",
|
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>]",
|
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
|
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
|
address or token parameter) all tokens (NFT contracts) for all accounts in
|
||||||
|
@ -70,14 +70,14 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "import",
|
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>",
|
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||||
Action: importNEP11Token,
|
Action: importNEP11Token,
|
||||||
Flags: importFlags,
|
Flags: importFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "info",
|
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>]",
|
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||||
Action: printNEP11Info,
|
Action: printNEP11Info,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -88,7 +88,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "remove",
|
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>",
|
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||||
Action: removeNEP11Token,
|
Action: removeNEP11Token,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -100,7 +100,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "transfer",
|
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> [...]]]",
|
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,
|
Action: transferNEP11,
|
||||||
Flags: transferFlags,
|
Flags: transferFlags,
|
||||||
|
@ -116,7 +116,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "properties",
|
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>]",
|
UsageText: "properties --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||||
Action: printNEP11Properties,
|
Action: printNEP11Properties,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -127,7 +127,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ownerOf",
|
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>]",
|
UsageText: "ownerOf --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||||
Action: printNEP11NDOwner,
|
Action: printNEP11NDOwner,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -138,7 +138,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ownerOfD",
|
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>]",
|
UsageText: "ownerOfD --rpc-endpoint <node> [--timeout <time>] --token <hash> --id <token-id> [--historic <block/hash>]",
|
||||||
Action: printNEP11DOwner,
|
Action: printNEP11DOwner,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -149,7 +149,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "tokensOf",
|
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>]",
|
UsageText: "tokensOf --rpc-endpoint <node> [--timeout <time>] --token <hash> --address <addr> [--historic <block/hash>]",
|
||||||
Action: printNEP11TokensOf,
|
Action: printNEP11TokensOf,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -160,7 +160,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "tokens",
|
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>]",
|
UsageText: "tokens --rpc-endpoint <node> [--timeout <time>] --token <hash> [--historic <block/hash>]",
|
||||||
Action: printNEP11Tokens,
|
Action: printNEP11Tokens,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
|
|
@ -98,7 +98,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "balance",
|
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>]",
|
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
|
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
|
address or token parameter) all tokens for all accounts in the specified wallet
|
||||||
|
@ -118,14 +118,14 @@ func newNEP17Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "import",
|
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>",
|
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||||
Action: importNEP17Token,
|
Action: importNEP17Token,
|
||||||
Flags: importFlags,
|
Flags: importFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "info",
|
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>]",
|
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||||
Action: printNEP17Info,
|
Action: printNEP17Info,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -136,7 +136,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "remove",
|
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>",
|
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||||
Action: removeNEP17Token,
|
Action: removeNEP17Token,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -148,7 +148,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "transfer",
|
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> [...]]]",
|
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,
|
Action: transferNEP17,
|
||||||
Flags: transferFlags,
|
Flags: transferFlags,
|
||||||
|
@ -163,7 +163,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "multitransfer",
|
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>` +
|
UsageText: `multitransfer -w wallet [--wallet-config path] [--await] --rpc-endpoint <node> --timeout <time> --from <addr>` +
|
||||||
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
|
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
|
||||||
Action: multiTransferNEP17,
|
Action: multiTransferNEP17,
|
||||||
|
|
|
@ -19,7 +19,7 @@ func newValidatorCommands() []cli.Command {
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "register",
|
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]",
|
UsageText: "register -w <path> -r <rpc> -a <addr> [-g gas] [-e sysgas] [--out file] [--force] [--await]",
|
||||||
Action: handleRegister,
|
Action: handleRegister,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -38,7 +38,7 @@ func newValidatorCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "unregister",
|
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]",
|
UsageText: "unregister -w <path> -r <rpc> -a <addr> [-g gas] [-e sysgas] [--out file] [--force] [--await]",
|
||||||
Action: handleUnregister,
|
Action: handleUnregister,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -57,7 +57,7 @@ func newValidatorCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "vote",
|
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]",
|
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
|
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
|
contract. Do not provide candidate argument to perform unvoting. If --await flag is
|
||||||
|
|
|
@ -65,7 +65,7 @@ var (
|
||||||
}
|
}
|
||||||
inFlag = cli.StringFlag{
|
inFlag = cli.StringFlag{
|
||||||
Name: "in",
|
Name: "in",
|
||||||
Usage: "file with JSON transaction",
|
Usage: "File with JSON transaction",
|
||||||
}
|
}
|
||||||
fromAddrFlag = flags.AddressFlag{
|
fromAddrFlag = flags.AddressFlag{
|
||||||
Name: "from",
|
Name: "from",
|
||||||
|
@ -107,18 +107,18 @@ func NewCommands() []cli.Command {
|
||||||
signFlags = append(signFlags, options.RPC...)
|
signFlags = append(signFlags, options.RPC...)
|
||||||
return []cli.Command{{
|
return []cli.Command{{
|
||||||
Name: "wallet",
|
Name: "wallet",
|
||||||
Usage: "create, open and manage a Neo wallet",
|
Usage: "Create, open and manage a Neo wallet",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "claim",
|
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]",
|
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,
|
Action: claimGas,
|
||||||
Flags: claimFlags,
|
Flags: claimFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "init",
|
Name: "init",
|
||||||
Usage: "create a new wallet",
|
Usage: "Create a new wallet",
|
||||||
UsageText: "neo-go wallet init -w wallet [--wallet-config path] [-a]",
|
UsageText: "neo-go wallet init -w wallet [--wallet-config path] [-a]",
|
||||||
Action: createWallet,
|
Action: createWallet,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -132,20 +132,20 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "change-password",
|
Name: "change-password",
|
||||||
Usage: "change password for accounts",
|
Usage: "Change password for accounts",
|
||||||
UsageText: "neo-go wallet change-password -w wallet -a address",
|
UsageText: "neo-go wallet change-password -w wallet -a address",
|
||||||
Action: changePassword,
|
Action: changePassword,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "address to change password for",
|
Usage: "Address to change password for",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "convert",
|
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",
|
UsageText: "neo-go wallet convert -w legacywallet [--wallet-config path] -o n3wallet",
|
||||||
Action: convertWallet,
|
Action: convertWallet,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -153,13 +153,13 @@ func NewCommands() []cli.Command {
|
||||||
walletConfigFlag,
|
walletConfigFlag,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "out, o",
|
Name: "out, o",
|
||||||
Usage: "where to write converted wallet",
|
Usage: "Where to write converted wallet",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "create",
|
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]",
|
UsageText: "neo-go wallet create -w wallet [--wallet-config path]",
|
||||||
Action: addAccount,
|
Action: addAccount,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -169,7 +169,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "dump",
|
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]",
|
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
|
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
|
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",
|
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]",
|
UsageText: "neo-go wallet dump-keys -w wallet [--wallet-config path] [-a address]",
|
||||||
Action: dumpKeys,
|
Action: dumpKeys,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -193,13 +193,13 @@ func NewCommands() []cli.Command {
|
||||||
walletConfigFlag,
|
walletConfigFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "address to print public keys for",
|
Usage: "Address to print public keys for",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "export",
|
Name: "export",
|
||||||
Usage: "export keys for address",
|
Usage: "Export keys for address",
|
||||||
UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<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
|
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
|
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",
|
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>]",
|
UsageText: "import -w wallet [--wallet-config path] --wif <wif> [--name <account_name>]",
|
||||||
Action: importWallet,
|
Action: importWallet,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -235,7 +235,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "import-multisig",
|
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>" +
|
UsageText: "import-multisig -w wallet [--wallet-config path] [--wif <wif>] [--name <account_name>] --min <m>" +
|
||||||
" [<pubkey1> [<pubkey2> [...]]]",
|
" [<pubkey1> [<pubkey2> [...]]]",
|
||||||
Description: `Imports a standard multisignature contract with "m out of n" signatures required where "m" is
|
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",
|
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>]",
|
UsageText: "import-deployed -w wallet [--wallet-config path] --wif <wif> --contract <hash> [--name <account_name>]",
|
||||||
Action: importDeployed,
|
Action: importDeployed,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
|
@ -281,7 +281,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "remove",
|
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>",
|
UsageText: "remove -w wallet [--wallet-config path] [--force] --address <addr>",
|
||||||
Action: removeAccount,
|
Action: removeAccount,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -296,7 +296,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "sign",
|
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]",
|
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
|
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
|
signing context) for the given address using the given wallet. This command can
|
||||||
|
@ -312,7 +312,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "strip-keys",
|
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]",
|
UsageText: "neo-go wallet strip-keys -w wallet [--wallet-config path] [--force]",
|
||||||
Description: `Removes private keys for all accounts from the given wallet. Notice,
|
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
|
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",
|
Name: "nep17",
|
||||||
Usage: "work with NEP-17 contracts",
|
Usage: "Work with NEP-17 contracts",
|
||||||
Subcommands: newNEP17Commands(),
|
Subcommands: newNEP17Commands(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "nep11",
|
Name: "nep11",
|
||||||
Usage: "work with NEP-11 contracts",
|
Usage: "Work with NEP-11 contracts",
|
||||||
Subcommands: newNEP11Commands(),
|
Subcommands: newNEP11Commands(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "candidate",
|
Name: "candidate",
|
||||||
Usage: "work with candidates",
|
Usage: "Work with candidates",
|
||||||
Subcommands: newValidatorCommands(),
|
Subcommands: newValidatorCommands(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -169,7 +169,7 @@ func main() {
|
||||||
ctl.Flags = []cli.Flag{
|
ctl.Flags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "ignore-height, g",
|
Name: "ignore-height, g",
|
||||||
Usage: "ignore height difference",
|
Usage: "Ignore height difference",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue