2

Does Solana use Chain IDs the way they are used in EVM blockchains? I cannot find this in the Solana documentation and in the internet. If Solana uses Chain IDs, where can I find them? If not, is there a generally accepted way of distinguishing networks?

1 Answer 1

3

You can read about different clusters which Solana maintains.

To fulfil different JSON-RPC requests to the same, endpoints are listed here.

You can open a request to any of them by creating a connection and a provider. In JavaScript, you can connect to the "devnet" cluster by doing the following :

import { clusterApiUrl , Connection } from "@solana/web3.js";
const networkUrl = "https://api.devnet.solana.com";   // RPC Endpoint
const connection = new Connection(networkUrl);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.