UI Version: 0.X.X
Description:
For a user is a bit hard to understand that he's paying Gas for transactions and to retrive this information later. It would be nice to have in the Voting, Depsit and Transaction actions and show it in a confirmation box: The fee of this operation is X
I think the user should eventually define the gas and fees (amount + coin denomination) by herself and also provide the option in the settings to define a default gas and fee
cc: @alessio what's the cmd/parameter to estimate the gas cost ?
The flag --dry-run can be used to perform a simulation of a transaction, w/o broadcasting it. You can use this flag to read an estimate of the gas.
If you use --gas=simulate instead, the transaction will be simulated first (to estimate gas), then executed.
absolutely - we need to do a better job of communicating gas and fees!
After the discussion in the sdk channel, I think gas is not relevant to our end users. Clients (voyager) could run a simulation previously and check the estimated gas used and set that value on the gas field.
Regarding fees, imo we should eventually define an input field within the txs modals (Deposit, Vote, Delegate, etc) and have a custom value set as default on the preferences/settings page that's pre-filled on the modals
Proposal:
Don't show the concept of gas to the user. The user only cares about fees he needs to pay (which include gas). Voyager shouldn't care about gas either. Stargate should handle fee calculation as it can reuse calculated minimum fees across multiple requests. A client could request stored minimum fees from Stargate similar to the current "simulate" flag.
Scope:
4. if gas price is too low and transaction is dropped, show button for increasing gas price by x% so user can try again (in action modal)
I am not sure we can identify this. Transactions will go to the mempool ready to be claimed by a block proposer and will only after several blocks be dropped.
I propose we do 4. in another iteration
moved to #2238
Most helpful comment
The flag
--dry-runcan be used to perform a simulation of a transaction, w/o broadcasting it. You can use this flag to read an estimate of the gas.If you use
--gas=simulateinstead, the transaction will be simulated first (to estimate gas), then executed.