@uniswap/token-list-bridge-utils 0.1.1-beta.1 → 0.1.1-beta.2
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.
- package/dist/arbitrum/gateway.d.ts +2 -0
- package/dist/{arb-token-lists/src/lib → arbitrum}/instantiate_bridge.d.ts +3 -4
- package/dist/constants/types.d.ts +30 -0
- package/dist/fixtures/index.d.ts +9 -0
- package/dist/providers/ArbitrumMappingProvider.d.ts +7 -6
- package/dist/providers/MappingProvider.d.ts +4 -2
- package/dist/providers/OptimismMappingProvider.d.ts +5 -4
- package/dist/providers/PolygonMappingProvider.d.ts +4 -2
- package/dist/providers/index.d.ts +2 -4
- package/dist/token-list-bridge-utils.cjs.development.js +324 -904
- package/dist/token-list-bridge-utils.cjs.development.js.map +1 -1
- package/dist/token-list-bridge-utils.cjs.production.min.js +1 -1
- package/dist/token-list-bridge-utils.cjs.production.min.js.map +1 -1
- package/dist/token-list-bridge-utils.esm.js +326 -900
- package/dist/token-list-bridge-utils.esm.js.map +1 -1
- package/dist/utils.d.ts +4 -0
- package/package.json +7 -4
- package/src/arbitrum/gateway.ts +25 -0
- package/src/{arb-token-lists/src/lib → arbitrum}/instantiate_bridge.ts +11 -15
- package/src/constants/types.ts +28 -0
- package/src/fixtures/index.ts +40 -5
- package/src/index.test.ts +60 -18
- package/src/index.ts +5 -7
- package/src/providers/ArbitrumMappingProvider.ts +31 -21
- package/src/providers/MappingProvider.ts +4 -2
- package/src/providers/OptimismMappingProvider.ts +21 -5
- package/src/providers/PolygonMappingProvider.ts +22 -114
- package/src/providers/index.ts +81 -2
- package/src/utils.ts +71 -1
- package/dist/arb-token-lists/server/app.d.ts +0 -1
- package/dist/arb-token-lists/src/lib/getClargs.d.ts +0 -8
- package/dist/arb-token-lists/src/lib/graph.d.ts +0 -2
- package/dist/arb-token-lists/src/lib/token_list_gen.d.ts +0 -23
- package/dist/arb-token-lists/src/lib/types.d.ts +0 -36
- package/dist/arb-token-lists/src/lib/utils.d.ts +0 -18
- package/dist/arb-token-lists/src/main.d.ts +0 -1
- package/src/arb-token-lists/.env.sample +0 -4
- package/src/arb-token-lists/.eslintrc.js +0 -43
- package/src/arb-token-lists/.gitignore +0 -4
- package/src/arb-token-lists/package.json +0 -40
- package/src/arb-token-lists/readme.md +0 -14
- package/src/arb-token-lists/server/app.ts +0 -21
- package/src/arb-token-lists/src/Assets/coingecko_uris.json +0 -5108
- package/src/arb-token-lists/src/Assets/logo_uris.json +0 -44
- package/src/arb-token-lists/src/WarningList/warningTokens.json +0 -290
- package/src/arb-token-lists/src/lib/getClargs.ts +0 -32
- package/src/arb-token-lists/src/lib/graph.ts +0 -116
- package/src/arb-token-lists/src/lib/token_list_gen.ts +0 -334
- package/src/arb-token-lists/src/lib/types.ts +0 -44
- package/src/arb-token-lists/src/lib/utils.ts +0 -285
- package/src/arb-token-lists/src/main.ts +0 -54
- package/src/arb-token-lists/tsconfig.json +0 -20
- package/src/arb-token-lists/update_all +0 -6
- 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
|
-
}
|