@tokemak/config 0.0.2 → 0.0.3
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 +9 -4
- package/dist/index.js +86 -17
- package/package.json +8 -8
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)[];
|
|
5
|
-
declare const SUPPORTED_PROD_NETWORKS_IDS: (1 | 8453 | 146)[];
|
|
6
|
-
declare const SUPPORTED_NETWORKS_IDS: (1 | 8453 | 146)[];
|
|
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)[];
|
|
7
7
|
|
|
8
8
|
type SupportedNetworkNames = keyof typeof SupportedNetworks;
|
|
9
9
|
type SupportedChainIds = (typeof SupportedNetworks)[number];
|
|
@@ -60,11 +60,16 @@ declare const coreBaseConfig: CoreNetworkConfig;
|
|
|
60
60
|
|
|
61
61
|
declare const coreSonicConfig: CoreNetworkConfig;
|
|
62
62
|
|
|
63
|
+
declare const corePlasmaConfig: CoreNetworkConfig;
|
|
64
|
+
|
|
65
|
+
declare const coreArbitrumConfig: CoreNetworkConfig;
|
|
66
|
+
|
|
63
67
|
declare const SUBGRAPH_ID = "108d48ba91e3";
|
|
64
68
|
declare const SUBGRAPH_URL = "https://subgraph.satsuma-prod.com/108d48ba91e3/tokemak";
|
|
65
69
|
declare const ETH_SUBGRAPH = "v2-gen3-eth-mainnet";
|
|
66
70
|
declare const BASE_SUBGRAPH = "v2-gen3-base-mainnet";
|
|
67
71
|
declare const SONIC_SUBGRAPH = "v2-gen3-sonic-mainnet2";
|
|
72
|
+
declare const ARBITRUM_SUBGRAPH = "v2-gen3-arbitrum-mainnet";
|
|
68
73
|
|
|
69
74
|
declare const coreNetworkConfigs: CoreNetworkConfig[];
|
|
70
75
|
declare const getCoreConfig: (chainId?: SupportedChainIds) => CoreNetworkConfig;
|
|
@@ -76,4 +81,4 @@ declare const getMainnetConfig: (chainId?: SupportedChainIds) => MainnetNetworkC
|
|
|
76
81
|
declare const AUTOPOOLS_WHITELIST_PROD: string[];
|
|
77
82
|
declare const STOKE_VOTE_WHITELIST: string[];
|
|
78
83
|
|
|
79
|
-
export { 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, coreBaseConfig, coreMainnetConfig, coreNetworkConfigs, coreSonicConfig, getCoreConfig, getMainnetConfig, isSupportedChainId, mainnetConfig };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ 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,
|
|
23
24
|
AUTOPOOLS_WHITELIST_PROD: () => AUTOPOOLS_WHITELIST_PROD,
|
|
24
25
|
BASE_SUBGRAPH: () => BASE_SUBGRAPH,
|
|
25
26
|
ETH_SUBGRAPH: () => ETH_SUBGRAPH,
|
|
@@ -31,9 +32,11 @@ __export(config_exports, {
|
|
|
31
32
|
SUPPORTED_NETWORKS_IDS: () => SUPPORTED_NETWORKS_IDS,
|
|
32
33
|
SUPPORTED_PROD_NETWORKS_IDS: () => SUPPORTED_PROD_NETWORKS_IDS,
|
|
33
34
|
SupportedNetworks: () => SupportedNetworks,
|
|
35
|
+
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
34
36
|
coreBaseConfig: () => coreBaseConfig,
|
|
35
37
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
36
38
|
coreNetworkConfigs: () => coreNetworkConfigs,
|
|
39
|
+
corePlasmaConfig: () => corePlasmaConfig,
|
|
37
40
|
coreSonicConfig: () => coreSonicConfig,
|
|
38
41
|
getCoreConfig: () => getCoreConfig,
|
|
39
42
|
getMainnetConfig: () => getMainnetConfig,
|
|
@@ -45,23 +48,16 @@ module.exports = __toCommonJS(config_exports);
|
|
|
45
48
|
// chains/index.ts
|
|
46
49
|
var chains_exports = {};
|
|
47
50
|
__export(chains_exports, {
|
|
51
|
+
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
48
52
|
coreBaseConfig: () => coreBaseConfig,
|
|
49
53
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
54
|
+
corePlasmaConfig: () => corePlasmaConfig,
|
|
50
55
|
coreSonicConfig: () => coreSonicConfig,
|
|
51
56
|
mainnetConfig: () => mainnetConfig
|
|
52
57
|
});
|
|
53
58
|
|
|
54
59
|
// chains/mainnet.ts
|
|
55
60
|
var import_chains = require("viem/chains");
|
|
56
|
-
|
|
57
|
-
// subgraph/index.ts
|
|
58
|
-
var SUBGRAPH_ID = "108d48ba91e3";
|
|
59
|
-
var SUBGRAPH_URL = `https://subgraph.satsuma-prod.com/${SUBGRAPH_ID}/tokemak`;
|
|
60
|
-
var ETH_SUBGRAPH = "v2-gen3-eth-mainnet";
|
|
61
|
-
var BASE_SUBGRAPH = "v2-gen3-base-mainnet";
|
|
62
|
-
var SONIC_SUBGRAPH = "v2-gen3-sonic-mainnet2";
|
|
63
|
-
|
|
64
|
-
// chains/mainnet.ts
|
|
65
61
|
var coreMainnetConfig = {
|
|
66
62
|
name: import_chains.mainnet.name,
|
|
67
63
|
id: import_chains.mainnet.id,
|
|
@@ -74,7 +70,8 @@ var coreMainnetConfig = {
|
|
|
74
70
|
stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
|
|
75
71
|
stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
|
|
76
72
|
explorerUrl: `${import_chains.mainnet.blockExplorers.default.url}/`,
|
|
77
|
-
subgraphEndpoint: `${SUBGRAPH_URL}/${ETH_SUBGRAPH}/api`,
|
|
73
|
+
// subgraphEndpoint: `${SUBGRAPH_URL}/${ETH_SUBGRAPH}/api`,
|
|
74
|
+
subgraphEndpoint: "https://ethereum-mainnet.graph-eu.p2pify.com/36c1106ec8369413ddc2396b35fd7f0c/sgr-626-485-741",
|
|
78
75
|
rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC"
|
|
79
76
|
};
|
|
80
77
|
var mainnetConfig = {
|
|
@@ -103,6 +100,16 @@ var mainnetConfig = {
|
|
|
103
100
|
|
|
104
101
|
// chains/base.ts
|
|
105
102
|
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
|
|
106
113
|
var coreBaseConfig = {
|
|
107
114
|
name: import_chains2.base.name,
|
|
108
115
|
id: import_chains2.base.id,
|
|
@@ -137,6 +144,43 @@ var coreSonicConfig = {
|
|
|
137
144
|
rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
|
|
138
145
|
};
|
|
139
146
|
|
|
147
|
+
// chains/plasma.ts
|
|
148
|
+
var import_chains4 = require("viem/chains");
|
|
149
|
+
var PLASMA_SUBGRAPH_URL = "https://subgraph.tokemaklabs.com/api/graphql/9745";
|
|
150
|
+
var corePlasmaConfig = {
|
|
151
|
+
name: import_chains4.plasma.name,
|
|
152
|
+
id: import_chains4.plasma.id,
|
|
153
|
+
shortName: "plasma",
|
|
154
|
+
systemRegistry: "0x9065C0E33Bc8FB31A21874f399985e39bC187D48",
|
|
155
|
+
weth: "0x9895D81bB462A195b4922ED7De0e3ACD007c32CB",
|
|
156
|
+
toke: "0x223C0d94dbc8c0E5df1f6B2C75F06c0229c91950",
|
|
157
|
+
lens: "0x8dBaD46D468d57fdd1FCbA0452C8cD4d7FaE72E8",
|
|
158
|
+
stoke: "0x0",
|
|
159
|
+
stokeVote: "0x0",
|
|
160
|
+
stokeExtend: "0x0",
|
|
161
|
+
explorerUrl: `${import_chains4.plasma.blockExplorers.default.url}/`,
|
|
162
|
+
subgraphEndpoint: PLASMA_SUBGRAPH_URL,
|
|
163
|
+
rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// chains/arbitrum.ts
|
|
167
|
+
var import_chains5 = require("viem/chains");
|
|
168
|
+
var coreArbitrumConfig = {
|
|
169
|
+
name: import_chains5.arbitrum.name,
|
|
170
|
+
id: import_chains5.arbitrum.id,
|
|
171
|
+
shortName: "arbitrum",
|
|
172
|
+
systemRegistry: "0xBFd8E6C9bF2CD5466f5651746f8E946A6C7b4220",
|
|
173
|
+
weth: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
174
|
+
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
175
|
+
lens: "0x590A31453390A1bB266672156A87eFB1302FC754",
|
|
176
|
+
stoke: "0x0",
|
|
177
|
+
stokeVote: "0x0",
|
|
178
|
+
stokeExtend: "0x0",
|
|
179
|
+
explorerUrl: `${import_chains5.arbitrum.blockExplorers.default.url}/`,
|
|
180
|
+
subgraphEndpoint: `${SUBGRAPH_URL}/${ARBITRUM_SUBGRAPH}/api`,
|
|
181
|
+
rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
|
|
182
|
+
};
|
|
183
|
+
|
|
140
184
|
// helpers/getCoreConfig.ts
|
|
141
185
|
var isCoreNetworkConfig = (config) => {
|
|
142
186
|
return config && !("autoEthGuardedRewards" in config);
|
|
@@ -155,12 +199,24 @@ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
|
|
|
155
199
|
};
|
|
156
200
|
|
|
157
201
|
// whitelist/chains.ts
|
|
158
|
-
var
|
|
202
|
+
var import_chains6 = require("viem/chains");
|
|
159
203
|
var SupportedNetworks = Object.fromEntries(
|
|
160
204
|
coreNetworkConfigs.map((config) => [config.name, config.id])
|
|
161
205
|
);
|
|
162
|
-
var SUPPORTED_DEV_NETWORKS_IDS = [
|
|
163
|
-
|
|
206
|
+
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
|
|
212
|
+
];
|
|
213
|
+
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
|
|
219
|
+
];
|
|
164
220
|
var SUPPORTED_NETWORKS_IDS = [
|
|
165
221
|
...SUPPORTED_DEV_NETWORKS_IDS,
|
|
166
222
|
...SUPPORTED_PROD_NETWORKS_IDS
|
|
@@ -172,9 +228,9 @@ var isSupportedChainId = (chainId) => {
|
|
|
172
228
|
};
|
|
173
229
|
|
|
174
230
|
// helpers/getMainnetConfig.ts
|
|
175
|
-
var
|
|
176
|
-
var getMainnetConfig = (chainId =
|
|
177
|
-
if (chainId ===
|
|
231
|
+
var import_chains8 = require("viem/chains");
|
|
232
|
+
var getMainnetConfig = (chainId = import_chains8.mainnet.id) => {
|
|
233
|
+
if (chainId === import_chains8.mainnet.id) {
|
|
178
234
|
return mainnetConfig;
|
|
179
235
|
}
|
|
180
236
|
return mainnetConfig;
|
|
@@ -193,8 +249,18 @@ var AUTOPOOLS_WHITELIST_PROD = [
|
|
|
193
249
|
// baseUSD
|
|
194
250
|
"0x79eB84B5E30Ef2481c8f00fD0Aa7aAd6Ac0AA54d",
|
|
195
251
|
// autoDOLA
|
|
196
|
-
"0xCb119265AA1195ea363D7A243aD56c73EA42Eb59"
|
|
252
|
+
"0xCb119265AA1195ea363D7A243aD56c73EA42Eb59",
|
|
197
253
|
// sonicUSD
|
|
254
|
+
"0xeb042DEE6f7Ff3B45eF0A71686653D168FB02477",
|
|
255
|
+
// baseEURC
|
|
256
|
+
"0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
|
|
257
|
+
// arbUSD
|
|
258
|
+
"0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
|
|
259
|
+
//siloETH
|
|
260
|
+
"0x408b6A3E2Daf288864968454AAe786a2A042Df36",
|
|
261
|
+
//siloUSD
|
|
262
|
+
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80"
|
|
263
|
+
// plasmaUSD
|
|
198
264
|
// "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
|
|
199
265
|
];
|
|
200
266
|
var STOKE_VOTE_WHITELIST = [
|
|
@@ -207,6 +273,7 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
207
273
|
];
|
|
208
274
|
// Annotate the CommonJS export names for ESM import in node:
|
|
209
275
|
0 && (module.exports = {
|
|
276
|
+
ARBITRUM_SUBGRAPH,
|
|
210
277
|
AUTOPOOLS_WHITELIST_PROD,
|
|
211
278
|
BASE_SUBGRAPH,
|
|
212
279
|
ETH_SUBGRAPH,
|
|
@@ -218,9 +285,11 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
218
285
|
SUPPORTED_NETWORKS_IDS,
|
|
219
286
|
SUPPORTED_PROD_NETWORKS_IDS,
|
|
220
287
|
SupportedNetworks,
|
|
288
|
+
coreArbitrumConfig,
|
|
221
289
|
coreBaseConfig,
|
|
222
290
|
coreMainnetConfig,
|
|
223
291
|
coreNetworkConfigs,
|
|
292
|
+
corePlasmaConfig,
|
|
224
293
|
coreSonicConfig,
|
|
225
294
|
getCoreConfig,
|
|
226
295
|
getMainnetConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokemak/config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsup index.ts --dts",
|
|
16
|
-
"lint": "eslint \"src/**/*.ts*\"",
|
|
17
|
-
"clean": "rimraf .turbo node_modules dist"
|
|
18
|
-
},
|
|
19
14
|
"devDependencies": {
|
|
20
|
-
"@tokemak/eslint-config": "
|
|
15
|
+
"@tokemak/eslint-config": "0.0.0"
|
|
21
16
|
},
|
|
22
17
|
"peerDependencies": {
|
|
23
18
|
"viem": "2.x"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup index.ts --dts",
|
|
22
|
+
"lint": "eslint \"src/**/*.ts*\"",
|
|
23
|
+
"clean": "rimraf .turbo node_modules dist"
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
}
|