post https://linea-mainnet.unifra.io/v1/
Returns the receipt of a transaction by transaction hash.
This can also be used to track the status of a transaction, since the 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: ["0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864"];
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 'https://linea-mainnet.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864"
],
"id": "123"
}'
Result
{
"jsonrpc": "2.0",
"id": "123",
"result": {
"blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
"blockNumber": "0x47f8e",
"contractAddress": null,
"cumulativeGasUsed": "0x2238d4",
"effectiveGasPrice": "0x590474de",
"from": "0x3cf48a95b9592094fb751bd099399b10dad2614e",
"gasUsed": "0x26c32",
"logs": [
{
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d5539d0360438a66661148c633a9f0965e482845",
"0x000000000000000000000000678aa4bf4e210cf2166753e054d5b7c31cc7fa86"
],
"data": "0x00000000000000000000000000000000000000000000000000d45f42c7f5dd9c",
"blockNumber": "0x47f8e",
"transactionHash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
"transactionIndex": "0x15",
"blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
"logIndex": "0x27",
"removed": false
},
{
"address": "0x176211869ca2b568f2a7d4ee941e073a821ee1ff",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003cf48a95b9592094fb751bd099399b10dad2614e",
"0x000000000000000000000000d5539d0360438a66661148c633a9f0965e482845"
],
"data": "0x0000000000000000000000000000000000000000000000000000000005e22166",
"blockNumber": "0x47f8e",
"transactionHash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
"transactionIndex": "0x15",
"blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
"logIndex": "0x28",
"removed": false
},
{
"address": "0xd5539d0360438a66661148c633a9f0965e482845",
"topics": [
"0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
"0x000000000000000000000000678aa4bf4e210cf2166753e054d5b7c31cc7fa86",
"0x000000000000000000000000678aa4bf4e210cf2166753e054d5b7c31cc7fa86"
],
"data": "0x0000000000000000000000000000000000000000000000000000000005e22166ffffffffffffffffffffffffffffffffffffffffffffffffff2ba0bd380a2264000000000000000000000000000000000000602444dd4507de110935adf1803600000000000000000000000000000000000000000000000000227c4eafd2af0500000000000000000000000000000000000000000000000000000000000315f6000000000000000000000000000000000000000000000000000000000000418c0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0x47f8e",
"transactionHash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
"transactionIndex": "0x15",
"blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
"logIndex": "0x29",
"removed": false
},
{
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"topics": [
"0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65",
"0x000000000000000000000000678aa4bf4e210cf2166753e054d5b7c31cc7fa86"
],
"data": "0x00000000000000000000000000000000000000000000000000d45f42c7f5dd9c",
"blockNumber": "0x47f8e",
"transactionHash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
"transactionIndex": "0x15",
"blockHash": "0x9f4506e9c0037a5cf477aabe4f716e7be5c3b414568b8bfb04a8b0ffa9cf2376",
"logIndex": "0x2a",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000880000000000100000000000000000000000000000000000000000000000000002000000000800000000000004100000000000040000000040000000000008020000000000000000400000000000200000000000000000000000400008000000000000000000000000040000000010000000000000000000000000001000000000000000000000000000000000000000000040000000100000000000000000000000000000000000000000000000002000000000000002000000000000000000000400000000008000000000000002000000000000000000000000000000000000000000100000000000000020000000000000",
"status": "0x1",
"to": "0x678aa4bf4e210cf2166753e054d5b7c31cc7fa86",
"transactionHash": "0xefdd52f72952caeed42195a126ca101df37ec2b128a66be480943caf262bc864",
"transactionIndex": "0x15",
"type": "0x2"
}
}