Skip to main content

useNetwork

Use this hook to read the connected network data.

const connectedNetwork = useNetwork();

Return Values

  • The name property stores the name of the network.
  • The provider property stores the network provider url.
  • The id property stores the chain id.
  • The currencySymbol property stores the network currency symbol.
  • The coingeckoPriceId property stores the coingecko price id for reading crypto prices.
  • The blockExplorer property stores the url to the network block explorer