impermax-sdk 1.2.32 → 1.2.34
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/lib/config/amms.d.ts +3 -1
- package/lib/config/amms.js +12 -0
- package/lib/config/contracts/claim-aggregators.js +1 -0
- package/lib/config/contracts/impermax-chef.js +1 -0
- package/lib/config/contracts/impermax-config-manager.js +1 -0
- package/lib/config/contracts/impermax-factories.js +3 -0
- package/lib/config/contracts/imxes.js +1 -0
- package/lib/config/contracts/lending-vault-watcher.js +1 -0
- package/lib/config/contracts/merkle-distributors.js +3 -0
- package/lib/config/contracts/routers.js +4 -0
- package/lib/config/contracts/simple-uniswap-oracles.js +1 -0
- package/lib/config/contracts/weths.js +2 -1
- package/lib/config/debank-ids.js +6 -5
- package/lib/config/endpoints/merkle-distributors.js +3 -0
- package/lib/config/eth.js +2 -0
- package/lib/config/farms.d.ts +3 -1
- package/lib/config/farms.js +5 -0
- package/lib/config/subgraphs.js +7 -1
- package/lib/config/types.d.ts +2 -1
- package/lib/config/types.js +1 -0
- package/lib/offchain/offchainInitializer.js +3 -0
- package/package.json +1 -1
package/lib/config/amms.d.ts
CHANGED
|
@@ -33,7 +33,8 @@ export declare enum Amms {
|
|
|
33
33
|
pearl = "pearl",
|
|
34
34
|
pearlStable = "pearlStable",
|
|
35
35
|
aerodrome = "aerodrome",
|
|
36
|
-
merchantmoe = "merchantmoe"
|
|
36
|
+
merchantmoe = "merchantmoe",
|
|
37
|
+
tokan = "tokan"
|
|
37
38
|
}
|
|
38
39
|
export declare const hrAmms: {
|
|
39
40
|
uniswap: string;
|
|
@@ -70,6 +71,7 @@ export declare const hrAmms: {
|
|
|
70
71
|
solunea: string;
|
|
71
72
|
aerodrome: string;
|
|
72
73
|
merchantmoe: string;
|
|
74
|
+
tokan: string;
|
|
73
75
|
};
|
|
74
76
|
export declare const AMM_FACTORY: AmmIndex;
|
|
75
77
|
export declare function getAmmByFactory(network: Networks, address: Address): Amms | null;
|
package/lib/config/amms.js
CHANGED
|
@@ -38,6 +38,7 @@ var Amms;
|
|
|
38
38
|
Amms["pearlStable"] = "pearlStable";
|
|
39
39
|
Amms["aerodrome"] = "aerodrome";
|
|
40
40
|
Amms["merchantmoe"] = "merchantmoe";
|
|
41
|
+
Amms["tokan"] = "tokan";
|
|
41
42
|
})(Amms = exports.Amms || (exports.Amms = {}));
|
|
42
43
|
exports.hrAmms = {
|
|
43
44
|
[Amms.uniswap]: 'Uniswap',
|
|
@@ -74,6 +75,7 @@ exports.hrAmms = {
|
|
|
74
75
|
[Amms.solunea]: 'Solunea',
|
|
75
76
|
[Amms.aerodrome]: 'Aerodrome',
|
|
76
77
|
[Amms.merchantmoe]: 'MerchantMoe',
|
|
78
|
+
[Amms.tokan]: 'Tokan',
|
|
77
79
|
};
|
|
78
80
|
exports.AMM_FACTORY = {
|
|
79
81
|
[types_1.Networks.Ropsten]: {
|
|
@@ -139,6 +141,9 @@ exports.AMM_FACTORY = {
|
|
|
139
141
|
},
|
|
140
142
|
[types_1.Networks.Base]: {
|
|
141
143
|
[Amms.aerodrome]: '0x2a32215Ba106039f5A96b6366338BDb9FB0b62E8', //NOTICE: this is actually the staked LP factory
|
|
144
|
+
},
|
|
145
|
+
[types_1.Networks.Scroll]: {
|
|
146
|
+
[Amms.tokan]: '0x074568F090e93194289c2C2BF285eE7f60b485a9', //NOTICE: this is actually the staked LP factory
|
|
142
147
|
}
|
|
143
148
|
};
|
|
144
149
|
function getAmmByFactory(network, address) {
|
|
@@ -205,6 +210,7 @@ exports.AMM_SUBGRAPH_URLS = {
|
|
|
205
210
|
[Amms.aerodrome]: 'https://api.thegraph.com/subgraphs/name/ethzoomer/aerodrome-trading-data', //could not find "official" subgraph
|
|
206
211
|
},
|
|
207
212
|
[types_1.Networks.Mantle]: {},
|
|
213
|
+
[types_1.Networks.Scroll]: {},
|
|
208
214
|
};
|
|
209
215
|
exports.ADD_LIQUIDITY_URLS = {
|
|
210
216
|
[types_1.Networks.Ropsten]: {
|
|
@@ -271,6 +277,9 @@ exports.ADD_LIQUIDITY_URLS = {
|
|
|
271
277
|
[types_1.Networks.Mantle]: {
|
|
272
278
|
[Amms.merchantmoe]: 'https://merchantmoe.com/pool',
|
|
273
279
|
},
|
|
280
|
+
[types_1.Networks.Scroll]: {
|
|
281
|
+
[Amms.tokan]: 'https://app.tokan.exchange/liquidity',
|
|
282
|
+
},
|
|
274
283
|
};
|
|
275
284
|
exports.AMM_LP_FEE = {
|
|
276
285
|
[types_1.Networks.Ropsten]: {
|
|
@@ -334,6 +343,9 @@ exports.AMM_LP_FEE = {
|
|
|
334
343
|
[types_1.Networks.Base]: {
|
|
335
344
|
[Amms.aerodrome]: 0,
|
|
336
345
|
},
|
|
346
|
+
[types_1.Networks.Scroll]: {
|
|
347
|
+
[Amms.tokan]: 0,
|
|
348
|
+
},
|
|
337
349
|
[types_1.Networks.Mantle]: {
|
|
338
350
|
[Amms.merchantmoe]: 0.003,
|
|
339
351
|
}
|
|
@@ -18,5 +18,6 @@ exports.IMPERMAX_CONFIG_MANAGER = {
|
|
|
18
18
|
[types_1.Networks.Canto]: '',
|
|
19
19
|
[types_1.Networks.ZksyncEra]: '',
|
|
20
20
|
[types_1.Networks.Base]: '0x9acafcb281e94eaB771D0cf6508c92A4B75DCE7c',
|
|
21
|
+
[types_1.Networks.Scroll]: '0x90869a451f966d848b85Da57e2a65A545AFb6087',
|
|
21
22
|
[types_1.Networks.Mantle]: '0x6daC1AbEA1E903765358EFD4Ac4e6E817F78F4CB',
|
|
22
23
|
};
|
|
@@ -44,6 +44,9 @@ exports.IMPERMAX_FACTORY = {
|
|
|
44
44
|
[types_1.Networks.Base]: {
|
|
45
45
|
[types_1.Factory.SOLV2]: '0x66ca66E002a9CEE8dEfE25dB6f0c6225117C2d9f',
|
|
46
46
|
},
|
|
47
|
+
[types_1.Networks.Scroll]: {
|
|
48
|
+
[types_1.Factory.SOLV2]: '0x02Ff7B4d96EeBF8c9B34Fae0418E591e11da3099',
|
|
49
|
+
},
|
|
47
50
|
[types_1.Networks.Mantle]: {
|
|
48
51
|
[types_1.Factory.V2V1]: '0x3047523D5ed0df1545B1C440BdAaB095f1f3cf5C'
|
|
49
52
|
},
|
|
@@ -19,6 +19,7 @@ exports.MERKLE_DISTRIBUTOR_IBEX = {
|
|
|
19
19
|
[types_1.Networks.ZksyncEra]: '',
|
|
20
20
|
[types_1.Networks.Base]: '',
|
|
21
21
|
[types_1.Networks.Mantle]: '',
|
|
22
|
+
[types_1.Networks.Scroll]: '',
|
|
22
23
|
};
|
|
23
24
|
exports.MERKLE_DISTRIBUTOR_IBEX_2 = {
|
|
24
25
|
[types_1.Networks.Polygon]: '0x1c813cDd6dAecE2CB83C52F0798504e42816E9C5',
|
|
@@ -37,6 +38,7 @@ exports.MERKLE_DISTRIBUTOR_IBEX_2 = {
|
|
|
37
38
|
[types_1.Networks.ZksyncEra]: '',
|
|
38
39
|
[types_1.Networks.Base]: '',
|
|
39
40
|
[types_1.Networks.Mantle]: '',
|
|
41
|
+
[types_1.Networks.Scroll]: '',
|
|
40
42
|
};
|
|
41
43
|
exports.MERKLE_DISTRIBUTOR_ETH = {
|
|
42
44
|
[types_1.Networks.Polygon]: '0x7ce2f634f0698ecdca051ef1dc4be96ef3d05a62',
|
|
@@ -55,4 +57,5 @@ exports.MERKLE_DISTRIBUTOR_ETH = {
|
|
|
55
57
|
[types_1.Networks.ZksyncEra]: '',
|
|
56
58
|
[types_1.Networks.Base]: '',
|
|
57
59
|
[types_1.Networks.Mantle]: '',
|
|
60
|
+
[types_1.Networks.Scroll]: '',
|
|
58
61
|
};
|
|
@@ -48,6 +48,9 @@ exports.ROUTER = {
|
|
|
48
48
|
[types_1.Networks.Base]: {
|
|
49
49
|
[types_1.Factory.SOLV2]: '0x1EBC3b5911B99aDdE07944c75D9E03958abdB49f'
|
|
50
50
|
},
|
|
51
|
+
[types_1.Networks.Scroll]: {
|
|
52
|
+
[types_1.Factory.SOLV2]: '0xFF8D0CDC9C857c7fA265121394558B26e1eAAffE'
|
|
53
|
+
},
|
|
51
54
|
[types_1.Networks.Mantle]: {
|
|
52
55
|
[types_1.Factory.V2V1]: '0xF4A9dda025e65945E7A3F873D6146A12c8110A19'
|
|
53
56
|
},
|
|
@@ -68,5 +71,6 @@ exports.DEFAULT_ROUTER = {
|
|
|
68
71
|
[types_1.Networks.Moonbeam]: '',
|
|
69
72
|
[types_1.Networks.Sxnetwork]: '',
|
|
70
73
|
[types_1.Networks.Base]: '0x1EBC3b5911B99aDdE07944c75D9E03958abdB49f',
|
|
74
|
+
[types_1.Networks.Scroll]: '0xFF8D0CDC9C857c7fA265121394558B26e1eAAffE',
|
|
71
75
|
[types_1.Networks.Mantle]: '0xF4A9dda025e65945E7A3F873D6146A12c8110A19',
|
|
72
76
|
};
|
|
@@ -35,6 +35,7 @@ exports.SIMPLE_UNISWAP_ORACLE = {
|
|
|
35
35
|
[types_1.Networks.Canto]: {},
|
|
36
36
|
[types_1.Networks.ZksyncEra]: {},
|
|
37
37
|
[types_1.Networks.Base]: {},
|
|
38
|
+
[types_1.Networks.Scroll]: {},
|
|
38
39
|
[types_1.Networks.Mantle]: {
|
|
39
40
|
[types_1.Factory.V2V1]: '0x936c30E14daED88fd29bf4FCe2965EbEDe633846'
|
|
40
41
|
},
|
|
@@ -19,5 +19,6 @@ exports.WETH = {
|
|
|
19
19
|
[types_1.Networks.Canto]: '0x826551890Dc65655a0Aceca109aB11AbDbD7a07B',
|
|
20
20
|
[types_1.Networks.ZksyncEra]: '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91',
|
|
21
21
|
[types_1.Networks.Base]: '0x4200000000000000000000000000000000000006',
|
|
22
|
-
[types_1.Networks.Mantle]: '0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8',
|
|
22
|
+
[types_1.Networks.Mantle]: '0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8',
|
|
23
|
+
[types_1.Networks.Scroll]: '0x5300000000000000000000000000000000000004', // WETH
|
|
23
24
|
};
|
package/lib/config/debank-ids.js
CHANGED
|
@@ -12,11 +12,12 @@ exports.DEBANK_IDS = {
|
|
|
12
12
|
[types_1.Networks.Fantom]: 'ftm',
|
|
13
13
|
[types_1.Networks.Cronos]: 'cro',
|
|
14
14
|
[types_1.Networks.Canto]: 'canto',
|
|
15
|
-
[types_1.Networks.Aurora]: '',
|
|
16
|
-
[types_1.Networks.Harmony]: '',
|
|
17
|
-
[types_1.Networks.Moonbeam]: '',
|
|
15
|
+
[types_1.Networks.Aurora]: 'aurora',
|
|
16
|
+
[types_1.Networks.Harmony]: 'hmy',
|
|
17
|
+
[types_1.Networks.Moonbeam]: 'mobm',
|
|
18
18
|
[types_1.Networks.Sxnetwork]: '',
|
|
19
|
-
[types_1.Networks.ZksyncEra]: '',
|
|
19
|
+
[types_1.Networks.ZksyncEra]: 'era',
|
|
20
20
|
[types_1.Networks.Base]: 'base',
|
|
21
|
-
[types_1.Networks.Mantle]: '',
|
|
21
|
+
[types_1.Networks.Mantle]: 'mnt',
|
|
22
|
+
[types_1.Networks.Scroll]: 'scrl',
|
|
22
23
|
};
|
|
@@ -19,6 +19,7 @@ exports.MERKLE_URL_IBEX = {
|
|
|
19
19
|
[types_1.Networks.ZksyncEra]: '',
|
|
20
20
|
[types_1.Networks.Base]: '',
|
|
21
21
|
[types_1.Networks.Mantle]: '',
|
|
22
|
+
[types_1.Networks.Scroll]: '',
|
|
22
23
|
};
|
|
23
24
|
exports.MERKLE_URL_IBEX_2 = {
|
|
24
25
|
[types_1.Networks.Polygon]: 'https://misty-rice-9880.impermax.workers.dev',
|
|
@@ -37,6 +38,7 @@ exports.MERKLE_URL_IBEX_2 = {
|
|
|
37
38
|
[types_1.Networks.ZksyncEra]: '',
|
|
38
39
|
[types_1.Networks.Base]: '',
|
|
39
40
|
[types_1.Networks.Mantle]: '',
|
|
41
|
+
[types_1.Networks.Scroll]: '',
|
|
40
42
|
};
|
|
41
43
|
exports.MERKLE_URL_ETH = {
|
|
42
44
|
[types_1.Networks.Polygon]: 'https://damp-hill-13d0.impermax.workers.dev',
|
|
@@ -55,4 +57,5 @@ exports.MERKLE_URL_ETH = {
|
|
|
55
57
|
[types_1.Networks.ZksyncEra]: '',
|
|
56
58
|
[types_1.Networks.Base]: '',
|
|
57
59
|
[types_1.Networks.Mantle]: '',
|
|
60
|
+
[types_1.Networks.Scroll]: '',
|
|
58
61
|
};
|
package/lib/config/eth.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.ETH_NAME = {
|
|
|
19
19
|
[types_1.Networks.ZksyncEra]: 'Ethereum',
|
|
20
20
|
[types_1.Networks.Base]: 'Base',
|
|
21
21
|
[types_1.Networks.Mantle]: 'Mantle',
|
|
22
|
+
[types_1.Networks.Scroll]: 'Scroll',
|
|
22
23
|
};
|
|
23
24
|
exports.ETH_SYMBOL = {
|
|
24
25
|
[types_1.Networks.Ropsten]: 'ETH',
|
|
@@ -37,4 +38,5 @@ exports.ETH_SYMBOL = {
|
|
|
37
38
|
[types_1.Networks.ZksyncEra]: 'ETH',
|
|
38
39
|
[types_1.Networks.Base]: 'ETH',
|
|
39
40
|
[types_1.Networks.Mantle]: 'MNT',
|
|
41
|
+
[types_1.Networks.Scroll]: 'ETH',
|
|
40
42
|
};
|
package/lib/config/farms.d.ts
CHANGED
|
@@ -40,7 +40,8 @@ export declare enum Farms {
|
|
|
40
40
|
solidexUSDCB = "solidexUSDCB",
|
|
41
41
|
oxdao = "oxdao",
|
|
42
42
|
aerodrome = "aerodrome",
|
|
43
|
-
merchantmoe = "merchantmoe"
|
|
43
|
+
merchantmoe = "merchantmoe",
|
|
44
|
+
tokan = "tokan"
|
|
44
45
|
}
|
|
45
46
|
export declare const hrFarms: {
|
|
46
47
|
quickswapOld: string;
|
|
@@ -82,6 +83,7 @@ export declare const hrFarms: {
|
|
|
82
83
|
solidexUSDCB: string;
|
|
83
84
|
oxdao: string;
|
|
84
85
|
aerodrome: string;
|
|
86
|
+
tokan: string;
|
|
85
87
|
};
|
|
86
88
|
export type FarmIndex = {
|
|
87
89
|
[key in Networks]: {
|
package/lib/config/farms.js
CHANGED
|
@@ -45,6 +45,7 @@ var Farms;
|
|
|
45
45
|
Farms["oxdao"] = "oxdao";
|
|
46
46
|
Farms["aerodrome"] = "aerodrome";
|
|
47
47
|
Farms["merchantmoe"] = "merchantmoe";
|
|
48
|
+
Farms["tokan"] = "tokan";
|
|
48
49
|
})(Farms = exports.Farms || (exports.Farms = {}));
|
|
49
50
|
exports.hrFarms = {
|
|
50
51
|
[Farms.quickswapOld]: 'QuickSwap',
|
|
@@ -87,6 +88,7 @@ exports.hrFarms = {
|
|
|
87
88
|
[Farms.solidexUSDCB]: 'Solidex',
|
|
88
89
|
[Farms.oxdao]: '0xDAO',
|
|
89
90
|
[Farms.aerodrome]: 'Aerodrome',
|
|
91
|
+
[Farms.tokan]: 'Tokan',
|
|
90
92
|
};
|
|
91
93
|
exports.STAKED_LP_FACTORY = {
|
|
92
94
|
[types_1.Networks.Ropsten]: {},
|
|
@@ -157,6 +159,9 @@ exports.STAKED_LP_FACTORY = {
|
|
|
157
159
|
},
|
|
158
160
|
[types_1.Networks.Mantle]: {
|
|
159
161
|
[Farms.merchantmoe]: '0x49bfE341232caE3CCB55ab99b11631CDE0AC9289',
|
|
162
|
+
},
|
|
163
|
+
[types_1.Networks.Scroll]: {
|
|
164
|
+
[Farms.tokan]: '0x074568F090e93194289c2C2BF285eE7f60b485a9',
|
|
160
165
|
}
|
|
161
166
|
};
|
|
162
167
|
function getFarmByStakedLPFactory(network, address) {
|
package/lib/config/subgraphs.js
CHANGED
|
@@ -24,7 +24,7 @@ exports.IMPERMAX_SUBGRAPH_URL = {
|
|
|
24
24
|
[types_1.Factory.SOLV2]: 'https://api.studio.thegraph.com/query/46041/impermax-avalanche-solv2/v0.0.2',
|
|
25
25
|
},
|
|
26
26
|
[types_1.Networks.Mantle]: {
|
|
27
|
-
[types_1.Factory.V2V1_2]: 'https://api
|
|
27
|
+
[types_1.Factory.V2V1_2]: 'https://subgraph-api.mantle.xyz/subgraphs/name/impermax-finance/impermax-mantle-v2'
|
|
28
28
|
},
|
|
29
29
|
[types_1.Networks.Moonriver]: {
|
|
30
30
|
[types_1.Factory.V2V1_2]: 'https://api.studio.thegraph.com/query/46041/impermax-moonriver-v1/v0.0.1'
|
|
@@ -46,6 +46,9 @@ exports.IMPERMAX_SUBGRAPH_URL = {
|
|
|
46
46
|
[types_1.Networks.Base]: {
|
|
47
47
|
[types_1.Factory.SOLV2]: 'https://api.studio.thegraph.com/query/46041/impermax-base-solv2/v0.0.2',
|
|
48
48
|
},
|
|
49
|
+
[types_1.Networks.Scroll]: {
|
|
50
|
+
[types_1.Factory.SOLV2]: '',
|
|
51
|
+
},
|
|
49
52
|
};
|
|
50
53
|
exports.IMPERMAX_CHEF_SUBGRAPH_URL = {
|
|
51
54
|
[types_1.Networks.Ropsten]: '',
|
|
@@ -65,6 +68,7 @@ exports.IMPERMAX_CHEF_SUBGRAPH_URL = {
|
|
|
65
68
|
[types_1.Networks.ZksyncEra]: '',
|
|
66
69
|
[types_1.Networks.Base]: '',
|
|
67
70
|
[types_1.Networks.Mantle]: '',
|
|
71
|
+
[types_1.Networks.Scroll]: '',
|
|
68
72
|
};
|
|
69
73
|
exports.LENDING_VAULT_SUBGRAPH_URL = {
|
|
70
74
|
[types_1.Networks.Ropsten]: '',
|
|
@@ -83,6 +87,7 @@ exports.LENDING_VAULT_SUBGRAPH_URL = {
|
|
|
83
87
|
[types_1.Networks.ZksyncEra]: '',
|
|
84
88
|
[types_1.Networks.Base]: '',
|
|
85
89
|
[types_1.Networks.Mantle]: '',
|
|
90
|
+
[types_1.Networks.Scroll]: '',
|
|
86
91
|
};
|
|
87
92
|
exports.BLOCKS_SUBGRAPH_URL = {
|
|
88
93
|
[types_1.Networks.Ropsten]: '',
|
|
@@ -101,6 +106,7 @@ exports.BLOCKS_SUBGRAPH_URL = {
|
|
|
101
106
|
[types_1.Networks.Sxnetwork]: '',
|
|
102
107
|
[types_1.Networks.Base]: 'https://api.thegraph.com/subgraphs/name/blocklytics/base-blocks',
|
|
103
108
|
[types_1.Networks.Mantle]: '',
|
|
109
|
+
[types_1.Networks.Scroll]: '',
|
|
104
110
|
};
|
|
105
111
|
exports.XIMX_SUBGRAPH_URL = "https://api.thegraph.com/subgraphs/name/impermax-finance/imx-staking";
|
|
106
112
|
exports.CONFIG_MANAGER_SUBGRAPH_URL = {
|
package/lib/config/types.d.ts
CHANGED
package/lib/config/types.js
CHANGED
|
@@ -464,6 +464,9 @@ function initializeTvlData() {
|
|
|
464
464
|
types_1.Networks.Fantom,
|
|
465
465
|
types_1.Networks.Canto,
|
|
466
466
|
types_1.Networks.ZksyncEra,
|
|
467
|
+
types_1.Networks.Mantle,
|
|
468
|
+
types_1.Networks.Base,
|
|
469
|
+
types_1.Networks.Scroll
|
|
467
470
|
]; // exclude ropsten
|
|
468
471
|
const calls = [];
|
|
469
472
|
for (const network of networks) {
|