net_version
Returns the current network id.
Parameters
None
Returns
String
- The current network id.
1
: Ethereum Mainnet5
: Goerli testnet11155111
: Sepolia testnet
Last updated
Returns the current network id.
None
String
- The current network id.
1
: Ethereum Mainnet
5
: Goerli testnet
11155111
: Sepolia testnet
Last updated
This method will use 5
.
The full list of current network IDs is available at . Some common ones are: