Get Network Name With Chain ID

Gets the name of an Ethereum network based on its chain ID.

  • chainId (string) The chain ID of the network.

  • RETURN (string) Returns the name of the Ethereum network.

console.log('Goerli: ', Onyx.util.getNetNameWithChainId(5));

Last updated