
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@hyperplay/chains
Advanced tools
chains is a lightweight (~600 kb) package that supports constant time lookup of chain metadata given a chainId. chains works offline with a chain map of around 1000 chains, and if a chain is not found, ethereum-lists/chains will be queried.
Most existing implementations of chain metadata lookup require the dev to copy paste a large json array of chain into their application which the dev then does linear time lookups or parses into a map at runtime. This has poor performance and maintainability. When chains are added, the dev has to replace the json array. Updating an npm package is much easier.
The other solution is to query external api's. These api's may fail occasionally though, and this does not support offline use either which is an important requirement for some applications.
chains solves these issues.
yarn add @hyperplay/chains
import { getChainMetadata } from '@hyperplay/chains'
const chainId = '1'
const metadata = await getChainMetadata(chainId)
console.log(JSON.stringify(metadata, null, 4))
Please submit a PR to https://github.com/ethereum-lists/chains with the appropriate data added to the _data folder. After this is merged, @hyperplay/chains will automatically start working with your chain.
Run yarn generateChainMap and yarn buildDist in the root directory and then submit a PR with the updated map.
Bump the package.json version before merging and the GHA will publish.
FAQs
A package to get chain metadata
We found that @hyperplay/chains demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers 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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.