@tokemak/config 0.0.4 → 0.0.5
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/index.d.ts +8 -10
- package/dist/index.js +59 -46
- package/dist/index.mjs +45 -29
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
2
|
|
|
3
3
|
declare const SupportedNetworks: Record<string, number>;
|
|
4
|
-
declare const SUPPORTED_DEV_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745)[];
|
|
5
|
-
declare const SUPPORTED_PROD_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745)[];
|
|
6
|
-
declare const SUPPORTED_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745)[];
|
|
4
|
+
declare const SUPPORTED_DEV_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745 | 59144)[];
|
|
5
|
+
declare const SUPPORTED_PROD_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745 | 59144)[];
|
|
6
|
+
declare const SUPPORTED_NETWORKS_IDS: (1 | 8453 | 146 | 42161 | 9745 | 59144)[];
|
|
7
7
|
|
|
8
8
|
type SupportedNetworkNames = keyof typeof SupportedNetworks;
|
|
9
9
|
type SupportedChainIds = (typeof SupportedNetworks)[number];
|
|
@@ -64,12 +64,10 @@ declare const corePlasmaConfig: CoreNetworkConfig;
|
|
|
64
64
|
|
|
65
65
|
declare const coreArbitrumConfig: CoreNetworkConfig;
|
|
66
66
|
|
|
67
|
-
declare const
|
|
68
|
-
|
|
69
|
-
declare const
|
|
70
|
-
declare const
|
|
71
|
-
declare const SONIC_SUBGRAPH = "v2-gen3-sonic-mainnet2";
|
|
72
|
-
declare const ARBITRUM_SUBGRAPH = "v2-gen3-arbitrum-mainnet";
|
|
67
|
+
declare const coreLineaConfig: CoreNetworkConfig;
|
|
68
|
+
|
|
69
|
+
declare const SUBGRAPH_BASE_URL = "https://subgraph.tokemaklabs.com/api/graphql";
|
|
70
|
+
declare const getSubgraphUrl: (chainId: number) => string;
|
|
73
71
|
|
|
74
72
|
declare const coreNetworkConfigs: CoreNetworkConfig[];
|
|
75
73
|
declare const getCoreConfig: (chainId?: SupportedChainIds) => CoreNetworkConfig;
|
|
@@ -81,4 +79,4 @@ declare const getMainnetConfig: (chainId?: SupportedChainIds) => MainnetNetworkC
|
|
|
81
79
|
declare const AUTOPOOLS_WHITELIST_PROD: string[];
|
|
82
80
|
declare const STOKE_VOTE_WHITELIST: string[];
|
|
83
81
|
|
|
84
|
-
export {
|
|
82
|
+
export { AUTOPOOLS_WHITELIST_PROD, CoreNetworkConfig, MainnetNetworkConfig, NetworkConfig, STOKE_VOTE_WHITELIST, SUBGRAPH_BASE_URL, SUPPORTED_DEV_NETWORKS_IDS, SUPPORTED_NETWORKS_IDS, SUPPORTED_PROD_NETWORKS_IDS, SupportedChainIds, SupportedNetwork, SupportedNetworkNames, SupportedNetworkNamesLowercased, SupportedNetworks, coreArbitrumConfig, coreBaseConfig, coreLineaConfig, coreMainnetConfig, coreNetworkConfigs, corePlasmaConfig, coreSonicConfig, getCoreConfig, getMainnetConfig, getSubgraphUrl, isSupportedChainId, mainnetConfig };
|
package/dist/index.js
CHANGED
|
@@ -20,26 +20,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// index.ts
|
|
21
21
|
var config_exports = {};
|
|
22
22
|
__export(config_exports, {
|
|
23
|
-
ARBITRUM_SUBGRAPH: () => ARBITRUM_SUBGRAPH,
|
|
24
23
|
AUTOPOOLS_WHITELIST_PROD: () => AUTOPOOLS_WHITELIST_PROD,
|
|
25
|
-
BASE_SUBGRAPH: () => BASE_SUBGRAPH,
|
|
26
|
-
ETH_SUBGRAPH: () => ETH_SUBGRAPH,
|
|
27
|
-
SONIC_SUBGRAPH: () => SONIC_SUBGRAPH,
|
|
28
24
|
STOKE_VOTE_WHITELIST: () => STOKE_VOTE_WHITELIST,
|
|
29
|
-
|
|
30
|
-
SUBGRAPH_URL: () => SUBGRAPH_URL,
|
|
25
|
+
SUBGRAPH_BASE_URL: () => SUBGRAPH_BASE_URL,
|
|
31
26
|
SUPPORTED_DEV_NETWORKS_IDS: () => SUPPORTED_DEV_NETWORKS_IDS,
|
|
32
27
|
SUPPORTED_NETWORKS_IDS: () => SUPPORTED_NETWORKS_IDS,
|
|
33
28
|
SUPPORTED_PROD_NETWORKS_IDS: () => SUPPORTED_PROD_NETWORKS_IDS,
|
|
34
29
|
SupportedNetworks: () => SupportedNetworks,
|
|
35
30
|
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
36
31
|
coreBaseConfig: () => coreBaseConfig,
|
|
32
|
+
coreLineaConfig: () => coreLineaConfig,
|
|
37
33
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
38
34
|
coreNetworkConfigs: () => coreNetworkConfigs,
|
|
39
35
|
corePlasmaConfig: () => corePlasmaConfig,
|
|
40
36
|
coreSonicConfig: () => coreSonicConfig,
|
|
41
37
|
getCoreConfig: () => getCoreConfig,
|
|
42
38
|
getMainnetConfig: () => getMainnetConfig,
|
|
39
|
+
getSubgraphUrl: () => getSubgraphUrl,
|
|
43
40
|
isSupportedChainId: () => isSupportedChainId,
|
|
44
41
|
mainnetConfig: () => mainnetConfig
|
|
45
42
|
});
|
|
@@ -50,6 +47,7 @@ var chains_exports = {};
|
|
|
50
47
|
__export(chains_exports, {
|
|
51
48
|
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
52
49
|
coreBaseConfig: () => coreBaseConfig,
|
|
50
|
+
coreLineaConfig: () => coreLineaConfig,
|
|
53
51
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
54
52
|
corePlasmaConfig: () => corePlasmaConfig,
|
|
55
53
|
coreSonicConfig: () => coreSonicConfig,
|
|
@@ -58,6 +56,12 @@ __export(chains_exports, {
|
|
|
58
56
|
|
|
59
57
|
// chains/mainnet.ts
|
|
60
58
|
var import_chains = require("viem/chains");
|
|
59
|
+
|
|
60
|
+
// subgraph/index.ts
|
|
61
|
+
var SUBGRAPH_BASE_URL = "https://subgraph.tokemaklabs.com/api/graphql";
|
|
62
|
+
var getSubgraphUrl = (chainId) => `${SUBGRAPH_BASE_URL}/${chainId}`;
|
|
63
|
+
|
|
64
|
+
// chains/mainnet.ts
|
|
61
65
|
var coreMainnetConfig = {
|
|
62
66
|
name: import_chains.mainnet.name,
|
|
63
67
|
id: import_chains.mainnet.id,
|
|
@@ -70,8 +74,7 @@ var coreMainnetConfig = {
|
|
|
70
74
|
stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
|
|
71
75
|
stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
|
|
72
76
|
explorerUrl: `${import_chains.mainnet.blockExplorers.default.url}/`,
|
|
73
|
-
|
|
74
|
-
subgraphEndpoint: "https://ethereum-mainnet.graph-eu.p2pify.com/36c1106ec8369413ddc2396b35fd7f0c/sgr-626-485-741",
|
|
77
|
+
subgraphEndpoint: getSubgraphUrl(import_chains.mainnet.id),
|
|
75
78
|
rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC"
|
|
76
79
|
};
|
|
77
80
|
var mainnetConfig = {
|
|
@@ -100,16 +103,6 @@ var mainnetConfig = {
|
|
|
100
103
|
|
|
101
104
|
// chains/base.ts
|
|
102
105
|
var import_chains2 = require("viem/chains");
|
|
103
|
-
|
|
104
|
-
// subgraph/index.ts
|
|
105
|
-
var SUBGRAPH_ID = "108d48ba91e3";
|
|
106
|
-
var SUBGRAPH_URL = `https://subgraph.satsuma-prod.com/${SUBGRAPH_ID}/tokemak`;
|
|
107
|
-
var ETH_SUBGRAPH = "v2-gen3-eth-mainnet";
|
|
108
|
-
var BASE_SUBGRAPH = "v2-gen3-base-mainnet";
|
|
109
|
-
var SONIC_SUBGRAPH = "v2-gen3-sonic-mainnet2";
|
|
110
|
-
var ARBITRUM_SUBGRAPH = "v2-gen3-arbitrum-mainnet";
|
|
111
|
-
|
|
112
|
-
// chains/base.ts
|
|
113
106
|
var coreBaseConfig = {
|
|
114
107
|
name: import_chains2.base.name,
|
|
115
108
|
id: import_chains2.base.id,
|
|
@@ -122,7 +115,7 @@ var coreBaseConfig = {
|
|
|
122
115
|
stokeVote: "0x388cFF4079E382FD7C11d699eB183882868d0FB9",
|
|
123
116
|
stokeExtend: "0x0",
|
|
124
117
|
explorerUrl: `${import_chains2.base.blockExplorers.default.url}/`,
|
|
125
|
-
subgraphEndpoint:
|
|
118
|
+
subgraphEndpoint: getSubgraphUrl(import_chains2.base.id),
|
|
126
119
|
rootPriceOracle: "0xBCf67d1d643C53E9C2f84aCBd830A5EDC2661795"
|
|
127
120
|
};
|
|
128
121
|
|
|
@@ -140,13 +133,12 @@ var coreSonicConfig = {
|
|
|
140
133
|
stokeVote: "0x0",
|
|
141
134
|
stokeExtend: "0x0",
|
|
142
135
|
explorerUrl: `${import_chains3.sonic.blockExplorers.default.url}/`,
|
|
143
|
-
subgraphEndpoint:
|
|
136
|
+
subgraphEndpoint: getSubgraphUrl(import_chains3.sonic.id),
|
|
144
137
|
rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
|
|
145
138
|
};
|
|
146
139
|
|
|
147
140
|
// chains/plasma.ts
|
|
148
141
|
var import_chains4 = require("viem/chains");
|
|
149
|
-
var PLASMA_SUBGRAPH_URL = "https://subgraph.tokemaklabs.com/api/graphql/9745";
|
|
150
142
|
var corePlasmaConfig = {
|
|
151
143
|
name: import_chains4.plasma.name,
|
|
152
144
|
id: import_chains4.plasma.id,
|
|
@@ -159,7 +151,7 @@ var corePlasmaConfig = {
|
|
|
159
151
|
stokeVote: "0x0",
|
|
160
152
|
stokeExtend: "0x0",
|
|
161
153
|
explorerUrl: `${import_chains4.plasma.blockExplorers.default.url}/`,
|
|
162
|
-
subgraphEndpoint:
|
|
154
|
+
subgraphEndpoint: getSubgraphUrl(import_chains4.plasma.id),
|
|
163
155
|
rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
|
|
164
156
|
};
|
|
165
157
|
|
|
@@ -177,10 +169,28 @@ var coreArbitrumConfig = {
|
|
|
177
169
|
stokeVote: "0x0",
|
|
178
170
|
stokeExtend: "0x0",
|
|
179
171
|
explorerUrl: `${import_chains5.arbitrum.blockExplorers.default.url}/`,
|
|
180
|
-
subgraphEndpoint:
|
|
172
|
+
subgraphEndpoint: getSubgraphUrl(import_chains5.arbitrum.id),
|
|
181
173
|
rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
|
|
182
174
|
};
|
|
183
175
|
|
|
176
|
+
// chains/linea.ts
|
|
177
|
+
var import_chains6 = require("viem/chains");
|
|
178
|
+
var coreLineaConfig = {
|
|
179
|
+
name: import_chains6.linea.name,
|
|
180
|
+
id: import_chains6.linea.id,
|
|
181
|
+
shortName: "linea",
|
|
182
|
+
systemRegistry: "0x25f26Ec2e764c63F8D191dFE7f88c6646ca9F980",
|
|
183
|
+
weth: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
|
|
184
|
+
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
185
|
+
lens: "0x92537a95b45AB695ab3EbabFc1A3c3E27AF7973c",
|
|
186
|
+
stoke: "0x0",
|
|
187
|
+
stokeVote: "0x0",
|
|
188
|
+
stokeExtend: "0x0",
|
|
189
|
+
explorerUrl: `${import_chains6.linea.blockExplorers.default.url}/`,
|
|
190
|
+
subgraphEndpoint: getSubgraphUrl(import_chains6.linea.id),
|
|
191
|
+
rootPriceOracle: "0x03DC051eb7fe444CEBCC2e870eba4464D8175618"
|
|
192
|
+
};
|
|
193
|
+
|
|
184
194
|
// helpers/getCoreConfig.ts
|
|
185
195
|
var isCoreNetworkConfig = (config) => {
|
|
186
196
|
return config && !("autoEthGuardedRewards" in config);
|
|
@@ -199,23 +209,25 @@ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
|
|
|
199
209
|
};
|
|
200
210
|
|
|
201
211
|
// whitelist/chains.ts
|
|
202
|
-
var
|
|
212
|
+
var import_chains7 = require("viem/chains");
|
|
203
213
|
var SupportedNetworks = Object.fromEntries(
|
|
204
214
|
coreNetworkConfigs.map((config) => [config.name, config.id])
|
|
205
215
|
);
|
|
206
216
|
var SUPPORTED_DEV_NETWORKS_IDS = [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
import_chains7.mainnet.id,
|
|
218
|
+
import_chains7.base.id,
|
|
219
|
+
import_chains7.sonic.id,
|
|
220
|
+
import_chains7.arbitrum.id,
|
|
221
|
+
import_chains7.plasma.id,
|
|
222
|
+
import_chains7.linea.id
|
|
212
223
|
];
|
|
213
224
|
var SUPPORTED_PROD_NETWORKS_IDS = [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
225
|
+
import_chains7.mainnet.id,
|
|
226
|
+
import_chains7.base.id,
|
|
227
|
+
import_chains7.sonic.id,
|
|
228
|
+
import_chains7.arbitrum.id,
|
|
229
|
+
import_chains7.plasma.id,
|
|
230
|
+
import_chains7.linea.id
|
|
219
231
|
];
|
|
220
232
|
var SUPPORTED_NETWORKS_IDS = [
|
|
221
233
|
...SUPPORTED_DEV_NETWORKS_IDS,
|
|
@@ -228,9 +240,9 @@ var isSupportedChainId = (chainId) => {
|
|
|
228
240
|
};
|
|
229
241
|
|
|
230
242
|
// helpers/getMainnetConfig.ts
|
|
231
|
-
var
|
|
232
|
-
var getMainnetConfig = (chainId =
|
|
233
|
-
if (chainId ===
|
|
243
|
+
var import_chains9 = require("viem/chains");
|
|
244
|
+
var getMainnetConfig = (chainId = import_chains9.mainnet.id) => {
|
|
245
|
+
if (chainId === import_chains9.mainnet.id) {
|
|
234
246
|
return mainnetConfig;
|
|
235
247
|
}
|
|
236
248
|
return mainnetConfig;
|
|
@@ -256,11 +268,15 @@ var AUTOPOOLS_WHITELIST_PROD = [
|
|
|
256
268
|
"0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
|
|
257
269
|
// arbUSD
|
|
258
270
|
"0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
|
|
259
|
-
//siloETH
|
|
271
|
+
// siloETH
|
|
260
272
|
"0x408b6A3E2Daf288864968454AAe786a2A042Df36",
|
|
261
|
-
//siloUSD
|
|
262
|
-
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80"
|
|
273
|
+
// siloUSD
|
|
274
|
+
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80",
|
|
263
275
|
// plasmaUSD
|
|
276
|
+
"0xd1A6524Fccd465ECa7AF2340B3D7fd2e3bbD792a",
|
|
277
|
+
// lineaUSD
|
|
278
|
+
"0x1ABD0403591bE494771115d74ED9E120530f356E"
|
|
279
|
+
// anchrgUSD
|
|
264
280
|
// "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
|
|
265
281
|
];
|
|
266
282
|
var STOKE_VOTE_WHITELIST = [
|
|
@@ -273,26 +289,23 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
273
289
|
];
|
|
274
290
|
// Annotate the CommonJS export names for ESM import in node:
|
|
275
291
|
0 && (module.exports = {
|
|
276
|
-
ARBITRUM_SUBGRAPH,
|
|
277
292
|
AUTOPOOLS_WHITELIST_PROD,
|
|
278
|
-
BASE_SUBGRAPH,
|
|
279
|
-
ETH_SUBGRAPH,
|
|
280
|
-
SONIC_SUBGRAPH,
|
|
281
293
|
STOKE_VOTE_WHITELIST,
|
|
282
|
-
|
|
283
|
-
SUBGRAPH_URL,
|
|
294
|
+
SUBGRAPH_BASE_URL,
|
|
284
295
|
SUPPORTED_DEV_NETWORKS_IDS,
|
|
285
296
|
SUPPORTED_NETWORKS_IDS,
|
|
286
297
|
SUPPORTED_PROD_NETWORKS_IDS,
|
|
287
298
|
SupportedNetworks,
|
|
288
299
|
coreArbitrumConfig,
|
|
289
300
|
coreBaseConfig,
|
|
301
|
+
coreLineaConfig,
|
|
290
302
|
coreMainnetConfig,
|
|
291
303
|
coreNetworkConfigs,
|
|
292
304
|
corePlasmaConfig,
|
|
293
305
|
coreSonicConfig,
|
|
294
306
|
getCoreConfig,
|
|
295
307
|
getMainnetConfig,
|
|
308
|
+
getSubgraphUrl,
|
|
296
309
|
isSupportedChainId,
|
|
297
310
|
mainnetConfig
|
|
298
311
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ var chains_exports = {};
|
|
|
9
9
|
__export(chains_exports, {
|
|
10
10
|
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
11
11
|
coreBaseConfig: () => coreBaseConfig,
|
|
12
|
+
coreLineaConfig: () => coreLineaConfig,
|
|
12
13
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
13
14
|
corePlasmaConfig: () => corePlasmaConfig,
|
|
14
15
|
coreSonicConfig: () => coreSonicConfig,
|
|
@@ -17,6 +18,12 @@ __export(chains_exports, {
|
|
|
17
18
|
|
|
18
19
|
// chains/mainnet.ts
|
|
19
20
|
import { mainnet } from "viem/chains";
|
|
21
|
+
|
|
22
|
+
// subgraph/index.ts
|
|
23
|
+
var SUBGRAPH_BASE_URL = "https://subgraph.tokemaklabs.com/api/graphql";
|
|
24
|
+
var getSubgraphUrl = (chainId) => `${SUBGRAPH_BASE_URL}/${chainId}`;
|
|
25
|
+
|
|
26
|
+
// chains/mainnet.ts
|
|
20
27
|
var coreMainnetConfig = {
|
|
21
28
|
name: mainnet.name,
|
|
22
29
|
id: mainnet.id,
|
|
@@ -29,8 +36,7 @@ var coreMainnetConfig = {
|
|
|
29
36
|
stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
|
|
30
37
|
stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
|
|
31
38
|
explorerUrl: `${mainnet.blockExplorers.default.url}/`,
|
|
32
|
-
|
|
33
|
-
subgraphEndpoint: "https://ethereum-mainnet.graph-eu.p2pify.com/36c1106ec8369413ddc2396b35fd7f0c/sgr-626-485-741",
|
|
39
|
+
subgraphEndpoint: getSubgraphUrl(mainnet.id),
|
|
34
40
|
rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC"
|
|
35
41
|
};
|
|
36
42
|
var mainnetConfig = {
|
|
@@ -59,16 +65,6 @@ var mainnetConfig = {
|
|
|
59
65
|
|
|
60
66
|
// chains/base.ts
|
|
61
67
|
import { base } from "viem/chains";
|
|
62
|
-
|
|
63
|
-
// subgraph/index.ts
|
|
64
|
-
var SUBGRAPH_ID = "108d48ba91e3";
|
|
65
|
-
var SUBGRAPH_URL = `https://subgraph.satsuma-prod.com/${SUBGRAPH_ID}/tokemak`;
|
|
66
|
-
var ETH_SUBGRAPH = "v2-gen3-eth-mainnet";
|
|
67
|
-
var BASE_SUBGRAPH = "v2-gen3-base-mainnet";
|
|
68
|
-
var SONIC_SUBGRAPH = "v2-gen3-sonic-mainnet2";
|
|
69
|
-
var ARBITRUM_SUBGRAPH = "v2-gen3-arbitrum-mainnet";
|
|
70
|
-
|
|
71
|
-
// chains/base.ts
|
|
72
68
|
var coreBaseConfig = {
|
|
73
69
|
name: base.name,
|
|
74
70
|
id: base.id,
|
|
@@ -81,7 +77,7 @@ var coreBaseConfig = {
|
|
|
81
77
|
stokeVote: "0x388cFF4079E382FD7C11d699eB183882868d0FB9",
|
|
82
78
|
stokeExtend: "0x0",
|
|
83
79
|
explorerUrl: `${base.blockExplorers.default.url}/`,
|
|
84
|
-
subgraphEndpoint:
|
|
80
|
+
subgraphEndpoint: getSubgraphUrl(base.id),
|
|
85
81
|
rootPriceOracle: "0xBCf67d1d643C53E9C2f84aCBd830A5EDC2661795"
|
|
86
82
|
};
|
|
87
83
|
|
|
@@ -99,13 +95,12 @@ var coreSonicConfig = {
|
|
|
99
95
|
stokeVote: "0x0",
|
|
100
96
|
stokeExtend: "0x0",
|
|
101
97
|
explorerUrl: `${sonic.blockExplorers.default.url}/`,
|
|
102
|
-
subgraphEndpoint:
|
|
98
|
+
subgraphEndpoint: getSubgraphUrl(sonic.id),
|
|
103
99
|
rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
|
|
104
100
|
};
|
|
105
101
|
|
|
106
102
|
// chains/plasma.ts
|
|
107
103
|
import { plasma } from "viem/chains";
|
|
108
|
-
var PLASMA_SUBGRAPH_URL = "https://subgraph.tokemaklabs.com/api/graphql/9745";
|
|
109
104
|
var corePlasmaConfig = {
|
|
110
105
|
name: plasma.name,
|
|
111
106
|
id: plasma.id,
|
|
@@ -118,7 +113,7 @@ var corePlasmaConfig = {
|
|
|
118
113
|
stokeVote: "0x0",
|
|
119
114
|
stokeExtend: "0x0",
|
|
120
115
|
explorerUrl: `${plasma.blockExplorers.default.url}/`,
|
|
121
|
-
subgraphEndpoint:
|
|
116
|
+
subgraphEndpoint: getSubgraphUrl(plasma.id),
|
|
122
117
|
rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
|
|
123
118
|
};
|
|
124
119
|
|
|
@@ -136,10 +131,28 @@ var coreArbitrumConfig = {
|
|
|
136
131
|
stokeVote: "0x0",
|
|
137
132
|
stokeExtend: "0x0",
|
|
138
133
|
explorerUrl: `${arbitrum.blockExplorers.default.url}/`,
|
|
139
|
-
subgraphEndpoint:
|
|
134
|
+
subgraphEndpoint: getSubgraphUrl(arbitrum.id),
|
|
140
135
|
rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
|
|
141
136
|
};
|
|
142
137
|
|
|
138
|
+
// chains/linea.ts
|
|
139
|
+
import { linea } from "viem/chains";
|
|
140
|
+
var coreLineaConfig = {
|
|
141
|
+
name: linea.name,
|
|
142
|
+
id: linea.id,
|
|
143
|
+
shortName: "linea",
|
|
144
|
+
systemRegistry: "0x25f26Ec2e764c63F8D191dFE7f88c6646ca9F980",
|
|
145
|
+
weth: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
|
|
146
|
+
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
147
|
+
lens: "0x92537a95b45AB695ab3EbabFc1A3c3E27AF7973c",
|
|
148
|
+
stoke: "0x0",
|
|
149
|
+
stokeVote: "0x0",
|
|
150
|
+
stokeExtend: "0x0",
|
|
151
|
+
explorerUrl: `${linea.blockExplorers.default.url}/`,
|
|
152
|
+
subgraphEndpoint: getSubgraphUrl(linea.id),
|
|
153
|
+
rootPriceOracle: "0x03DC051eb7fe444CEBCC2e870eba4464D8175618"
|
|
154
|
+
};
|
|
155
|
+
|
|
143
156
|
// helpers/getCoreConfig.ts
|
|
144
157
|
var isCoreNetworkConfig = (config) => {
|
|
145
158
|
return config && !("autoEthGuardedRewards" in config);
|
|
@@ -158,7 +171,7 @@ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
|
|
|
158
171
|
};
|
|
159
172
|
|
|
160
173
|
// whitelist/chains.ts
|
|
161
|
-
import { base as base2, mainnet as mainnet2, sonic as sonic2, arbitrum as arbitrum2, plasma as plasma2 } from "viem/chains";
|
|
174
|
+
import { base as base2, mainnet as mainnet2, sonic as sonic2, arbitrum as arbitrum2, plasma as plasma2, linea as linea2 } from "viem/chains";
|
|
162
175
|
var SupportedNetworks = Object.fromEntries(
|
|
163
176
|
coreNetworkConfigs.map((config) => [config.name, config.id])
|
|
164
177
|
);
|
|
@@ -167,14 +180,16 @@ var SUPPORTED_DEV_NETWORKS_IDS = [
|
|
|
167
180
|
base2.id,
|
|
168
181
|
sonic2.id,
|
|
169
182
|
arbitrum2.id,
|
|
170
|
-
plasma2.id
|
|
183
|
+
plasma2.id,
|
|
184
|
+
linea2.id
|
|
171
185
|
];
|
|
172
186
|
var SUPPORTED_PROD_NETWORKS_IDS = [
|
|
173
187
|
mainnet2.id,
|
|
174
188
|
base2.id,
|
|
175
189
|
sonic2.id,
|
|
176
190
|
arbitrum2.id,
|
|
177
|
-
plasma2.id
|
|
191
|
+
plasma2.id,
|
|
192
|
+
linea2.id
|
|
178
193
|
];
|
|
179
194
|
var SUPPORTED_NETWORKS_IDS = [
|
|
180
195
|
...SUPPORTED_DEV_NETWORKS_IDS,
|
|
@@ -215,11 +230,15 @@ var AUTOPOOLS_WHITELIST_PROD = [
|
|
|
215
230
|
"0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
|
|
216
231
|
// arbUSD
|
|
217
232
|
"0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
|
|
218
|
-
//siloETH
|
|
233
|
+
// siloETH
|
|
219
234
|
"0x408b6A3E2Daf288864968454AAe786a2A042Df36",
|
|
220
|
-
//siloUSD
|
|
221
|
-
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80"
|
|
235
|
+
// siloUSD
|
|
236
|
+
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80",
|
|
222
237
|
// plasmaUSD
|
|
238
|
+
"0xd1A6524Fccd465ECa7AF2340B3D7fd2e3bbD792a",
|
|
239
|
+
// lineaUSD
|
|
240
|
+
"0x1ABD0403591bE494771115d74ED9E120530f356E"
|
|
241
|
+
// anchrgUSD
|
|
223
242
|
// "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
|
|
224
243
|
];
|
|
225
244
|
var STOKE_VOTE_WHITELIST = [
|
|
@@ -231,26 +250,23 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
231
250
|
// "0xAADf01DD90aE0A6Bb9Eb908294658037096E0404", // baseETH
|
|
232
251
|
];
|
|
233
252
|
export {
|
|
234
|
-
ARBITRUM_SUBGRAPH,
|
|
235
253
|
AUTOPOOLS_WHITELIST_PROD,
|
|
236
|
-
BASE_SUBGRAPH,
|
|
237
|
-
ETH_SUBGRAPH,
|
|
238
|
-
SONIC_SUBGRAPH,
|
|
239
254
|
STOKE_VOTE_WHITELIST,
|
|
240
|
-
|
|
241
|
-
SUBGRAPH_URL,
|
|
255
|
+
SUBGRAPH_BASE_URL,
|
|
242
256
|
SUPPORTED_DEV_NETWORKS_IDS,
|
|
243
257
|
SUPPORTED_NETWORKS_IDS,
|
|
244
258
|
SUPPORTED_PROD_NETWORKS_IDS,
|
|
245
259
|
SupportedNetworks,
|
|
246
260
|
coreArbitrumConfig,
|
|
247
261
|
coreBaseConfig,
|
|
262
|
+
coreLineaConfig,
|
|
248
263
|
coreMainnetConfig,
|
|
249
264
|
coreNetworkConfigs,
|
|
250
265
|
corePlasmaConfig,
|
|
251
266
|
coreSonicConfig,
|
|
252
267
|
getCoreConfig,
|
|
253
268
|
getMainnetConfig,
|
|
269
|
+
getSubgraphUrl,
|
|
254
270
|
isSupportedChainId,
|
|
255
271
|
mainnetConfig
|
|
256
272
|
};
|