-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add flag -y as a shortcut for --skip-confirm #1127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understood the spec from #1062, this should be a new flag which should skip both --skip-dry-run
and --skip-confirm
.
My mistake then. I understood it as just a shortcut, but a same logic as the I am going to modify it to add it as a new flag, that skips both |
We should clarify then. @cmichi ? |
Yup, I meant what Andrew said. |
@AlexD10S Don't forget updating the |
Does make sense to have at the same time
|
Yes I think it should have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, revisiting this.
After reading the issue again, I believe it incorrectly states that --skip-dry-run
is saying yes to a prompt. In fact, what it does is prevent the pre tx submission dry-run which is used for gas estimation. This can be used if the user wants to submit a transaction with their own custom limits, or if the dry-run fails and they want to submit the tx anyway.
Therefore I believe it doesn't make sense to group it with --skip-confirm
. It may be true that when manually specifying gas limits the user then wants to skip the confirm step, but I think that is okay to have as a separate option still.
skip_dry_run: bool, | ||
/// Before submitting a transaction, do not ask the user for confirmation. | ||
#[clap(long)] | ||
#[clap(long, conflicts_with = "y")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly we could change this whole PR just by adding y
as the short for skip-confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, is great to have your feedback.
This was my initial though too. Do you suggest to come back to the initial commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes looks good 👍
d41c0a6
to
7be4610
Compare
PR for this issue: Add flag -y that says Yes to every prompt (#1062)
It adds
-y
as a shortcut for--skip-confirm
.Examplo of use:
cargo contract instantiate --suri //Alice --constructor new --args true -x -y
instead ofcargo contract instantiate --suri //Alice --constructor new --args true -x --skip-confirm