Gas cost estimate display.
Pair with Web3.Contract.Send.estimateGas and Web3.Fee.getGasPrice to show
the expected cost of a transaction before the user confirms.
Web3.Ui.GasEstimate.view []
{ gasUnits = model.gasEstimate
, gasPrice = model.gasPrice
, decimals = 18
, symbol = "PLS"
}
Display an estimated transaction cost in the native token.
gasUnits-- gas limit returned byestimateGas(decoded from port)gasPrice-- current gas price in wei, fromWeb3.Fee.getGasPriceShows
"Estimating..."while either value isNothing.Cost = gasUnits x gasPrice (in wei), displayed via
formatUnits.CSS class:
web3-gas-estimate