estimateGas method

Future<BigInt> estimateGas(
  1. String method, [
  2. List args = const []
])

Implementation

Future<BigInt> estimateGas(String method,
    [List<dynamic> args = const []]) async {
  final iface = Interface(abi);
  final encode = iface.encodeFunctionData(method, args);
  return BigInt.from(await promiseToFuture(_estimateGas(RequestEstimateGas(
    from: signer,
    to: address,
    data: encode,
  ))));
}