npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@seaswap/seaswap-contract-metadata

v1.0.0

Published

A mapping of RSK contract addresses to broadly accepted icons for those addresses.

Downloads

1

Readme

SeaSwap Contract Metadata

A mapping of checksummed addresses to metadata, like names, and images of those addresses' logos.

All address keys follow the EIP 1191 address checksum format.

Submit PRs to add valid logos, and obviously valid logos will be merged.

Usage

You can install from npm with npm install @seaswap/seaswap-contract-metadata and use it in your code like this:

const contractMap = require('@seaswap/seaswap-contract-metadata')
const toChecksumAddress = require('seaswap-util').toChecksumAddress

function imageElFor (address) {
  const metadata = iconMap[toChecksumAddress(address, 30)]
  if (!('logo' in metadata)) {
    return false
  }
  const fileName = metadata.logo
  const path = `${PATH_TO_METADATA_MODULE}/images/${fileName}`
  const img = document.createElement('img')
  img.src = path
  img.style.width = '100%'
  return img
}

Submission Process

  1. Fork this repository.
  2. Add your logo image in a web-safe format to the images folder.
  3. Add an entry to the contract-map.json file with the specified address as the key, and the image file's name as the value.

Criteria:

  • The icon should be small, square, but high resolution, ideally a vector/svg.
  • Do not add your entry to the end of the JSON map, messing with the trailing comma. Your pull request should only be an addition of lines, and any line removals should be deliberate deprecations of those logos.
  • PR should include link to official project website referencing the suggested address.
  • Project website should include explanation of project.
  • Project should have clear signs of activity, either traffic on the network, activity on GitHub, or community buzz.

Tokens should include a field "erc20": true, and can include additional fields:

  • symbol (a five-character or less ticker symbol)
  • decimals (precision of the tokens stored)

A sample submission:

"0x2aCc95758f8b5F583470bA265Eb685a8f45fC9D5": {
  "name": "RIF",
  "logo": "rif.png",
  "erc20": true,
  "symbol": "RIF",
  "decimals": 18
}

A full list of permitted fields can be found in the permitted-fields.json file.

Disclaimer

Maintaining this list is a considerable chore, and it is not our highest priority. We do not guarantee inclusion in this list on any urgent timeline. We are actively looking for fair and safe ways to maintain a list like this in a decentralized way, because maintaining it is a large and security-delicate task.