eth_getTransactionByBlockNumberAndIndex
Returns the information about a transaction requested by Block number and index.
QUANTITY|TAG - Integer block number encoded as a hexadecimal, or the string 'latest', 'earliest' or 'pending'.
QUANTITY - A hex of the integer representing the position in the block.
Object - A transaction object, or null when no transaction was found:
- blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.
- blockNumber: QUANTITY - block number where this transaction was in.
- 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.
- value: QUANTITY - value transferred in Wei.
- v: QUANTITY - ECDSA recovery id
- r: DATA, 32 Bytes - ECDSA signature r
- s: DATA, 32 Bytes - ECDSA signature s
// Request
curl https://arbitrum.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["27DB5E2", "0x0"],"id":1}'
// Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x3b32dd164f1eb2b1f925c214e7180bf35280cf233a01f7e3a5d70203912e6808",
"blockNumber": "0x27db5e2",
"from": "0x00000000000000000000000000000000000a4b05",
"gas": "0x0",
"gasPrice": "0x0",
"hash": "0xf27c44d8b561a3088a60d691f6a10a3cd2a2222ced41ec1716a8f376d025775e",
"input": "0x6bf6a42d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f526c600000000000000000000000000000000000000000000000000000000027db5e20000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0x0",
"to": "0x00000000000000000000000000000000000a4b05",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x6a",
"chainId": "0xa4b1",
"v": "0x0",
"r": "0x0",
"s": "0x0"
}
}
Last modified 9mo ago