Skip to content

Commit 0ee6d46

Browse files
authored
Add prettier formatting (#113)
1 parent 08a72b2 commit 0ee6d46

File tree

108 files changed

+1666
-3451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1666
-3451
lines changed

.github/workflows/validate.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ on: [push, pull_request]
44

55
jobs:
66
verify-json:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
- name: Validate JSONs
11-
run: bash ./tools/scripts/jsonlint.sh
12-
# env:
13-
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Validate JSONs
11+
run: bash ./tools/scripts/jsonlint.sh
12+
# env:

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"arrowParens": "avoid",
3+
"semi": false,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"trailingComma": "es5",
7+
"useTabs": false
8+
}

README.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
Sequence Token Directory
2-
========================
1+
# Sequence Token Directory
32

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

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

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

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

24-
## Setup
24+
## Setup
2525

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

3131
## Token List Formats
3232

3333
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.
3434

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

3837
## How to Add or Update Your Token / Contract
3938

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

48-
4947
## Formats
5048

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

5755
```typescript
5856
{
59-
chainId: number, // Chain ID
57+
chainId: number, // Chain ID
6058
address: string, // Contract address
6159
name: string, // Name of token, 40 chars max
6260
symbol: string, // Symbol of token, 20 chars max
6361
decimals: number, // Number of decimals token uses
64-
logoURI: string | null, // URI / URL for token logo
62+
logoURI: string | null, // URI / URL for token logo
6563
extensions: {
6664
link: string | null, // URL of token's website
6765
description: string | null, // Short description of token (1000 chars max)
68-
ogImage: string | null // URL of Open Graph image of token website
66+
ogImage: string | null // URL of Open Graph image of token website
6967
}
7068
```
7169
@@ -75,16 +73,16 @@ See [here](https://github.com/0xsequence/token-directory/blob/master/index/mainn
7573
7674
```typescript
7775
{
78-
chainId: number, // Chain ID
76+
chainId: number, // Chain ID
7977
address: string, // Contract address
8078
name: string, // Name of token, 40 chars max
81-
standard: 'erc721' | 'erc1155', // Name of token's standard
79+
standard: 'erc721' | 'erc1155', // Name of token's standard
8280
symbol: string | null, // Symbol of token, 20 chars max
8381
logoURI: string | null, // URI / URL for token logo
8482
extensions: {
8583
link: string | null, // URL of token's website
8684
description: string | null, // Short description of token (1000 chars max)
87-
ogImage: string | null // URL of Open Graph image of token website
85+
ogImage: string | null // URL of Open Graph image of token website
8886
}
8987
```
9088

index/_external/1-uniswap.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
},
99
"tags": {},
1010
"logoURI": "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
11-
"keywords": [
12-
"uniswap",
13-
"default"
14-
],
11+
"keywords": ["uniswap", "default"],
1512
"tokens": [
1613
{
1714
"chainId": 1,
@@ -21672,4 +21669,4 @@
2167221669
"logoURI": "https://coin-images.coingecko.com/coins/images/14796/large/zig.jpg?1731990265"
2167321670
}
2167421671
]
21675-
}
21672+
}

index/_external/2-sushiswap.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
},
99
"tags": {},
1010
"logoURI": "https://raw.githubusercontent.com/sushiswap/art/master/sushi/logo-256x256.png",
11-
"keywords": [
12-
"sushiswap",
13-
"default"
14-
],
11+
"keywords": ["sushiswap", "default"],
1512
"tokens": [
1613
{
1714
"address": "0x111111111117dC0aa78b770fA6A738034120C302",
@@ -13041,4 +13038,4 @@
1304113038
"symbol": "WPALM"
1304213039
}
1304313040
]
13044-
}
13041+
}

index/_external/3-pancakeswap-default.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
"patch": 10
88
},
99
"logoURI": "https://pancakeswap.finance/logo.png",
10-
"keywords": [
11-
"pancakeswap",
12-
"default"
13-
],
10+
"keywords": ["pancakeswap", "default"],
1411
"tokens": [
1512
{
1613
"name": "WBNB Token",
@@ -117,4 +114,4 @@
117114
"logoURI": "https://tokens.pancakeswap.finance/images/0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d.png"
118115
}
119116
]
120-
}
117+
}

index/_external/4-pancakeswap-extended.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6920,9 +6920,6 @@
69206920
"logoURI": "https://tokens.pancakeswap.finance/images/0x876cEcb73c9ED1B1526F8e35C6a5a51a31BCF341.png"
69216921
}
69226922
],
6923-
"keywords": [
6924-
"pancakeswap",
6925-
"extended"
6926-
],
6923+
"keywords": ["pancakeswap", "extended"],
69276924
"logoURI": "https://pancakeswap.finance/logo.png"
6928-
}
6925+
}

0 commit comments

Comments
 (0)