API Reference

eth_getTransactionByHash - Zeta

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 'http://zetachain-athens-3.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": [
        "0x559936ed33f35ecbe67b702b5592a65f0a94a43a2a82f834d3fe4be05670d7fb"
    ],
     "id": "1693277597"
}'
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": "1693277589",
    "result": {
        "blockHash": "0xe9393ffcb4b63b078afa17274b044526de7e5f34981bc98c40da132249cc680e",
        "blockNumber": "0x151fb0",
        "from": "0x735b14bb79463307aacbed86daf3322b1e6226ab",
        "gas": "0x0",
        "gasPrice": "0x7",
        "hash": "0x559936ed33f35ecbe67b702b5592a65f0a94a43a2a82f834d3fe4be05670d7fb",
        "input": "0x",
        "nonce": "0x0",
        "to": "0xedf1c3275d13489acdc6cd6ed246e72458b8795b",
        "transactionIndex": "0x22b8",
        "value": "0x0",
        "type": "0x58",
        "chainId": "0x1b59",
        "v": null,
        "r": null,
        "s": null
    }
}
Language
Click Try It! to start a request and see the response here!