Skip to main content

eth_getTransactionByHash

Returns the information about a transaction requested by transaction 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_getTransactionByHash"
}'

Params

transactionhash required

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

Result

Transaction
type : object
  • accessList accessList
    type : array
    • items[x] AccessListItem
      type : object
      • address address
        type : string
        Pattern : ^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
      • storageKeys storageKeys
        type : array
        • items[x] H256
          type : string
          Pattern : ^0x[0-9,a-f,A-F]{64}$
  • 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)$
  • chainId chainId
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • creates creates
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{40}$
  • from from
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{40}$
  • gas gas
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • gasPrice gasPrice
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • hash hash
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{64}$
  • input input
    type : string
    Pattern : ^0x[0-9a-f]*$
  • maxFeePerGas maxFeePerGas
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • maxPriorityFeePerGas maxPriorityFeePerGas
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • nonce nonce
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • publicKey publicKey
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{128}$
  • r r
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • raw raw
    type : string
    Pattern : ^0x[0-9a-f]*$
  • s s
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • standardV standardV
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • status status
    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}$
  • 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)$
  • v v
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • value value
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • yParity yParity
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$

Examples

Request

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

Response

{
"blockHash": "0x1768f524493543ac12785a8dd50e5a5b2c5b1ebaaef4f6202a5832783fad13bc",
"blockNumber": "0x43543a1",
"chainId": "0x47",
"creates": null,
"from": "0x8d86bc475bedcb08179c5e6a4d494ebd3b44ea8b",
"gas": "0x64da4",
"gasPrice": "0x1",
"hash": "0xb0312f4972128d4bfee5162ee10cdbea6d0252c337db0c88fed6ce4c16ce8008",
"input": "0x9c312cfd",
"nonce": "0x813",
"publicKey": "0x12ad2589e15771fdefad4491915ecc2d895bd7b81a4bb12d136e2075ebe47e84e9cc1d223520a18dd32cddfd8dad8d22204c117f77e26dec4b83807fb123d681",
"r": "0x445441721c00b8404e5e599d50db2f37ff18912ac7066f7a2e0a25d67bc8cca9",
"raw": "0xf86a8208130183064da494e4cff55f193b3493f1aa6811738309b2acf6c96383036ee8849c312cfd81b1a0445441721c00b8404e5e599d50db2f37ff18912ac7066f7a2e0a25d67bc8cca9a0567d39820042e94bb3d469a37edc98c70578cc76447b90f8a3e0076509d4bc30",
"s": "0x567d39820042e94bb3d469a37edc98c70578cc76447b90f8a3e0076509d4bc30",
"standardV": "0x0",
"status": "0x1",
"to": "0xe4cff55f193b3493f1aa6811738309b2acf6c963",
"transactionIndex": "0x2",
"v": "0xb1",
"value": "0x36ee8"
}