getTransactionReceipt method
Returns the TransactionReceipt for hash
or null
if the transaction has not been mined.
To stall until the transaction has been mined, consider the waitForTransaction method.
final transaction = await provider!.getTransactionReceipt(
'0x4e04def628cfd0c7786febaef8fbe832fc30eae54a4fba25bf46022c439ab39d');
print(transaction); // TransactionReceipt: 0x4e04def6 from 0x1dFCD06a with 618 confirmations and 8 logs
print(transaction != null); // true
print(transaction is TransactionReceipt); // true
Implementation
Future<TransactionReceipt?> getTransactionReceipt(String hash) async {
final receipt =
await call<_TransactionReceiptImpl?>('getTransactionReceipt', [hash]);
if (receipt != null) return TransactionReceipt._(receipt);
}