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
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COINGECKO_API_KEY=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
node_modules
tools/node_modules
tools/config/creds.env
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,44 @@ Token directory that contains a comprehensive list of ERC-20, ERC-721, ERC-1155
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 update-featured` updates the `featured` / `featureIndex` fields on ERC-20 tokens based on
24hr trading volume from the CoinGecko API. See usage below.

## 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 update-featured` to update featured token rankings (see below).

## Update Featured Tokens

Ranks tokens by 24hr trading volume from CoinGecko and assigns `featureIndex` values in each chain's `erc20.json`.

Requires a [CoinGecko Pro API key](https://www.coingecko.com/en/api). Copy `.env.sample` to `.env` and fill in your key, or pass it directly:

```bash
COINGECKO_API_KEY=xxx pnpm update-featured
```

By default the script performs a **dry run** — it prints the proposed ranking without writing any files. Pass `--write` to apply changes.

```bash
# Preview changes for all supported chains
pnpm update-featured

# Preview a single chain
pnpm update-featured -- --chain arbitrum

# Apply changes
pnpm update-featured -- --write

# Feature top 20 instead of default 50
pnpm update-featured -- --write --count 20
```

Supported chains: mainnet, arbitrum, polygon, optimism, base, avalanche, bnb, gnosis, arbitrum-nova.

## Token List Formats

Expand Down
30 changes: 22 additions & 8 deletions index/arbitrum-nova/erc20.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"chainId": 42170,
"tokenStandard": "erc20",
"logoURI": "https://avatars.githubusercontent.com/u/35579638?s=400&u=41e1dbfbbf6f98037069c918c9383ffb8e978fb7&v=4",
"keywords": ["erc20", "arbitrum-nova"],
"keywords": [
"erc20",
"arbitrum-nova"
],
"timestamp": "2021-12-08T19:03:47.288Z",
"tokens": [
{
Expand All @@ -15,7 +18,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/42170/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -27,7 +30,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/42170/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -40,12 +43,16 @@
"extensions": {
"link": "https://www.circle.com/en/usdc",
"description": "USDC is a fully collateralized US dollar stablecoin. USDC is the bridge between dollars and trading on cryptocurrency exchanges. The technology behind CENTRE makes it possible to exchange value between people, businesses and financial institutions just like email between mail services and texts between SMS providers. We believe by removing artificial economic borders, we can create a more inclusive global economy. ",
"categories": ["usd-stablecoin", "transactional", "usdc"],
"categories": [
"usd-stablecoin",
"transactional",
"usdc"
],
"ogImage": "https://www.circle.com/hubfs/share-USDC.png#keepProtocol",
"originChainId": 1,
"originAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"featured": true,
"featureIndex": 1
"featureIndex": 2
}
},
{
Expand Down Expand Up @@ -84,10 +91,16 @@
"extensions": {
"link": "https://weth.io/",
"description": "W-ETH is \"wrapped ETH\" but let's start by introducing the players. First, there's Ether token. Ether or ETH is the native currency built on the Ethereum blockchain.\r\nSecond, there are alt tokens. When a dApp (decentralized app) is built off of the Ethereum Blockchain it usually implements it’s own form of Token. Think Augur’s REP Token, or Bancor's BNT Token. Finally the ERC-20 standard. ERC20 is a standard developed after the release of ETH that defines how tokens are transferred and how to keep a consistent record of those transfers among tokens in the Ethereum Network.",
"categories": ["defi", "protocol", "chain", "wrapped"],
"categories": [
"defi",
"protocol",
"chain",
"wrapped"
],
"ogImage": "https://makerdao.com/dai.png",
"originChainId": 1,
"originAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
"originAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"featureIndex": 4
}
},
{
Expand All @@ -99,7 +112,8 @@
"logoURI": "https://assets.coingecko.com/coins/images/16547/standard/arb.jpg",
"extensions": {
"link": "https://docs.arbitrum.foundation/deployment-addresses",
"description": "$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to shape Arbitrum's future together."
"description": "$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to shape Arbitrum's future together.",
"featureIndex": 5
}
}
],
Expand Down
51 changes: 39 additions & 12 deletions index/arbitrum/erc20.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"chainId": 42161,
"tokenStandard": "erc20",
"logoURI": "https://avatars.githubusercontent.com/u/35579638?s=400&u=41e1dbfbbf6f98037069c918c9383ffb8e978fb7&v=4",
"keywords": ["erc20", "arbitrum"],
"keywords": [
"erc20",
"arbitrum"
],
"timestamp": "2021-12-08T19:03:47.288Z",
"tokens": [
{
Expand All @@ -15,7 +18,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/42161/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -27,7 +30,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/42161/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -40,12 +43,16 @@
"extensions": {
"link": "https://www.circle.com/en/usdc",
"description": "USDC is a fully collateralized US dollar stablecoin. USDC is the bridge between dollars and trading on cryptocurrency exchanges. The technology behind CENTRE makes it possible to exchange value between people, businesses and financial institutions just like email between mail services and texts between SMS providers. We believe by removing artificial economic borders, we can create a more inclusive global economy. ",
"categories": ["usd-stablecoin", "transactional", "usdc"],
"categories": [
"usd-stablecoin",
"transactional",
"usdc"
],
"ogImage": "https://www.circle.com/hubfs/share-USDC.png#keepProtocol",
"originChainId": 1,
"originAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"featured": true,
"featureIndex": 1
"featureIndex": 2
}
},
{
Expand All @@ -67,7 +74,8 @@
],
"ogImage": "https://www.circle.com/hubfs/share-USDC.png#keepProtocol",
"originChainId": 1,
"originAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
"originAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"featureIndex": 8
}
},
{
Expand Down Expand Up @@ -113,7 +121,8 @@
"reward",
"treasure"
],
"ogImage": null
"ogImage": null,
"featureIndex": 7
}
},
{
Expand Down Expand Up @@ -149,7 +158,13 @@
"extensions": {
"link": "https://weth.io/",
"description": "W-ETH is \"wrapped ETH\" but let's start by introducing the players. First, there's Ether token. Ether or ETH is the native currency built on the Ethereum blockchain.\r\nSecond, there are alt tokens. When a dApp (decentralized app) is built off of the Ethereum Blockchain it usually implements it’s own form of Token. Think Augur’s REP Token, or Bancor's BNT Token. Finally the ERC-20 standard. ERC20 is a standard developed after the release of ETH that defines how tokens are transferred and how to keep a consistent record of those transfers among tokens in the Ethereum Network.",
"categories": ["defi", "protocol", "chain", "wrapped"]
"categories": [
"defi",
"protocol",
"chain",
"wrapped"
],
"featureIndex": 4
}
},
{
Expand All @@ -163,7 +178,13 @@
"extensions": {
"link": "https://guardfdn.com/",
"description": "Guardian is for purpose driven companies and projects building and contributing to the web3 economy.",
"categories": ["governance", "protocol", "defi", "access"]
"categories": [
"governance",
"protocol",
"defi",
"access"
],
"featureIndex": 9
}
},
{
Expand All @@ -175,7 +196,8 @@
"logoURI": "https://assets.coingecko.com/coins/images/16547/standard/arb.jpg",
"extensions": {
"link": "https://docs.arbitrum.foundation/deployment-addresses",
"description": "$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to shape Arbitrum's future together."
"description": "$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to shape Arbitrum's future together.",
"featureIndex": 5
}
},
{
Expand Down Expand Up @@ -548,10 +570,15 @@
"extensions": {
"link": "https://www.paypal.com/us/digital-wallet/manage-money/crypto/pyusd",
"description": "PayPal USD (PYUSD) is a stablecoin that is redeemable 1:1 for US dollars. Buy, sell, and transfer it in the app or on our site. Plus, when you hold PYUSD on PayPal, you could get 4% rewards.",
"categories": ["usd-stablecoin", "stablecoin", "transactional", "defi"],
"categories": [
"usd-stablecoin",
"stablecoin",
"transactional",
"defi"
],
"ogImage": "https://assets.coingecko.com/coins/images/31212/standard/PYUSD_Logo_%282%29.png?1696530039",
"featured": true,
"featureIndex": 4
"featureIndex": 6
}
}
],
Expand Down
30 changes: 19 additions & 11 deletions index/avalanche/erc20.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/43114/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -32,7 +32,7 @@
"logoURI": "https://assets.sequence.info/images/tokens/large/43114/0x0000000000000000000000000000000000000000.webp",
"extensions": {
"featured": true,
"featureIndex": 0
"featureIndex": 1
}
},
{
Expand All @@ -53,7 +53,8 @@
"staking",
"wrapped"
],
"ogImage": null
"ogImage": null,
"featureIndex": 4
}
},
{
Expand All @@ -74,7 +75,8 @@
"protocol",
"maker"
],
"ogImage": null
"ogImage": null,
"featureIndex": 3
}
},
{
Expand All @@ -96,7 +98,8 @@
"wrapped",
"bridged"
],
"ogImage": null
"ogImage": null,
"featureIndex": 5
}
},
{
Expand All @@ -115,7 +118,8 @@
"wrapped",
"bridged"
],
"ogImage": null
"ogImage": null,
"featureIndex": 9
}
},
{
Expand All @@ -135,7 +139,8 @@
"wrapped",
"bridged"
],
"ogImage": null
"ogImage": null,
"featureIndex": 8
}
},
{
Expand All @@ -155,7 +160,8 @@
"wrapped",
"bridged"
],
"ogImage": null
"ogImage": null,
"featureIndex": 6
}
},
{
Expand All @@ -175,7 +181,8 @@
"wrapped",
"bridged"
],
"ogImage": null
"ogImage": null,
"featureIndex": 7
}
},
{
Expand All @@ -197,7 +204,8 @@
],
"ogImage": null,
"originChainId": 56,
"originAddress": "0x82030cdbd9e4b7c5bb0b811a61da6360d69449cc"
"originAddress": "0x82030cdbd9e4b7c5bb0b811a61da6360d69449cc",
"featureIndex": 10
}
},
{
Expand All @@ -217,7 +225,7 @@
],
"ogImage": "https://www.circle.com/hubfs/share-USDC.png#keepProtocol",
"featured": true,
"featureIndex": 1
"featureIndex": 2
}
},
{
Expand Down
Loading