Saltar al contenido principal

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
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}$
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
string
Match pattern:
^0x[0-9a-f]*$
epochHeight
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
from
string
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
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}$
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)$
r
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
s
string
Match 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
string
Match 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
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": "cfx_getTransactionByHash",
"params": [
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
localhost:12539

Result

null

Endpoint

Params

tx_hash


Request

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