-
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
Dry run gas limit estimation #484
Conversation
I tested this. Works fine so far. But there is one regression: It does no longer print the debug buffer. Also, I think the formatting of the error is harder to read now. I think the output for the automatic dry run should be the same as for the manual one before. Before:
Now:
|
Yes this is a regression. In order to avoid this type of regression I want to revive the automated end to end tests see #518. Fixed see below 👇 |
Nice this issue is fixed. More:
|
My intention was to add storage deposit as a nice and easy follow up, since it wasn't part of the (original) scope.
This was by design, I have seen it in other CLIs where confirming requires pressing two keys to make Y to avoid accidental presses, as in "are you really sure?" confirmation. However happy to make it less strict if you think that is too much |
Ok then let's keep the deposit as follow up. Regarding the confirmation: The only confusing thing is that |
Ok I have reverted to your previous suggestion, make it case insensitive and have Y as the default option. It seems I was wrong and the convention is as you suggest: https://askubuntu.com/questions/322600/do-you-want-to-continuey-n-why-the-upper-case. |
To determine the gas limit to supply for instantiate and call commands, first invoke via rpc to determine
gas_required
for estimation.By default
instantiate
andcall
commands will do a dry run first, and if--gas
is not specified will use thegas_required
from the RPC result as thegas_limit
for the subsequent transaction. The user can skip the dry run with--skip-dry-run
, in which case the--gas
parameter is required.The user will be prompted to confirm transaction submission with the suggested gas limit. This prompt can be skipped with the
--skip-confirm
flag, and the transaction will be submitted without user input.From #432.
/cc @athei