forked from maticnetwork/polygon-token-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrite.js
89 lines (81 loc) · 2.13 KB
/
write.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
const fs = require("fs");
const buildList = require("./build");
const listRegistry = require("./listRegistry.json");
const tokenlists = buildList();
// Mainnet Popular List
fs.writeFile(
"build/tokenlists/popular.tokenlist.json",
JSON.stringify(tokenlists.popularTokenList, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("popular.tokenlist.json successfully built");
}
);
// Mainnet Mapped List
fs.writeFile(
"build/tokenlists/mapped.tokenlist.json",
JSON.stringify(tokenlists.mappedTokenList, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("mapped.tokenlist.json successfully built");
}
);
// Testnet Popular List
fs.writeFile(
"build/tokenlists/popularTestnet.tokenlist.json",
JSON.stringify(tokenlists.popularTestnetTokenList, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("popularTestnet.tokenlist.json successfully built");
}
);
// Testnet Mapped List
fs.writeFile(
"build/tokenlists/mappedTestnet.tokenlist.json",
JSON.stringify(tokenlists.mappedTestnetTokenList, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("mappedTestnet.tokenlist.json successfully built");
}
);
// Mainnet Staging Popular List
fs.writeFile(
"build/tokenlists/staging.tokenlist.json",
JSON.stringify(tokenlists.popularTokenListStaging, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("staging.tokenlist.json successfully built");
}
);
// Mainnet Staging Mapped List
fs.writeFile(
"build/tokenlists/mappedStaging.tokenlist.json",
JSON.stringify(tokenlists.mappedTokenListStaging, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("mappedStaging.tokenlist.json successfully built");
}
);
// List Registery
fs.writeFile(
"build/listRegistry.json",
JSON.stringify(listRegistry, null, 2),
(err) => {
if (err) {
throw err;
}
console.log("listRegistry.json successfully built");
}
);