Arbitrum One
Arbitrum One
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_chainId returns the EIP-155 chain ID of the network behind the endpoint. For Arbitrum One — the ETH-gas Optimistic Rollup — that value is 0xa4b1, which is 42161 in decimal. Call https://arbitrum.therpc.io/YOUR_API_KEY and you should always get this exact value back; it is the canonical way to confirm a client is talking to Arbitrum One and not Ethereum L1 or another rollup before it signs anything.
eth_blockNumber for a full "alive and on the right chain" probe of the endpoint.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded chain ID integer (e.g. "0x1" for Ethereum mainnet). |
Try it live in the Arbitrum One playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node failed to retrieve chain configuration. |
net_version — that returns a network ID string and can differ from the EIP-155 chain ID; always sign with the value from eth_chainId."0xa4b1", not the number 42161 — compare with BigInt(result) === 42161n rather than a raw string match to avoid case or zero-padding bugs.