estimateNetworkFees method

Future<(Amount, int)> estimateNetworkFees({
  1. required String recipient,
  2. required String sender,
  3. required Uint8List? data,
  4. required BigInt? value,
})

Implementation

Future<(Amount, int)> estimateNetworkFees({
  required String recipient,
  required String sender,
  required Uint8List? data,
  required BigInt? value,
}) async {
  final gasPrice = await getGasPrice();
  final gasLimit = await estimateGasLimit(
    recipient: recipient,
    sender: sender,
    data: data,
    value: value,
    gasPrice: gasPrice,
  );

  return (Amount(value: gasPrice, decimals: 18), gasLimit);
}