eth_getTransactionByHash - Flow EVM RPC Method
Retrieve transaction details by hash on Flow EVM Gateway. Essential for NFT developers, gaming studios, and Solidity devs seeking Cadence interoperability tracking transactions on the EVM-equivalent layer on Flow blockchain enabling Cadence+Solidity composability.
Returns the information about a transaction by transaction hash on Flow EVM Gateway.
Why Flow EVM? Build on the EVM-equivalent layer on Flow blockchain enabling Cadence+Solidity composability with full EVM equivalence on Flow, atomic multi-operation transactions, 40% lower gas fees, and 473% contract growth in 2025.
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 consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications
- Block explorers - Display transaction information
Request Parameters
32-byte transaction hash
Response Body
Transaction hash
Sender address
Recipient address
Value in wei
Gas provided
Gas price in wei
Transaction input data
Sender's nonce
Block hash (null if pending)
Block number (null if pending)
Code Examples
curl -X POST https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xac905cb8672fe39508dab7199529d77b32d459242ad9d3f6799e4e427d6003f8"],
"id": 1
}'import { JsonRpcProvider, formatEther } from 'ethers';
const provider = new JsonRpcProvider('https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY');
const txHash = '0xac905cb8672fe39508dab7199529d77b32d459242ad9d3f6799e4e427d6003f8';
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);
}from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY'))
tx_hash = '0xac905cb8672fe39508dab7199529d77b32d459242ad9d3f6799e4e427d6003f8'
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"]}')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-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY")
if err != nil {
log.Fatal(err)
}
txHash := common.HexToHash("0xac905cb8672fe39508dab7199529d77b32d459242ad9d3f6799e4e427d6003f8")
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 Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid transaction hash format |
Related Methods
eth_getTransactionReceipt- Get transaction receipteth_sendRawTransaction- Send transaction
eth_sendRawTransaction
Submit signed transactions to Flow EVM Gateway. Essential for broadcasting transactions for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications.
eth_getTransactionReceipt
Get transaction receipt with status and logs on Flow EVM Gateway. Essential for verifying transaction execution for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications.