Updated on 2024-11-14 GMT+08:00

eth_chainId

Introduction

This API returns the currently configured chain ID. It consumes 1 CU.

Parameter Description

This method does not accept any parameters.

Return Value

A hexadecimal value of the current chain ID.

Request

curl https://your-http-endpoint/v1/<API-KEY> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}'