eth_getTransactionReceipt RPC Method
Please note that transaction receipts are not available for pending transactions.
Parameters
hash
string
REQUIRED
Loading...
Returns
object
Loading...
blockHash
Loading...
blockNumber
Loading...
contractAddress
Loading...
cumulativeGasUsed
Loading...
effectiveGasPrice
Loading...
from
Loading...
gasUsed
Loading...
logs
Loading...
address
Loading...
topics
Loading...
data
Loading...
blockNumber
Loading...
transactionHash
Loading...
transactionIndex
Loading...
blockHash
Loading...
logIndex
Loading...
removed
Loading...
logsBloom
Loading...
status
Loading...
to
Loading...
transactionHash
Loading...
transactionIndex
Loading...
type
Loading...
Request
curl https://docs-demo.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_getTransactionReceipt","params":["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"],"id":1,"jsonrpc":"2.0"}'
require 'eth' client = Eth::Client.create 'https://docs-demo.quiknode.pro/' payload = { "jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"], "id": "1" } response = client.send(payload.to_json) puts response
import { ethers } from "ethers"; (async () => { const provider = new ethers.JsonRpcProvider("https://docs-demo.quiknode.pro/"); const txReceipt = await provider.waitForTransaction( "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5" ); console.log(txReceipt); })();
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); var raw = JSON.stringify({ "method": "eth_getTransactionReceipt", "params": [ "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5" ], "id": 1, "jsonrpc": "2.0" }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("https://docs-demo.quiknode.pro/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
import requests import json url = "https://docs-demo.quiknode.pro/" payload = json.dumps({ "method": "eth_getTransactionReceipt", "params": [ "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5" ], "id": 1, "jsonrpc": "2.0" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
require "uri" require "json" require "net/http" url = URI("https://docs-demo.quiknode.pro/") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ "method": "eth_getTransactionReceipt", "params": [ "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5" ], "id": 1, "jsonrpc": "2.0" }) response = https.request(request) puts response.read_body
from web3 import Web3, HTTPProvider w3 = Web3(HTTPProvider('https://docs-demo.quiknode.pro/')) print(w3.eth.get_transaction_receipt('0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5'))
import { Core } from '@quicknode/sdk' const core = new Core({ endpointUrl: "https://docs-demo.quiknode.pro/", }) core.client .getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d' }) .then(res => console.log(res))
Response
{ "jsonrpc": "2.0", "id": 1, "result": { "blockHash": "0xa957d47df264a31badc3ae823e10ac1d444b098d9b73d204c40426e57f47e8c3", "blockNumber": "0xeff35f", "contractAddress": null, "cumulativeGasUsed": "0xa12515", "effectiveGasPrice": "0x5a9c688d4", "from": "0x6221a9c005f6e47eb398fd867784cacfdcfff4e7", "gasUsed": "0xb4c8", "logs": [ { "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "0x0000000000000000000000006221a9c005f6e47eb398fd867784cacfdcfff4e7", "0x0000000000000000000000001e0049783f008a0085193e00003d00cd54003c71" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "blockNumber": "0xeff35f", "transactionHash": "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5", "transactionIndex": "0x66", "blockHash": "0xa957d47df264a31badc3ae823e10ac1d444b098d9b73d204c40426e57f47e8c3", "logIndex": "0xfa", "removed": false } ], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000080000000000000000200000000000000000000020000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020001000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000010200000000000000000000000000000000000000000000000000000020000", "status": "0x1", "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "transactionHash": "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5", "transactionIndex": "0x66", "type": "0x2" } }
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free