🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@ethersproject/networks

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/networks

Network definitions for ethers.

5.8.0
latest
Source
npm
Version published
Weekly downloads
1.3M
6.89%
Maintainers
0
Weekly downloads
 
Created

What is @ethersproject/networks?

@ethersproject/networks is a part of the ethers.js library, which provides a collection of utilities for interacting with Ethereum networks. This package specifically deals with network configurations and provides utilities to define and work with different Ethereum networks.

What are @ethersproject/networks's main functionalities?

Get Network Information

This feature allows you to retrieve information about a specific Ethereum network by its name or chain ID. In this example, we get the network information for the 'homestead' network, which is the main Ethereum network.

const { getNetwork } = require('@ethersproject/networks');

const network = getNetwork('homestead');
console.log(network);

Define Custom Network

This feature allows you to define a custom network by specifying its name and chain ID. In this example, we create a custom network with the name 'custom' and chain ID 12345.

const { Network } = require('@ethersproject/networks');

const customNetwork = new Network('custom', 12345);
console.log(customNetwork);

Other packages similar to @ethersproject/networks

Keywords

Ethereum

FAQs

Package last updated on 26 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts