BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
When you are stepping through BNB Smart Chain by height rather than by hash, eth_getTransactionByBlockNumberAndIndex is the tool to reach a single transaction. Pass a hex block number or a tag such as latest or pending, add a zero-based hex index, and the node returns that one transaction object. You get null if the height or position has no entry. BNB Smart Chain charges gas in BNB and seals blocks about every three seconds, so iterating height-by-height keeps pace with a quick chain. Send each request to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56.
pending tag with its index.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 BNB Smart Chain playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or transaction index is not a valid hex integer. |
"0x0" for the leading transaction, never a plain numeric 0.pending tag orders and exposes queued transactions is not uniform across node clients, so do not depend on stable positions there.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0" for the first transaction)