Skip to main content

eth_getTransactionByHash

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

Parameters#

ParameterTypeRequiredDescription
transactionHashDATAYes32-byte transaction hash

Request#

{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [""],
"id": 1
}

Returns#

FieldTypeDescription
hashDATATransaction hash
fromDATASender address
toDATARecipient address
valueQUANTITYValue in wei
gasQUANTITYGas provided
gasPriceQUANTITYGas price in wei
inputDATATransaction input data
nonceQUANTITYSender's nonce
blockHashDATABlock hash (null if pending)
blockNumberQUANTITYBlock number (null if pending)

Code Examples#

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": [""],
"id": 1
}'

Error Handling#

Error CodeMessageDescription
-32602Invalid paramsInvalid transaction hash format