[Transaction] klay_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
NOTE: The receipt is not available for pending transactions.
JSONRPC: klay_getTransactionReceipt
Request
- application/json
Body
Default value: klay_getTransactionReceipt
Method name
Default value: 1
Request ID, Random or Auto incrementation
Default value: 2.0
JSON-RPC Version (2.0)
Hash of a transaction.
Responses
- 200
Returns a transaction receipt object, or null when no receipt was found.
- application/json
- Schema
- Example (from schema)
Schema
Array [
- Signature
]
Array [
- BlockHash
- TransactionHash
- LogObject
]
Array [
- Signature
]
Default value: 2.0
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
| code | message | description | |-----|-----|-------| | -32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. | |-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object
Hash of the block where this transaction was in.
The block number where this transaction was in.
(optional) The code format of smart contract code.
The contract address created, if the transaction was a contract creation, otherwise null.
(optional) Address of the fee payer.
feePayerSignatures
object[]
(optional) An array of fee payer's signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
anyOf
(optional) Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender.
Address of the sender.
Gas provided by the sender.
The actual value per gas deducted from the senders account.
Gas price provided by the sender in peb.
The amount of gas used by this specific transaction alone.
(optional) true if the address is humanReadable, false if the address is not humanReadable.
(optional) Key of the newly created account.
(optional) The data sent along with the transaction.
logs
object[]
required
Array of log objects, which this transaction generated.
anyOf
string
string
true when the log was removed, due to a chain reorganization. false if its a valid log.
Integer of the log index position in the block. null when it is a pending log.
Integer of the transactions index position log was created from. null when pending.
Hash of the transactions this log was created from. null when pending.
Hash of the block where this log was in. null when pending.
The block number where this log was in. null when pending.
Address from which this log originated.
Contains the non-indexed arguments of the log.
Array of 0 to 4 32-byte 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 declared the event with the anonymous specifier.).
Bloom filter for light clients to quickly retrieve related logs.
The number of transactions made by the sender prior to this one.
Hash of the tx without the fee payer's address and signature. This value is always the same as the value of transactionHash for non fee-delegated transactions.
signature
object[]
required
(optional) An array of fee payer's signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
anyOf
Either 1 (success) or 0 (failure).
(optional) detailed error code if status is equal to zero.
Address of the receiver. null when it is a contract creation transaction.
Hash of the transaction.
Integer of the transaction index position in the block.
A string representing the type of the transaction.
An integer representing the type of the transaction.
Value transferred in peb.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"blockHash": "0x4d97cf1f686a925ed4f1ad42c635cedb54974fe23a2941c7825e1ed3163c0e41",
"blockNumber": "0x7008",
"contractAddress": null,
"feePayer": "0xa9d2cc2bb853163b6eadfb6f962d72f7e00bc2e6",
"feePayerSignatures": [
{
"V": "0x4e44",
"R": "0xa665e17d92e1c671c8b062cecb19790d49138a21854fc15c460c91035b1884e",
"S": "0x17165688acc01736f1221a39399e3aac7e1ece14731fcab31631e3e4a59b7441"
}
],
"effectiveGasPrice": "0x5d21dba00",
"from": "0xab0833d744a8943fe3c783f9cc70c13cbd70fcf4",
"gas": "0xdbba0",
"gasPrice": "0x5d21dba00",
"gasUsed": "0x7918",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x26",
"senderTxHash": "0x18fe9e1007da7d20aad77778557fb8acc58c80054daba65124c8c843aadd3478",
"signatures": [
{
"V": "0x4e44",
"R": "0x1b6bb3d996d903d0528565d13e8d9d122b2220ed09c5baf384114193a6977027",
"S": "0x20c506ce9f1bdd42183c40c44f414a3930f339f856e8be3cfcdf5ca0852fd378"
}
],
"status": "0x1",
"to": "0x15a9119104e1bf0ec6d408b3cc188685e4402a2c",
"transactionHash": "0xaca5d9a1ed8b86b1ef61431b2bedfc99a66eaefc3a7e1cffdf9ff53653956a67",
"transactionIndex": "0x0",
"type": "TxTypeFeeDelegatedValueTransfer",
"typeInt": 9,
"value": "0x1"
}
}