estimateTransferGas method

Future<int> estimateTransferGas({
  1. required String token,
  2. required double amount,
  3. required String to,
  4. required String from,
})

Implementation

Future<int> estimateTransferGas(
    {required String token,
    required double amount,
    required String to,
    required String from}) async {
  final res = await serviceRoot.webView!.evalJavascript(
      'eth.keyring.estimateTransferGas("$token", $amount, "$to", "$from")');
  return res ?? 200000;
}