diff --git a/cli/wallet/validator.go b/cli/wallet/validator.go index 2bc246298..8f791dd26 100644 --- a/cli/wallet/validator.go +++ b/cli/wallet/validator.go @@ -22,12 +22,13 @@ func newValidatorCommands() []cli.Command { { Name: "register", Usage: "register as a new candidate", - UsageText: "register -w -r -a ", + UsageText: "register -w -r -a [-g gas] [-e sysgas]", Action: handleRegister, Flags: append([]cli.Flag{ walletPathFlag, walletConfigFlag, gasFlag, + sysGasFlag, flags.AddressFlag{ Name: "address, a", Usage: "Address to register", @@ -37,12 +38,13 @@ func newValidatorCommands() []cli.Command { { Name: "unregister", Usage: "unregister self as a candidate", - UsageText: "unregister -w -r -a ", + UsageText: "unregister -w -r -a [-g gas] [-e sysgas]", Action: handleUnregister, Flags: append([]cli.Flag{ walletPathFlag, walletConfigFlag, gasFlag, + sysGasFlag, flags.AddressFlag{ Name: "address, a", Usage: "Address to unregister", @@ -52,7 +54,7 @@ func newValidatorCommands() []cli.Command { { Name: "vote", Usage: "vote for a validator", - UsageText: "vote -w -r [-s ] [-g gas] -a [-c ]", + UsageText: "vote -w -r [-s ] [-g gas] [-e sysgas] -a [-c ]", Description: `Votes for a validator by calling "vote" method of a NEO native contract. Do not provide candidate argument to perform unvoting. `, @@ -61,6 +63,7 @@ func newValidatorCommands() []cli.Command { walletPathFlag, walletConfigFlag, gasFlag, + sysGasFlag, flags.AddressFlag{ Name: "address, a", Usage: "Address to vote from", @@ -119,12 +122,14 @@ func handleNeoAction(ctx *cli.Context, mkTx func(*neo.Contract, util.Uint160, *w } gas := flags.Fixed8FromContext(ctx, "gas") + sysgas := flags.Fixed8FromContext(ctx, "sysgas") contract := neo.New(act) tx, err := mkTx(contract, addr, acc) if err != nil { return cli.NewExitError(err, 1) } tx.NetworkFee += int64(gas) + tx.SystemFee += int64(sysgas) res, _, err := act.SignAndSend(tx) if err != nil { return cli.NewExitError(fmt.Errorf("failed to sign/send transaction: %w", err), 1) diff --git a/cli/wallet/wallet.go b/cli/wallet/wallet.go index 6a3cd93ac..40d826f7e 100644 --- a/cli/wallet/wallet.go +++ b/cli/wallet/wallet.go @@ -92,6 +92,7 @@ func NewCommands() []cli.Command { walletPathFlag, walletConfigFlag, gasFlag, + sysGasFlag, flags.AddressFlag{ Name: "address, a", Usage: "Address to claim GAS for", @@ -116,7 +117,7 @@ func NewCommands() []cli.Command { { Name: "claim", Usage: "claim GAS", - UsageText: "neo-go wallet claim -w wallet [--wallet-config path] [-g gas] -a address -r endpoint [-s timeout]", + UsageText: "neo-go wallet claim -w wallet [--wallet-config path] [-g gas] [-e sysgas] -a address -r endpoint [-s timeout]", Action: claimGas, Flags: claimFlags, },