-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn --from into a positional argument in gaiacli tx send #4142
Comments
Thanks @alessio
I also want to bring to light where this notion of "required flags must be positional arguments". Imho, this is not some universal axiom -- it is very much command and context dependent. IMHO, this really only applies to very simple and short commands. |
This is just for
Indeed it is not, in fact it's not a bad practice at all to turn positional arguments into options, should the program command line require too many arguments. In that case yes, I'd agree to turn some into optional arguments.
In my view, 1:
2:
Semantically speaking, from users perspective In this case enforcing a shorter, strictly positional syntax makes things clearer and encourages a less error-prone usage. |
This is a very small task. Hence estimating as 1 point. |
Kind of related to: #4072
The
gaiacli tx send
command's--from
flag carries a required parameter. As such it should be a positional argument rather than a required flag. Marking a flag required is usually a good sign that such parameter should be passed as a positional argument.Positional arguments are inherently required as they represent inputs without which the command cannot operate. Conversely, flags are traditionally used to modify a command behaviour and are innatum optional.
Description
As A user of
gaiacli
I Want to broadcast/generate a send tx with
gaiacli tx send
So That I can broadcast a tx/generate a specimen of a tx.
Acceptance Criteria
AC1
Given I can access my key
foo
in the local keybaseWhen I run
gaiacli tx send foo to_address amount
Then a send tx (from:
foo
's address; to:to_address
address; amount:amount
) is generated and broadcast to a node for further validation/processing.AC2
Given I have no access to the local keybase
When I run
gaiacli tx send --generate-only from_address to_address amount
Then a send tx (from:
foo_address
; to:to_address
; amount:amount
) specimen is generated and printed out to screen.For Admin Use
The text was updated successfully, but these errors were encountered: