Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on: [push, pull_request]

jobs:
verify-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Validate JSONs
run: bash ./tools/scripts/jsonlint.sh
# env:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Validate JSONs
run: bash ./tools/scripts/jsonlint.sh
# env:
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
56 changes: 27 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
Sequence Token Directory
========================
# Sequence Token Directory

Token directory that contains a comprehensive list of ERC-20, ERC-721, ERC-1155 and other contracts.

**NOTES:**
* The [./index/index.json](./index/index.json) is an auto-generated file that is a master index of all ./index/**/* contents
including chain names, chain ids, file names, and sha256 hashes of the file contents. This file
is perfect for using as the primary index of this repo, and when syncing contents you can traverse this
index file and also compare the sha256 hash if the file has changed.
* The [./index/deprecated.json](./index/deprecated.json) is a manually maintained file which lists all folders which are deprecated
and as a result the files will be labelled as deprecated in the master index.json.
* The [./index/external.json](./index/external.json) is a manually maintained file of external token list sources which are synced
and downloaded to the [./index/_external](./index/_external) folder. We store the contents here to ensure data integrity,
and we also compute and include these files in the master index.json.

- The [./index/index.json](./index/index.json) is an auto-generated file that is a master index of all ./index/\*_/_ contents
including chain names, chain ids, file names, and sha256 hashes of the file contents. This file
is perfect for using as the primary index of this repo, and when syncing contents you can traverse this
index file and also compare the sha256 hash if the file has changed.
- The [./index/deprecated.json](./index/deprecated.json) is a manually maintained file which lists all folders which are deprecated
and as a result the files will be labelled as deprecated in the master index.json.
- The [./index/external.json](./index/external.json) is a manually maintained file of external token list sources which are synced
and downloaded to the [./index/\_external](./index/_external) folder. We store the contents here to ensure data integrity,
and we also compute and include these files in the master index.json.

**REMINDERS:**
* `pnpm reindex` is automatically called as a pre-commit hook anytime an entry it changed. You may also
call it manually if you like.
* `pnpm sync-external` must be called manually periodically to ensure we have the latest contents, this
script is not run automatically.

- `pnpm reindex` is automatically called as a pre-commit hook anytime an entry it changed. You may also
call it manually if you like.
- `pnpm sync-external` must be called manually periodically to ensure we have the latest contents, this
script is not run automatically.

## Setup
## Setup

* `pnpm install` will setup your local tools
* `pnpm reindex` to reindex the token directory master index.json, but see notes above, as this
is also automatically called as a pre-commit hook.
* `pnpm sync-external` to sync ./index/external.json files to local ./index/_external/ folder.
- `pnpm install` will setup your local tools
- `pnpm reindex` to reindex the token directory master index.json, but see notes above, as this
is also automatically called as a pre-commit hook.
- `pnpm sync-external` to sync ./index/external.json files to local ./index/\_external/ folder.

## Token List Formats

The ERC-20 token lists present in this repository follow the [Uniswap Token List Schema](https://github.com/Uniswap/token-lists). The original list was populated using [Coingecko](https://www.coingecko.com/en)'s erc20 token list [CoinGecko](https://tokens.coingecko.com/uniswap/all.json). Token description and links are taken from Coingecko's API.

The ERC-721 and ERC-1155 token lists present in this repository follow the [Sequence Collectible List Schema](https://github.com/0xsequence/collectible-lists).

The ERC-721 and ERC-1155 token lists present in this repository follow the [Sequence Collectible List Schema](https://github.com/0xsequence/collectible-lists).

## How to Add or Update Your Token / Contract

Expand All @@ -45,7 +44,6 @@ If a token is missing entirely, or contains incorrect or missing information, pl
4. [Open a PR](https://github.com/0xsequence/token-directory/compare) comparing the master branch with your fork
5. In the PR, add an explanation if this PR is for an existing token that needs to be updated


## Formats

Depending on the standard, your token entries should respect the following format:
Expand All @@ -56,16 +54,16 @@ See [here](https://github.com/0xsequence/token-directory/blob/master/index/mainn

```typescript
{
chainId: number, // Chain ID
chainId: number, // Chain ID
address: string, // Contract address
name: string, // Name of token, 40 chars max
symbol: string, // Symbol of token, 20 chars max
decimals: number, // Number of decimals token uses
logoURI: string | null, // URI / URL for token logo
logoURI: string | null, // URI / URL for token logo
extensions: {
link: string | null, // URL of token's website
description: string | null, // Short description of token (1000 chars max)
ogImage: string | null // URL of Open Graph image of token website
ogImage: string | null // URL of Open Graph image of token website
}
```

Expand All @@ -75,16 +73,16 @@ See [here](https://github.com/0xsequence/token-directory/blob/master/index/mainn

```typescript
{
chainId: number, // Chain ID
chainId: number, // Chain ID
address: string, // Contract address
name: string, // Name of token, 40 chars max
standard: 'erc721' | 'erc1155', // Name of token's standard
standard: 'erc721' | 'erc1155', // Name of token's standard
symbol: string | null, // Symbol of token, 20 chars max
logoURI: string | null, // URI / URL for token logo
extensions: {
link: string | null, // URL of token's website
description: string | null, // Short description of token (1000 chars max)
ogImage: string | null // URL of Open Graph image of token website
ogImage: string | null // URL of Open Graph image of token website
}
```

Expand Down
7 changes: 2 additions & 5 deletions index/_external/1-uniswap.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
},
"tags": {},
"logoURI": "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
"keywords": [
"uniswap",
"default"
],
"keywords": ["uniswap", "default"],
"tokens": [
{
"chainId": 1,
Expand Down Expand Up @@ -21672,4 +21669,4 @@
"logoURI": "https://coin-images.coingecko.com/coins/images/14796/large/zig.jpg?1731990265"
}
]
}
}
7 changes: 2 additions & 5 deletions index/_external/2-sushiswap.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
},
"tags": {},
"logoURI": "https://raw.githubusercontent.com/sushiswap/art/master/sushi/logo-256x256.png",
"keywords": [
"sushiswap",
"default"
],
"keywords": ["sushiswap", "default"],
"tokens": [
{
"address": "0x111111111117dC0aa78b770fA6A738034120C302",
Expand Down Expand Up @@ -13041,4 +13038,4 @@
"symbol": "WPALM"
}
]
}
}
7 changes: 2 additions & 5 deletions index/_external/3-pancakeswap-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"patch": 10
},
"logoURI": "https://pancakeswap.finance/logo.png",
"keywords": [
"pancakeswap",
"default"
],
"keywords": ["pancakeswap", "default"],
"tokens": [
{
"name": "WBNB Token",
Expand Down Expand Up @@ -117,4 +114,4 @@
"logoURI": "https://tokens.pancakeswap.finance/images/0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d.png"
}
]
}
}
7 changes: 2 additions & 5 deletions index/_external/4-pancakeswap-extended.json
Original file line number Diff line number Diff line change
Expand Up @@ -6920,9 +6920,6 @@
"logoURI": "https://tokens.pancakeswap.finance/images/0x876cEcb73c9ED1B1526F8e35C6a5a51a31BCF341.png"
}
],
"keywords": [
"pancakeswap",
"extended"
],
"keywords": ["pancakeswap", "extended"],
"logoURI": "https://pancakeswap.finance/logo.png"
}
}
Loading