dag_chainId

Returns the current network id.

Parameters

None

Return Type

ChainId - The current network id.

ChainId

type ChainId =
  | "1" // Constellation MainNet
  | "3"; // Ceres Testnet (fka. Exchanges Network)

Example

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

Last updated

Was this helpful?