Avalanche
Avalanche
Avalanche
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleCountByBlockNumber returns the number of uncle blocks referenced by the block at a given height or block tag (such as latest). On the Avalanche C-Chain (chain ID 43114, gas paid in AVAX), this is always 0x0: under Snowman/Avalanche BFT consensus there is no competitive mining and therefore no uncle (ommer) blocks at any height. Available at https://avalanche.therpc.io/YOUR_API_KEY, the method is kept for EVM tooling compatibility, but on this chain you can treat its result as a constant 0x0.
0x0, so the rate is uniformly zero and the scan is unnecessary.0x0 here, so there is never a follow-up eth_getUncleByBlockNumberAndIndex call to make.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockTag | string | نعم | The block to count uncles in. |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the Avalanche playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
0x0 regardless of the height or block tag you pass, because Snowman consensus produces no uncles — there is no block where the count is non-zero."0x0"), not a number — parse it (for example with parseInt(value, 16)) before any numeric comparison.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"