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

@orca-so/orca-mintlists-demo

v1.8.30

Published

This is the repository for managing SPL tokens frequently used by Orca which replaces the Mongo DB backed token database. Here we only manage lists of mint addresses, and there can be multiple lists managed in the repository in the `./src/mintlists/` dire

Downloads

196

Readme

Orca Mintlists

This is the repository for managing SPL tokens frequently used by Orca which replaces the Mongo DB backed token database. Here we only manage lists of mint addresses, and there can be multiple lists managed in the repository in the ./src/mintlists/ directory.

Mintlist management also relies on two other Orca packages

  • token-sdk - SDK utilities and classes for working with tokens
  • mintlist-cli - CLI tool used by the mintlist repository for generating code and automating token management - e.g. scripts for adding and removing tokens

Mintlist Types

We currently maintain two mintlists which represent different types of business logic. Tokens that are in neither list will not be searchable or visible in our web app until we implement arbitrary token support in the future.

Orca Default List

orca-default.mintlist.json

This list represents what our web app considers the "whitelisted" tokens. Tokens in this list will be visible by default in our web app (e.g. token auto-complete drop-down, API endpoint).

Presence in the default lists takes priority over the extended list - if a mint is in both lists, it will be considered "whitelisted".

Orca Extended List

orca-extended.mintlist.json

Tokens that are only visible by default in our web app but NOT "whitelisted" tokens.

This list is currently automatically updated every 6 hours via the Auto Update action. This pulls the newest Solana token list from CoinGecko and adds any new mints that are detected.

Managing tokens

Here are the common actions to modify mintlists.

How to add whitelisted tokens:

  • Add Mint GitHub Action
  • Click on "Run Workflow" on the right-hand side
  • Branch: main
  • Mintlist to add mints to: orca-default.mintlist.json
  • space separated mints to add: mint1 mint2 ...

How to add non-whitelisted tokens:

  • Add Mint GitHub Action
  • Click on "Run Workflow" on the right-hand side
  • Branch: main
  • Mintlist to add mints to: orca-extended.mintlist.json
  • space separated mints to add: mint1 mint2 ...

How to un-whitelist tokens:

Note that if a token is removed from the default list and does not exist in the extended list, it will completely disappear from the UI. If we still want the token to appear in the UI but only be un-whitelisted, the token needs to exist in the extended list.

  • Remove Mint GitHub Action
  • Click on "Run Workflow" on the right-hand side
  • Branch: main
  • Mintlist to remove mints from: orca-default.mintlist.json
  • space separated mints to remove: mint1 mint2 ...

How to change(override) symbol or logo of tokens:

  • Currently only by manually modifying ./src/override.json
  • Open PR with changes against main

File Structure

* = generated code
.
└── orca-mintlists/
    ├── .github/
    │   └── workflows/
    ├── bin/
    ├── dist*/
    │   └── <contents published to NPM>
    ├── src/
    │   ├── mintlists/
    │   │   ├── orca-default.mintlist.json
    │   │   └── orca-extended.mintlist.json
    │   ├── tokenlists*/
    │   │   └── <generated based on mintlists>
    │   ├── overrides.json
    │   └── index.ts*
    └── package.json

Changes can be made manually - see example PR https://github.com/orca-so/orca-mintlists/pull/1.

Whenever changes are detected on the main branch in any of the mintlist JSON files, we generate a new tokenlist from the mints. The tokenlist is used for caching on the client-side to prevent expensive fetches when first loading a large list of mints.

Once the tokenlist(s) are generated, we generate an index.ts file that exports all of the JSON files and compiles the package into the dist/ folder. A new version is then published as an NPM package that contains the latest mintlists and tokenlists. Clients use the latest NPM tag to pull in new changes on a set interval.

In the future, we can move the management of the JSON files from NPM to an on-chain solution like a Solana contract + Arweave.

Setting up the Repository

This repository requires the following secrets for the bump-and-publish GitHub workflow.

  • SOLANA_NETWORK: Solana RPC URL used for fetching token metadata
  • NPM_ACCESS_TOKEN: Access token used for publishing NPM packages
  • CG_API_KEY: Optional - API key used for fetching token metadata

Also need to set up the following variable

Versioning

Once mintlist changes are detected in the main branch, the package version will automatically be updated in the following manner

  • Major - When a mintlist is added or removed from the mintlists directory.
  • Minor - When a mint is removed from at least one mintlist.
  • Patch - When a mint is added to at least one mintlist or an overrides change is detected.