cli/wallet: specify --wallet-config for all commands accepting it

This commit is contained in:
Roman Khimov 2022-08-05 18:27:24 +03:00
parent 28e2010cbd
commit 4c8e00369c
3 changed files with 17 additions and 17 deletions

View file

@ -48,21 +48,21 @@ func newNEP11Commands() []cli.Command {
{
Name: "balance",
Usage: "get address balance",
UsageText: "balance --wallet <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>]",
Action: getNEP11Balance,
Flags: balanceFlags,
},
{
Name: "import",
Usage: "import NEP-11 token to a wallet",
UsageText: "import --wallet <path> --rpc-endpoint <node> --timeout <time> --token <hash>",
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",
UsageText: "print --wallet <path> [--token <hash-or-name>]",
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
Action: printNEP11Info,
Flags: []cli.Flag{
walletPathFlag,
@ -73,7 +73,7 @@ func newNEP11Commands() []cli.Command {
{
Name: "remove",
Usage: "remove NEP-11 token from the wallet",
UsageText: "remove --wallet <path> --token <hash-or-name>",
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
Action: removeNEP11Token,
Flags: []cli.Flag{
walletPathFlag,
@ -85,7 +85,7 @@ func newNEP11Commands() []cli.Command {
{
Name: "transfer",
Usage: "transfer NEP-11 tokens",
UsageText: "transfer --wallet <path> --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --id <token-id> [--amount string] [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] [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
Action: transferNEP11,
Flags: transferFlags,
Description: `Transfers specified NEP-11 token with optional cosigners list attached to

View file

@ -90,21 +90,21 @@ func newNEP17Commands() []cli.Command {
{
Name: "balance",
Usage: "get address balance",
UsageText: "balance --wallet <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>]",
Action: getNEP17Balance,
Flags: balanceFlags,
},
{
Name: "import",
Usage: "import NEP-17 token to a wallet",
UsageText: "import --wallet <path> --rpc-endpoint <node> --timeout <time> --token <hash>",
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",
UsageText: "print --wallet <path> [--token <hash-or-name>]",
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
Action: printNEP17Info,
Flags: []cli.Flag{
walletPathFlag,
@ -115,7 +115,7 @@ func newNEP17Commands() []cli.Command {
{
Name: "remove",
Usage: "remove NEP-17 token from the wallet",
UsageText: "remove --wallet <path> --token <hash-or-name>",
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
Action: removeNEP17Token,
Flags: []cli.Flag{
walletPathFlag,
@ -127,7 +127,7 @@ func newNEP17Commands() []cli.Command {
{
Name: "transfer",
Usage: "transfer NEP-17 tokens",
UsageText: "transfer --wallet <path> --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] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --amount string [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
Action: transferNEP17,
Flags: transferFlags,
Description: `Transfers specified NEP-17 token amount with optional 'data' parameter and cosigners
@ -140,7 +140,7 @@ func newNEP17Commands() []cli.Command {
{
Name: "multitransfer",
Usage: "transfer NEP-17 tokens to multiple recipients",
UsageText: `multitransfer --wallet <path> --rpc-endpoint <node> --timeout <time> --from <addr>` +
UsageText: `multitransfer -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --from <addr>` +
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
Action: multiTransferNEP17,
Flags: multiTransferFlags,

View file

@ -195,7 +195,7 @@ func NewCommands() []cli.Command {
{
Name: "export",
Usage: "export keys for address",
UsageText: "export --wallet <path> [--decrypt] [<address>]",
UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<address>]",
Action: exportKeys,
Flags: []cli.Flag{
walletPathFlag,
@ -206,7 +206,7 @@ func NewCommands() []cli.Command {
{
Name: "import",
Usage: "import WIF of a standard signature contract",
UsageText: "import --wallet <path> --wif <wif> [--name <account_name>]",
UsageText: "import -w wallet [--wallet-config path] --wif <wif> [--name <account_name>]",
Action: importWallet,
Flags: []cli.Flag{
walletPathFlag,
@ -225,7 +225,7 @@ func NewCommands() []cli.Command {
{
Name: "import-multisig",
Usage: "import multisig contract",
UsageText: "import-multisig --wallet <path> --wif <wif> [--name <account_name>] --min <n>" +
UsageText: "import-multisig -w wallet [--wallet-config path] --wif <wif> [--name <account_name>] --min <n>" +
" [<pubkey1> [<pubkey2> [...]]]",
Action: importMultisig,
Flags: []cli.Flag{
@ -245,7 +245,7 @@ func NewCommands() []cli.Command {
{
Name: "import-deployed",
Usage: "import deployed contract",
UsageText: "import-deployed --wallet <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,
Flags: append([]cli.Flag{
walletPathFlag,
@ -264,7 +264,7 @@ func NewCommands() []cli.Command {
{
Name: "remove",
Usage: "remove an account from the wallet",
UsageText: "remove --wallet <path> [--force] --address <addr>",
UsageText: "remove -w wallet [--wallet-config path] [--force] --address <addr>",
Action: removeAccount,
Flags: []cli.Flag{
walletPathFlag,
@ -279,7 +279,7 @@ func NewCommands() []cli.Command {
{
Name: "sign",
Usage: "cosign transaction with multisig/contract/additional account",
UsageText: "sign --wallet <path> --address <address> --in <file.in> --out <file.out> [-r <endpoint>]",
UsageText: "sign -w wallet [--wallet-config path] --address <address> --in <file.in> --out <file.out> [-r <endpoint>]",
Action: signStoredTransaction,
Flags: signFlags,
},