estimateGas method

  1. @override
Future<BigInt> estimateGas(
  1. TransactionRequest transaction
)
override

Execution

Implementation

@override
Future<BigInt> estimateGas(TransactionRequest transaction) async {
  // TODO: check transaction valid.
  final amountHex = await _makeRPCCall<String>('eth_estimateGas', [
    transaction.toJSON(),
  ]);
  return hexToInt(amountHex);
}