Ethereum
Ethereum
Ethereum
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_blockNumber returns the height of the most recent block the node has accepted on Ethereum mainnet. Since The Merge a validator proposes one block per 12-second slot, so under normal conditions the number this method reports climbs by one roughly every 12 seconds. It takes no parameters and answers with a single hex integer. Point it at https://ethereum.therpc.io/YOUR_API_KEY (chain ID 1, native coin ETH) and you get the current tip of the canonical chain. It is the lightest call in the whole eth_ namespace.
eth_getLogs backward in fixed windows so you never request a range that runs past the head.current - txBlock crosses your confirmation threshold before treating a transaction as settled.finalized to see how many slots still sit in the reorg-able window above economic finality.هذا الأسلوب لا يأخذ أي معاملات. مرر مصفوفة فارغة [].
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded integer block number. Parse with parseInt(value, 16) or BigInt(value). |
Try it live in the Ethereum playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32603 | Internal error | Node is not reachable or has not yet produced any block. |
0x12d4f1a. Decode it with BigInt(value) or parseInt(value, 16); comparing or adding to the raw string gives garbage.finalized or safe instead of acting on the raw latest height.