useNetwork
Use this hook to read the connected network data.
const connectedNetwork = useNetwork();
Return Values
- The
nameproperty stores the name of the network. - The
providerproperty stores the network provider url. - The
idproperty stores the chain id. - The
currencySymbolproperty stores the network currency symbol. - The
coingeckoPriceIdproperty stores the coingecko price id for reading crypto prices. - The
blockExplorerproperty stores the url to the network block explorer