Contents

net_version RPC method

Parameters:

  1. None

Returns:

  1. Result - String value of current network id. Typical values are as follows:
    1 - Ethereum Mainnet 2 - Morden Testnet (deprecated) 3 - Ropsten Testnet 4 - Rinkeby Testnet 5 - Goerli Testnet 10 - Optimism Mainnet 69 - Optimism Kovan Testnet 42 - Kovan Testnet 137 - Matic/Polygon Mainnet 80001 - Matic/Polygon Mumbai Testnet 250 - Fantom Mainnet 100 - xDAI Mainnet 56 - BSC Mainnet

Code Examples:

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}'
Ready to try QuickNode? Start your 7-day free trial