⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

net_version

Returns the current network ID.

When to Use This Method

Use net_version to:

  • Identify Network - Get network identifier
  • Verify Connection - Confirm correct network
  • Multi-Network Support - Switch between networks

Parameters

No parameters required.

{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}

Returns

String - The current network ID:

  • "7000" for ZetaChain mainnet
  • "7001" for Athens testnet

Implementation Examples

const networkId = await provider.send('net_version', []);
console.log('Network ID:', networkId); // "7000"