Ethereum
Ethereum
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
net_peerCount reports how many peers an Ethereum execution node is currently connected to on the devp2p network. Those peers are how the node receives new mainnet blocks every 12-second slot and learns about pending ETH transactions before they are mined, so the count is a direct read on how well-connected the node is. Call it against https://ethereum.therpc.io/YOUR_API_KEY on chain ID 1 and the answer comes back as a hex-encoded integer, for example "0x1a" for 26 peers. Decode it to base 10 yourself; the JSON-RPC layer does not do that for you.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Hex-encoded peer count, e.g. `"0x1a"` = 26 peers. |
Try it live in the Ethereum playground.
eth_call or eth_getBalance results are stale.