EVM
eth_getTransactionByBlockNumberAndIndex
Summary: Get transaction by block identifier and index
This request returns information about a transaction by block number or tag and the transaction's index position.
Parameters
block oneOf
requiredBlock number or string tag.
transactionIndex string
requiredThe position in the block, in hexadecimal.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
Returns
Returns the transaction information or "not found".
eth_getTransactionByBlockNumberAndIndexResponse oneOf
Customize request
Parameter
Value
Request
CURL
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["0x49b95c","0x2"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x3ff53efeec688238a8ecc0a1404221d1be3723aa6531f12f4d635dc8e7824779",
"blockNumber": "0x49b95c",
"chainId": "0xe708",
"from": "0x05cc939ac053dc47366fe8032f9be00f5f33b508",
"gas": "0x439d0",
"gasPrice": "0x3dfd240",
"hash": "0x8b04f98bec033ccc46e13f01ed75e0b2b12c0dc8b7d7d16102cf2b4addeaa3b8",
"input": "0x83bd37f900011a51b19ce03dbe0cb44c1528e34a7edd7771e9af000...",
"nonce": "0x8d",
"r": "0xbc381ffdf71e5934df37913906305d88e06daf0051e69e42cabe4539e6fc4c58",
"s": "0x4d65409fdc70bb2d14926b038ac7a064d8cce583df50efb424438dfd9333d578",
"to": "0x2d8879046f1559e53eb052e949e9544bcb72f414",
"transactionIndex": "0x2",
"type": "0x0",
"v": "0x1ce33",
"value": "0x0"
}
}