BNB Smart Chain
BNB Smart Chain
BNB Smart Chain
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_blockNumber reports the head of BNB Smart Chain: the height of the most recently accepted block. BSC is a geth-equivalent EVM secured by PoSA validators and fueled by BNB. It seals a block roughly every three seconds, and sub-second after recent client upgrades, so this counter climbs fast. Point any client at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56. The response is a single hex integer naming the freshest canonical block the node knows about.
Diese Methode erwartet keine Parameter. Übergib ein leeres Array [].
| Typ | Beschreibung |
|---|---|
| string (hex) | Hex-encoded integer block number. Parse with parseInt(value, 16) or BigInt(value). |
Try it live in the BNB Smart Chain playground.
| Code | Meldung | Ursache |
|---|---|---|
-32603 | Internal error | Node is not reachable or has not yet produced any block. |
"0x2a1b3c0". Run it through parseInt(value, 16) before any arithmetic.