Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@ethersproject/networks
Advanced tools
@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.
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);
The web3.js library is a comprehensive collection of modules that allow you to interact with an Ethereum blockchain. It includes functionalities for network configurations similar to @ethersproject/networks, but also provides a broader range of features for interacting with smart contracts, accounts, and more.
ethjs is a lightweight JavaScript library for interacting with the Ethereum blockchain. It provides utilities for network configurations and other Ethereum-related functionalities. Compared to @ethersproject/networks, ethjs is more minimalistic and focuses on providing a simple API for common Ethereum tasks.
This sub-module is part of the ethers project.
It is responsible for tracking common networks along with important parameters for each.
For more information, see the documentation.
Most users will prefer to use the umbrella package, but for those with more specific needs, individual components can be imported.
const {
getNetwork,
// Types
Network,
Networkish
} = require("@ethersproject/networks");
MIT License
FAQs
Network definitions for ethers.
The npm package @ethersproject/networks receives a total of 452,254 weekly downloads. As such, @ethersproject/networks popularity was classified as popular.
We found that @ethersproject/networks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.