impermax-sdk 1.2.120 → 1.2.122
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 +5 -1
- package/lib/config/amms.js +21 -4
- 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 +1 -0
- package/lib/config/endpoints/merkle-distributors.js +3 -0
- package/lib/config/eth.js +2 -0
- package/lib/config/farms.js +2 -1
- package/lib/config/subgraphs.d.ts +1 -0
- package/lib/config/subgraphs.js +9 -0
- package/lib/config/types.d.ts +2 -1
- package/lib/config/types.js +1 -0
- package/lib/offchain/offchainAPRHelper.js +1 -0
- package/lib/offchain/offchainInitializer.js +2 -1
- package/lib/offchain/offchainPriceHelper.js +2 -0
- package/package.json +1 -1
package/lib/config/amms.d.ts
CHANGED
|
@@ -47,7 +47,9 @@ export declare enum Amms {
|
|
|
47
47
|
equalizer = "equalizer",
|
|
48
48
|
wigoswap = "wigoswap",
|
|
49
49
|
velodrome = "velodrome",
|
|
50
|
-
alien = "alien"
|
|
50
|
+
alien = "alien",
|
|
51
|
+
shadow = "shadow",
|
|
52
|
+
nile = "nile"
|
|
51
53
|
}
|
|
52
54
|
export declare const hrAmms: {
|
|
53
55
|
uniswap: string;
|
|
@@ -98,6 +100,8 @@ export declare const hrAmms: {
|
|
|
98
100
|
wigoswap: string;
|
|
99
101
|
velodrome: string;
|
|
100
102
|
alien: string;
|
|
103
|
+
shadow: string;
|
|
104
|
+
nile: string;
|
|
101
105
|
};
|
|
102
106
|
export declare const AMM_FACTORY: AmmIndex;
|
|
103
107
|
export declare function getAmmByFactory(network: Networks, address: Address): Amms | null;
|
package/lib/config/amms.js
CHANGED
|
@@ -52,6 +52,8 @@ var Amms;
|
|
|
52
52
|
Amms["wigoswap"] = "wigoswap";
|
|
53
53
|
Amms["velodrome"] = "velodrome";
|
|
54
54
|
Amms["alien"] = "alien";
|
|
55
|
+
Amms["shadow"] = "shadow";
|
|
56
|
+
Amms["nile"] = "nile";
|
|
55
57
|
})(Amms = exports.Amms || (exports.Amms = {}));
|
|
56
58
|
exports.hrAmms = {
|
|
57
59
|
[Amms.uniswap]: 'Uniswap',
|
|
@@ -102,6 +104,8 @@ exports.hrAmms = {
|
|
|
102
104
|
[Amms.wigoswap]: 'Wigoswap',
|
|
103
105
|
[Amms.velodrome]: 'Velodrome',
|
|
104
106
|
[Amms.alien]: 'AlienBase',
|
|
107
|
+
[Amms.shadow]: 'Shadow',
|
|
108
|
+
[Amms.nile]: 'Nile',
|
|
105
109
|
};
|
|
106
110
|
exports.AMM_FACTORY = {
|
|
107
111
|
[types_1.Networks.Ropsten]: {
|
|
@@ -195,6 +199,10 @@ exports.AMM_FACTORY = {
|
|
|
195
199
|
},
|
|
196
200
|
[types_1.Networks.Sonic]: {
|
|
197
201
|
[Amms.equalizer]: '0xDDD9845Ba0D8f38d3045f804f67A1a8B9A528FcC',
|
|
202
|
+
[Amms.shadow]: '0x2dA25E7446A70D7be65fd4c053948BEcAA6374c8',
|
|
203
|
+
},
|
|
204
|
+
[types_1.Networks.Linea]: {
|
|
205
|
+
[Amms.nile]: '0xAAA16c016BF556fcD620328f0759252E29b1AB57',
|
|
198
206
|
}
|
|
199
207
|
};
|
|
200
208
|
function getAmmByFactory(network, address) {
|
|
@@ -268,6 +276,7 @@ exports.AMM_SUBGRAPH_URLS = {
|
|
|
268
276
|
[types_1.Networks.Real]: {},
|
|
269
277
|
[types_1.Networks.Optimism]: {},
|
|
270
278
|
[types_1.Networks.Sonic]: {},
|
|
279
|
+
[types_1.Networks.Linea]: {},
|
|
271
280
|
};
|
|
272
281
|
exports.ADD_LIQUIDITY_URLS = {
|
|
273
282
|
[types_1.Networks.Ropsten]: {
|
|
@@ -356,8 +365,12 @@ exports.ADD_LIQUIDITY_URLS = {
|
|
|
356
365
|
[Amms.pearl]: 'https://www.pearl.exchange/supply-liquidity/v2/',
|
|
357
366
|
},
|
|
358
367
|
[types_1.Networks.Sonic]: {
|
|
359
|
-
[Amms.equalizer]: 'https://equalizer.exchange/liquidity/'
|
|
360
|
-
|
|
368
|
+
[Amms.equalizer]: 'https://equalizer.exchange/liquidity/',
|
|
369
|
+
[Amms.shadow]: 'https://www.shadow.so/liquidity/'
|
|
370
|
+
},
|
|
371
|
+
[types_1.Networks.Linea]: {
|
|
372
|
+
[Amms.nile]: 'https://www.nile.build/manage/v1/'
|
|
373
|
+
},
|
|
361
374
|
};
|
|
362
375
|
exports.AMM_LP_FEE = {
|
|
363
376
|
[types_1.Networks.Ropsten]: {
|
|
@@ -445,6 +458,10 @@ exports.AMM_LP_FEE = {
|
|
|
445
458
|
[Amms.pearl]: 0,
|
|
446
459
|
},
|
|
447
460
|
[types_1.Networks.Sonic]: {
|
|
448
|
-
[Amms.equalizer]: 0
|
|
449
|
-
|
|
461
|
+
[Amms.equalizer]: 0,
|
|
462
|
+
[Amms.shadow]: 0
|
|
463
|
+
},
|
|
464
|
+
[types_1.Networks.Linea]: {
|
|
465
|
+
[Amms.nile]: 0
|
|
466
|
+
},
|
|
450
467
|
};
|
|
@@ -24,4 +24,5 @@ exports.IMPERMAX_CONFIG_MANAGER = {
|
|
|
24
24
|
[types_1.Networks.Optimism]: '0xC8301bD3f86e642904aeD9b588cA9d9350b3B160',
|
|
25
25
|
[types_1.Networks.Real]: '0x274C36c461C02B39a110A0801EbB218eC076B79B',
|
|
26
26
|
[types_1.Networks.Sonic]: '0x1A3e33E38D2e70D43f65772f63c5B3f52073b37E',
|
|
27
|
+
[types_1.Networks.Linea]: '0x3A65E736b534B3A3703Eb081b93118852Bf1796a',
|
|
27
28
|
};
|
|
@@ -69,6 +69,9 @@ exports.IMPERMAX_FACTORY = {
|
|
|
69
69
|
[types_1.Networks.Sonic]: {
|
|
70
70
|
[types_1.Factory.SOLV2]: '0x26fca5916c20D252feEF7A58E39886d3d3112b91',
|
|
71
71
|
},
|
|
72
|
+
[types_1.Networks.Linea]: {
|
|
73
|
+
[types_1.Factory.SOLV2]: '0x7A9212D34DD283e952f8f15f084832e9b48ee746',
|
|
74
|
+
},
|
|
72
75
|
};
|
|
73
76
|
function getFactoryByAddress(network, address) {
|
|
74
77
|
if (!address)
|
|
@@ -24,6 +24,7 @@ exports.MERKLE_DISTRIBUTOR_IBEX = {
|
|
|
24
24
|
[types_1.Networks.Optimism]: '',
|
|
25
25
|
[types_1.Networks.Real]: '',
|
|
26
26
|
[types_1.Networks.Sonic]: '',
|
|
27
|
+
[types_1.Networks.Linea]: '',
|
|
27
28
|
};
|
|
28
29
|
exports.MERKLE_DISTRIBUTOR_IBEX_2 = {
|
|
29
30
|
[types_1.Networks.Polygon]: '0x1c813cDd6dAecE2CB83C52F0798504e42816E9C5',
|
|
@@ -47,6 +48,7 @@ exports.MERKLE_DISTRIBUTOR_IBEX_2 = {
|
|
|
47
48
|
[types_1.Networks.Optimism]: '',
|
|
48
49
|
[types_1.Networks.Real]: '',
|
|
49
50
|
[types_1.Networks.Sonic]: '',
|
|
51
|
+
[types_1.Networks.Linea]: '',
|
|
50
52
|
};
|
|
51
53
|
exports.MERKLE_DISTRIBUTOR_ETH = {
|
|
52
54
|
[types_1.Networks.Polygon]: '0x7ce2f634f0698ecdca051ef1dc4be96ef3d05a62',
|
|
@@ -70,4 +72,5 @@ exports.MERKLE_DISTRIBUTOR_ETH = {
|
|
|
70
72
|
[types_1.Networks.Optimism]: '',
|
|
71
73
|
[types_1.Networks.Real]: '',
|
|
72
74
|
[types_1.Networks.Sonic]: '',
|
|
75
|
+
[types_1.Networks.Linea]: '',
|
|
73
76
|
};
|
|
@@ -73,6 +73,9 @@ exports.ROUTER = {
|
|
|
73
73
|
[types_1.Networks.Sonic]: {
|
|
74
74
|
[types_1.Factory.SOLV2]: '0xcBdf792456367a91708C0036E0678eCFB1f09654',
|
|
75
75
|
},
|
|
76
|
+
[types_1.Networks.Linea]: {
|
|
77
|
+
[types_1.Factory.SOLV2]: '0xEB81da0cAC9D3efc4bf3270080936C6a5758926f',
|
|
78
|
+
},
|
|
76
79
|
};
|
|
77
80
|
exports.DEFAULT_ROUTER = {
|
|
78
81
|
[types_1.Networks.Ropsten]: '0xbFf4acF789297A8507Eb7493AE18EB2C3A3A9632',
|
|
@@ -96,4 +99,5 @@ exports.DEFAULT_ROUTER = {
|
|
|
96
99
|
[types_1.Networks.Mantle]: '0xF4A9dda025e65945E7A3F873D6146A12c8110A19',
|
|
97
100
|
[types_1.Networks.Optimism]: '0xb5657FA5ba87CaD11b9150c319069625d423aaD4',
|
|
98
101
|
[types_1.Networks.Sonic]: '0xcBdf792456367a91708C0036E0678eCFB1f09654',
|
|
102
|
+
[types_1.Networks.Linea]: '0xEB81da0cAC9D3efc4bf3270080936C6a5758926f',
|
|
99
103
|
};
|
|
@@ -24,5 +24,6 @@ exports.WETH = {
|
|
|
24
24
|
[types_1.Networks.Scroll]: '0x5300000000000000000000000000000000000004',
|
|
25
25
|
[types_1.Networks.Optimism]: '0x4200000000000000000000000000000000000006',
|
|
26
26
|
[types_1.Networks.Real]: '0x90c6E93849E06EC7478ba24522329d14A5954Df4',
|
|
27
|
-
[types_1.Networks.Sonic]: '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38',
|
|
27
|
+
[types_1.Networks.Sonic]: '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38',
|
|
28
|
+
[types_1.Networks.Linea]: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f', // weth
|
|
28
29
|
};
|
package/lib/config/debank-ids.js
CHANGED
|
@@ -24,6 +24,7 @@ exports.MERKLE_URL_IBEX = {
|
|
|
24
24
|
[types_1.Networks.Optimism]: '',
|
|
25
25
|
[types_1.Networks.Real]: '',
|
|
26
26
|
[types_1.Networks.Sonic]: '',
|
|
27
|
+
[types_1.Networks.Linea]: '',
|
|
27
28
|
};
|
|
28
29
|
exports.MERKLE_URL_IBEX_2 = {
|
|
29
30
|
[types_1.Networks.Polygon]: 'https://misty-rice-9880.impermax.workers.dev',
|
|
@@ -47,6 +48,7 @@ exports.MERKLE_URL_IBEX_2 = {
|
|
|
47
48
|
[types_1.Networks.Optimism]: '',
|
|
48
49
|
[types_1.Networks.Real]: '',
|
|
49
50
|
[types_1.Networks.Sonic]: '',
|
|
51
|
+
[types_1.Networks.Linea]: '',
|
|
50
52
|
};
|
|
51
53
|
exports.MERKLE_URL_ETH = {
|
|
52
54
|
[types_1.Networks.Polygon]: 'https://damp-hill-13d0.impermax.workers.dev',
|
|
@@ -70,4 +72,5 @@ exports.MERKLE_URL_ETH = {
|
|
|
70
72
|
[types_1.Networks.Optimism]: '',
|
|
71
73
|
[types_1.Networks.Real]: '',
|
|
72
74
|
[types_1.Networks.Sonic]: '',
|
|
75
|
+
[types_1.Networks.Linea]: '',
|
|
73
76
|
};
|
package/lib/config/eth.js
CHANGED
|
@@ -24,6 +24,7 @@ exports.ETH_NAME = {
|
|
|
24
24
|
[types_1.Networks.Optimism]: 'Ethereum',
|
|
25
25
|
[types_1.Networks.Real]: 'Ethereum',
|
|
26
26
|
[types_1.Networks.Sonic]: 'S',
|
|
27
|
+
[types_1.Networks.Linea]: 'Ethereum',
|
|
27
28
|
};
|
|
28
29
|
exports.ETH_SYMBOL = {
|
|
29
30
|
[types_1.Networks.Ropsten]: 'ETH',
|
|
@@ -47,4 +48,5 @@ exports.ETH_SYMBOL = {
|
|
|
47
48
|
[types_1.Networks.Optimism]: 'ETH',
|
|
48
49
|
[types_1.Networks.Real]: 'reETH',
|
|
49
50
|
[types_1.Networks.Sonic]: 'S',
|
|
51
|
+
[types_1.Networks.Linea]: 'ETH',
|
|
50
52
|
};
|
package/lib/config/farms.js
CHANGED
|
@@ -199,7 +199,8 @@ exports.STAKED_LP_FACTORY = {
|
|
|
199
199
|
[Farms.pearl]: '0x2B965fDf04f9e9bEEf1659464Ef3A0094A68D923',
|
|
200
200
|
[Farms.pearlStable]: '0x28E22D8c807b6E6c0ECa4373fC3B9920453cEEEe',
|
|
201
201
|
},
|
|
202
|
-
[types_1.Networks.Sonic]: {}
|
|
202
|
+
[types_1.Networks.Sonic]: {},
|
|
203
|
+
[types_1.Networks.Linea]: {}
|
|
203
204
|
};
|
|
204
205
|
function getFarmByStakedLPFactory(network, address) {
|
|
205
206
|
if (!address)
|
package/lib/config/subgraphs.js
CHANGED
|
@@ -83,6 +83,11 @@ exports.IMPERMAX_SUBGRAPH_URL = {
|
|
|
83
83
|
'https://sonic-factory-production.up.railway.app/',
|
|
84
84
|
'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/HK9BA4oFp1xaoQW7YVP4m2nbxX7q2bQCZWNPKBtudtZR'
|
|
85
85
|
]
|
|
86
|
+
},
|
|
87
|
+
[types_1.Networks.Linea]: {
|
|
88
|
+
[types_1.Factory.SOLV2]: [
|
|
89
|
+
'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/AyFSeFRAtUm4aY3cb1zTJqoMjcgSNrRipucuSxkEZ1v9'
|
|
90
|
+
]
|
|
86
91
|
}
|
|
87
92
|
};
|
|
88
93
|
exports.IMPERMAX_CHEF_SUBGRAPH_URL = {
|
|
@@ -108,6 +113,7 @@ exports.IMPERMAX_CHEF_SUBGRAPH_URL = {
|
|
|
108
113
|
[types_1.Networks.Optimism]: '',
|
|
109
114
|
[types_1.Networks.Real]: '',
|
|
110
115
|
[types_1.Networks.Sonic]: '',
|
|
116
|
+
[types_1.Networks.Linea]: '',
|
|
111
117
|
};
|
|
112
118
|
exports.LENDING_VAULT_SUBGRAPH_URL = {
|
|
113
119
|
[types_1.Networks.Ropsten]: '',
|
|
@@ -131,6 +137,7 @@ exports.LENDING_VAULT_SUBGRAPH_URL = {
|
|
|
131
137
|
[types_1.Networks.Real]: '',
|
|
132
138
|
[types_1.Networks.Scroll]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/BaPMX2ubiRZ4ujqTFmWyrk72fPo6yFLQ7A5Z4BLXCTFU',
|
|
133
139
|
[types_1.Networks.Sonic]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/AHj91C4xwYSfyHAnZiMa1pC4ZwRtzqG3QGVyJchEsJAC',
|
|
140
|
+
[types_1.Networks.Linea]: '',
|
|
134
141
|
};
|
|
135
142
|
exports.BLOCKS_SUBGRAPH_URL = {
|
|
136
143
|
[types_1.Networks.Ropsten]: '',
|
|
@@ -154,6 +161,7 @@ exports.BLOCKS_SUBGRAPH_URL = {
|
|
|
154
161
|
[types_1.Networks.Real]: '',
|
|
155
162
|
[types_1.Networks.Optimism]: '',
|
|
156
163
|
[types_1.Networks.Sonic]: '',
|
|
164
|
+
[types_1.Networks.Linea]: '',
|
|
157
165
|
};
|
|
158
166
|
exports.XIMX_SUBGRAPH_URL = "https://api.thegraph.com/subgraphs/name/impermax-finance/imx-staking";
|
|
159
167
|
exports.CONFIG_MANAGER_SUBGRAPH_URL = {
|
|
@@ -177,6 +185,7 @@ exports.CONFIG_MANAGER_SUBGRAPH_URL = {
|
|
|
177
185
|
[types_1.Networks.Optimism]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/GWFrv8MNg5fpD19fxdu32G1Wt6om8qb1wbacpgHDyvC8',
|
|
178
186
|
[types_1.Networks.Real]: 'https://api.goldsky.com/api/public/project_cm2d5q4l4w31601vz4swb3vmi/subgraphs/impermax-config-manager-real/1.0/gn',
|
|
179
187
|
[types_1.Networks.Sonic]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/DqzQAecRNGsoRgwVre16Fha9XTPFf9QBo8iZxubysy2x',
|
|
188
|
+
[types_1.Networks.Linea]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/CKu5kt4M1p2ELhn7cef9ZjE9igMH2icv3mzBepEdNPRz',
|
|
180
189
|
};
|
|
181
190
|
exports.WHITELIST_SUBGRAPH_URL = {
|
|
182
191
|
[types_1.Networks.Ropsten]: '',
|
package/lib/config/types.d.ts
CHANGED
package/lib/config/types.js
CHANGED
|
@@ -33,6 +33,7 @@ const LlamaChains = {
|
|
|
33
33
|
[types_1.Networks.Real]: "re.al",
|
|
34
34
|
[types_1.Networks.Blast]: "blast",
|
|
35
35
|
[types_1.Networks.Sonic]: "sonic",
|
|
36
|
+
[types_1.Networks.Linea]: "linea",
|
|
36
37
|
};
|
|
37
38
|
// Class to get the APR from DefiLlama directly, only makes 1 call to api and caches all pools
|
|
38
39
|
class OffchainAPRHelper {
|
|
@@ -475,7 +475,8 @@ function initializeTvlData() {
|
|
|
475
475
|
types_1.Networks.Scroll,
|
|
476
476
|
types_1.Networks.Real,
|
|
477
477
|
types_1.Networks.Blast,
|
|
478
|
-
types_1.Networks.Sonic
|
|
478
|
+
types_1.Networks.Sonic,
|
|
479
|
+
types_1.Networks.Linea,
|
|
479
480
|
]; // exclude ropsten
|
|
480
481
|
const calls = [];
|
|
481
482
|
for (const network of networks) {
|
|
@@ -67,6 +67,8 @@ const coingecko_ids = {
|
|
|
67
67
|
"0xce1581d7b4ba40176f0e219b2cac30088ad50c7a": "pearl",
|
|
68
68
|
// blast
|
|
69
69
|
"0x52f847356b38720b55ee18cb3e094ca11c85a192": "fenix",
|
|
70
|
+
// sonic
|
|
71
|
+
"0x3333b97138d4b086720b5ae8a7844b1345a33333": "shadow-2"
|
|
70
72
|
};
|
|
71
73
|
const dexscreener_ids = {
|
|
72
74
|
// ibex on scroll
|