eth_getTransactionByBlockHashAndIndex-polygon

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

Parameters

  • DATA, 32 Bytes - hash of a block.
  • QUANTITY - integer of the transaction index position.
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getTransactionByBlockHashAndIndex",
    "params":[
        "0x31d14b77082ceaeba816c1ea6c86c25bf275391b9c305d3e568442d986d2fcfd",
        "0x1"
    ]
}'

Returns

  • Object - A transaction object, or null when no transaction was found:
    • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
    • blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
    • from: DATA, 20 Bytes - address of the sender.
    • gas: QUANTITY - gas provided by the sender.
    • gasPrice: QUANTITY - gas price provided by the sender in Wei.
    • hash: DATA, 32 Bytes - hash of the transaction.
    • input: DATA - the data send along with the transaction.
    • nonce: QUANTITY - the number of transactions made by the sender prior to this one.
    • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
    • transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
    • value: QUANTITY - value transferred in Wei.
    • v: QUANTITY - ECDSA recovery id
    • r: QUANTITY - ECDSA signature r
    • s: QUANTITY - ECDSA signature s
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x31d14b77082ceaeba816c1ea6c86c25bf275391b9c305d3e568442d986d2fcfd",
    "blockNumber": "0x2b9bb73",
    "from": "0x79e715aba8fce020407a0522c9b1d6eb0800b60e",
    "gas": "0xf4240",
    "gasPrice": "0x22ecb25c00",
    "maxPriorityFeePerGas": "0x22ecb25c00",
    "maxFeePerGas": "0x22ecb25c00",
    "hash": "0xb0fb6d8d7e60e60272b33ace470eb253786bb145a770d645ca92ccf810a27347",
    "input": "0xa9059cbb000000000000000000000000f30d9b5ca07cc4c67bb47ea9b365eab47a6a5b1a0000000000000000000000000000000000000000000000144d61cfa9980edab0",
    "nonce": "0x1fba",
    "to": "0x13efaa3d5e2c86e7aba168f925fef9827648cff4",
    "transactionIndex": "0x1",
    "value": "0x0",
    "type": "0x2",
    "accessList": [],
    "chainId": "0x89",
    "v": "0x0",
    "r": "0x6b97840d80a2388b64a2f529f4b421ab19e6155a068bae54093a1a38ee9bf868",
    "s": "0x4d3fa62d3fd51aee02ea8c7ed540a02a9d42b3add809117c8923805e38ea743e"
  }
}

Try Yourself

Language
Click Try It! to start a request and see the response here!