API Reference

eth_getTransactionReceipt - Merlin

Returns the receipt of a transaction by transaction hash.

This can also be used to track the status of a transaction, since result will be null until the transaction is mined. However, unlike eth_getTransactionByHash , which returns null for unknown transactions, and a non-null response with 3 null fields for a pending transaction, eth_getTransactionReceipt returns null for both pending and unknown transactions.

This call is also commonly used to get the contract address for a contract creation tx.

Note: the receipt is not available for pending transactions.

Parameters

DATA, 32 Bytes - hash of a transaction

params: ["0x964f00fbe2883098c7f4f552f954f9f9a9d20e1ba7ca397706d07a74202f1796"];

Returns

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

  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionIndex: QUANTITY - Integer of the transactions index position in the block.
  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in.
  • blockNumber: QUANTITY - Block number where this transaction was in.
  • from: DATA, 20 Bytes - Address of the sender.
  • to: DATA, 20 Bytes - Address of the receiver. Null when its a contract creation transaction.
  • cumulativeGasUsed: QUANTITY - The total amount of gas used when this transaction was executed in the block.
  • gasUsed: QUANTITY - The amount of gas used by this specific transaction alone.
  • contractAddress: DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
  • logs: Array - Array of log objects, which this transaction generated.
  • logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.

It also returns either:

  • root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
  • status: QUANTITY either 1 (success) or 0 (failure)

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_getTransactionReceipt", "params":["0xba4304eb48dbe0582e51576db33d1be7186cf6c192d47abeb7ee58956f7b8868"], "id":0 }'

Result

{ "jsonrpc": "2.0", "id": null, "result": { "root": "0x08b8e4d01660898fc75445d2cb6a17cdafe56ce738d403b68f34ee7bc358a5f5", "cumulativeGasUsed": "0x5208", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logs": [], "status": "0x1", "transactionHash": "0xba4304eb48dbe0582e51576db33d1be7186cf6c192d47abeb7ee58956f7b8868", "transactionIndex": "0x0", "blockHash": "0x9b58a44e96fde767d91026811e765b16fc5b137bbc3c5455c346d42ada0f8b8d", "blockNumber": "0x1", "gasUsed": "0x5208", "from": "0x92367037e551e0894c3dd8a7a63aa41cfb3db0a8", "to": "0x92367037e551e0894c3dd8a7a63aa41cfb3db0a8", "contractAddress": null, "type": "0x0", "effectiveGasPrice": "0x3b9aca00" } }
Path Params
string
required
Body Params
string
Defaults to 2.0
string
Defaults to eth_getTransactionReceipt
params
array of strings
params
int32
Responses

Language
Choose an example:
application/json