Saltar al contenido principal

eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

Params

(1)

1. transactionhash (required)

string
Match pattern:
^0x[0-9,a-f,A-F]{64}$

Result

(eth_getTransactionByHash_result)
Transaction or null
accessList
array[AccessListItem] or null
address
string
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
storageKeys
array[string]
blockHash
string or null
Match pattern:
^0x[0-9,a-f,A-F]{64}$
blockNumber
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
chainId
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
creates
string or null
Match pattern:
^0x[0-9,a-f,A-F]{40}$
from
string
Match pattern:
^0x[0-9,a-f,A-F]{40}$
gas
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
gasPrice
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
hash
string
Match pattern:
^0x[0-9,a-f,A-F]{64}$
input
string
Match pattern:
^0x[0-9a-f]*$
maxFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
maxPriorityFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
nonce
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
publicKey
string or null
Match pattern:
^0x[0-9,a-f,A-F]{128}$
r
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
raw
string
Match pattern:
^0x[0-9a-f]*$
s
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
standardV
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
status
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
to
string or null
Match pattern:
^0x[0-9,a-f,A-F]{40}$
transactionIndex
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
transactionType
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
v
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
value
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
yParity
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$

Examples

Request

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

Result

{
"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"
}

Endpoint

Params

transactionhash


Request

curl -X POST --data \
'{
"method": "eth_getTransactionByHash",
"params": [
null
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
https://evmtestnet.confluxrpc.com