eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash. Receipts are not available for pending transactions.
Parameters
Section titled “Parameters”DATA(32 bytes) — Hash of a transaction.
Returns
Section titled “Returns”Object|null — A transaction receipt object, or null when no receipt was found.
| Field | Type | Description |
|---|---|---|
| transactionHash | DATA | Transaction hash |
| blockHash | DATA | Block hash |
| blockNumber | QUANTITY | Block number |
| from | DATA | Sender address |
| to | DATA | Recipient (null for contract creation) |
| contractAddress | DATA | Created contract address (null otherwise) |
| gasUsed | QUANTITY | Gas used by this tx |
| cumulativeGasUsed | QUANTITY | Total gas in block up to this tx |
| status | QUANTITY | 0x1 (success) or 0x0 (failure) |
| logs | Array | Log objects generated by this tx |
Request
Section titled “Request”curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/public \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"], "id": 1 }'Code Examples
Section titled “Code Examples”JavaScript (ethers.js v6)
Section titled “JavaScript (ethers.js v6)”import { JsonRpcProvider } from "ethers";const provider = new JsonRpcProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY");const receipt = await provider.getTransactionReceipt("0x88df...");console.log("Status:", receipt.status === 1 ? "Success" : "Failed");console.log("Gas used:", receipt.gasUsed.toString());Python (web3.py)
Section titled “Python (web3.py)”from web3 import Web3w3 = Web3(Web3.HTTPProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY"))receipt = w3.eth.get_transaction_receipt("0x88df...")print(f"Status: {'Success' if receipt['status'] == 1 else 'Failed'}")RU Cost
Section titled “RU Cost”| Method | Cost |
|---|---|
| eth_getTransactionReceipt | 10 RU |