BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Chain ID 56 finalizes one canonical block per PoSA slot in roughly three seconds, paying gas in BNB, and never accumulates competing sibling blocks along the way. eth_getUncleCountByBlockNumber, issued against https://bsc.therpc.io/YOUR_API_KEY, is documented to count the ommers a block references when you address that block by height or by a tag like latest. Whether you name the block by number or by hash makes no difference to the result. PoSA forks no uncles, so this variant stays an Ethereum-compatibility shim that hands back 0x0 at every height you ask about.
eth_getUncleByBlockNumberAndIndex; a 0x0 count tells you up front there is nothing further to fetch at that height.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockTag | string | نعم | The block to count uncles in. |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the BNB Smart Chain playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
0x0 for every height regardless of which block you name, so never branch on the expectation of a positive count.0x0 to a number before any numeric comparison or you risk comparing strings by accident.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"