eth_chainId

网络: Base · 主网 · Chain ID 8453(0x2105)

计为 1 个 Request。 计费规则见 Request Counting。

返回用于 EIP-155 重放保护签名的链 ID。

参数

无。

返回

QUANTITY — 当前链 ID。

请求

{ "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1 }

响应

{ "jsonrpc": "2.0", "id": 1, "result": "0x2105" }

0x2105 = 8453(Base)

代码示例

curl -X POST https://base-rpc.blockreq.com/v1/rpc/public \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'

在线试用