跳到主要内容

eth_getTransactionReceipt

Returns the receipt information of a transaction by its hash.

curl --request POST \
--url https://evm.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": ["0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008"],
"method": "eth_getTransactionReceipt"
}'

Params

transactionhash required

Schema
type : string
Pattern : ^0x[0-9,a-f,A-F]{64}$

Result

Receipt
type : object
  • blockHash blockHash
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{64}$
  • blockNumber blockNumber
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • burntGasFee burntGasFee
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • contractAddress contractAddress
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{40}$
  • cumulativeGasUsed cumulativeGasUsed
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • effectiveGasPrice effectiveGasPrice
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • from from
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{40}$
  • gasUsed gasUsed
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • logs logs
    type : array
    • items[x] Log
      type : object
      • address address
        type : string
        Pattern : ^0x[0-9,a-f,A-F]{40}$
      • blockHash blockHash
        type : string
        Pattern : ^0x[0-9,a-f,A-F]{64}$
      • blockNumber blockNumber
        type : string
        Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
      • data data
        type : string
        Pattern : ^0x[0-9a-f]*$
      • logIndex logIndex
        type : string
        Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
      • removed removed
        type : boolean
      • topics topics
        type : array
        • items[x] H256
          type : string
          Pattern : ^0x[0-9,a-f,A-F]{64}$
      • transactionHash transactionHash
        type : string
        Pattern : ^0x[0-9,a-f,A-F]{64}$
      • transactionIndex transactionIndex
        type : string
        Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
      • transactionLogIndex transactionLogIndex
        type : string
        Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • logsBloom logsBloom
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{512}$
  • statusCode statusCode
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • to to
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{40}$
  • transactionHash transactionHash
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{64}$
  • transactionIndex transactionIndex
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • transactionType transactionType
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • txExecErrorMsg txExecErrorMsg
    type : string
    Pattern : ^.*$

Examples

Request

curl -X POST --data \
'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionReceipt",
"params": [
"0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008"
]
}' \
-H "Content-Type: application/json" \
localhost:12539

Response

{
"blockHash": "0x1768f524493543ac12785a8dd50e5a5b2c5b1ebaaef4f6202a5832783fad13bc",
"blockNumber": "0x43543a1",
"contractAddress": null,
"cumulativeGasUsed": "0xcee2a",
"effectiveGasPrice": "0x1",
"from": "0x8d86bc475bedcb08179c5e6a4d494ebd3b44ea8b",
"gasUsed": "0x54d0a",
"logs": [
{
"address": "0x0c4be6aa667df48de54ba174be7948875fdf152b",
"blockHash": "0x1768f524493543ac12785a8dd50e5a5b2c5b1ebaaef4f6202a5832783fad13bc",
"blockNumber": "0x43543a1",
"data": "0x0000000000000000000000000000000000000000000000000000000000000416000000000000000000000000e4cff55f193b3493f1aa6811738309b2acf6c963",
"logIndex": "0xa",
"removed": false,
"topics": [
"0xdec847db058c9c012e0f3dbe2b99e05cfa4c693f61a7d8bc64652a68913cbfff"
],
"transactionHash": "0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008",
"transactionIndex": "0x2",
"transactionLogIndex": "0x0"
},
{
"address": "0x0c4be6aa667df48de54ba174be7948875fdf152b",
"blockHash": "0x1768f524493543ac12785a8dd50e5a5b2c5b1ebaaef4f6202a5832783fad13bc",
"blockNumber": "0x43543a1",
"data": "0x000000000000000000000000000000000000000000000000000000000000041f000000000000000000000000e4cff55f193b3493f1aa6811738309b2acf6c963",
"logIndex": "0xb",
"removed": false,
"topics": [
"0xcabaf9c102f83746b27ae932f638eebfaf5ea7d014edd20ab14dec3768a8f55c"
],
"transactionHash": "0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008",
"transactionIndex": "0x2",
"transactionLogIndex": "0x1"
},
{
"address": "0xe4cff55f193b3493f1aa6811738309b2acf6c963",
"blockHash": "0x1768f524493543ac12785a8dd50e5a5b2c5b1ebaaef4f6202a5832783fad13bc",
"blockNumber": "0x43543a1",
"data": "0x000000000000000000000000000000000000000000000000000000000000041f0000000000000000000000000000000000000000000000000000000000036ee8",
"logIndex": "0xc",
"removed": false,
"topics": [
"0x177160e50d083725209651bf251badbab2b70d078dda089acd2101eefccd82c7",
"0x0000000000000000000000008d86bc475bedcb08179c5e6a4d494ebd3b44ea8b"
],
"transactionHash": "0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008",
"transactionIndex": "0x2",
"transactionLogIndex": "0x2"
}
],
"logsBloom": "0x00000000000000000000000000000000000000020040000000000042000000000000000000000000000000000000000000000000000000000000000000000000000000004004000000000000000000000000002000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000040000400000000000000000000000000000000000000000004000000000000000000000000000000000000000020080000000000000000000002000000000008000000000000000000000000000000020000000000000000002000000000000000000000000",
"status": "0x1",
"to": "0xe4cff55f193b3493f1aa6811738309b2acf6c963",
"transactionHash": "0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008",
"transactionIndex": "0x2",
"txExecErrorMsg": null
}