跳到主要内容

eth_getTransactionByBlockNumberAndIndex

Returns the information about a transaction requested by the block number and index of which it was mined.

Params

(2)

1. blocknumber (required)

(one of)
string
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$

2. index (required)

number

Result

(eth_getTransactionByBlockNumberAndIndex_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)$

Endpoint

Params

blocknumber

index


Request

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