Skip to content

Commit

Permalink
mistswap
Browse files Browse the repository at this point in the history
  • Loading branch information
kasumi-1 committed Sep 9, 2021
1 parent a55c992 commit 96d8e2c
Show file tree
Hide file tree
Showing 34 changed files with 80 additions and 9,497 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/token-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ labels: token request
assignees: ''
---

- [ ] I understand that token listing is not required to use the SushiSwap Interface with a token.
- [ ] I understand that filing an issue or adding liquidity does not guarantee addition to the Sushi default token list.
- [ ] I understand that token listing is not required to use the MISTswap Interface with a token.
- [ ] I understand that filing an issue or adding liquidity does not guarantee addition to the MIST default token list.
- [ ] I will not ping the Discord about this listing request.

**Please provide the following information for your token.**
Expand All @@ -17,9 +17,9 @@ Token Address (checkSum):
Token Name (from contract):
Token Decimals (from contract):
Token Symbol (from contract):
SushiSwap V2 Pair Address of Token:
MISTswap V2 Pair Address of Token:

Link to sushiswap/assets PR:
Link to mistswapdex/assets PR:
Link to the official homepage of token:
Link to CoinMarketCap or CoinGecko page of token:
Link to official Twitter account:
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v15.1.0
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @sushiswap/default-token-list
# @mistswapdex/default-token-list

This NPM module and GitHub repo contains the default token list used in the SushiSwap interface.
This NPM module and GitHub repo contains the default token list used in the MISTswap interface.

## Adding a token

