impermax-sdk 1.2.112 → 1.2.113

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.
@@ -34,6 +34,7 @@ export declare enum Amms {
34
34
  pearlStable = "pearlStable",
35
35
  thruster = "thruster",
36
36
  fenix = "fenix",
37
+ fenixStable = "fenixStable",
37
38
  aerodrome = "aerodrome",
38
39
  aeroStable = "aeroStable",
39
40
  aeroStable1 = "aeroStable1",
@@ -82,6 +83,7 @@ export declare const hrAmms: {
82
83
  vesync: string;
83
84
  solunea: string;
84
85
  fenix: string;
86
+ fenixStable: string;
85
87
  thruster: string;
86
88
  aerodrome: string;
87
89
  aeroStable: string;
@@ -38,6 +38,7 @@ var Amms;
38
38
  Amms["pearlStable"] = "pearlStable";
39
39
  Amms["thruster"] = "thruster";
40
40
  Amms["fenix"] = "fenix";
41
+ Amms["fenixStable"] = "fenixStable";
41
42
  Amms["aerodrome"] = "aerodrome";
42
43
  Amms["aeroStable"] = "aeroStable";
43
44
  Amms["aeroStable1"] = "aeroStable1";
@@ -86,6 +87,7 @@ exports.hrAmms = {
86
87
  [Amms.vesync]: 'VeSync',
87
88
  [Amms.solunea]: 'Solunea',
88
89
  [Amms.fenix]: 'Fenix',
90
+ [Amms.fenixStable]: 'Fenix Stable',
89
91
  [Amms.thruster]: 'Thruster',
90
92
  [Amms.aerodrome]: 'Aerodrome',
91
93
  [Amms.aeroStable]: 'Aerodrome Stable',
@@ -162,6 +164,7 @@ exports.AMM_FACTORY = {
162
164
  [types_1.Networks.Blast]: {
163
165
  [Amms.thruster]: '',
164
166
  [Amms.fenix]: '0xa19C51D91891D3DF7C13Ed22a2f89d328A82950f',
167
+ [Amms.fenixStable]: '0xa19c51d91891d3df7c13ed22a2f89d328a82950f',
165
168
  },
166
169
  [types_1.Networks.Harmony]: {},
167
170
  [types_1.Networks.Moonbeam]: {},
@@ -254,7 +257,7 @@ exports.AMM_SUBGRAPH_URLS = {
254
257
  [types_1.Networks.Moonbeam]: {},
255
258
  [types_1.Networks.Sxnetwork]: {},
256
259
  [types_1.Networks.Base]: {
257
- [Amms.aerodrome]: 'https://api.thegraph.com/subgraphs/name/ethzoomer/aerodrome-trading-data',
260
+ [Amms.aerodrome]: '',
258
261
  [Amms.uniswap]: 'https://api.studio.thegraph.com/query/46041/uniswap-v2-base/v0.0.1',
259
262
  },
260
263
  [types_1.Networks.Mantle]: {},
@@ -323,6 +326,7 @@ exports.ADD_LIQUIDITY_URLS = {
323
326
  [types_1.Networks.Blast]: {
324
327
  [Amms.thruster]: 'https://app.thruster.finance/add',
325
328
  [Amms.fenix]: 'https://www.fenixfinance.io/liquidity/deposit',
329
+ [Amms.fenixStable]: 'https://www.fenixfinance.io/liquidity/deposit',
326
330
  },
327
331
  [types_1.Networks.Harmony]: {},
328
332
  [types_1.Networks.Moonbeam]: {},
@@ -41,7 +41,8 @@ exports.IMPERMAX_FACTORY = {
41
41
  },
42
42
  [types_1.Networks.Blast]: {
43
43
  [types_1.Factory.SOLV2]: '0x7B816c1CCaFA7D3e71E279Ed9DC3226484f6EF87',
44
- [types_1.Factory.V2V2]: '0xb3C80CFcdD177E3FCe2E66870E4768d1EAd89F6c'
44
+ [types_1.Factory.V2V2]: '0xb3C80CFcdD177E3FCe2E66870E4768d1EAd89F6c',
45
+ [types_1.Factory.SOL_STABLE]: '0xfff3C004D115002E0fe8Ef08bBB127aEF5B97bE1',
45
46
  },
46
47
  [types_1.Networks.Harmony]: {},
47
48
  [types_1.Networks.Moonbeam]: {},
@@ -17,7 +17,7 @@ exports.LENDING_VAULT_WATCHER = {
17
17
  [types_1.Networks.Sxnetwork]: '',
18
18
  [types_1.Networks.Canto]: '',
19
19
  [types_1.Networks.ZksyncEra]: '',
20
- [types_1.Networks.Blast]: '',
20
+ [types_1.Networks.Blast]: '0x5833C2BCe6C29323401e9eD171f1599001f5B288',
21
21
  [types_1.Networks.Base]: '0x1c79103cEc595b8af673Cd41271861FFA3B2BEDA',
22
22
  [types_1.Networks.Mantle]: '',
23
23
  [types_1.Networks.Scroll]: '0x0774eBA9e1b20B0f191AbC59a5798838F4bd938c',
@@ -46,6 +46,7 @@ exports.ROUTER = {
46
46
  [types_1.Networks.Blast]: {
47
47
  [types_1.Factory.SOLV2]: '0x447b4E5C469b76A1f7175cE7b224629091713a02',
48
48
  [types_1.Factory.V2V2]: '0x57f9284e10cA2e21181FA626973C72D45a45fd20',
49
+ [types_1.Factory.SOL_STABLE]: '0xd02Db94aAb460703B2a0A6928eA720B9009Da3D1',
49
50
  },
50
51
  [types_1.Networks.Harmony]: {},
51
52
  [types_1.Networks.Moonbeam]: {},
@@ -40,6 +40,7 @@ export declare enum Farms {
40
40
  solidexUSDCB = "solidexUSDCB",
41
41
  oxdao = "oxdao",
42
42
  fenix = "fenix",
43
+ fenixStable = "fenixStable",
43
44
  thruster = "thruster",
44
45
  aerodrome = "aerodrome",
45
46
  aeroStable = "aeroStable",
@@ -44,6 +44,7 @@ var Farms;
44
44
  Farms["solidexUSDCB"] = "solidexUSDCB";
45
45
  Farms["oxdao"] = "oxdao";
46
46
  Farms["fenix"] = "fenix";
47
+ Farms["fenixStable"] = "fenixStable";
47
48
  Farms["thruster"] = "thruster";
48
49
  Farms["aerodrome"] = "aerodrome";
49
50
  Farms["aeroStable"] = "aeroStable";
@@ -168,8 +169,8 @@ exports.STAKED_LP_FACTORY = {
168
169
  [Farms.vesync]: '0xCF3CAD85885254CBD445d6511c502Da095863f11',
169
170
  },
170
171
  [types_1.Networks.Blast]: {
171
- [Farms.thruster]: '',
172
172
  [Farms.fenix]: '0x29C714621152E607ea9768be05F8A96d9e41d62f',
173
+ [Farms.fenixStable]: '0x77AB0B61E2994Dd5c62E578E23E409681E3bA42f',
173
174
  },
174
175
  [types_1.Networks.Harmony]: {},
175
176
  [types_1.Networks.Moonbeam]: {},
@@ -47,7 +47,8 @@ exports.IMPERMAX_SUBGRAPH_URL = {
47
47
  [types_1.Networks.Sxnetwork]: {},
48
48
  [types_1.Networks.Blast]: {
49
49
  [types_1.Factory.SOLV2]: ['https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/4FDikpVjE2XnDJ5QcpQ1YJXWcUDiAgE7x8ErtsHh33UB'],
50
- [types_1.Factory.V2V2]: ['https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/6xkrXFPJ4wqh9cy9ayP19WGr2wZVSMP3FniMjcW2LUG4']
50
+ [types_1.Factory.V2V2]: ['https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/6xkrXFPJ4wqh9cy9ayP19WGr2wZVSMP3FniMjcW2LUG4'],
51
+ [types_1.Factory.SOL_STABLE]: ['https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/CfJnk2rt4fUs71dvJJk21dbSS4dshKFWjfLsCceTXNBa']
51
52
  },
52
53
  [types_1.Networks.Base]: {
53
54
  [types_1.Factory.SOLV2]: [
@@ -116,7 +117,7 @@ exports.LENDING_VAULT_SUBGRAPH_URL = {
116
117
  [types_1.Networks.Sxnetwork]: '',
117
118
  [types_1.Networks.Canto]: '',
118
119
  [types_1.Networks.ZksyncEra]: '',
119
- [types_1.Networks.Blast]: '',
120
+ [types_1.Networks.Blast]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/8UbzkWkh1zqWhkgkomcVAVR7tmvDNq9LUtfmvRwtDQTh',
120
121
  [types_1.Networks.Base]: 'https://gateway.thegraph.com/api/1350441d268f171aeb0934412dfadf3b/subgraphs/id/2TdbQKGWPRHUwuHJgxQzh8kZ7FVpBgZaFtnbjTS6iYng',
121
122
  [types_1.Networks.Mantle]: '',
122
123
  [types_1.Networks.Optimism]: '',
@@ -164,13 +164,15 @@ function fetchPastVolume(amm, lendingPools, seconds) {
164
164
  const pastVolume = {};
165
165
  try {
166
166
  const subgraph = amms_1.AMM_SUBGRAPH_URLS[this.network][amm];
167
- const query = queries_1.QueryBuilderFactory.getQuery(subgraph);
168
- // Since it's not part of core, one endpoint should suffice
169
- if (!query.pastVolumeQuery)
170
- return {};
171
- result = yield this.apolloFetcher(subgraph, query.pastVolumeQuery(blockNumber, lendingPools.map(lendingPool => lendingPool.pair.uniswapV2PairAddress)));
172
- for (const pair of result.data.pairs) {
173
- pastVolume[pair.id] = parseInt(pair.volumeUSD);
167
+ if (subgraph && subgraph.length > 0) {
168
+ const query = queries_1.QueryBuilderFactory.getQuery(subgraph);
169
+ // Since it's not part of core, one endpoint should suffice
170
+ if (!query.pastVolumeQuery)
171
+ return {};
172
+ result = yield this.apolloFetcher(subgraph, query.pastVolumeQuery(blockNumber, lendingPools.map(lendingPool => lendingPool.pair.uniswapV2PairAddress)));
173
+ for (const pair of result.data.pairs) {
174
+ pastVolume[pair.id] = parseInt(pair.volumeUSD);
175
+ }
174
176
  }
175
177
  }
176
178
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.2.112",
3
+ "version": "1.2.113",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",