Arbitrum One
Arbitrum One
Arbitrum One
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.Cette méthode ne prend aucun paramètre. Passez un tableau vide [].
| Type | Description |
|---|---|
| string (hex) | Hex-encoded chain ID integer (e.g. "0x1" for Ethereum mainnet). |
Try it live in the Arbitrum One playground.
| Code | Message | Cause |
|---|---|---|
-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.