What is the chainid for Klaytn?

I cannot get it through eth_chainId json rpc.


Thanks for asking chainID API.
Klaytn chainID API is klayt_chainID. You can get the chainId of the network which the node is in.
Also, Klaytn supports eth_chainID json RPC as below to be compatible with Ethereum client.

➜  bin curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"klay_chainID","id":1}' http://localhost:8551
➜  bin curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainID","id":1}' http://localhost:8551

Please go through this website.

Cypress (mainnet) chainID is 8217 (0x2019).
Baobab (testnet) chainID is 1001 (0x3e9).

And I found Klaytn doesn’t support eth_chainId but support eth_chainID now.
I will update Klaytn supports eth_chainId also in next Klaytn release.

Thanks for letting me know.

Thank you so much! i will try that