BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Within any BNB Smart Chain block, transactions are stored in a fixed order, and eth_getTransactionByBlockHashAndIndex reaches one of them by its position. Give the method a 32-byte block hash plus a zero-based hex index and it returns that single transaction object, or null when the block or slot does not exist. Because BNB Smart Chain pays its validators in BNB and finalizes blocks in around three seconds under PoSA, addressing a transaction by block hash pins it to one specific, immutable block. Route the lookup through https://bsc.therpc.io/YOUR_API_KEY on chain ID 56.
0x0 until the method returns 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 BNB Smart Chain playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash or transaction index is malformed. |
"0x0" — passing a bare integer 0 will be rejected as malformed.null back rather than an error, so guard against the null before reading fields.المعاملات
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0" for the first transaction)