Docs
Supported ChainsImmutableJSON-RPC APITransaction Methods

eth_getTransactionByHash - Immutable RPC Method

Retrieve transaction details by hash on Immutable. Essential for AAA game studios, indie game developers, and NFT gaming teams seeking enforceable royalties tracking transactions on the gaming-optimized zkEVM with 660+ games, 5.5M+ Passport signups, and $40M TVL.

Returns the information about a transaction by transaction hash on Immutable.

Why Immutable? Build on the gaming-optimized zkEVM with 660+ games, 5.5M+ Passport signups, and $40M TVL with first EVM chain with enforceable royalties, Polygon zkEVM technology, $2B+ ecosystem funding, and Agglayer cross-chain liquidity.

Use Cases

The eth_getTransactionByHash method is essential for:

  • Transaction tracking - Get details of pending or confirmed transactions
  • Payment verification - Verify transaction parameters
  • Debugging - Analyze transaction data for Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets
  • Block explorers - Display transaction information

Request Parameters

Request
transactionHashDATA

32-byte transaction hash

Response Body

Response
hashDATA

Transaction hash

fromDATA

Sender address

toDATA

Recipient address

valueQUANTITY

Value in wei

gasQUANTITY

Gas provided

gasPriceQUANTITY

Gas price in wei

inputDATA

Transaction input data

nonceQUANTITY

Sender's nonce

blockHashDATA

Block hash (null if pending)

blockNumberQUANTITY

Block number (null if pending)

Code Examples

Bash
curl -X POST https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": ["0x63d1ef279d87a451bc017ca70614ea90270040a2e4b7fcadb1c6115ffcb29486"],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider, formatEther } from 'ethers';

const provider = new JsonRpcProvider('https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY');

const txHash = '0x63d1ef279d87a451bc017ca70614ea90270040a2e4b7fcadb1c6115ffcb29486';
const tx = await provider.getTransaction(txHash);

if (tx) {
  console.log('From:', tx.from);
  console.log('To:', tx.to);
  console.log('Value:', formatEther(tx.value));
  console.log('Block:', tx.blockNumber);
}
Python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY'))

tx_hash = '0x63d1ef279d87a451bc017ca70614ea90270040a2e4b7fcadb1c6115ffcb29486'
tx = w3.eth.get_transaction(tx_hash)

if tx:
    print(f'From: {tx["from"]}')
    print(f'To: {tx["to"]}')
    print(f'Value: {w3.from_wei(tx["value"], "ether")}')
    print(f'Block: {tx["blockNumber"]}')
Go
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-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY")
    if err != nil {
        log.Fatal(err)
    }

    txHash := common.HexToHash("0x63d1ef279d87a451bc017ca70614ea90270040a2e4b7fcadb1c6115ffcb29486")
    tx, isPending, err := client.TransactionByHash(context.Background(), txHash)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Pending: %v\n", isPending)
    fmt.Printf("Value: %s\n", tx.Value().String())
}

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid transaction hash format