Arbitrum One
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Arbitrum One
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getTransactionByBlockNumberAndIndex returns one transaction by its position inside a block, where the block is named by its number or by a tag like latest. On Arbitrum One (chain ID 42161), an Optimistic Rollup paying gas in ETH and settling to Ethereum L1, this is convenient when you are scanning forward by block height rather than tracking hashes. Send a block tag and a hex index to https://arbitrum.therpc.io/YOUR_API_KEY and it returns the transaction at that index position within the block, or null if the block or index is not found.
pending tag with a position index.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | Sí | Zero-based position of the transaction within the block. |
| Tipo | Descripción |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the Arbitrum One playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or transaction index is not a valid hex integer. |
"0x0", not the integer 0, for the first transaction.pending tag depend on the sequencer's current view; ordering and availability of pending transactions can differ between calls and node clients, so do not treat them as final.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)