@tokemak/config 0.0.4 → 0.1.1
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 +17 -10
- package/dist/index.js +82 -50
- package/dist/index.mjs +64 -30
- package/package.json +15 -2
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];
|
|
@@ -20,6 +20,7 @@ interface CoreNetworkConfig {
|
|
|
20
20
|
systemRegistry: Address;
|
|
21
21
|
weth: Address;
|
|
22
22
|
toke: Address;
|
|
23
|
+
auto: Address;
|
|
23
24
|
lens: Address;
|
|
24
25
|
stoke: Address;
|
|
25
26
|
stokeVote: Address;
|
|
@@ -28,16 +29,21 @@ interface CoreNetworkConfig {
|
|
|
28
29
|
explorerUrl: string;
|
|
29
30
|
subgraphEndpoint: string;
|
|
30
31
|
rootPriceOracle: Address;
|
|
32
|
+
merklDistributor?: Address;
|
|
31
33
|
}
|
|
32
34
|
interface MainnetNetworkConfig extends CoreNetworkConfig {
|
|
33
35
|
autoEthGuardedRewards: Address;
|
|
34
36
|
accTokeV1: Address;
|
|
37
|
+
sAuto: Address;
|
|
38
|
+
tokeToAutoMigration: Address;
|
|
35
39
|
missedTokeRewards: Address;
|
|
36
40
|
accTokeV1Rewards: Address;
|
|
37
41
|
accTokeV1RewardsHash: Address;
|
|
38
42
|
autoETHRewardsHash: Address;
|
|
39
43
|
stokeRewards: Address;
|
|
40
44
|
stokeRewardsHash: Address;
|
|
45
|
+
sAutoRewards: Address;
|
|
46
|
+
sAutoRewardsHash: Address;
|
|
41
47
|
managerV1: Address;
|
|
42
48
|
stakingV1: Address;
|
|
43
49
|
rewardsV1: Address;
|
|
@@ -64,12 +70,10 @@ declare const corePlasmaConfig: CoreNetworkConfig;
|
|
|
64
70
|
|
|
65
71
|
declare const coreArbitrumConfig: CoreNetworkConfig;
|
|
66
72
|
|
|
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";
|
|
73
|
+
declare const coreLineaConfig: CoreNetworkConfig;
|
|
74
|
+
|
|
75
|
+
declare const SUBGRAPH_BASE_URL = "https://subgraph.tokemaklabs.com/api/graphql";
|
|
76
|
+
declare const getSubgraphUrl: (chainId: number) => string;
|
|
73
77
|
|
|
74
78
|
declare const coreNetworkConfigs: CoreNetworkConfig[];
|
|
75
79
|
declare const getCoreConfig: (chainId?: SupportedChainIds) => CoreNetworkConfig;
|
|
@@ -80,5 +84,8 @@ declare const getMainnetConfig: (chainId?: SupportedChainIds) => MainnetNetworkC
|
|
|
80
84
|
|
|
81
85
|
declare const AUTOPOOLS_WHITELIST_PROD: string[];
|
|
82
86
|
declare const STOKE_VOTE_WHITELIST: string[];
|
|
87
|
+
declare const DEPOSIT_ADDRESS_WHITELIST: {
|
|
88
|
+
infinifiUSD: string[];
|
|
89
|
+
};
|
|
83
90
|
|
|
84
|
-
export {
|
|
91
|
+
export { AUTOPOOLS_WHITELIST_PROD, CoreNetworkConfig, DEPOSIT_ADDRESS_WHITELIST, 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
|
@@ -18,38 +18,37 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
ARBITRUM_SUBGRAPH: () => ARBITRUM_SUBGRAPH,
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
24
23
|
AUTOPOOLS_WHITELIST_PROD: () => AUTOPOOLS_WHITELIST_PROD,
|
|
25
|
-
|
|
26
|
-
ETH_SUBGRAPH: () => ETH_SUBGRAPH,
|
|
27
|
-
SONIC_SUBGRAPH: () => SONIC_SUBGRAPH,
|
|
24
|
+
DEPOSIT_ADDRESS_WHITELIST: () => DEPOSIT_ADDRESS_WHITELIST,
|
|
28
25
|
STOKE_VOTE_WHITELIST: () => STOKE_VOTE_WHITELIST,
|
|
29
|
-
|
|
30
|
-
SUBGRAPH_URL: () => SUBGRAPH_URL,
|
|
26
|
+
SUBGRAPH_BASE_URL: () => SUBGRAPH_BASE_URL,
|
|
31
27
|
SUPPORTED_DEV_NETWORKS_IDS: () => SUPPORTED_DEV_NETWORKS_IDS,
|
|
32
28
|
SUPPORTED_NETWORKS_IDS: () => SUPPORTED_NETWORKS_IDS,
|
|
33
29
|
SUPPORTED_PROD_NETWORKS_IDS: () => SUPPORTED_PROD_NETWORKS_IDS,
|
|
34
30
|
SupportedNetworks: () => SupportedNetworks,
|
|
35
31
|
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
36
32
|
coreBaseConfig: () => coreBaseConfig,
|
|
33
|
+
coreLineaConfig: () => coreLineaConfig,
|
|
37
34
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
38
35
|
coreNetworkConfigs: () => coreNetworkConfigs,
|
|
39
36
|
corePlasmaConfig: () => corePlasmaConfig,
|
|
40
37
|
coreSonicConfig: () => coreSonicConfig,
|
|
41
38
|
getCoreConfig: () => getCoreConfig,
|
|
42
39
|
getMainnetConfig: () => getMainnetConfig,
|
|
40
|
+
getSubgraphUrl: () => getSubgraphUrl,
|
|
43
41
|
isSupportedChainId: () => isSupportedChainId,
|
|
44
42
|
mainnetConfig: () => mainnetConfig
|
|
45
43
|
});
|
|
46
|
-
module.exports = __toCommonJS(
|
|
44
|
+
module.exports = __toCommonJS(index_exports);
|
|
47
45
|
|
|
48
46
|
// chains/index.ts
|
|
49
47
|
var chains_exports = {};
|
|
50
48
|
__export(chains_exports, {
|
|
51
49
|
coreArbitrumConfig: () => coreArbitrumConfig,
|
|
52
50
|
coreBaseConfig: () => coreBaseConfig,
|
|
51
|
+
coreLineaConfig: () => coreLineaConfig,
|
|
53
52
|
coreMainnetConfig: () => coreMainnetConfig,
|
|
54
53
|
corePlasmaConfig: () => corePlasmaConfig,
|
|
55
54
|
coreSonicConfig: () => coreSonicConfig,
|
|
@@ -58,6 +57,12 @@ __export(chains_exports, {
|
|
|
58
57
|
|
|
59
58
|
// chains/mainnet.ts
|
|
60
59
|
var import_chains = require("viem/chains");
|
|
60
|
+
|
|
61
|
+
// subgraph/index.ts
|
|
62
|
+
var SUBGRAPH_BASE_URL = "https://subgraph.tokemaklabs.com/api/graphql";
|
|
63
|
+
var getSubgraphUrl = (chainId) => `${SUBGRAPH_BASE_URL}/${chainId}`;
|
|
64
|
+
|
|
65
|
+
// chains/mainnet.ts
|
|
61
66
|
var coreMainnetConfig = {
|
|
62
67
|
name: import_chains.mainnet.name,
|
|
63
68
|
id: import_chains.mainnet.id,
|
|
@@ -65,26 +70,32 @@ var coreMainnetConfig = {
|
|
|
65
70
|
systemRegistry: "0x2218F90A98b0C070676f249EF44834686dAa4285",
|
|
66
71
|
weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
67
72
|
toke: "0x2e9d63788249371f1DFC918a52f8d799F4a38C94",
|
|
73
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
68
74
|
lens: "0x75455ae8c9B2Ff7Ae9F21ae06730d614c31D2300",
|
|
69
75
|
stoke: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
|
|
70
76
|
stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
|
|
71
77
|
stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
|
|
72
78
|
explorerUrl: `${import_chains.mainnet.blockExplorers.default.url}/`,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
subgraphEndpoint: getSubgraphUrl(import_chains.mainnet.id),
|
|
80
|
+
rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC",
|
|
81
|
+
merklDistributor: "0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae"
|
|
76
82
|
};
|
|
77
83
|
var mainnetConfig = {
|
|
78
84
|
...coreMainnetConfig,
|
|
79
85
|
autoEthGuardedRewards: "0xf81D69f11e5103ce199fF745295a1E3D7a4CEF69",
|
|
86
|
+
sAuto: "0x13ff49c4bf8dbBb6Fa8B2DEC9911438E6e588213",
|
|
80
87
|
accTokeV1: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
|
|
88
|
+
tokeToAutoMigration: "0xFc9e2a42A8fcB01c9A6fd62133c71da80fa78057",
|
|
81
89
|
missedTokeRewards: "0xffd22cee98c24c12b20987d4106148d88269ede3",
|
|
82
90
|
accTokeV1Rewards: "0x086B9734D33783Bbe4fBc8249DF4C686aAe27054",
|
|
83
91
|
accTokeV1RewardsHash: "0x3cCE05568008916d739479958f7a1AF5f67661DD",
|
|
84
92
|
autoETHRewardsHash: "0x9ba21890C1017A7f65989016110c6ECd757B2162",
|
|
85
93
|
stokeRewards: "0xD69e57336377460707d579CB24f9Ba0aEDf88003",
|
|
86
94
|
stokeRewardsHash: "0x70f0f41B354cE2f1378952C50C635633E0373c24",
|
|
95
|
+
sAutoRewards: "0x30Ddef8CeDEE40DF8CaB52813Fc929dA2bcc070c",
|
|
96
|
+
sAutoRewardsHash: "0xF24e2B87aD351855Becdb9C90a8AFd6693675e5D",
|
|
87
97
|
managerV1: "0xA86e412109f77c45a3BC1c5870b880492Fb86A14",
|
|
98
|
+
// sAutoManager: "0xd06a077d8bD8909B8a6C6a9747E02491c1E90D83",
|
|
88
99
|
stakingV1: "0x96F98Ed74639689C3A11daf38ef86E59F43417D3",
|
|
89
100
|
rewardsV1: "0x79dD22579112d8a5F7347c5ED7E609e60da713C5",
|
|
90
101
|
rewardsV1Hash: "0x5ec3EC6A8aC774c7d53665ebc5DDf89145d02fB6",
|
|
@@ -100,16 +111,6 @@ var mainnetConfig = {
|
|
|
100
111
|
|
|
101
112
|
// chains/base.ts
|
|
102
113
|
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
114
|
var coreBaseConfig = {
|
|
114
115
|
name: import_chains2.base.name,
|
|
115
116
|
id: import_chains2.base.id,
|
|
@@ -117,12 +118,13 @@ var coreBaseConfig = {
|
|
|
117
118
|
systemRegistry: "0x18Dc926095A7A007C01Ef836683Fdef4c4371b4e",
|
|
118
119
|
weth: "0x4200000000000000000000000000000000000006",
|
|
119
120
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
121
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
120
122
|
lens: "0x1C00599444dd916eAD61487bc0C8112446DB89F0",
|
|
121
123
|
stoke: "0x2770784de40b9588FE16e4C514820f6bf8901EBf",
|
|
122
124
|
stokeVote: "0x388cFF4079E382FD7C11d699eB183882868d0FB9",
|
|
123
125
|
stokeExtend: "0x0",
|
|
124
126
|
explorerUrl: `${import_chains2.base.blockExplorers.default.url}/`,
|
|
125
|
-
subgraphEndpoint:
|
|
127
|
+
subgraphEndpoint: getSubgraphUrl(import_chains2.base.id),
|
|
126
128
|
rootPriceOracle: "0xBCf67d1d643C53E9C2f84aCBd830A5EDC2661795"
|
|
127
129
|
};
|
|
128
130
|
|
|
@@ -135,18 +137,18 @@ var coreSonicConfig = {
|
|
|
135
137
|
systemRegistry: "0x1a912EB51D3cF8364eBAEE5A982cA37f25aD8848",
|
|
136
138
|
weth: "0x50c42deacd8fc9773493ed674b675be577f2634b",
|
|
137
139
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
140
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
138
141
|
lens: "0xCB7E450c32D21Eb0168466c8022Ae32EF785a163",
|
|
139
142
|
stoke: "0x0",
|
|
140
143
|
stokeVote: "0x0",
|
|
141
144
|
stokeExtend: "0x0",
|
|
142
145
|
explorerUrl: `${import_chains3.sonic.blockExplorers.default.url}/`,
|
|
143
|
-
subgraphEndpoint:
|
|
146
|
+
subgraphEndpoint: getSubgraphUrl(import_chains3.sonic.id),
|
|
144
147
|
rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
|
|
145
148
|
};
|
|
146
149
|
|
|
147
150
|
// chains/plasma.ts
|
|
148
151
|
var import_chains4 = require("viem/chains");
|
|
149
|
-
var PLASMA_SUBGRAPH_URL = "https://subgraph.tokemaklabs.com/api/graphql/9745";
|
|
150
152
|
var corePlasmaConfig = {
|
|
151
153
|
name: import_chains4.plasma.name,
|
|
152
154
|
id: import_chains4.plasma.id,
|
|
@@ -154,12 +156,13 @@ var corePlasmaConfig = {
|
|
|
154
156
|
systemRegistry: "0x9065C0E33Bc8FB31A21874f399985e39bC187D48",
|
|
155
157
|
weth: "0x9895D81bB462A195b4922ED7De0e3ACD007c32CB",
|
|
156
158
|
toke: "0x223C0d94dbc8c0E5df1f6B2C75F06c0229c91950",
|
|
159
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
157
160
|
lens: "0x8dBaD46D468d57fdd1FCbA0452C8cD4d7FaE72E8",
|
|
158
161
|
stoke: "0x0",
|
|
159
162
|
stokeVote: "0x0",
|
|
160
163
|
stokeExtend: "0x0",
|
|
161
164
|
explorerUrl: `${import_chains4.plasma.blockExplorers.default.url}/`,
|
|
162
|
-
subgraphEndpoint:
|
|
165
|
+
subgraphEndpoint: getSubgraphUrl(import_chains4.plasma.id),
|
|
163
166
|
rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
|
|
164
167
|
};
|
|
165
168
|
|
|
@@ -172,15 +175,35 @@ var coreArbitrumConfig = {
|
|
|
172
175
|
systemRegistry: "0xBFd8E6C9bF2CD5466f5651746f8E946A6C7b4220",
|
|
173
176
|
weth: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
174
177
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
178
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
175
179
|
lens: "0x590A31453390A1bB266672156A87eFB1302FC754",
|
|
176
180
|
stoke: "0x0",
|
|
177
181
|
stokeVote: "0x0",
|
|
178
182
|
stokeExtend: "0x0",
|
|
179
183
|
explorerUrl: `${import_chains5.arbitrum.blockExplorers.default.url}/`,
|
|
180
|
-
subgraphEndpoint:
|
|
184
|
+
subgraphEndpoint: getSubgraphUrl(import_chains5.arbitrum.id),
|
|
181
185
|
rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
|
|
182
186
|
};
|
|
183
187
|
|
|
188
|
+
// chains/linea.ts
|
|
189
|
+
var import_chains6 = require("viem/chains");
|
|
190
|
+
var coreLineaConfig = {
|
|
191
|
+
name: import_chains6.linea.name,
|
|
192
|
+
id: import_chains6.linea.id,
|
|
193
|
+
shortName: "linea",
|
|
194
|
+
systemRegistry: "0x25f26Ec2e764c63F8D191dFE7f88c6646ca9F980",
|
|
195
|
+
weth: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
|
|
196
|
+
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
197
|
+
auto: "0x62E57804469947506720e33D0C9f6E4029326099",
|
|
198
|
+
lens: "0x92537a95b45AB695ab3EbabFc1A3c3E27AF7973c",
|
|
199
|
+
stoke: "0x0",
|
|
200
|
+
stokeVote: "0x0",
|
|
201
|
+
stokeExtend: "0x0",
|
|
202
|
+
explorerUrl: `${import_chains6.linea.blockExplorers.default.url}/`,
|
|
203
|
+
subgraphEndpoint: getSubgraphUrl(import_chains6.linea.id),
|
|
204
|
+
rootPriceOracle: "0x03DC051eb7fe444CEBCC2e870eba4464D8175618"
|
|
205
|
+
};
|
|
206
|
+
|
|
184
207
|
// helpers/getCoreConfig.ts
|
|
185
208
|
var isCoreNetworkConfig = (config) => {
|
|
186
209
|
return config && !("autoEthGuardedRewards" in config);
|
|
@@ -199,23 +222,25 @@ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
|
|
|
199
222
|
};
|
|
200
223
|
|
|
201
224
|
// whitelist/chains.ts
|
|
202
|
-
var
|
|
225
|
+
var import_chains7 = require("viem/chains");
|
|
203
226
|
var SupportedNetworks = Object.fromEntries(
|
|
204
227
|
coreNetworkConfigs.map((config) => [config.name, config.id])
|
|
205
228
|
);
|
|
206
229
|
var SUPPORTED_DEV_NETWORKS_IDS = [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
230
|
+
import_chains7.mainnet.id,
|
|
231
|
+
import_chains7.base.id,
|
|
232
|
+
import_chains7.sonic.id,
|
|
233
|
+
import_chains7.arbitrum.id,
|
|
234
|
+
import_chains7.plasma.id,
|
|
235
|
+
import_chains7.linea.id
|
|
212
236
|
];
|
|
213
237
|
var SUPPORTED_PROD_NETWORKS_IDS = [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
238
|
+
import_chains7.mainnet.id,
|
|
239
|
+
import_chains7.base.id,
|
|
240
|
+
import_chains7.sonic.id,
|
|
241
|
+
import_chains7.arbitrum.id,
|
|
242
|
+
import_chains7.plasma.id,
|
|
243
|
+
import_chains7.linea.id
|
|
219
244
|
];
|
|
220
245
|
var SUPPORTED_NETWORKS_IDS = [
|
|
221
246
|
...SUPPORTED_DEV_NETWORKS_IDS,
|
|
@@ -228,9 +253,9 @@ var isSupportedChainId = (chainId) => {
|
|
|
228
253
|
};
|
|
229
254
|
|
|
230
255
|
// helpers/getMainnetConfig.ts
|
|
231
|
-
var
|
|
232
|
-
var getMainnetConfig = (chainId =
|
|
233
|
-
if (chainId ===
|
|
256
|
+
var import_chains9 = require("viem/chains");
|
|
257
|
+
var getMainnetConfig = (chainId = import_chains9.mainnet.id) => {
|
|
258
|
+
if (chainId === import_chains9.mainnet.id) {
|
|
234
259
|
return mainnetConfig;
|
|
235
260
|
}
|
|
236
261
|
return mainnetConfig;
|
|
@@ -256,11 +281,17 @@ var AUTOPOOLS_WHITELIST_PROD = [
|
|
|
256
281
|
"0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
|
|
257
282
|
// arbUSD
|
|
258
283
|
"0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
|
|
259
|
-
//siloETH
|
|
284
|
+
// siloETH
|
|
260
285
|
"0x408b6A3E2Daf288864968454AAe786a2A042Df36",
|
|
261
|
-
//siloUSD
|
|
262
|
-
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80"
|
|
286
|
+
// siloUSD
|
|
287
|
+
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80",
|
|
263
288
|
// plasmaUSD
|
|
289
|
+
"0xC7d7F434C015F2A7E77dF9763ADE300F2171a05a",
|
|
290
|
+
// infinifiUSD
|
|
291
|
+
"0xd1A6524Fccd465ECa7AF2340B3D7fd2e3bbD792a",
|
|
292
|
+
// lineaUSD
|
|
293
|
+
"0x1ABD0403591bE494771115d74ED9E120530f356E"
|
|
294
|
+
// anchrgUSD
|
|
264
295
|
// "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
|
|
265
296
|
];
|
|
266
297
|
var STOKE_VOTE_WHITELIST = [
|
|
@@ -271,28 +302,29 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
271
302
|
// "0xa7569A44f348d3D70d8ad5889e50F78E33d80D35", // autoUSD
|
|
272
303
|
// "0xAADf01DD90aE0A6Bb9Eb908294658037096E0404", // baseETH
|
|
273
304
|
];
|
|
305
|
+
var DEPOSIT_ADDRESS_WHITELIST = {
|
|
306
|
+
infinifiUSD: ["0x09618943342c016A85aC0F98Fd005479b3cec571"]
|
|
307
|
+
};
|
|
274
308
|
// Annotate the CommonJS export names for ESM import in node:
|
|
275
309
|
0 && (module.exports = {
|
|
276
|
-
ARBITRUM_SUBGRAPH,
|
|
277
310
|
AUTOPOOLS_WHITELIST_PROD,
|
|
278
|
-
|
|
279
|
-
ETH_SUBGRAPH,
|
|
280
|
-
SONIC_SUBGRAPH,
|
|
311
|
+
DEPOSIT_ADDRESS_WHITELIST,
|
|
281
312
|
STOKE_VOTE_WHITELIST,
|
|
282
|
-
|
|
283
|
-
SUBGRAPH_URL,
|
|
313
|
+
SUBGRAPH_BASE_URL,
|
|
284
314
|
SUPPORTED_DEV_NETWORKS_IDS,
|
|
285
315
|
SUPPORTED_NETWORKS_IDS,
|
|
286
316
|
SUPPORTED_PROD_NETWORKS_IDS,
|
|
287
317
|
SupportedNetworks,
|
|
288
318
|
coreArbitrumConfig,
|
|
289
319
|
coreBaseConfig,
|
|
320
|
+
coreLineaConfig,
|
|
290
321
|
coreMainnetConfig,
|
|
291
322
|
coreNetworkConfigs,
|
|
292
323
|
corePlasmaConfig,
|
|
293
324
|
coreSonicConfig,
|
|
294
325
|
getCoreConfig,
|
|
295
326
|
getMainnetConfig,
|
|
327
|
+
getSubgraphUrl,
|
|
296
328
|
isSupportedChainId,
|
|
297
329
|
mainnetConfig
|
|
298
330
|
});
|
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,
|
|
@@ -24,26 +31,32 @@ var coreMainnetConfig = {
|
|
|
24
31
|
systemRegistry: "0x2218F90A98b0C070676f249EF44834686dAa4285",
|
|
25
32
|
weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
26
33
|
toke: "0x2e9d63788249371f1DFC918a52f8d799F4a38C94",
|
|
34
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
27
35
|
lens: "0x75455ae8c9B2Ff7Ae9F21ae06730d614c31D2300",
|
|
28
36
|
stoke: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
|
|
29
37
|
stokeExtend: "0x6e1F006c98B7389001eB427b1f593936B5c50673",
|
|
30
38
|
stokeVote: "0xFE3f64e47E2474bc2b337F348B9AA0ef6e1ccD01",
|
|
31
39
|
explorerUrl: `${mainnet.blockExplorers.default.url}/`,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
subgraphEndpoint: getSubgraphUrl(mainnet.id),
|
|
41
|
+
rootPriceOracle: "0x61F8BE7FD721e80C0249829eaE6f0DAf21bc2CaC",
|
|
42
|
+
merklDistributor: "0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae"
|
|
35
43
|
};
|
|
36
44
|
var mainnetConfig = {
|
|
37
45
|
...coreMainnetConfig,
|
|
38
46
|
autoEthGuardedRewards: "0xf81D69f11e5103ce199fF745295a1E3D7a4CEF69",
|
|
47
|
+
sAuto: "0x13ff49c4bf8dbBb6Fa8B2DEC9911438E6e588213",
|
|
39
48
|
accTokeV1: "0xA374A62DdBd21e3d5716cB04821CB710897c0972",
|
|
49
|
+
tokeToAutoMigration: "0xFc9e2a42A8fcB01c9A6fd62133c71da80fa78057",
|
|
40
50
|
missedTokeRewards: "0xffd22cee98c24c12b20987d4106148d88269ede3",
|
|
41
51
|
accTokeV1Rewards: "0x086B9734D33783Bbe4fBc8249DF4C686aAe27054",
|
|
42
52
|
accTokeV1RewardsHash: "0x3cCE05568008916d739479958f7a1AF5f67661DD",
|
|
43
53
|
autoETHRewardsHash: "0x9ba21890C1017A7f65989016110c6ECd757B2162",
|
|
44
54
|
stokeRewards: "0xD69e57336377460707d579CB24f9Ba0aEDf88003",
|
|
45
55
|
stokeRewardsHash: "0x70f0f41B354cE2f1378952C50C635633E0373c24",
|
|
56
|
+
sAutoRewards: "0x30Ddef8CeDEE40DF8CaB52813Fc929dA2bcc070c",
|
|
57
|
+
sAutoRewardsHash: "0xF24e2B87aD351855Becdb9C90a8AFd6693675e5D",
|
|
46
58
|
managerV1: "0xA86e412109f77c45a3BC1c5870b880492Fb86A14",
|
|
59
|
+
// sAutoManager: "0xd06a077d8bD8909B8a6C6a9747E02491c1E90D83",
|
|
47
60
|
stakingV1: "0x96F98Ed74639689C3A11daf38ef86E59F43417D3",
|
|
48
61
|
rewardsV1: "0x79dD22579112d8a5F7347c5ED7E609e60da713C5",
|
|
49
62
|
rewardsV1Hash: "0x5ec3EC6A8aC774c7d53665ebc5DDf89145d02fB6",
|
|
@@ -59,16 +72,6 @@ var mainnetConfig = {
|
|
|
59
72
|
|
|
60
73
|
// chains/base.ts
|
|
61
74
|
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
75
|
var coreBaseConfig = {
|
|
73
76
|
name: base.name,
|
|
74
77
|
id: base.id,
|
|
@@ -76,12 +79,13 @@ var coreBaseConfig = {
|
|
|
76
79
|
systemRegistry: "0x18Dc926095A7A007C01Ef836683Fdef4c4371b4e",
|
|
77
80
|
weth: "0x4200000000000000000000000000000000000006",
|
|
78
81
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
82
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
79
83
|
lens: "0x1C00599444dd916eAD61487bc0C8112446DB89F0",
|
|
80
84
|
stoke: "0x2770784de40b9588FE16e4C514820f6bf8901EBf",
|
|
81
85
|
stokeVote: "0x388cFF4079E382FD7C11d699eB183882868d0FB9",
|
|
82
86
|
stokeExtend: "0x0",
|
|
83
87
|
explorerUrl: `${base.blockExplorers.default.url}/`,
|
|
84
|
-
subgraphEndpoint:
|
|
88
|
+
subgraphEndpoint: getSubgraphUrl(base.id),
|
|
85
89
|
rootPriceOracle: "0xBCf67d1d643C53E9C2f84aCBd830A5EDC2661795"
|
|
86
90
|
};
|
|
87
91
|
|
|
@@ -94,18 +98,18 @@ var coreSonicConfig = {
|
|
|
94
98
|
systemRegistry: "0x1a912EB51D3cF8364eBAEE5A982cA37f25aD8848",
|
|
95
99
|
weth: "0x50c42deacd8fc9773493ed674b675be577f2634b",
|
|
96
100
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
101
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
97
102
|
lens: "0xCB7E450c32D21Eb0168466c8022Ae32EF785a163",
|
|
98
103
|
stoke: "0x0",
|
|
99
104
|
stokeVote: "0x0",
|
|
100
105
|
stokeExtend: "0x0",
|
|
101
106
|
explorerUrl: `${sonic.blockExplorers.default.url}/`,
|
|
102
|
-
subgraphEndpoint:
|
|
107
|
+
subgraphEndpoint: getSubgraphUrl(sonic.id),
|
|
103
108
|
rootPriceOracle: "0x356d6e38efd2f33B162eC63534B449B96846751F"
|
|
104
109
|
};
|
|
105
110
|
|
|
106
111
|
// chains/plasma.ts
|
|
107
112
|
import { plasma } from "viem/chains";
|
|
108
|
-
var PLASMA_SUBGRAPH_URL = "https://subgraph.tokemaklabs.com/api/graphql/9745";
|
|
109
113
|
var corePlasmaConfig = {
|
|
110
114
|
name: plasma.name,
|
|
111
115
|
id: plasma.id,
|
|
@@ -113,12 +117,13 @@ var corePlasmaConfig = {
|
|
|
113
117
|
systemRegistry: "0x9065C0E33Bc8FB31A21874f399985e39bC187D48",
|
|
114
118
|
weth: "0x9895D81bB462A195b4922ED7De0e3ACD007c32CB",
|
|
115
119
|
toke: "0x223C0d94dbc8c0E5df1f6B2C75F06c0229c91950",
|
|
120
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
116
121
|
lens: "0x8dBaD46D468d57fdd1FCbA0452C8cD4d7FaE72E8",
|
|
117
122
|
stoke: "0x0",
|
|
118
123
|
stokeVote: "0x0",
|
|
119
124
|
stokeExtend: "0x0",
|
|
120
125
|
explorerUrl: `${plasma.blockExplorers.default.url}/`,
|
|
121
|
-
subgraphEndpoint:
|
|
126
|
+
subgraphEndpoint: getSubgraphUrl(plasma.id),
|
|
122
127
|
rootPriceOracle: "0xf25BDd81822aB430F6637Ea31D8b5aDd0B6d124F"
|
|
123
128
|
};
|
|
124
129
|
|
|
@@ -131,15 +136,35 @@ var coreArbitrumConfig = {
|
|
|
131
136
|
systemRegistry: "0xBFd8E6C9bF2CD5466f5651746f8E946A6C7b4220",
|
|
132
137
|
weth: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
133
138
|
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
139
|
+
auto: "0x60cff692F42D67D4e367185E70D20164903E8725",
|
|
134
140
|
lens: "0x590A31453390A1bB266672156A87eFB1302FC754",
|
|
135
141
|
stoke: "0x0",
|
|
136
142
|
stokeVote: "0x0",
|
|
137
143
|
stokeExtend: "0x0",
|
|
138
144
|
explorerUrl: `${arbitrum.blockExplorers.default.url}/`,
|
|
139
|
-
subgraphEndpoint:
|
|
145
|
+
subgraphEndpoint: getSubgraphUrl(arbitrum.id),
|
|
140
146
|
rootPriceOracle: "0xe84CEa5553CC9D65166A7850DAB2E7712072D97F"
|
|
141
147
|
};
|
|
142
148
|
|
|
149
|
+
// chains/linea.ts
|
|
150
|
+
import { linea } from "viem/chains";
|
|
151
|
+
var coreLineaConfig = {
|
|
152
|
+
name: linea.name,
|
|
153
|
+
id: linea.id,
|
|
154
|
+
shortName: "linea",
|
|
155
|
+
systemRegistry: "0x25f26Ec2e764c63F8D191dFE7f88c6646ca9F980",
|
|
156
|
+
weth: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
|
|
157
|
+
toke: "0x223c0d94dbc8c0e5df1f6b2c75f06c0229c91950",
|
|
158
|
+
auto: "0x62E57804469947506720e33D0C9f6E4029326099",
|
|
159
|
+
lens: "0x92537a95b45AB695ab3EbabFc1A3c3E27AF7973c",
|
|
160
|
+
stoke: "0x0",
|
|
161
|
+
stokeVote: "0x0",
|
|
162
|
+
stokeExtend: "0x0",
|
|
163
|
+
explorerUrl: `${linea.blockExplorers.default.url}/`,
|
|
164
|
+
subgraphEndpoint: getSubgraphUrl(linea.id),
|
|
165
|
+
rootPriceOracle: "0x03DC051eb7fe444CEBCC2e870eba4464D8175618"
|
|
166
|
+
};
|
|
167
|
+
|
|
143
168
|
// helpers/getCoreConfig.ts
|
|
144
169
|
var isCoreNetworkConfig = (config) => {
|
|
145
170
|
return config && !("autoEthGuardedRewards" in config);
|
|
@@ -158,7 +183,7 @@ var getCoreConfig = (chainId = coreMainnetConfig.id) => {
|
|
|
158
183
|
};
|
|
159
184
|
|
|
160
185
|
// whitelist/chains.ts
|
|
161
|
-
import { base as base2, mainnet as mainnet2, sonic as sonic2, arbitrum as arbitrum2, plasma as plasma2 } from "viem/chains";
|
|
186
|
+
import { base as base2, mainnet as mainnet2, sonic as sonic2, arbitrum as arbitrum2, plasma as plasma2, linea as linea2 } from "viem/chains";
|
|
162
187
|
var SupportedNetworks = Object.fromEntries(
|
|
163
188
|
coreNetworkConfigs.map((config) => [config.name, config.id])
|
|
164
189
|
);
|
|
@@ -167,14 +192,16 @@ var SUPPORTED_DEV_NETWORKS_IDS = [
|
|
|
167
192
|
base2.id,
|
|
168
193
|
sonic2.id,
|
|
169
194
|
arbitrum2.id,
|
|
170
|
-
plasma2.id
|
|
195
|
+
plasma2.id,
|
|
196
|
+
linea2.id
|
|
171
197
|
];
|
|
172
198
|
var SUPPORTED_PROD_NETWORKS_IDS = [
|
|
173
199
|
mainnet2.id,
|
|
174
200
|
base2.id,
|
|
175
201
|
sonic2.id,
|
|
176
202
|
arbitrum2.id,
|
|
177
|
-
plasma2.id
|
|
203
|
+
plasma2.id,
|
|
204
|
+
linea2.id
|
|
178
205
|
];
|
|
179
206
|
var SUPPORTED_NETWORKS_IDS = [
|
|
180
207
|
...SUPPORTED_DEV_NETWORKS_IDS,
|
|
@@ -215,11 +242,17 @@ var AUTOPOOLS_WHITELIST_PROD = [
|
|
|
215
242
|
"0xf63b7F49B4f5Dc5D0e7e583Cfd79DC64E646320c",
|
|
216
243
|
// arbUSD
|
|
217
244
|
"0x52F0D57Fb5D4780a37164f918746f9BD51c684a3",
|
|
218
|
-
//siloETH
|
|
245
|
+
// siloETH
|
|
219
246
|
"0x408b6A3E2Daf288864968454AAe786a2A042Df36",
|
|
220
|
-
//siloUSD
|
|
221
|
-
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80"
|
|
247
|
+
// siloUSD
|
|
248
|
+
"0x4Ec8f8b0F144ce1fa280B84F01Df9e353e83EC80",
|
|
222
249
|
// plasmaUSD
|
|
250
|
+
"0xC7d7F434C015F2A7E77dF9763ADE300F2171a05a",
|
|
251
|
+
// infinifiUSD
|
|
252
|
+
"0xd1A6524Fccd465ECa7AF2340B3D7fd2e3bbD792a",
|
|
253
|
+
// lineaUSD
|
|
254
|
+
"0x1ABD0403591bE494771115d74ED9E120530f356E"
|
|
255
|
+
// anchrgUSD
|
|
223
256
|
// "0xEc4F2F260CfaA25c4524c4cAC8eB4222f25Ff73e", // autoS
|
|
224
257
|
];
|
|
225
258
|
var STOKE_VOTE_WHITELIST = [
|
|
@@ -230,27 +263,28 @@ var STOKE_VOTE_WHITELIST = [
|
|
|
230
263
|
// "0xa7569A44f348d3D70d8ad5889e50F78E33d80D35", // autoUSD
|
|
231
264
|
// "0xAADf01DD90aE0A6Bb9Eb908294658037096E0404", // baseETH
|
|
232
265
|
];
|
|
266
|
+
var DEPOSIT_ADDRESS_WHITELIST = {
|
|
267
|
+
infinifiUSD: ["0x09618943342c016A85aC0F98Fd005479b3cec571"]
|
|
268
|
+
};
|
|
233
269
|
export {
|
|
234
|
-
ARBITRUM_SUBGRAPH,
|
|
235
270
|
AUTOPOOLS_WHITELIST_PROD,
|
|
236
|
-
|
|
237
|
-
ETH_SUBGRAPH,
|
|
238
|
-
SONIC_SUBGRAPH,
|
|
271
|
+
DEPOSIT_ADDRESS_WHITELIST,
|
|
239
272
|
STOKE_VOTE_WHITELIST,
|
|
240
|
-
|
|
241
|
-
SUBGRAPH_URL,
|
|
273
|
+
SUBGRAPH_BASE_URL,
|
|
242
274
|
SUPPORTED_DEV_NETWORKS_IDS,
|
|
243
275
|
SUPPORTED_NETWORKS_IDS,
|
|
244
276
|
SUPPORTED_PROD_NETWORKS_IDS,
|
|
245
277
|
SupportedNetworks,
|
|
246
278
|
coreArbitrumConfig,
|
|
247
279
|
coreBaseConfig,
|
|
280
|
+
coreLineaConfig,
|
|
248
281
|
coreMainnetConfig,
|
|
249
282
|
coreNetworkConfigs,
|
|
250
283
|
corePlasmaConfig,
|
|
251
284
|
coreSonicConfig,
|
|
252
285
|
getCoreConfig,
|
|
253
286
|
getMainnetConfig,
|
|
287
|
+
getSubgraphUrl,
|
|
254
288
|
isSupportedChainId,
|
|
255
289
|
mainnetConfig
|
|
256
290
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokemak/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
5
6
|
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
6
19
|
"sideEffects": false,
|
|
7
20
|
"license": "MIT",
|
|
8
21
|
"files": [
|
|
@@ -19,7 +32,7 @@
|
|
|
19
32
|
},
|
|
20
33
|
"scripts": {
|
|
21
34
|
"build": "tsup",
|
|
22
|
-
"lint": "eslint \"
|
|
35
|
+
"lint": "eslint \"**/*.ts\" --ignore-pattern dist",
|
|
23
36
|
"clean": "rimraf .turbo node_modules dist"
|
|
24
37
|
}
|
|
25
38
|
}
|