post https://api.infstones.com/okc/mainnet/
Returns the receipt of a transaction by transaction hash.
NOTE:
eth_getTransactionReceipt
is not available for pending transactions.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
TRANSACTION HASH | ✅ | String | Hash of a transaction. |
"params": [
"0x859DD0C5319B71AF9EC6E16C32ECF494BAD9AA4C9349BACE6F27D081F50E9E24"
]
Result
A transaction receipt object, or null
when no receipt was found.
Result Fields
Key | Type | Detail |
---|---|---|
blockHash | String | Hash of the block where this transaction was in. |
blockNumber | String | A hex code of an integer that represents the block number where this transaction was in. |
contractAddress | String | Address where the contract was created, if the transaction was a contract creation. null otherwise. |
cumulativeGasUsed | String | A hex code of an integer that represents the total amount of gas used when this transaction was executed in the block. |
from | String | Address the transaction is sent from. |
gasUsed | String | A hex code of an integer that represents the amount of gas used by this specific transaction alone. |
logs | Array | Array of log objects, which this transaction generated. |
logsBloom | String | Bloom filter for light clients to quickly retrieve related logs. |
root | String | Post-transaction stateroot (pre Byzantium). If root is showed, then status will not showed. |
status | Integer | Either 1 (success) or 0 (failure). If status is showed, then root will not showed. |
to | String | Address the transaction is directed to. null if the transaction is a contract creation. |
transactionHash | String | Hash of the transaction. |
transactionIndex | String | A hex code of an integer that represents the index position of the transaction in the block. |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0x859DD0C5319B71AF9EC6E16C32ECF494BAD9AA4C9349BACE6F27D081F50E9E24"],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "0x1",
"cumulativeGasUsed": "0x3d6f6",
"logsBloom": "0x00000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000200000000000000000000000000000000008000000000000000000000000000000400000100000000000000000002000000000000000000000000000000000000010000000000000000000000000100000000000000000000000000000000000010000000000000000000000000400000000000000000000000000000000000000000000000000000002000000010000000000000000000000000800400000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"logs": [
{
"address": "0xf8b973fdf2e6f700a775aa94ff72180688b5a044",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000001de4f1ae2efb80716a73fbb2457b1efba5ae2759",
"0x0000000000000000000000007d884341b838693f1c8fd3ab30c44f942ae9c91e",
"0x0000000000000000000000000000000000000000000000000000000000003ad9"
],
"data": "0x",
"blockNumber": "0xb994dd",
"transactionHash": "0x859dd0c5319b71af9ec6e16c32ecf494bad9aa4c9349bace6f27d081f50e9e24",
"transactionIndex": "0x0",
"blockHash": "0xac39be33905675520b82ae390dd912bcf9d0a6974879c4cdfabb93acc710607f",
"logIndex": "0x0",
"removed": false
}
],
"transactionHash": "0x859dd0c5319b71af9ec6e16c32ecf494bad9aa4c9349bace6f27d081f50e9e24",
"contractAddress": null,
"gasUsed": "0x1a935",
"blockHash": "0xac39be33905675520b82ae390dd912bcf9d0a6974879c4cdfabb93acc710607f",
"blockNumber": "0xb994dd",
"transactionIndex": "0x1",
"from": "0x1dE4F1AE2eFb80716a73fBB2457B1eFba5Ae2759",
"to": "0xf8b973fdf2e6f700a775aa94ff72180688b5a044"
}
}