@uniswap/token-list-bridge-utils 0.1.1-beta.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +102 -5
  2. package/dist/arbitrum/gateway.d.ts +2 -0
  3. package/dist/{arb-token-lists/src/lib → arbitrum}/instantiate_bridge.d.ts +3 -4
  4. package/dist/constants/types.d.ts +30 -0
  5. package/dist/fixtures/index.d.ts +9 -0
  6. package/dist/providers/ArbitrumMappingProvider.d.ts +7 -6
  7. package/dist/providers/MappingProvider.d.ts +4 -2
  8. package/dist/providers/OptimismMappingProvider.d.ts +5 -4
  9. package/dist/providers/PolygonMappingProvider.d.ts +4 -2
  10. package/dist/providers/index.d.ts +2 -4
  11. package/dist/token-list-bridge-utils.cjs.development.js +327 -906
  12. package/dist/token-list-bridge-utils.cjs.development.js.map +1 -1
  13. package/dist/token-list-bridge-utils.cjs.production.min.js +1 -1
  14. package/dist/token-list-bridge-utils.cjs.production.min.js.map +1 -1
  15. package/dist/token-list-bridge-utils.esm.js +329 -902
  16. package/dist/token-list-bridge-utils.esm.js.map +1 -1
  17. package/dist/utils.d.ts +4 -0
  18. package/package.json +7 -4
  19. package/src/.DS_Store +0 -0
  20. package/src/arbitrum/gateway.ts +25 -0
  21. package/src/{arb-token-lists/src/lib → arbitrum}/instantiate_bridge.ts +11 -15
  22. package/src/constants/types.ts +28 -0
  23. package/src/fixtures/index.ts +40 -5
  24. package/src/index.test.ts +60 -18
  25. package/src/index.ts +5 -7
  26. package/src/providers/ArbitrumMappingProvider.ts +31 -21
  27. package/src/providers/MappingProvider.ts +4 -2
  28. package/src/providers/OptimismMappingProvider.ts +21 -5
  29. package/src/providers/PolygonMappingProvider.ts +22 -114
  30. package/src/providers/index.ts +82 -2
  31. package/src/utils.ts +71 -1
  32. package/dist/arb-token-lists/server/app.d.ts +0 -1
  33. package/dist/arb-token-lists/src/lib/getClargs.d.ts +0 -8
  34. package/dist/arb-token-lists/src/lib/graph.d.ts +0 -2
  35. package/dist/arb-token-lists/src/lib/token_list_gen.d.ts +0 -23
  36. package/dist/arb-token-lists/src/lib/types.d.ts +0 -36
  37. package/dist/arb-token-lists/src/lib/utils.d.ts +0 -18
  38. package/dist/arb-token-lists/src/main.d.ts +0 -1
  39. package/src/arb-token-lists/.env.sample +0 -4
  40. package/src/arb-token-lists/.eslintrc.js +0 -43
  41. package/src/arb-token-lists/.gitignore +0 -4
  42. package/src/arb-token-lists/package.json +0 -40
  43. package/src/arb-token-lists/readme.md +0 -14
  44. package/src/arb-token-lists/server/app.ts +0 -21
  45. package/src/arb-token-lists/src/Assets/coingecko_uris.json +0 -5108
  46. package/src/arb-token-lists/src/Assets/logo_uris.json +0 -44
  47. package/src/arb-token-lists/src/WarningList/warningTokens.json +0 -290
  48. package/src/arb-token-lists/src/lib/getClargs.ts +0 -32
  49. package/src/arb-token-lists/src/lib/graph.ts +0 -116
  50. package/src/arb-token-lists/src/lib/token_list_gen.ts +0 -334
  51. package/src/arb-token-lists/src/lib/types.ts +0 -44
  52. package/src/arb-token-lists/src/lib/utils.ts +0 -285
  53. package/src/arb-token-lists/src/main.ts +0 -54
  54. package/src/arb-token-lists/tsconfig.json +0 -20
  55. package/src/arb-token-lists/update_all +0 -6
  56. package/src/arb-token-lists/yarn.lock +0 -4273
@@ -1,54 +0,0 @@
1
- import { TokenList } from '@uniswap/token-lists';
2
- import { existsSync, mkdirSync, writeFileSync } from 'fs';
3
- import args from './lib/getClargs';
4
- import {
5
- arbifyL1List,
6
- arbListtoEtherscanList, generateTokenList, updateArbifiedList
7
- } from './lib/token_list_gen';
8
-
9
- const TOKENLIST_DIR_PATH = __dirname +'/ArbTokenLists'
10
- const FULLLIST_DIR_PATH = __dirname +'/FullList'
11
-
12
- if(!existsSync(TOKENLIST_DIR_PATH)){
13
- console.log(`Setting up token list dir at ${TOKENLIST_DIR_PATH}`);
14
- mkdirSync(TOKENLIST_DIR_PATH)
15
- }
16
-
17
- if(!existsSync(FULLLIST_DIR_PATH)){
18
- console.log(`Setting up full list dir at ${FULLLIST_DIR_PATH}`);
19
- mkdirSync(FULLLIST_DIR_PATH)
20
-
21
- }
22
-
23
- (async () => {
24
- if (args.action === 'arbify') {
25
- if (!args.tokenList) throw new Error('No token list provided');
26
-
27
- await arbifyL1List(args.tokenList);
28
- } else if(args.action === "update") {
29
- if (!args.tokenList) throw new Error('No token list provided');
30
-
31
- await updateArbifiedList(args.tokenList)
32
- }
33
-
34
- else if (args.action === 'full') {
35
- const mockList: TokenList = {
36
- name: "Full",
37
- logoURI: "ipfs://QmTvWJ4kmzq9koK74WJQ594ov8Es1HHurHZmMmhU8VY68y",
38
- timestamp: new Date().toISOString(),
39
- version: {
40
- major: 1,
41
- minor: 0,
42
- patch: 0
43
- },
44
- tokens: []
45
- }
46
- const tokenData = await generateTokenList(mockList, undefined, { getAllTokensInNetwork: true });
47
-
48
- const etherscanData = arbListtoEtherscanList(tokenData)
49
- const fullListPath = __dirname + '/FullList/all_tokens.json';
50
- writeFileSync(fullListPath, JSON.stringify(etherscanData));
51
- console.log('List generated at', fullListPath);
52
-
53
- }
54
- })();
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2017",
4
- "module": "commonjs",
5
- "declaration": true,
6
- "rootDir": "./src",
7
- "outDir": "./dist",
8
- "strict": true,
9
- // "allowJs": true,
10
- "noImplicitAny": true,
11
- "noImplicitReturns": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "strictNullChecks": true,
14
- "noImplicitThis": true,
15
- "resolveJsonModule": true,
16
- "esModuleInterop": true,
17
- "experimentalDecorators": true
18
- },
19
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.js"]
20
- }
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
-
3
- yarn fullList
4
- yarn arbify --tokenList https://gateway.ipfs.io/ipns/tokens.uniswap.org
5
- yarn arbify --tokenList https://www.gemini.com/uniswap/manifest.json
6
- yarn arbify --tokenList https://api.coinmarketcap.com/data-api/v3/uniswap/all.json