Base
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Base
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getTransactionByBlockNumberAndIndex returns one transaction from a Base block, located by the block's number (or a tag like latest, safe, or finalized) and the transaction's zero-based index within it. It is the number-based sibling of eth_getTransactionByBlockHashAndIndex, handy when you scan the chain by height rather than by hash. Base is Coinbase's OP Stack optimistic rollup that settles to Ethereum L1 and meters gas in ETH, with the sequencer sealing a block about every 2 seconds. Send the call to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105) with a block tag and a hex index; you get the transaction object, or null if the block or index is out of range.
0x0) of each block to study sequencer ordering and MEV patterns.pending tag, where node support allows it.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockTag | string | 是 | The block containing the transaction. |
| 2 | transactionIndex | string (hex) | 是 | Zero-based position of the transaction within the block. |
| 类型 | 描述 |
|---|---|
| object | null | Same transaction object as eth_getTransactionByHash. Returns null if block or index not found. |
Try it live in the Base playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or transaction index is not a valid hex integer. |
"0x0" for the first transaction, never the integer 0.pending tag is not uniform — transaction ordering and even availability under it differ between node clients, so do not build hard guarantees on the pending view of a Base block.参数
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)