# eth\_chainId

Returns the current network id.

**Parameters**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_chainId#parameters)

None

**Return Type**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_chainId#return-type)

`ChainId` - The current network id. The full list of chain IDs is available at [chainlist.org](https://chainlist.org/). Some of the common ones are noted bellow.

ChainId

```typescript
type ChainId =
  | "1" // Ethereum Mainnet
  | "2" // Morden TestNet (deprecated)
  | "3" // Ropsten TestNet
  | "4" // Rinkeby TestNet
  | "5" // Goerli TestNet
  | "11155111"; // Sepolia TestNet
```

**Example**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_chainId#example)

```typescript
await provider.request({ method: "net_version", params: [] });
// "3"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.constellationnetwork.io/stargazer-wallet/ethereum-rpc-api/eth_chainid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
