eth_chainId
返回用于 EIP-155 重放保护签名的链 ID。
无。
QUANTITY — 当前链 ID。
curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/public \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'{ "jsonrpc": "2.0", "id": 1, "result": "0x1"}
0x1= 1(Ethereum Mainnet)
常见链 ID
Section titled “常见链 ID”| 网络 | Chain ID(十六进制) | Chain ID(十进制) |
|---|---|---|
| Ethereum | 0x1 | 1 |
| BSC | 0x38 | 56 |
| Arbitrum One | 0xa4b1 | 42161 |
| Base | 0x2105 | 8453 |
| Method | Cost |
|---|---|
| eth_chainId | 0 RU(免费) |