cfx_getTransactionByHash
Get transaction by its hash.
Params
(1)1. tx_hash (required)
string
Match pattern:
^0x[0-9,a-f,A-F]{64}$
Result
(cfx_getTransactionByHash_result)object or null
accessList
array[CfxAccessListItem] or null
address
stringMatch 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}$
chainId
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
contractCreated
string or null
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
data
stringMatch pattern:
^0x[0-9a-f]*$
epochHeight
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
from
stringMatch pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
gas
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
gasPrice
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
hash
stringMatch pattern:
^0x[0-9,a-f,A-F]{64}$
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
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
r
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
s
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
space
Allowed values:
nativeethereum
status
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
storageLimit
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
to
string or null
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
transactionIndex
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
transactionType
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
v
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
value
stringMatch 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": "cfx_getTransactionByHash",
"params": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
localhost:12539
Result
null