eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash on Arbitrum. Receipt is only available for mined transactions.
Why Arbitrum? Build on Ethereum's leading Layer 2 with 46% L2 market share and $12B+ TVL with full EVM compatibility, 1.5M daily transactions, and $3B+ DAO treasury for ecosystem growth.
Use Cases#
The eth_getTransactionReceipt method is essential for:
- Transaction confirmation - Verify transaction was mined successfully
- Gas analysis - Check actual gas used vs estimated
- Event parsing - Read emitted events from logs
- Status verification - Confirm success/failure for high-volume DeFi (GMX, Uniswap, Aave), gaming, and cross-chain applications
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionHash | DATA | Yes | 32-byte transaction hash |
Request#
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x6d26bc1cde1ce724eadaf4448431aa79a323ab58212c4ec39b5569b201ffaee2"],
"id": 1
}
Returns#
| Field | Type | Description |
|---|---|---|
status | QUANTITY | 1 (success) or 0 (failure) |
transactionHash | DATA | Transaction hash |
blockHash | DATA | Block hash |
blockNumber | QUANTITY | Block number |
gasUsed | QUANTITY | Gas used by this transaction |
cumulativeGasUsed | QUANTITY | Total gas used in block up to this tx |
logs | Array | Array of log objects |
contractAddress | DATA | Created contract address (if deployment) |
Code Examples#
- cURL
- JavaScript
- Python
- Go
curl -X POST https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x6d26bc1cde1ce724eadaf4448431aa79a323ab58212c4ec39b5569b201ffaee2"],
"id": 1
}'
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY');
const txHash = '0x6d26bc1cde1ce724eadaf4448431aa79a323ab58212c4ec39b5569b201ffaee2';
const receipt = await provider.getTransactionReceipt(txHash);
if (receipt) {
console.log('Status:', receipt.status === 1 ? 'Success' : 'Failed');
console.log('Gas Used:', receipt.gasUsed.toString());
console.log('Block:', receipt.blockNumber);
console.log('Logs:', receipt.logs.length);
// Parse specific events
for (const log of receipt.logs) {
console.log('Event from:', log.address);
}
}
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY'))
tx_hash = '0x6d26bc1cde1ce724eadaf4448431aa79a323ab58212c4ec39b5569b201ffaee2'
receipt = w3.eth.get_transaction_receipt(tx_hash)
if receipt:
status = 'Success' if receipt['status'] == 1 else 'Failed'
print(f'Status: {status}')
print(f'Gas Used: {receipt["gasUsed"]}')
print(f'Block: {receipt["blockNumber"]}')
print(f'Logs: {len(receipt["logs"])}')
package main
import (
"context"
"fmt"
"log"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
func main() {
client, err := ethclient.Dial("https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY")
if err != nil {
log.Fatal(err)
}
txHash := common.HexToHash("0x6d26bc1cde1ce724eadaf4448431aa79a323ab58212c4ec39b5569b201ffaee2")
receipt, err := client.TransactionReceipt(context.Background(), txHash)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Status: %d\n", receipt.Status)
fmt.Printf("Gas Used: %d\n", receipt.GasUsed)
fmt.Printf("Logs: %d\n", len(receipt.Logs))
}
Error Handling#
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid transaction hash |
Note: Returns null if transaction is not yet mined.
Related Methods#
eth_getTransactionByHash- Get transaction detailseth_getLogs- Query logs by filter