Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme #443

Merged
merged 1 commit into from
Oct 16, 2023
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
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This repo contains the token lists to be used in Polygon products' interfaces.

## Different Token Lists in JSON

the JSON schema for the tokens includes: chainId, name, address, decimals, symbol, logoURI (optional), tags (optional), and custom extensions metadata.
The JSON schema for the tokens includes: chainId, name, address, decimals, symbol, logoURI (optional), tags (optional), and custom extensions metadata.

There are two token lists that we are maintaining currently on mainet and another one on testnet:

1. [Polygon Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/polygonTokens.tokenlist.json) contains all the tokens added by the community that are mapped on the Polygon PoS chain. The community can raise token addition and updation issues to help us keep the token list up-to-date.
1. [Polygon Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/polygon.tokenlist.json) contains all the valid tokens that are mapped on the Polygon PoS chain. The community can raise token addition and updation issues to help us keep the token list up-to-date.

2. [Popular Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/popularTokens.tokenlist.json) is a subset of the allTokens list. It contains the mostly used tokens on Polygon Wallet Web.
2. [Popular Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/polygonPopular.tokenlist.json) is a subset of the allTokens list. It contains the mostly used tokens on Polygon products.

3. [Testnet Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/testnet.tokenlist.json) contains the tokens mapped on the Mumbai chain.
3. [Testnet Tokens List](https://api-polygon-tokens.polygon.technology/tokenlists/polygonTestnet.tokenlist.json) contains the tokens mapped on the Mumbai chain.

Apart from these 3 token list there is one blacklisted token list:

Expand All @@ -28,23 +28,25 @@ Apart from these 3 token list there is one blacklisted token list:

```json
{
"chainId": 137, // Should always be 137
"chainId": 137, // Chain Id of the L2 chain
"name": "token_name",
"symbol": "token_symbol",
"decimals": <token_decimals>,
"decimals": "<token_decimals>",
"address": "token_address on Polygon",
"logoURI": "token_icon_uri",
"tags": ["<bridge>", "<token_type>", "<optional_tag>", "<optional_tag>", ...], // For all acceptable tags, check below
"tags": ["<bridge>", "<token_type>", "<optional_tag>", "<optional_tag>", ...], // For all acceptable tags, check the below list
"extensions": {
"rootAddress": "token_address on Ethereum", // If not deployed on ethereum, use "0x0000000000000000000000000000000000000000" and add noDeposit and noWithdraw tags
"originTokenAddress": "token_address on the origin chain", // If not deployed on ethereum, add noDeposit and noWithdraw tags
"originTokenNetwork": "id of the token's origin chain", // Use 0 for Ethereum, 1 for zkEVM, -1 for PoS
"wrappedTokenNetwork": "id of the wrapper token's chain", // Only for tokens bridged via LxLy bridge (zkEVM)
"project": {
"name": "Project_Name",
"summary": "Short_Project_Description",
"contact": "Project_Support",
"website": "Project_Website"
},
"rootChainBridgeAdapter": "", // Only required for tokens bridged using zkEVM messaging layer
"childChainBridgeAdapter": "" // Only required for tokens bridged using zkEVM messaging layer
"originChainBridgeAdapter": "Bridge adapter contract address on origin chain", // Only required for tokens bridged using zkEVM messaging layer
"wrapperChainBridgeAdapter": "Bridge adapter contract address on wrapper chain" // Only required for tokens bridged using zkEVM messaging layer
}
}
```
Expand All @@ -55,23 +57,31 @@ Apart from these 3 token list there is one blacklisted token list:

2. `swapable`: Tokens are eligible for swapping through the 0x contracts

3. `erc20`: Tokens are of ERC20 token type
3. `native`: Tokens are native tokens of the chain

4. `pos`: Tokens can be bridged from Ethereum using the PoS bridge
4. `erc20`: Tokens are of ERC20 token type

5. `pos`: Tokens that are bridged using the PoS bridge
Note: Also use this tag if the tokens cannot be bridged.

5. `plasma`: Tokens can be bridged from Ethereum using the PLASMA bridge
6. `fx`: Tokens that are bridged using the FX or custom FX bridge

7. `plasma`: Tokens that are bridged using the PLASMA bridge

8. `lxly`: Tokens that are bridged using the LxLy bridge (zkEVM)

6. `metaTx`: Tokens are eligible for meta transactions
9. `metaTx`: Tokens are eligible for meta transactions
Note: Use this tag if the tokens support meta transactions and can be used for a gasless swaps.

7. `customWithdrawEventSig`: The token has its custom withdraw event signature and does not depend on the transfer event signature while verifing withdrawals
10. `customSig`: The token has its custom withdraw event signature and does not depend on the transfer event signature while verifing withdrawals

8. `noDeposit`: Tokens are not eligible for deposits from Ethereum
Note: Also use this tag if the tokens cannot be bridged.
11. `noDeposit`: Tokens are not eligible for deposits from Ethereum
Note: Also use this tag if the tokens cannot be bridged.

9. `noWithdraw`: Tokens are not eligible for withdrawals back to Ethereum
Note: Also use this tag if the tokens cannot be bridged.
12. `noWithdraw`: Tokens are not eligible for withdrawals back to Ethereum
Note: Also use this tag if the tokens cannot be bridged.

13. `customZkevmBridge`: Tokens that are bridged using zkEVM messaging layer

3. Run linter and fix the issues if any

Expand Down
4 changes: 4 additions & 0 deletions src/metadata/polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"noWithdraw": {
"name": "Withdraw Disabled",
"description": "Tokens are not eligible for withdraws"
},
"customZkevmBridge": {
"name": "Custom Zkevm Bridge",
"description": "Tokens that are bridged using zkEVM messaging layer"
}
}
}
4 changes: 4 additions & 0 deletions src/metadata/polygonPopular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"noWithdraw": {
"name": "Withdraw Disabled",
"description": "Tokens are not eligible for withdraws"
},
"customZkevmBridge": {
"name": "Custom Zkevm Bridge",
"description": "Tokens that are bridged using zkEVM messaging layer"
}
}
}