estimateGasForTx method
Implementation
Future<double> estimateGasForTx(double txAmount, List<dynamic> messages,
{double gasAdjustment = 3,
String coinTypeForGas = CoinDenoms.ULUNA}) async {
var walletOptions = await getWalletOptions();
var gasLimit = await _lcd.treasury.getGasPriceForDenom(coinTypeForGas);
var signedTx = await key.signTx(
Core.Tx(
TxBody(null, "Running Gas Estimation", 0),
AuthInfo(
[],
Fee(gasLimit, [Coin(coinTypeForGas, txAmount)],
granter: accAddress)),
[]),
walletOptions,
messages);
return await broadcastTx.estimateGas(signedTx, gasAdjustment, messages);
}