getTransactionReceipt method

  1. @override
Future<TransactionReceipt> getTransactionReceipt(
  1. String hash
)
override

Returns an receipt of a transaction based on its hash.

Implementation

@override
Future<TransactionReceipt> getTransactionReceipt(String hash) async {
  final res = await _makeRPCCall<Map<String, dynamic>>(
    'eth_getTransactionReceipt',
    [hash],
  );
  return TransactionReceipt(
    to: res['to'],
    from: res['from'],
    contractAddress: res['contractAddress'],
    transactionIndex: res['transactionIndex'],
    gasUsed: res['gasUsed'],
    logsBloom: res['logsBloom'],
    blockHash: res['blockHash'],
    transactionHash: res['transactionHash'],
    logs: res['logs'],
    blockNumber: res['blockNumber'],
    confirmations: res['confirmations'],
    cumulativeGasUsed: res['cumulativeGasUsed'],
    effectiveGasPrice: res['effectiveGasPrice'],
    byzantium: res['byzantium'],
    type: res['type'],
  );
}