🔵 Base
net_version

🆔 net_version - Base Chain

Returns

Returns the current network id for Base chain.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "8453"
}

Need RPC API keys?

Get 12.5M archival requests for free today.

Parameters

None

Request

POST https://base-mainnet.chainnodes.org/YOUR-API-KEY
💡

Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)

Example

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing base-mainnet
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}'

Base Network IDs

ℹ️

The network ID is used to distinguish different Ethereum-compatible networks from each other. The Base mainnet always has network ID 8453.

Base NetworkNetwork IDChain ID
Base Mainnet84538453
Base Goerli (testnet)8453184531
Base Sepolia (testnet)8453284532

Use Cases

  1. Network Verification Confirm that you're connected to the correct Base network before sending transactions.

    // Check if connected to Base mainnet
    const netVersion = await provider.send("net_version", []);
    if (netVersion !== "8453") {
      console.error("Not connected to Base mainnet!");
    }
  2. Multi-Chain Applications Use the network ID to adapt your application's behavior based on the connected network.

Related Methods

  • eth_chainId - Returns the current chain ID (similar to network ID)
  • net_listening - Check if the node is listening for network connections
  • net_peerCount - Get the number of peers currently connected to the node