Path parameters
Your API key for authentication
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Returns the chain ID of the current connected node as described in EIP-695.
curl https://site1.moralis-nodes.com/optimism/:apiKey \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}