API Reference

eth_getTransactionByHash - Merlin

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

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 --request POST 'https://merlin-mainnet.unifra.io/v1/your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xba4304eb48dbe0582e51576db33d1be7186cf6c192d47abeb7ee58956f7b8868"],"id":0}'

Result

{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "nonce": "0x0",
    "gasPrice": "0x3b9aca00",
    "gas": "0x5208",
    "to": "0x92367037e551e0894c3dd8a7a63aa41cfb3db0a8",
    "value": "0x0",
    "input": "0x",
    "v": "0x20f3",
    "r": "0x4c1f262ffa7672fcd220d311a34f7e9b6ffdf106f1b57651956f6e09f0f3ab52",
    "s": "0x4d97ce6d94dcbe0251ba53e0532ab7d0c78d64a805f25ee090a248c07c5238b7",
    "hash": "0xba4304eb48dbe0582e51576db33d1be7186cf6c192d47abeb7ee58956f7b8868",
    "from": "0x92367037e551e0894c3dd8a7a63aa41cfb3db0a8",
    "blockHash": "0x9b58a44e96fde767d91026811e765b16fc5b137bbc3c5455c346d42ada0f8b8d",
    "blockNumber": "0x1",
    "transactionIndex": "0x0",
    "chainId": "0x1068",
    "type": "0x0"
  }
}
Language