getTransactionCount method

  1. @override
Future<int> getTransactionCount(
  1. String address, {
  2. BlockTag? blockTag,
})
override

Implementation

@override
Future<int> getTransactionCount(
  String address, {
  BlockTag? blockTag,
}) {
  final bt = blockTag?.toParam() ?? const BlockTag.latest().toParam();

  return _makeRPCCall<String>(
    'eth_getTransactionCount',
    [address.toLowerCase(), bt],
  ).then((data) {
    return hexToInt(data).toInt();
  });
}