net_version
Returns the current network ID as a decimal string.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”| Field | Type | Description |
|---|---|---|
result | string | The network ID as a decimal string. "8453" for Base Mainnet, "84532" for Base Sepolia. |
Example
Section titled “Example”Request
Section titled “Request”{ "jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}Response (Base Mainnet)
Section titled “Response (Base Mainnet)”{ "jsonrpc": "2.0", "id": 1, "result": "8453"}