impermax-sdk 1.0.5 → 1.0.7
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 +2 -0
- package/lib/config/amms.js +6 -0
- package/lib/config/contracts/routers.js +1 -0
- package/lib/config/farms.d.ts +2 -0
- package/lib/config/farms.js +3 -0
- package/lib/config/subgraphs.js +1 -0
- package/lib/subgraph/PriceHelper.js +1 -0
- package/lib/subgraph/index.d.ts +4 -1
- package/lib/subgraph/initializer.js +10 -0
- package/package.json +1 -1
package/lib/config/amms.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare enum Amms {
|
|
|
6
6
|
swapr = "swapr",
|
|
7
7
|
swapfish = "swapfish",
|
|
8
8
|
zyberswap = "zyberswap",
|
|
9
|
+
solidlizard = "solidlizard",
|
|
9
10
|
pangolin = "pangolin",
|
|
10
11
|
traderJoe = "traderJoe",
|
|
11
12
|
solarbeam = "solarbeam",
|
|
@@ -25,6 +26,7 @@ export declare const hrAmms: {
|
|
|
25
26
|
swapr: string;
|
|
26
27
|
swapfish: string;
|
|
27
28
|
zyberswap: string;
|
|
29
|
+
solidlizard: string;
|
|
28
30
|
pangolin: string;
|
|
29
31
|
traderJoe: string;
|
|
30
32
|
solarbeam: string;
|
package/lib/config/amms.js
CHANGED
|
@@ -10,6 +10,7 @@ var Amms;
|
|
|
10
10
|
Amms["swapr"] = "swapr";
|
|
11
11
|
Amms["swapfish"] = "swapfish";
|
|
12
12
|
Amms["zyberswap"] = "zyberswap";
|
|
13
|
+
Amms["solidlizard"] = "solidlizard";
|
|
13
14
|
Amms["pangolin"] = "pangolin";
|
|
14
15
|
Amms["traderJoe"] = "traderJoe";
|
|
15
16
|
Amms["solarbeam"] = "solarbeam";
|
|
@@ -29,6 +30,7 @@ exports.hrAmms = {
|
|
|
29
30
|
[Amms.swapr]: 'Swapr',
|
|
30
31
|
[Amms.swapfish]: 'SwapFish',
|
|
31
32
|
[Amms.zyberswap]: 'ZyberSwap',
|
|
33
|
+
[Amms.solidlizard]: 'SolidLizard',
|
|
32
34
|
[Amms.pangolin]: 'Pangolin',
|
|
33
35
|
[Amms.traderJoe]: 'TraderJoe',
|
|
34
36
|
[Amms.solarbeam]: 'Solarbeam',
|
|
@@ -58,6 +60,7 @@ exports.AMM_FACTORY = {
|
|
|
58
60
|
[Amms.swapr]: '0x359F20Ad0F42D75a5077e65F30274cABe6f4F01a',
|
|
59
61
|
[Amms.swapfish]: '0x71539D09D3890195dDa87A6198B98B75211b72F3',
|
|
60
62
|
[Amms.zyberswap]: '0xac2ee06a14c52570ef3b9812ed240bce359772e7',
|
|
63
|
+
[Amms.solidlizard]: '0x734d84631f00dc0d3fcd18b04b6cf42bfd407074',
|
|
61
64
|
},
|
|
62
65
|
[types_1.Networks.Avalanche]: {
|
|
63
66
|
[Amms.pangolin]: '0xefa94DE7a4656D787667C749f7E1223D71E9FD88',
|
|
@@ -107,6 +110,7 @@ exports.AMM_SUBGRAPH_URLS = {
|
|
|
107
110
|
[Amms.sushiswap]: 'https://api.thegraph.com/subgraphs/name/sushiswap/arbitrum-exchange',
|
|
108
111
|
[Amms.swapr]: 'https://api.thegraph.com/subgraphs/name/luzzif/swapr-arbitrum-one-v2',
|
|
109
112
|
[Amms.zyberswap]: 'https://api.thegraph.com/subgraphs/name/zyberswap-arbitrum/zyber-amm',
|
|
113
|
+
[Amms.solidlizard]: 'https://api.thegraph.com/subgraphs/name/solidlizardfinance/sliz',
|
|
110
114
|
//[Amms.swapfish]: 'https://bsc.streamingfast.io/subgraphs/name/pancakeswap/exchange-v2',
|
|
111
115
|
},
|
|
112
116
|
[types_1.Networks.Avalanche]: {
|
|
@@ -149,6 +153,7 @@ exports.ADD_LIQUIDITY_URLS = {
|
|
|
149
153
|
[Amms.swapr]: 'https://swapr.eth.link/#/add/',
|
|
150
154
|
[Amms.swapfish]: 'https://swapfish.fi/add/',
|
|
151
155
|
[Amms.zyberswap]: 'https://app.zyberswap.io/exchange/add/',
|
|
156
|
+
[Amms.solidlizard]: 'https://solidlizard.finance/liquidity/create/',
|
|
152
157
|
},
|
|
153
158
|
[types_1.Networks.Avalanche]: {
|
|
154
159
|
[Amms.pangolin]: 'https://app.pangolin.exchange/#/add/',
|
|
@@ -190,6 +195,7 @@ exports.AMM_LP_FEE = {
|
|
|
190
195
|
[Amms.swapr]: 0.00225,
|
|
191
196
|
[Amms.swapfish]: 0.0017,
|
|
192
197
|
[Amms.zyberswap]: 0.0015,
|
|
198
|
+
[Amms.solidlizard]: 0.002,
|
|
193
199
|
},
|
|
194
200
|
[types_1.Networks.Avalanche]: {
|
|
195
201
|
[Amms.pangolin]: 0.0025,
|
|
@@ -16,6 +16,7 @@ exports.ROUTER = {
|
|
|
16
16
|
[types_1.Networks.Arbitrum]: {
|
|
17
17
|
[types_1.Factory.V2V1_1]: '0x5475aEd9d11BeaA822e122C36ACDfa0dA2eb086f',
|
|
18
18
|
[types_1.Factory.V2V2]: '0xaf82ee9246a608484e8567fadbef64ac1b8a87ab',
|
|
19
|
+
[types_1.Factory.SOLV2]: '0xdD7aC67fA9576b4096e86f251088189C3659Da0d',
|
|
19
20
|
},
|
|
20
21
|
[types_1.Networks.Avalanche]: {
|
|
21
22
|
[types_1.Factory.V2V1_2]: '0x3039C26F9126833bAca8EdBF61c761CD909F461f',
|
package/lib/config/farms.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare enum Farms {
|
|
|
8
8
|
swapr = "swapr",
|
|
9
9
|
swapfish = "swapfish",
|
|
10
10
|
zyberswap = "zyberswap",
|
|
11
|
+
solidlizard = "solidlizard",
|
|
11
12
|
radiant = "",
|
|
12
13
|
plutusDao = "",
|
|
13
14
|
pangolin = "pangolin",
|
|
@@ -34,6 +35,7 @@ export declare const hrFarms: {
|
|
|
34
35
|
swapr: string;
|
|
35
36
|
swapfish: string;
|
|
36
37
|
zyberswap: string;
|
|
38
|
+
solidlizard: string;
|
|
37
39
|
"": string;
|
|
38
40
|
pangolin: string;
|
|
39
41
|
pangolinV2: string;
|
package/lib/config/farms.js
CHANGED
|
@@ -12,6 +12,7 @@ var Farms;
|
|
|
12
12
|
Farms["swapr"] = "swapr";
|
|
13
13
|
Farms["swapfish"] = "swapfish";
|
|
14
14
|
Farms["zyberswap"] = "zyberswap";
|
|
15
|
+
Farms["solidlizard"] = "solidlizard";
|
|
15
16
|
Farms["radiant"] = "";
|
|
16
17
|
Farms["plutusDao"] = "";
|
|
17
18
|
Farms["pangolin"] = "pangolin";
|
|
@@ -38,6 +39,7 @@ exports.hrFarms = {
|
|
|
38
39
|
[Farms.swapr]: 'Swapr',
|
|
39
40
|
[Farms.swapfish]: 'SwapFish',
|
|
40
41
|
[Farms.zyberswap]: 'ZyberSwap',
|
|
42
|
+
[Farms.solidlizard]: 'SolidLizard',
|
|
41
43
|
[Farms.radiant]: 'Radiant',
|
|
42
44
|
[Farms.plutusDao]: 'Plutus DAO',
|
|
43
45
|
[Farms.pangolin]: 'Pangolin',
|
|
@@ -72,6 +74,7 @@ exports.STAKED_LP_FACTORY = {
|
|
|
72
74
|
//[Farms.swapfish]: '0xcDAeC65495Fa5c0545c5a405224214e3594f30d8',
|
|
73
75
|
[Farms.swapfish]: '0x3bE7B59Ab6558845FfA1f026Dff40b305dd47b37',
|
|
74
76
|
[Farms.zyberswap]: '0xBCE93e2D822CfDD70F106e32FCB266457cece45F',
|
|
77
|
+
[Farms.solidlizard]: '0x30d7ef0d94b43BFa4Ff5935DBC608D7fc0116BB7',
|
|
75
78
|
[Farms.radiant]: '0x4aE11dC7D7e70eE16d7eaE32851302e55f6CA85e',
|
|
76
79
|
[Farms.plutusDao]: '0x4dC48B93855F42cCcc54f65615AeF6FFC12EC1DF',
|
|
77
80
|
},
|
package/lib/config/subgraphs.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.IMPERMAX_SUBGRAPH_URL = {
|
|
|
16
16
|
[types_1.Networks.Arbitrum]: {
|
|
17
17
|
[types_1.Factory.V2V1_1]: 'https://api.thegraph.com/subgraphs/name/impermax-finance/impermax-x-uniswap-v2-arbitrum',
|
|
18
18
|
[types_1.Factory.V2V2]: 'https://api.thegraph.com/subgraphs/name/impermax-finance/impermax-arbitrum-v2',
|
|
19
|
+
[types_1.Factory.SOLV2]: 'https://api.thegraph.com/subgraphs/name/impermax-finance/impermax-arbitrum-solv2',
|
|
19
20
|
//[F.V2V1_1]: 'https://api.impermax.finance/subgraphs/name/impermax-finance/impermax-x-uniswap-v2-arbitrum02'
|
|
20
21
|
},
|
|
21
22
|
[types_1.Networks.Avalanche]: {
|
|
@@ -16,6 +16,7 @@ const coingecko_ids = {
|
|
|
16
16
|
// Arbitrum
|
|
17
17
|
"0xb348b87b23d5977e2948e6f36ca07e1ec94d7328": "swapfish",
|
|
18
18
|
"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f": "wrapped-bitcoin",
|
|
19
|
+
"0x463913D3a3D3D291667D53B8325c598Eb88D3B0e": "solidlizard",
|
|
19
20
|
};
|
|
20
21
|
class PriceHelper {
|
|
21
22
|
constructor(subgraph) {
|
package/lib/subgraph/index.d.ts
CHANGED
|
@@ -59,7 +59,10 @@ export default class Subgraph {
|
|
|
59
59
|
/**
|
|
60
60
|
* DATA GETTERS
|
|
61
61
|
*/
|
|
62
|
-
getPairList(): Promise<
|
|
62
|
+
getPairList(): Promise<{
|
|
63
|
+
pairAddress: string;
|
|
64
|
+
factory: Factory;
|
|
65
|
+
}[]>;
|
|
63
66
|
private getPairData;
|
|
64
67
|
getPairListWithData(pairList: {
|
|
65
68
|
pairAddress: string;
|
|
@@ -287,6 +287,7 @@ function initializeLendingPoolsData() {
|
|
|
287
287
|
const ETH_gGOHM = '0x6d94f7e67c6ae0b0257c35754e059fdfb249d998';
|
|
288
288
|
const ETH_MAGIC = '0x88a0b00bbe918ee00e3482f71962070dc052984b';
|
|
289
289
|
const ETH_RDNT = '0xfb468ad210d427d65c9a765a480649d5754ca325';
|
|
290
|
+
const LIZ_ETH_USDC = '0x1229aAC120Ae75301aB1c3A2A04ec14183493584';
|
|
290
291
|
if (lendingPoolsData[types_1.Factory.V2V1_1][ETH_gGOHM]) {
|
|
291
292
|
//lendingPoolsData[Factory.V2V1_1][ETH_SPELL].pair.rewards[0].rewardRate = '8.44';
|
|
292
293
|
//lendingPoolsData[Factory.V2V1_1][ETH_MIM].pair.rewards[0].rewardRate = '30.64';
|
|
@@ -296,6 +297,15 @@ function initializeLendingPoolsData() {
|
|
|
296
297
|
if (lendingPoolsData[types_1.Factory.V2V2][ETH_RDNT]) {
|
|
297
298
|
lendingPoolsData[types_1.Factory.V2V2][ETH_RDNT].pair.rewards[0].rewardRate = (parseFloat(lendingPoolsData[types_1.Factory.V2V2][ETH_RDNT].pair.rewards[0].rewardRate) / 2).toString();
|
|
298
299
|
}
|
|
300
|
+
console.log("debug", lendingPoolsData[types_1.Factory.V2V1_1][LIZ_ETH_USDC].pair.rewards);
|
|
301
|
+
/*if (lendingPoolsData[Factory.SOLV2][LIZ_ETH_USDC]) {
|
|
302
|
+
lendingPoolsData[Factory.V2V1_1][LIZ_ETH_USDC].pair.rewards = [{
|
|
303
|
+
id: '',
|
|
304
|
+
rewardsToken: LIZ,
|
|
305
|
+
rewardRate: '0.00608',
|
|
306
|
+
periodFinish: '0',
|
|
307
|
+
}];
|
|
308
|
+
}*/
|
|
299
309
|
}
|
|
300
310
|
if (this.network === types_1.Networks.Polygon) {
|
|
301
311
|
const GNS_DAI = '0xf9221c5edc736d26ffc4ddccddfa15a4b958862e';
|