Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getTransactionByBlockHashAndIndex returns a single transaction from Polygon PoS (chain ID 137) by pointing at a block via its hash and giving the zero-based position of the transaction inside that block. On Polygon — the MATIC-fee, EVM-equivalent network producing ~2-second Bor blocks — this is the call to use when you already hold a block hash and want a specific entry without first pulling the entire block body. Send it to https://polygon.therpc.io/YOUR_API_KEY and you get the same transaction object eth_getTransactionByHash returns, or null when the block or index does not exist.
0x0 until you hit a null.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | نعم | The hash of 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 Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash or transaction index is malformed. |
"0x0" for the first transaction, not the integer 0.null rather than an error, so null-check before reading fields and treat it as your loop-termination signal.المعاملات
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0" for the first transaction)