To request that we add a token to the list:
+ [file an issue](https://github.com/sushiswap/default-token-list/issues/new?assignees=&labels=token+request&template=token-request.md&title=Add+%7BTOKEN_SYMBOL%7D%3A+%7BTOKEN_NAME%7D)
+ [Add PR](https://github.com/sushiswap/assets) with corresponding logo in under the correct blockchain folder
+ [file an issue](https://github.com/mistswapdex/default-token-list/issues/new?assignees=&labels=token+request&template=token-request.md&title=Add+%7BTOKEN_SYMBOL%7D%3A+%7BTOKEN_NAME%7D)
+ [Add PR](https://github.com/mistswapdex/assets) with corresponding logo in under the correct blockchain folder

### Disclaimer

Expand Down
60 changes: 7 additions & 53 deletions internal/buildList.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
const { version } = require("../package.json");

const mainnet = require("../tokens/mainnet.json");
const ropsten = require("../tokens/ropsten.json");
const rinkeby = require("../tokens/rinkeby.json");
const goerli = require("../tokens/goerli.json");
const kovan = require("../tokens/kovan.json");
const fantom = require("../tokens/fantom.json");
const fantomTestnet = require("../tokens/fantom-testnet.json");
const matic = require("../tokens/matic.json");
const maticTestnet = require("../tokens/matic-testnet.json");
const xdai = require("../tokens/xdai.json");
const bsc = require("../tokens/bsc.json");
const bscTestnet = require("../tokens/bsc-testnet.json");
const moonbase = require("../tokens/moonbase.json");
const avalanche = require("../tokens/avalanche.json");
const fuji = require("../tokens/fuji.json");
const heco = require("../tokens/heco.json");
const hecoTestnet = require("../tokens/heco-testnet.json");
const harmony = require("../tokens/harmony.json");
const harmonyTestnet = require("../tokens/harmony-testnet.json");
const okex = require("../tokens/okex.json");
const okexTestnet = require("../tokens/okex-testnet.json");
const arbitrum = require("../tokens/arbitrum.json");
const celo = require("../tokens/celo.json");
const palm = require("../tokens/palm.json");
const moonriver = require("../tokens/moonriver.json");
const bch = require("../tokens/smartbch.json");
const bchAmber = require("../tokens/smartbch-amber.json");

module.exports = function buildList() {
const parsed = version.split(".");
return {
name: "SushiSwap Menu",
name: "MISTswap Menu",
timestamp: new Date().toISOString(),
version: {
major: +parsed[0],
Expand All @@ -38,34 +15,11 @@ module.exports = function buildList() {
},
tags: {},
logoURI:
"https://raw.githubusercontent.com/sushiswap/art/master/sushi/logo-256x256.png",
keywords: ["sushiswap", "default"],
"https://raw.githubusercontent.com/mistswapdex/art/master/mist/logo-256x256.png",
keywords: ["mistswap", "default"],
tokens: [
...mainnet,
...ropsten,
...goerli,
...kovan,
...rinkeby,
...fantom,
...fantomTestnet,
...matic,
...maticTestnet,
...xdai,
...bsc,
...bscTestnet,
...moonbase,
...avalanche,
...fuji,
...heco,
...hecoTestnet,
...harmony,
...harmonyTestnet,
...okex,
...okexTestnet,
...arbitrum,
...celo,
...palm,
...moonriver,
...bch,
...bchAmber,
]
// sort them by symbol for easy readability
.sort((t1, t2) => {
Expand Down
22 changes: 7 additions & 15 deletions internal/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@ const { Octokit } = require("@octokit/rest");

const octokit = new Octokit();

const { ChainId } = require("@sushiswap/sdk");
const { ChainId } = require("@mistswapdex/sdk");

const fs = require("fs");

const { resolve } = require("path");

const NAME = {
[ChainId.MAINNET]: "mainnet",
[ChainId.FANTOM]: "fantom",
[ChainId.MATIC]: "matic",
[ChainId.XDAI]: "xdai",
[ChainId.BSC]: "bsc",
[ChainId.AVALANCHE]: "avalanche",
[ChainId.HECO]: "heco",
[ChainId.HARMONY]: "harmony",
[ChainId.OKEX]: "okex",
[ChainId.CELO]: "celo",
[ChainId.SMARTBCH]: "smartbch",
[ChainId.SMARTBCH_AMBER]: "smartbch_amber",
};

(async () => {
Expand All @@ -36,10 +28,10 @@ const NAME = {

const tokens = require(path);

// Grab file file names of the sushiswap/icons repo at the token path
// Grab file file names of the mistswapdex/icons repo at the token path
// we can use this to see if our default list is missing icons
const { data } = await octokit.rest.repos.getContent({
owner: "sushiswap",
owner: "mistswapdex",
repo: "icons",
path: "token",
});
Expand Down Expand Up @@ -71,9 +63,9 @@ const NAME = {
}

// Check if logoURI has correct path
if (!token.logoURI.includes("sushiswap/icons")) {
if (!token.logoURI.includes("mistswapdex/icons")) {
// TODO: Automate this part...
const logoURI = `https://raw.githubusercontent.com/sushiswap/icons/master/token/${icon}.jpg`;
const logoURI = `https://raw.githubusercontent.com/mistswapdex/icons/master/token/${icon}.jpg`;

console.log(`Update Logo URI for ${token.symbol} with ${logoURI}`);
} else {
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "@sushiswap/default-token-list",
"version": "15.1.0",
"description": "◦ The SushiSwap default token list",
"main": "build/sushiswap-default.tokenlist.json",
"name": "@mistswapdex/default-token-list",
"version": "0.0.1",
"description": "◦ The MISTswap default token list",
"main": "build/mistswap-default.tokenlist.json",
"scripts": {
"test": "mocha",
"build": "rimraf build && mkdir -p build && node internal/write.js > build/sushiswap-default.tokenlist.json",
"build": "rimraf build && mkdir -p build && node internal/write.js > build/mistswap-default.tokenlist.json",
"prepublishOnly": "npm test && npm run build",
"sync": "node internal/sync.js"
},
"files": [
"build/sushiswap-default.tokenlist.json"
"build/mistswap-default.tokenlist.json"
],
"repository": {
"type": "git",
"url": "git+https://github.com/sushiswap/default-token-list.git"
"url": "git+https://github.com/mistswapdex/default-token-list.git"
},
"keywords": [
"sushiswap",
"mistswap",
"default",
"token",
"list"
],
"author": "Matthew Lilley <[email protected]>",
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/sushiswap/default-token-list/issues"
"url": "https://github.com/mistswapdex/default-token-list/issues"
},
"homepage": "https://github.com/sushiswap/default-token-list#readme",
"homepage": "https://github.com/mistswapdex/default-token-list#readme",
"devDependencies": {
"@ethersproject/address": "^5.0.2",
"@ethersproject/solidity": "^5.3.0",
"@octokit/rest": "^18.6.2",
"@sushiswap/sdk": "^5.0.0-canary.22",
"@mistswapdex/sdk": "^0.0.2",
"@uniswap/token-lists": "^1.0.0-beta.19",
"ajv": "^6.12.3",
"chai": "^4.2.0",
Expand Down
Loading

0 comments on commit 96d8e2c

Please sign in to comment.