Closed flmel closed 1 month ago
An alternative would be to allow suffixes to these values. For example:
11
or 11Gas
stands for 11 unit of gas21Tgas
/ 21 tgas
stands for 21 * 10^12
unit of gas (or 21 Tera Gas)We can ignore capitalization, and white spaces, trim "gas" from the end, and check remaining value is one of "t", "tera" for TeraGas, or empty for gas unit. Floating point numbers could be allowed if Tera gas is specified.
That's a good point @mfornet however this will be deviating from the --deposit --depositYocto which is essentially min max units of Near so that's why i was thinking the proposed --gas --Tgas makes sense
fair enough. Tbh I think that --deposit
and --depositYocto
could be consolidated in a single argument using a similar approach. i.e parsing the suffix.
I can agree with this. Eliminating --depositYocto will couple --deposit and --amount using the same approach you suggest for --gas. Lets hear what others think.
Is your feature request related to a problem? Please describe.
Calls from the cli sometimes can require more gas, some xcc calls can even exceed the max amount 300Tgas, every time someone wants to attach gas/Tgas they have to either remember how many zeros to add or go to nomicon check the Tgas and then copy paste or count and type...
Describe the solution you'd like
I think adding --Tgas flag would help the issue at hand
Describe alternatives you've considered
another solution might be either the cli or the rpc to state what the max amount of possible gas is in the error returned by not attaching any/not enough
Additional context
Since we already have --deposit and --depositYocto (we also have --amount but not --amountYocto) i think having --gas and --Tgas makes sense