maxFee property

Amount? get maxFee

Implementation

Amount? get maxFee {
  if (gasLimit == null) {
    return null;
  }
  if (gasPrice == null) {
    return null;
  }

  return switch (gasPrice!) {
    EvmLegacyGasPrice gasPrice => gasPrice.gasPrice *
        Amount.convert(
          value: gasLimit!,
          decimals: 0,
        ),
    EvmType2GasPrice gasPrice =>
      gasPrice.maxFeePerGas * Amount.convert(value: gasLimit!, decimals: 0),
  };
}