⚡ We welcome businesses to test our enterprise-grade service

arbitrum
Arbitrum

Method: POST eth_getTransactionByBlockNumberAndIndex

dropdown

Method RPC eth_getTransactionByBlockNumberAndIndex example for Arbitrum

POST eth_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.

Parameters

QUANTITY|TAG - integer or string

block number or "latest", "earliest" or "pending"

QUANTITY - integer

Transaction index position.

Request

curl --location --request POST 'https://arbitrum.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "arbSubType": "0x4",
        "arbType": "0x3",
        "blockHash": "0x10256c0da0cdf9b71295c2e7b7b9136bc1539d37b2e738b1232fb349b0c7383f",
        "blockNumber": "0x135b1ff",
        "from": "0x80c67432656d59144ceff962e8faf8926599bcf8",
        "gas": "0xf4240",
        "gasPrice": "0xa63cd5c",
        "hash": "0x579b09b83ffa9e3ed38ced10f09e21bae3aa3d19fc1dbe8d8ac35130a6f2ce0e",
        "indexInParent": "0x0",
        "input": "0x",
        "l1BlockNumber": "0xea2502",
        "l1SequenceNumber": "0x284e8de",
        "nonce": "0x14851",
        "parentRequestId": "0x34a5cdf0a8c59d43012fb5d921681f21b866d57f7cde35c807533eac5cccf390",
        "r": "0xdedec959721febc505e8e56e421beb2d8687fb0f104d32fe8c41b8e94f2a2e6d",
        "s": "0x49db432f07027e904810bdc5eb37be6781a4e30389b307b8b1ba940caf4ffe33",
        "to": "0x3f30f37ebace3f59e00fb2b6553adfa73f9bca0b",
        "transactionIndex": "0x0",
        "v": "0x14985",
        "value": "0xa19fc19358f2009"
    }
}