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)