post https://base-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: ["0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd"];
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 --request POST \
--url https://base-testnet.unifra.io/v1/{your-api-key} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd"
],
"id": 0
}
'
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"blockHash": "0x4d4740c1f839535ae6116c5511b6fee41a83398a074fa06ec45ff4db5d7676aa",
"blockNumber": "0x5c97b4",
"contractAddress": null,
"cumulativeGasUsed": "0xf9643",
"effectiveGasPrice": "0x6b49d23c",
"from": "0xeb6304c9904dc04ef66d367b2ebc41525d1f231b",
"gasUsed": "0x191cf",
"l1Fee": "0x2efc8",
"l1FeeScalar": "1",
"l1GasPrice": "0x16",
"l1GasUsed": "0x19f8",
"logs": [
{
"address": "0x145c041566b21bec558b2a37f1a5ff261ab55998",
"topics": [
"0x74bbc026808dcba59692d6a8bb20596849ca718e10e2432c6cdf48af865bc5d9",
"0x0000000000000000000000000000000000000000000000000000000000002789",
"0x00000000000000000000000053fd4c4fbbd53f6bc58cae6704b92db1f360a648"
],
"data": "0x08b8b695e01a6025516a9963a63f4ae86ae2bf79ce20a4b82fe2d5e77f0fa14608b8b695e01a6025516a9963a63f4ae86ae2bf79ce20a4b82fe2d5e77f0fa1460000000000000000000000000000000000000000000000000000000000000003",
"blockNumber": "0x5c97b4",
"transactionHash": "0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd",
"transactionIndex": "0x3",
"blockHash": "0x4d4740c1f839535ae6116c5511b6fee41a83398a074fa06ec45ff4db5d7676aa",
"logIndex": "0x12",
"removed": false
},
{
"address": "0x53fd4c4fbbd53f6bc58cae6704b92db1f360a648",
"topics": [
"0x293e3a2153dc5c8d3667cbd6ede71a71674b2381e5dc4b40c91ad0e813447c0f"
],
"data": "0x000000000000000000000000145c041566b21bec558b2a37f1a5ff261ab5599858010f3ad04ac7a69cf934ea1636bae33caf160d61c27876c210eac18daed4f1000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0x5c97b4",
"transactionHash": "0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd",
"transactionIndex": "0x3",
"blockHash": "0x4d4740c1f839535ae6116c5511b6fee41a83398a074fa06ec45ff4db5d7676aa",
"logIndex": "0x13",
"removed": false
}
],
"logsBloom": "0x00000000000000080000000000000000000000000000000000000002000000000000080000000000000000000000000000000000000000000000000000002000000000000000000040000000000000000000008000020000080000000000000000000000000000000040000000000000000000004008000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000100800000080000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000008000",
"status": "0x1",
"to": "0x53fd4c4fbbd53f6bc58cae6704b92db1f360a648",
"transactionHash": "0xb1cdcc54555ab3468ee3a8b25cb8eed22db82d9c01211d1683c1e977c8de54bd",
"transactionIndex": "0x3",
"type": "0x0"
}
}