estimateGas method

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

Returns the estimate units of gas that would be required to execute the method with args and override.

The override are identical to the overrides above for read-only or write methods, depending on the type of call of method.

Implementation

Future<BigInt> estimateGas(String method,
        [List<dynamic> args = const [],
        TransactionOverride? override]) async =>
    (await promiseToFuture<BigNumber>(callMethod(
            getProperty(impl, 'estimateGas'),
            method,
            override != null ? [...args, override.impl] : args)))
        .toBigInt;