• This repository has been archived on 03/Jul/2022
  • Stars
    star
    1,415
  • Rank 32,067 (Top 0.7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The community maintained Solana token registry

🚨🚨🚨This repository is EOL 🚨🚨🚨

Read below for instructions on new token metadata flow


As of June 20th, this repository will be archived and will receive no more updates. The repository will be set to read-only and the npm package will still exist at @solana/spl-token-registry.

Adding a New Token

You can use one of two tools at the time of writing:

  1. Strata Protocol Token Launchpad
  2. Token Creator Demo

All new token metadata will be added using Metaplex Fungible Token Metadata. The steps to add new Fungible Token Metadata are as follows:

  1. Use CreateMetadataV2 instruction from Metaplex token metadata to create new metadata for token.
  2. Make sure you use the correct format for the token metadata.
  3. You must have mint authority in order to create or update the metadata

The token metadata for Metaplex Metadata Schema is in the following format:

{
  "name": "TOKEN_NAME", 
  "symbol": "TOKEN_SYMBOL",
  "uri": "TOKEN_URI",
  "sellerFeeBasisPoints": 0,
  "creators": null,
  "collection": null,
  "uses": null
}

The TOKEN_URI must point to a file with the following format:

{
  "name": "TOKEN_NAME",
  "symbol": "TOKEN_SYMBOL",
  "description": "TOKEN_DESC",
  "image": "TOKEN_IMAGE_URL"
}

Where TOKEN_IMAGE_URL is the image url.

An example of the TOKEN_URI: https://token-creator-lac.vercel.app/token_metadata.json

Which resolves to:

{
  "name": "A test token",
  "symbol": "TEST",
  "description": "Fully for testing purposes only",
  "image": "https://token-creator-lac.vercel.app/token_image.png"
}

Updating Token Metadata

To update token metadata you must use createUpdateMetadataAccountV2Instruction in @metaplex-foundation/js in order to update an existing token's metadata.

While updating, you provide the same details as when creating.

Tools for Adding/Updating/Migrating

Update/migrate token metadata using Strata Protocol update token tool.

A tutorial for adding/updating metadata can be found at the Token-Creator demo.

Reading Legacy Token-list

@solana/spl-token-registry

npm GitHub license

Solana Token Registry is a package that allows application to query for list of tokens. The JSON schema for the tokens includes: chainId, address, name, decimals, symbol, logoURI (optional), tags (optional), and custom extensions metadata.

Installation

npm install @solana/spl-token-registry
yarn add @solana/spl-token-registry

Examples

Query available tokens

new TokenListProvider().resolve().then((tokens) => {
  const tokenList = tokens.filterByClusterSlug('mainnet-beta').getList();
  console.log(tokenList);
});

Render icon for token in React

import React, { useEffect, useState } from 'react';
import { TokenListProvider, TokenInfo } from '@solana/spl-token-registry';


export const Icon = (props: { mint: string }) => {
  const [tokenMap, setTokenMap] = useState<Map<string, TokenInfo>>(new Map());

  useEffect(() => {
    new TokenListProvider().resolve().then(tokens => {
      const tokenList = tokens.filterByChainId(ENV.MainnetBeta).getList();

      setTokenMap(tokenList.reduce((map, item) => {
        map.set(item.address, item);
        return map;
      },new Map()));
    });
  }, [setTokenMap]);

  const token = tokenMap.get(props.mint);
  if (!token || !token.logoURI) return null;

  return (<img src={token.logoURI} />);

Disclaimer

All claims, content, designs, algorithms, estimates, roadmaps, specifications, and performance measurements described in this project are done with the Solana Foundation's ("SF") good faith efforts. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore nothing in this project constitutes a solicitation for investment.

Any content produced by SF or developer resources that SF provides, are for educational and inspiration purposes only. SF does not encourage, induce or sanction the deployment, integration or use of any such applications (including the code comprising the Solana blockchain protocol) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. This includes use of any such applications by the reader (a) in violation of export control or sanctions laws of the United States or any other applicable jurisdiction, (b) if the reader is located in or ordinarily resident in a country or territory subject to comprehensive sanctions administered by the U.S. Office of Foreign Assets Control (OFAC), or (c) if the reader is or is working on behalf of a Specially Designated National (SDN) or a person subject to similar blocking or denied party prohibitions.

The reader should be aware that U.S. export control and sanctions laws prohibit U.S. persons (and other persons that are subject to such laws) from transacting with persons in certain countries and territories or that are on the SDN list. As a project based primarily on open-source software, it is possible that such sanctioned persons may nevertheless bypass prohibitions, obtain the code comprising the Solana blockchain protocol (or other project code or applications) and deploy, integrate, or otherwise use it. Accordingly, there is a risk to individuals that other persons using the Solana blockchain protocol may be sanctioned persons and that transactions with such persons would be a violation of U.S. export controls and sanctions law. This risk applies to individuals, organizations, and other ecosystem participants that deploy, integrate, or use the Solana blockchain protocol code directly (e.g., as a node operator), and individuals that transact on the Solana blockchain through light clients, third party interfaces, and/or wallet software.

More Repositories

1

solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Rust
11,861
star
2

solana-program-library

A collection of Solana programs maintained by Solana Labs
Rust
2,861
star
3

solana-web3.js

Solana JavaScript SDK
TypeScript
1,749
star
4

dapp-scaffold

Scaffolding for a dapp built on Solana
TypeScript
1,636
star
5

wallet-adapter

Modular TypeScript wallet adapters and components for Solana applications.
TypeScript
1,180
star
6

solana-pay

A new standard for decentralized payments.
TypeScript
1,173
star
7

example-helloworld

Hello world on Solana
TypeScript
855
star
8

solana-season

338
star
9

break

Break Solana Game
TypeScript
279
star
10

governance-ui

TypeScript
260
star
11

explorer

Explorer for Solana clusters
TypeScript
166
star
12

defi-hackathon

165
star
13

octane

Octane is a gasless transaction relayer for Solana.
TypeScript
164
star
14

chatgpt-plugin

TypeScript
160
star
15

ecosystem

Project files for Solana ecosystem members
150
star
16

obsolete-spl-zk-token

Obsolete - don't use
Rust
144
star
17

solana-solidity.js

Compile, deploy, and use Solidity contracts on Solana
TypeScript
114
star
18

oyster

TypeScript
109
star
19

oyster-swap

TypeScript
109
star
20

solana-accountsdb-plugin-postgres

Rust
72
star
21

solana-payments-app

Solana Pay for Commerce Platforms
TypeScript
68
star
22

solana-bigtable

Shell
62
star
23

oyster-lending

TypeScript
60
star
24

whitepaper

Solana whitepaper LaTeX source
TeX
60
star
25

perpetuals

Solana perpetuals reference implementation
Rust
57
star
26

dexterity

Reference implementation of a decentralized exchange for custom instruments, risk, and fees
Rust
55
star
27

eslint-plugin-require-extensions

JavaScript
48
star
28

wallet-standard

TypeScript
46
star
29

solana-pay-scaffold

Scaffolding for a dapp using Solana Pay
TypeScript
41
star
30

solana-perf-libs

C and CUDA libraries to enhance Solana
C
37
star
31

example-tictactoe

Tic-Tac-Toe built on Solana
JavaScript
34
star
32

wormhole-hackathon

34
star
33

governance-program-library

Rust
33
star
34

example-token

Obsoleted by https://spl.solana.com/token (Token Example)
Rust
33
star
35

example-messagefeed

Simple message feed built on Solana
JavaScript
32
star
36

browser-extension

Solana Chrome Extension
TypeScript
32
star
37

security-audits

Published security audits
31
star
38

obsolete-dontuse-example-webwallet

Example Solana Web-based Wallet
JavaScript
31
star
39

platform-tools

Shell
30
star
40

solana-ping-api

solana ping api server
Go
26
star
41

cluster

Cluster Infrastructure
Shell
25
star
42

rust-bpf-sysroot

Rust sysroot source for Berkley Packet Filter Rust programs
C
20
star
43

governance-docs

JavaScript
19
star
44

solana-labs.github.io

Organization Pages
16
star
45

auto-emissions

Python
16
star
46

token-ops

Scripts and tools for token accounting and operation
Shell
14
star
47

example-move

Solana example which runs a Libra Move program
JavaScript
14
star
48

rust-bpf-builder

Dockerfile
13
star
49

solana-voib-demo

Voice over Internet & Blockchain (VoIB) demo
Rust
13
star
50

buffer-layout-utils

TypeScript utilities for using buffer-layout with Solana programs
TypeScript
12
star
51

sealevel

A parallel runtime for layer 1 blockchains
11
star
52

eslint-config-solana

ESLint rules to be shared across all Solana Labs projects
JavaScript
11
star
53

networkexplorer

Retired
JavaScript
11
star
54

twamm

Solana twamm reference implementation
TypeScript
11
star
55

network_simulation

Python
11
star
56

governance-api

TypeScript
10
star
57

wbtc

TypeScript
10
star
58

bench-tps-dos-test

UDP and QUIC dos test for buildkite using bench-tps utility
Shell
9
star
59

token-aggregator

Aggregates tokens listed in onchain token registry
TypeScript
9
star
60

newlib

Newlib is a C library intended for use on embedded systems.
C
9
star
61

solana-flagged-accounts

A community-maintained registry of flagged accounts
JavaScript
8
star
62

launchpad

Solana launchpad reference implementation
Rust
8
star
63

llvm-builder

Builds customized LLVM for Solana
Dockerfile
8
star
64

tour-de-sol

Tour de SOL
Rust
8
star
65

interns-codehub

Public repo for Solana interns
TypeScript
8
star
66

solminer

Cross-platform Solana Replicator UI ⛏️
JavaScript
7
star
67

oyster-margin

7
star
68

cargo-run-solana-tests

Cargo command to compile and run BPF test
Rust
7
star
69

ledger-app-solana

Solana app for Ledger Wallet
7
star
70

secure-wrap-token

Rust
7
star
71

dc-homedir-skeleton

Base directory struct for the `solana` user on Solana's datacenter infrastructure
Shell
6
star
72

contributor-access-policy

This document outlines the procedure for getting contributor access to various Solana Labs source code repositories
6
star
73

reddit-scaling-demo

Demo for Reddit scaling
Rust
6
star
74

inc-20210825

Tool for audit and reclaim of delegated SPL Token accounts
Rust
6
star
75

bridge-adapter

TypeScript
6
star
76

kurtosis-solana-testing

Rust
5
star
77

governance-ui-landing

Governance UI Landing Page - realms.today
TypeScript
5
star
78

k8s-cluster

5
star
79

farms

Solana Farms
Rust
5
star
80

solana-build

Rust
4
star
81

solana-tokens

Utility for distributing Solana tokens
4
star
82

prettier-config-solana

A Prettier config consistent to all Solana Labs projects
4
star
83

solana-graphql-playground

GraphQL web IDE for working with the Solana RPC-GraphQL resolver
TypeScript
4
star
84

validator-tracker

https://metrics.solana.com:3000/d/jrdi4uUWz/validator-tracker
Shell
3
star
85

oyster-bridge

3
star
86

solana-pkcs8

A utility to parse DER-encoded PKCS #8 files
Rust
3
star
87

governance-sdk

Governance SDK
TypeScript
3
star
88

solana-json-rpc-https-proxy

DEPRECATED - Provides a TLS proxy for web-based Solana JSON RPC users
Shell
2
star
89

oyster-gov

1
star
90

ipfs-ledger

1
star
91

sync_test

For developing a Github Action to sync solana-labs/solana from anza-xyz/agave
1
star
92

spl-token-subscription

Rust
1
star