eth_chainId

网络: Ethereum Sepolia · 测试网 · Chain ID 11155111(0xaa36a7)

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

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

参数

无。

返回

QUANTITY — 当前链 ID。

请求

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

响应

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

0xaa36a7 = 11155111(Ethereum Sepolia)

代码示例

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

在线试用