POST
/
efb0a5eccd2caa5135eb54eba6f7f300
curl --request POST \
  --url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "id": 1,
  "params": [
    "0xd0a7bd7d80ba09a5a627b00fe6d05cde7d45939de9b16cb96d9029da1757b59b"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {
    "blockHash": "<string>",
    "blockNumber": "<string>",
    "from": "<string>",
    "gas": "<string>",
    "gasPrice": "<string>",
    "hash": "<string>",
    "input": "<string>",
    "nonce": "<string>",
    "to": "<string>",
    "transactionIndex": "<string>",
    "value": "<string>",
    "v": "<string>",
    "r": "<string>",
    "s": "<string>"
  }
}

Optimism API method eth_getTransactionByHash retrieves information about a transaction given its hash. This method is crucial for tracking transaction details and status.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • transactionHash — the hash of the transaction to retrieve.

Response

  • result — an object containing details about the transaction, including the block hash, block number, from address, gas used, gas price, hash, input data, nonce, to address, transaction index, value transferred, and the signature components (v, r, s).

Use case

The eth_getTransactionByHash method is essential for:

  • Wallets and exchanges that track transactions to update user balances and display transaction statuses.
  • DApps that need to verify transaction execution or retrieve transaction inputs for processing.
  • Services that monitor the Optimism network for specific transaction patterns or activities.

Body

application/json
jsonrpc
string
default:2.0
required
method
string
default:eth_getTransactionByHash
required
id
integer
default:1
required
params
string[]
required

Response

200 - application/json
Transaction information for the given hash
jsonrpc
string
id
integer
result
object