API Reference

eth_getTransactionByHash - Linea

Returns the information about a transaction requested by transaction hash. In the response object, blockHash, blockNumber, and transactionIndex are null when the transaction is pending.

Parameters

DATA, 32 Bytes - hash of a transaction

params: ["0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864"];

Returns

Object - A transaction object, or null when no transaction was found:

  • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber: QUANTITY - block number where this transaction was in. null when it's pending.
  • from: DATA, 20 Bytes - address of the sender.
  • gas: QUANTITY - gas provided by the sender.
  • gasPrice: QUANTITY - gas price provided by the sender in Wei.
  • hash: DATA, 32 Bytes - hash of the transaction.
  • input: DATA - the data send along with the transaction.
  • nonce: QUANTITY - the number of transactions made by the sender prior to this one.
  • to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
  • transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
  • value: QUANTITY - value transferred in Wei.
  • v: QUANTITY - ECDSA recovery id
  • r: DATA, 32 Bytes - ECDSA signature r
  • s: DATA, 32 Bytes - ECDSA signature s

Example

Request

curl --location 'https://linea-mainnet.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": [
        "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864"
    ],
     "id": "1693211369"
}'
URL: https://eth-mainnet.unifra.io/v1/your-api-key
RequestType: POST
Body:
{
    "jsonrpc":"2.0",
    "method":"eth_getTransactionByHash",
    "params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
    "id":0
}

Result

{
    "jsonrpc": "2.0",
    "id": "1693211366",
    "result": {
        "blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
        "blockNumber": "0x47f8e",
        "from": "0x3cf48a95b9592094fb751bd099399b10dad2614e",
        "gas": "0x33664",
        "gasPrice": "0x590474de",
        "maxFeePerGas": "0x590474e1",
        "maxPriorityFeePerGas": "0x590474d7",
        "hash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
        "input": "0x5ae401dc0000000000000000000000000000000000000000000000000000000064ec5b79000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005e2216600000000000000000000000000000000000000000000000000d3a0acfbb887fd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000d3a0acfbb887fd0000000000000000000000003cf48a95b9592094fb751bd099399b10dad2614e00000000000000000000000000000000000000000000000000000000",
        "nonce": "0x5",
        "to": "0x678aa4bf4e210cf2166753e054d5b7c31cc7fa86",
        "transactionIndex": "0x15",
        "value": "0x0",
        "type": "0x2",
        "accessList": [],
        "chainId": "0xe708",
        "v": "0x0",
        "r": "0x99d929e00a7f9cb52032758341bb41c3dfe787ee79ea4f260ca64846d02e9db2",
        "s": "0x507bd823aa9bf0dfe93bf5cfad99a4794f84fa83ffb6b1192f95137a1baa23b8"
    }
}
Language
Click Try It! to start a request and see the response here!