eth_getTransactionReceipt - Celo
eth_getTransactionReceipt. Fetches the receipt of a transaction by its hash
eth_getTransactionReceipt - celo [Value: 30CU]
Retrieves the receipt of a specific transaction by its hash
Use cases
- Retrieve general information about a transaction's details
- Track transaction status effectively
- Obtain contract address from contract creation transaction
Constraints
- Requires valid transaction hash input
- Returns null for pending or unknown transactions
- Dependent on node synchronization with the blockchain
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://celo.drpc.org \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getTransactionReceipt","params":["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"],"id":1,"jsonrpc":"2.0"}'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"blockNumber": "0xeb8822",
"logsBloom": "0x00000000000100000000008000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000008008008000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000010000000000000000000000000000000000000000000000000010002000000000000000400000000000400200001000000000000000000000000040000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000",
"gasUsed": "0x1a14b",
"contractAddress": null,
"cumulativeGasUsed": "0x76c649",
"transactionIndex": "0x4e",
"from": "0x5067c042e35881843f2b31dfc2db1f4f272ef48c",
"to": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
"type": "0x0",
"effectiveGasPrice": "0x2d7003407",
"logs": [
{
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"logIndex": "0x6c",
"data": "0x000000000000000000000000000000000000000000000000000000001debea42",
"removed": false,
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005067c042e35881843f2b31dfc2db1f4f272ef48c",
"0x0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585"
],
"blockNumber": "0xeb8822",
"transactionIndex": "0x4e",
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
},
{
"blockHash": "0x58a945e1558810523df00490ff28cbe111b37851c44679ce5be1eeaebb4b4907",
"address": "0x98f3c9e6e3face36baad05fe09d375ef1464288b",
"logIndex": "0x6d",
"data": "0x000000000000000000000000000000000000000000000000000000000001371e000000000000000000000000000000000000000000000000000000006eca00000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000008501000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000267c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e4000100000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000",
"removed": false,
"topics": [
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2",
"0x0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585"
],
"blockNumber": "0xeb8822",
"transactionIndex": "0x4e",
"transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
}
],
"status": "0x1"
}
}
Request params
idinteger
jsonrpcstring
methodstring
array of strings
hashstring
The hash of the transaction for which the receipt is to be retrieved.
Response
200
The transaction receipt object if the transaction is found, or null if not.Response params
object
idinteger
jsonrpcstring
resultobject
object
blockHashstring
Hash of the block containing the transaction.
blockNumberstring
Block number containing the transaction.
transactionIndexstring
Position of the transaction in the block (null if pending)
noncestring
Number of prior transactions from the sender.
hashstring
32 Bytes - hash of the transaction.
fromstring
Transaction hash.
tostring
Receiver's address (null if contract creation).
cumulativeGasUsedstring
Total gas used when the transaction was executed in the block.
gasUsedstring
Gas used by this specific transaction alone.
contractAddressstring
Address of the contract created, if applicable.
logsarray_of_objects
Array of log objects, which this transaction generated.
object
blockHashstring
32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log
blockNumberstring
The block number where this log was in. null when its pending. null when its pending log.
transactionIndexstring
Integer of the transactions index position log was created from. null when its pending log.
addressstring
20 Bytes - address from which this log originated.
logIndexstring
Integer of the log index position in the block. null when its pending log.
datastring
Contains one or more 32 Bytes non-indexed arguments of the log.
removedboolean
true when the log was removed, due to a chain reorganization. false if its a valid log.
topicsarray_of_strings
Array of zero to four 32 Bytes DATA of indexed log arguments. In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
transactionHashstring
Hash of the transactions this log was created from. null when its pending log.
logsBloomstring
Bloom filter for the logs.
statusinteger
ETransaction status, either 1 (success) or 0 (failure)
effectiveGasPricestring
typestring