call method

  1. @override
Future<String> call(
  1. TransactionRequest transaction, {
  2. BlockTag? blockTag,
})
override

Implementation

@override
Future<String> call(
  TransactionRequest transaction, {
  BlockTag? blockTag,
}) async {
  // TODO: check transaction valid.
  final bt = blockTag?.toParam() ?? const BlockTag.latest().toParam();
  return await _makeRPCCall<String>('eth_call', [
    {
      'to': transaction.to,
      'data': transaction.data,
      if (transaction.from != null) 'from': transaction.from,
    },
    bt,
  ]);
}