eth_getTransactionByBlockNumberAndIndex-polygon

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

Log in to see full request history

Parameters

  • QUANTITY|TAG - a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.
  • QUANTITY - 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_getTransactionByBlockNumberAndIndex", "params":[ "latest", "0x0" ] }'

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": "0xd63ce4e085a5fd8b0315a875f71216fccaf7f7a7a5a0450b62019854354b552c", "blockNumber": "0x2b9bbb4", "from": "0xac4d6b6dfeb782644de65a1b5d5d6c3b25a48837", "gas": "0x7a120", "gasPrice": "0x1f56c90200", "hash": "0xb07d5cfb7d4ba8b18faa15d313ea0a1ce6cf1df9259976cedd1fd457346935ab", "input": "0xbc6511880000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000ac4d6b6dfeb782644de65a1b5d5d6c3b25a488370000000000000000000000000000000000000000000000000000000064c73be400000000000000000000000000000000000000000000006194049f30f7200000000000000000000000000000000000000000000000000000000000004b0c693f0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x6236b", "to": "0xf5b509bb0909a69b1c207e495f687a596c168e12", "transactionIndex": "0x1", "value": "0x0", "type": "0x0", "chainId": "0x89", "v": "0x136", "r": "0xa259fd33bf6c12d6a6a39dd0da860ce56955f1275a672471607f21c9c7179771", "s": "0x54eaaf685efca01ed7b3ebc1196443884ce4294c86282bb56c1fb7531585bc81" } }

Try Yourself

Path Params
string
required
Defaults to 8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj
Body Params
string
required
Defaults to 1
string
required
Defaults to 2.0
string
required
Defaults to eth_getTransactionByBlockNumberAndIndex
params
array of strings
required
Defaults to latest,0x0
params*
Language
Click Try It! to start a request and see the response here!