Avalanche
Avalanche
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_blockNumber returns the height of the most recently accepted block on the Avalanche C-Chain — the EVM contract chain where gas is paid in AVAX. Because the C-Chain runs the Snowman consensus protocol with roughly one-to-two-second finality, the value advances quickly, and an accepted block here is already final rather than merely the longest fork. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114) and you get back the current tip as a hex-encoded integer such as "0x2f1a4c".
eth_getLogs across a historical range.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded integer block number. Parse with parseInt(value, 16) or BigInt(value). |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node is not reachable or has not yet produced any block. |
"0x2f1a4c", not a number — parse it with parseInt(value, 16) or BigInt(value) before doing any arithmetic.