Arbitrum One
Arbitrum One
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
net_version returns the network ID of the chain the node is connected to, as a decimal string. For Arbitrum One — the Optimistic Rollup that settles to Ethereum and pays gas in ETH — that value is "42161", matching its chain ID (42161, or 0xa4b1 in hex). Querying https://arbitrum.therpc.io/YOUR_API_KEY with this no-parameter method is a fast way to confirm a connection is pointed at Arbitrum One mainnet and not at the Sepolia testnet or another chain entirely before you act on the node's data.
"42161" for Arbitrum One mainnet — before submitting a transaction, so funds and contract calls land on the right chain."42161") from the Arbitrum Sepolia testnet ("421614") in environment-aware application logic, so staging and production code paths read the network straight from the node.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Decimal string network ID, e.g. `"1"` for Ethereum mainnet. Note: network ID and chain ID coincide on most networks but can differ. |
Try it live in the Arbitrum One playground.
eth_chainId — not net_version — for the value you fold into transaction signing and EIP-155 replay protection."42161"), not a hex-encoded number like most other numeric RPC responses. Do not pass it through hex parsing, or you will misread the network.