Check out our new component library - build.abs.xyz!
cURL
curl --request POST \ --url https://api.mainnet.abs.xyz/eth_chainId \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "eth_chainId", "params": [] }'
{ "jsonrpc": "2.0", "result": "0x144", "id": 1 }
Gets the current chain ID
JSON-RPC version
The method to call
Request identifier
Parameters (empty for this method)
Returns the chain ID in hexadecimal format
"2.0"
1
Hexadecimal representation of the current blockchain network's chain ID
"0x144"
Was this page helpful?