@tokemak/config 0.0.3 → 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 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 SUBGRAPH_ID = "108d48ba91e3";
68
- declare const SUBGRAPH_URL = "https://subgraph.satsuma-prod.com/108d48ba91e3/tokemak";
69
- declare const ETH_SUBGRAPH = "v2-gen3-eth-mainnet";
70
- declare const BASE_SUBGRAPH = "v2-gen3-base-mainnet";
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 { ARBITRUM_SUBGRAPH, AUTOPOOLS_WHITELIST_PROD, BASE_SUBGRAPH, CoreNetworkConfig, ETH_SUBGRAPH, MainnetNetworkConfig, NetworkConfig, SONIC_SUBGRAPH, STOKE_VOTE_WHITELIST, SUBGRAPH_ID, SUBGRAPH_URL, SUPPORTED_DEV_NETWORKS_IDS, SUPPORTED_NETWORKS_IDS, SUPPORTED_PROD_NETWORKS_IDS, SupportedChainIds, SupportedNetwork, SupportedNetworkNames, SupportedNetworkNamesLowercased, SupportedNetworks, coreArbitrumConfig, coreBaseConfig, coreMainnetConfig, coreNetworkConfigs, corePlasmaConfig, coreSonicConfig, getCoreConfig, getMainnetConfig, isSupportedChainId, mainnetConfig };
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
- SUBGRAPH_ID: () => SUBGRAPH_ID,
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
- // subgraphEndpoint: `${SUBGRAPH_URL}/${ETH_SUBGRAPH}/api`,
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: `${SUBGRAPH_URL}/${BASE_SUBGRAPH}/api`,
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: `${SUBGRAPH_URL}/${SONIC_SUBGRAPH}/api`,
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: PLASMA_SUBGRAPH_URL,
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: `${SUBGRAPH_URL}/${ARBITRUM_SUBGRAPH}/api`,
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 import_chains6 = require("viem/chains");
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
- import_chains6.mainnet.id,
208
- import_chains6.base.id,
209
- import_chains6.sonic.id,
210
- import_chains6.arbitrum.id,
211
- import_chains6.plasma.id
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
- import_chains6.mainnet.id,
215
- import_chains6.base.id,
216
- import_chains6.sonic.id,
217
- import_chains6.arbitrum.id,
218
- import_chains6.plasma.id
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 import_chains8 = require("viem/chains");
232
- var getMainnetConfig = (chainId = import_chains8.mainnet.id) => {
233
- if (chainId === import_chains8.mainnet.id) {
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
- SUBGRAPH_ID,
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 ADDED
@@ -0,0 +1,272 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // chains/index.ts
8
+ var chains_exports = {};
9
+ __export(chains_exports, {
10
+ coreArbitrumConfig: () => coreArbitrumConfig,
11
+ coreBaseConfig: () => coreBaseConfig,
12
+ coreLineaConfig: () => coreLineaConfig,
13
+ coreMainnetConfig: () => coreMainnetConfig,
14
+ corePlasmaConfig: () => corePlasmaConfig,
15
+ coreSonicConfig: () => coreSonicConfig,
16
+ mainnetConfig: () => mainnetConfig
17
+ });
18
+
19
+ // chains/mainnet.ts
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
27
+ var coreMainnetConfig = {
28
+ name: mainnet.name,
29
+ id: mainnet.id,
30
+ shortName: "eth",
31
+ systemRegistry: "0x2218F90A98b0C070676f249EF44834686dAa4285",
32
+ weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
33
+ toke: "0x2e9d63788249371f1DFC918a52f8d799F4a38C94",
34
+ lens: "0x75455ae8c9B2Ff7Ae9F21ae06730d614c31D2300",
35
+ stoke: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
36
+ stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
37
+ stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
38
+ explorerUrl: `${mainnet.blockExplorers.default.url}/`,
39
+ subgraphEndpoint: getSubgraphUrl(mainnet.id),
40
+ rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC"
41
+ };
42
+ var mainnetConfig = {
43
+ ...coreMainnetConfig,
44
+ autoEthGuardedRewards: "0xf81D69f11e5103ce199fF745295a1E3D7a4CEF69",
45
+ accTokeV1: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
46
+ missedTokeRewards: "0xffd22cee98c24c12b20987d4106148d88269ede3",
47
+ accTokeV1Rewards: "0x086B9734D33783Bbe4fBc8249DF4C686aAe27054",
48
+ accTokeV1RewardsHash: "0x3cCE05568008916d739479958f7a1AF5f67661DD",
49
+ autoETHRewardsHash: "0x9ba21890C1017A7f65989016110c6ECd757B2162",
50
+ stokeRewards: "0xD69e57336377460707d579CB24f9Ba0aEDf88003",
51
+ stokeRewardsHash: "0x70f0f41B354cE2f1378952C50C635633E0373c24",
52
+ managerV1: "0xA86e412109f77c45a3BC1c5870b880492Fb86A14",
53
+ stakingV1: "0x96F98Ed74639689C3A11daf38ef86E59F43417D3",
54
+ rewardsV1: "0x79dD22579112d8a5F7347c5ED7E609e60da713C5",
55
+ rewardsV1Hash: "0x5ec3EC6A8aC774c7d53665ebc5DDf89145d02fB6",
56
+ rewardsV1Url: "https://ipfs-rewards.tokemaklabs.com/ipfs",
57
+ sushiPool: "0xd4e7a6e2D03e4e48DfC27dd3f46DF1c176647E38",
58
+ sushiPoolReactor: "0x8858A739eA1dd3D80FE577EF4e0D03E88561FaA3",
59
+ lpRewardsV1Url: "https://auto-rewards-prod-bucket-pool-stats-api-tokemakxyz.s3.amazonaws.com/current.json",
60
+ tSushiLP: "0x8858A739eA1dd3D80FE577EF4e0D03E88561FaA3",
61
+ curvePool: "0x7ea4aD8C803653498bF6AC1D2dEbc04DCe8Fd2aD",
62
+ convexRewarder: "0x3382607d00cfb668AbaB80D8EE781a2720CbC9ea",
63
+ curveRewardsUrl: "https://tokemakmarketdata.s3.amazonaws.com/curve-convex-apys.json"
64
+ };
65
+
66
+ // chains/base.ts
67
+ import { base } from "viem/chains";
68
+ var coreBaseConfig = {
69
+ name: base.name,
70
+ id: base.id,
71
+ shortName: "base",
72
+ systemRegistry: "0x18Dc926095A7A007C01Ef836683Fdef4c4371b4e",
73
+ weth: "0x4200000000000000000000000000000000000006",
74
+ toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
75
+ lens: "0x1C00599444dd916eAD61487bc0C8112446DB89F0",
76
+ stoke: "0x2770784de40b9588FE16e4C514820f6bf8901EBf",
77
+ stokeVote: "0x388cFF4079E382FD7C11d699eB183882868d0FB9",
78
+ stokeExtend: "0x0",
79
+ explorerUrl: `${base.blockExplorers.default.url}/`,
80
+ subgraphEndpoint: getSubgraphUrl(base.id),
81
+ rootPriceOracle: "0xBCf67d1d643C53E9C2f84aCBd830A5EDC2661795"
82
+ };
83
+
84
+ // chains/sonic.ts
85
+ import { sonic } from "viem/chains";
86
+ var coreSonicConfig = {
87
+ name: sonic.name,
88
+ id: sonic.id,
89
+ shortName: "sonic",
90
+ systemRegistry: "0x1a912EB51D3cF8364eBAEE5A982cA37f25aD8848",
91
+ weth: "0x50c42deacd8fc9773493ed674b675be577f2634b",
92
+ toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
93
+ lens: "0xCB7E450c32D21Eb0168466c8022Ae32EF785a163",
94
+ stoke: "0x0",
95
+ stokeVote: "0x0",
96
+ stokeExtend: "0x0",
97
+ explorerUrl: `${sonic.blockExplorers.default.url}/`,
98
+ subgraphEndpoint: getSubgraphUrl(sonic.id),
99
+ rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
100
+ };
101
+
102
+ // chains/plasma.ts
103
+ import { plasma } from "viem/chains";
104
+ var corePlasmaConfig = {
105
+ name: plasma.name,
106
+ id: plasma.id,
107
+ shortName: "plasma",
108
+ systemRegistry: "0x9065C0E33Bc8FB31A21874f399985e39bC187D48",
109
+ weth: "0x9895D81bB462A195b4922ED7De0e3ACD007c32CB",
110
+ toke: "0x223C0d94dbc8c0E5df1f6B2C75F06c0229c91950",
111
+ lens: "0x8dBaD46D468d57fdd1FCbA0452C8cD4d7FaE72E8",
112
+ stoke: "0x0",
113
+ stokeVote: "0x0",
114
+ stokeExtend: "0x0",
115
+ explorerUrl: `${plasma.blockExplorers.default.url}/`,
116
+ subgraphEndpoint: getSubgraphUrl(plasma.id),
117
+ rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
118
+ };
119
+
120
+ // chains/arbitrum.ts
121
+ import { arbitrum } from "viem/chains";
122
+ var coreArbitrumConfig = {
123
+ name: arbitrum.name,
124
+ id: arbitrum.id,
125
+ shortName: "arbitrum",
126
+ systemRegistry: "0xBFd8E6C9bF2CD5466f5651746f8E946A6C7b4220",
127
+ weth: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
128
+ toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
129
+ lens: "0x590A31453390A1bB266672156A87eFB1302FC754",
130
+ stoke: "0x0",
131
+ stokeVote: "0x0",
132
+ stokeExtend: "0x0",
133
+ explorerUrl: `${arbitrum.blockExplorers.default.url}/`,
134
+ subgraphEndpoint: getSubgraphUrl(arbitrum.id),
135
+ rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
136
+ };
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
+
156
+ // helpers/getCoreConfig.ts
157
+ var isCoreNetworkConfig = (config) => {
158
+ return config && !("autoEthGuardedRewards" in config);
159
+ };
160
+ var getCoreNetworkConfigs = () => {
161
+ return Object.values(chains_exports).filter(isCoreNetworkConfig);
162
+ };
163
+ var coreNetworkConfigs = getCoreNetworkConfigs();
164
+ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
165
+ const coreConfigs = getCoreNetworkConfigs();
166
+ const config = coreConfigs.find((config2) => config2.id === chainId);
167
+ if (!config) {
168
+ throw new Error(`Unsupported chainId: ${chainId}`);
169
+ }
170
+ return config;
171
+ };
172
+
173
+ // whitelist/chains.ts
174
+ import { base as base2, mainnet as mainnet2, sonic as sonic2, arbitrum as arbitrum2, plasma as plasma2, linea as linea2 } from "viem/chains";
175
+ var SupportedNetworks = Object.fromEntries(
176
+ coreNetworkConfigs.map((config) => [config.name, config.id])
177
+ );
178
+ var SUPPORTED_DEV_NETWORKS_IDS = [
179
+ mainnet2.id,
180
+ base2.id,
181
+ sonic2.id,
182
+ arbitrum2.id,
183
+ plasma2.id,
184
+ linea2.id
185
+ ];
186
+ var SUPPORTED_PROD_NETWORKS_IDS = [
187
+ mainnet2.id,
188
+ base2.id,
189
+ sonic2.id,
190
+ arbitrum2.id,
191
+ plasma2.id,
192
+ linea2.id
193
+ ];
194
+ var SUPPORTED_NETWORKS_IDS = [
195
+ ...SUPPORTED_DEV_NETWORKS_IDS,
196
+ ...SUPPORTED_PROD_NETWORKS_IDS
197
+ ];
198
+
199
+ // helpers/isSupportedChainId.ts
200
+ var isSupportedChainId = (chainId) => {
201
+ return SUPPORTED_NETWORKS_IDS.includes(chainId);
202
+ };
203
+
204
+ // helpers/getMainnetConfig.ts
205
+ import { mainnet as mainnet3 } from "viem/chains";
206
+ var getMainnetConfig = (chainId = mainnet3.id) => {
207
+ if (chainId === mainnet3.id) {
208
+ return mainnetConfig;
209
+ }
210
+ return mainnetConfig;
211
+ };
212
+
213
+ // whitelist/autopools.ts
214
+ var AUTOPOOLS_WHITELIST_PROD = [
215
+ "0x0A2b94F6871c1D7A32Fe58E1ab5e6deA2f114E56",
216
+ "0x6dC3ce9C57b20131347FDc9089D740DAf6eB34c5",
217
+ "0xE800e3760FC20aA98c5df6A9816147f190455AF3",
218
+ "0xAADf01DD90aE0A6Bb9Eb908294658037096E0404",
219
+ "0x35911af1B570E26f668905595dEd133D01CD3E5a",
220
+ "0xa7569A44f348d3D70d8ad5889e50F78E33d80D35",
221
+ // autoUSD
222
+ "0x9c6864105AEC23388C89600046213a44C384c831",
223
+ // baseUSD
224
+ "0x79eB84B5E30Ef2481c8f00fD0Aa7aAd6Ac0AA54d",
225
+ // autoDOLA
226
+ "0xCb119265AA1195ea363D7A243aD56c73EA42Eb59",
227
+ // sonicUSD
228
+ "0xeb042DEE6f7Ff3B45eF0A71686653D168FB02477",
229
+ // baseEURC
230
+ "0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
231
+ // arbUSD
232
+ "0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
233
+ // siloETH
234
+ "0x408b6A3E2Daf288864968454AAe786a2A042Df36",
235
+ // siloUSD
236
+ "0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80",
237
+ // plasmaUSD
238
+ "0xd1A6524Fccd465ECa7AF2340B3D7fd2e3bbD792a",
239
+ // lineaUSD
240
+ "0x1ABD0403591bE494771115d74ED9E120530f356E"
241
+ // anchrgUSD
242
+ // "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
243
+ ];
244
+ var STOKE_VOTE_WHITELIST = [
245
+ "0x0A2b94F6871c1D7A32Fe58E1ab5e6deA2f114E56",
246
+ "0x6dC3ce9C57b20131347FDc9089D740DAf6eB34c5",
247
+ "0xE800e3760FC20aA98c5df6A9816147f190455AF3",
248
+ "0x35911af1B570E26f668905595dEd133D01CD3E5a"
249
+ // "0xa7569A44f348d3D70d8ad5889e50F78E33d80D35", // autoUSD
250
+ // "0xAADf01DD90aE0A6Bb9Eb908294658037096E0404", // baseETH
251
+ ];
252
+ export {
253
+ AUTOPOOLS_WHITELIST_PROD,
254
+ STOKE_VOTE_WHITELIST,
255
+ SUBGRAPH_BASE_URL,
256
+ SUPPORTED_DEV_NETWORKS_IDS,
257
+ SUPPORTED_NETWORKS_IDS,
258
+ SUPPORTED_PROD_NETWORKS_IDS,
259
+ SupportedNetworks,
260
+ coreArbitrumConfig,
261
+ coreBaseConfig,
262
+ coreLineaConfig,
263
+ coreMainnetConfig,
264
+ coreNetworkConfigs,
265
+ corePlasmaConfig,
266
+ coreSonicConfig,
267
+ getCoreConfig,
268
+ getMainnetConfig,
269
+ getSubgraphUrl,
270
+ isSupportedChainId,
271
+ mainnetConfig
272
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokemak/config",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "sideEffects": false,
@@ -11,14 +11,14 @@
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
+ "dependencies": {
15
+ "viem": "2.x"
16
+ },
14
17
  "devDependencies": {
15
18
  "@tokemak/eslint-config": "0.0.0"
16
19
  },
17
- "peerDependencies": {
18
- "viem": "2.x"
19
- },
20
20
  "scripts": {
21
- "build": "tsup index.ts --dts",
21
+ "build": "tsup",
22
22
  "lint": "eslint \"src/**/*.ts*\"",
23
23
  "clean": "rimraf .turbo node_modules dist"
24
24
  }