impermax-sdk 1.1.1 → 1.1.3
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/routers.js +3 -0
- package/lib/config/contracts/weths.js +2 -1
- package/lib/config/eth.js +2 -0
- package/lib/config/farms.d.ts +2 -0
- package/lib/config/farms.js +5 -0
- package/lib/config/subgraphs.js +3 -0
- package/lib/config/types.d.ts +2 -1
- package/lib/config/types.js +1 -0
- package/lib/subgraph/PriceHelper.js +3 -0
- package/package.json +1 -1
package/lib/config/amms.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ export declare enum Amms {
|
|
|
22
22
|
solidlyUSDCB = "solidlyUSDCB",
|
|
23
23
|
solidly091 = "solidly091",
|
|
24
24
|
solidlyOxd = "solidlyOxd",
|
|
25
|
-
velocimeter = "velocimeter"
|
|
25
|
+
velocimeter = "velocimeter",
|
|
26
|
+
velocore = "velocore"
|
|
26
27
|
}
|
|
27
28
|
export declare const hrAmms: {
|
|
28
29
|
uniswap: string;
|
|
@@ -48,6 +49,7 @@ export declare const hrAmms: {
|
|
|
48
49
|
solidly091: string;
|
|
49
50
|
solidlyOxd: string;
|
|
50
51
|
velocimeter: string;
|
|
52
|
+
velocore: string;
|
|
51
53
|
};
|
|
52
54
|
export declare const AMM_FACTORY: AmmIndex;
|
|
53
55
|
export declare function getAmmByFactory(network: Networks, address: Address): Amms;
|
package/lib/config/amms.js
CHANGED
|
@@ -27,6 +27,7 @@ var Amms;
|
|
|
27
27
|
Amms["solidly091"] = "solidly091";
|
|
28
28
|
Amms["solidlyOxd"] = "solidlyOxd";
|
|
29
29
|
Amms["velocimeter"] = "velocimeter";
|
|
30
|
+
Amms["velocore"] = "velocore";
|
|
30
31
|
})(Amms = exports.Amms || (exports.Amms = {}));
|
|
31
32
|
exports.hrAmms = {
|
|
32
33
|
[Amms.uniswap]: 'Uniswap',
|
|
@@ -52,6 +53,7 @@ exports.hrAmms = {
|
|
|
52
53
|
[Amms.solidly091]: 'Solidly',
|
|
53
54
|
[Amms.solidlyOxd]: 'Solidly',
|
|
54
55
|
[Amms.velocimeter]: 'Velocimeter',
|
|
56
|
+
[Amms.velocore]: 'Velocore',
|
|
55
57
|
};
|
|
56
58
|
exports.AMM_FACTORY = {
|
|
57
59
|
[types_1.Networks.Ropsten]: {
|
|
@@ -98,6 +100,9 @@ exports.AMM_FACTORY = {
|
|
|
98
100
|
[types_1.Networks.Canto]: {
|
|
99
101
|
[Amms.velocimeter]: '0x1c813cdd6daece2cb83c52f0798504e42816e9c5', //NOTICE: this is actually the staked LP factory
|
|
100
102
|
},
|
|
103
|
+
[types_1.Networks.ZksyncEra]: {
|
|
104
|
+
[Amms.velocore]: '0x36BbDb0DEA4Aa211Dd76dF0a3201c89FD530851b', //NOTICE: this is actually the staked LP factory
|
|
105
|
+
},
|
|
101
106
|
[types_1.Networks.Harmony]: {},
|
|
102
107
|
[types_1.Networks.Moonbeam]: {},
|
|
103
108
|
[types_1.Networks.Sxnetwork]: {},
|
|
@@ -154,6 +159,7 @@ exports.AMM_SUBGRAPH_URLS = {
|
|
|
154
159
|
[Amms.solidlyOxd]: 'https://api.thegraph.com/subgraphs/name/spartacus-finance/solidly',
|
|
155
160
|
},
|
|
156
161
|
[types_1.Networks.Canto]: {},
|
|
162
|
+
[types_1.Networks.ZksyncEra]: {},
|
|
157
163
|
[types_1.Networks.Harmony]: {},
|
|
158
164
|
[types_1.Networks.Moonbeam]: {},
|
|
159
165
|
[types_1.Networks.Sxnetwork]: {},
|
|
@@ -203,6 +209,9 @@ exports.ADD_LIQUIDITY_URLS = {
|
|
|
203
209
|
[types_1.Networks.Canto]: {
|
|
204
210
|
[Amms.velocimeter]: 'https://www.velocimeter.xyz/liquidity/',
|
|
205
211
|
},
|
|
212
|
+
[types_1.Networks.ZksyncEra]: {
|
|
213
|
+
[Amms.velocore]: 'https://app.velocore.xyz/liquidity/',
|
|
214
|
+
},
|
|
206
215
|
[types_1.Networks.Harmony]: {},
|
|
207
216
|
[types_1.Networks.Moonbeam]: {},
|
|
208
217
|
[types_1.Networks.Sxnetwork]: {},
|
|
@@ -252,6 +261,9 @@ exports.AMM_LP_FEE = {
|
|
|
252
261
|
[types_1.Networks.Canto]: {
|
|
253
262
|
[Amms.velocimeter]: 0,
|
|
254
263
|
},
|
|
264
|
+
[types_1.Networks.ZksyncEra]: {
|
|
265
|
+
[Amms.velocore]: 0,
|
|
266
|
+
},
|
|
255
267
|
[types_1.Networks.Harmony]: {},
|
|
256
268
|
[types_1.Networks.Moonbeam]: {},
|
|
257
269
|
[types_1.Networks.Sxnetwork]: {},
|
|
@@ -38,6 +38,9 @@ exports.ROUTER = {
|
|
|
38
38
|
[types_1.Networks.Canto]: {
|
|
39
39
|
[types_1.Factory.SOLV2]: '0xf6f32Ddb73d103895228Aa603c252690fC95727d',
|
|
40
40
|
},
|
|
41
|
+
[types_1.Networks.ZksyncEra]: {
|
|
42
|
+
[types_1.Factory.SOLV2]: '0x0463cdFc586c36CCD0E2510acECE24bdac354324',
|
|
43
|
+
},
|
|
41
44
|
[types_1.Networks.Harmony]: {},
|
|
42
45
|
[types_1.Networks.Moonbeam]: {},
|
|
43
46
|
[types_1.Networks.Sxnetwork]: {},
|
|
@@ -16,5 +16,6 @@ exports.WETH = {
|
|
|
16
16
|
[types_1.Networks.Harmony]: '0xcf664087a5bb0237a0bad6742852ec6c8d69a27a',
|
|
17
17
|
[types_1.Networks.Moonbeam]: '0xacc15dc74880c9944775448304b263d191c6077f',
|
|
18
18
|
[types_1.Networks.Sxnetwork]: '0xacc15dc74880c9944775448304b263d191c6077f',
|
|
19
|
-
[types_1.Networks.Canto]: '0x826551890Dc65655a0Aceca109aB11AbDbD7a07B',
|
|
19
|
+
[types_1.Networks.Canto]: '0x826551890Dc65655a0Aceca109aB11AbDbD7a07B',
|
|
20
|
+
[types_1.Networks.ZksyncEra]: '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91',
|
|
20
21
|
};
|
package/lib/config/eth.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.ETH_NAME = {
|
|
|
16
16
|
[types_1.Networks.Moonbeam]: 'Moonbeam',
|
|
17
17
|
[types_1.Networks.Sxnetwork]: 'SX Network',
|
|
18
18
|
[types_1.Networks.Canto]: 'CANTO',
|
|
19
|
+
[types_1.Networks.ZksyncEra]: 'Ethereum',
|
|
19
20
|
};
|
|
20
21
|
exports.ETH_SYMBOL = {
|
|
21
22
|
[types_1.Networks.Ropsten]: 'ETH',
|
|
@@ -31,4 +32,5 @@ exports.ETH_SYMBOL = {
|
|
|
31
32
|
[types_1.Networks.Moonbeam]: 'GLMR',
|
|
32
33
|
[types_1.Networks.Sxnetwork]: 'SX',
|
|
33
34
|
[types_1.Networks.Canto]: 'CANTO',
|
|
35
|
+
[types_1.Networks.ZksyncEra]: 'ETH',
|
|
34
36
|
};
|
package/lib/config/farms.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare enum Farms {
|
|
|
13
13
|
solidlizard = "solidlizard",
|
|
14
14
|
ramses = "ramses",
|
|
15
15
|
velocimeter = "velocimeter",
|
|
16
|
+
velocore = "velocore",
|
|
16
17
|
radiant = "",
|
|
17
18
|
plutusDao = "",
|
|
18
19
|
pangolin = "pangolin",
|
|
@@ -45,6 +46,7 @@ export declare const hrFarms: {
|
|
|
45
46
|
solidlizard: string;
|
|
46
47
|
ramses: string;
|
|
47
48
|
velocimeter: string;
|
|
49
|
+
velocore: string;
|
|
48
50
|
"": string;
|
|
49
51
|
pangolin: string;
|
|
50
52
|
pangolinV2: string;
|
package/lib/config/farms.js
CHANGED
|
@@ -17,6 +17,7 @@ var Farms;
|
|
|
17
17
|
Farms["solidlizard"] = "solidlizard";
|
|
18
18
|
Farms["ramses"] = "ramses";
|
|
19
19
|
Farms["velocimeter"] = "velocimeter";
|
|
20
|
+
Farms["velocore"] = "velocore";
|
|
20
21
|
Farms["radiant"] = "";
|
|
21
22
|
Farms["plutusDao"] = "";
|
|
22
23
|
Farms["pangolin"] = "pangolin";
|
|
@@ -49,6 +50,7 @@ exports.hrFarms = {
|
|
|
49
50
|
[Farms.solidlizard]: 'SolidLizard',
|
|
50
51
|
[Farms.ramses]: 'Ramses',
|
|
51
52
|
[Farms.velocimeter]: 'Velocimeter',
|
|
53
|
+
[Farms.velocore]: 'Velocore',
|
|
52
54
|
[Farms.radiant]: 'Radiant',
|
|
53
55
|
[Farms.plutusDao]: 'Plutus DAO',
|
|
54
56
|
[Farms.pangolin]: 'Pangolin',
|
|
@@ -117,6 +119,9 @@ exports.STAKED_LP_FACTORY = {
|
|
|
117
119
|
[types_1.Networks.Canto]: {
|
|
118
120
|
[Farms.velocimeter]: '0x1c813cDd6dAecE2CB83C52F0798504e42816E9C5',
|
|
119
121
|
},
|
|
122
|
+
[types_1.Networks.ZksyncEra]: {
|
|
123
|
+
[Farms.velocore]: '0x36BbDb0DEA4Aa211Dd76dF0a3201c89FD530851b',
|
|
124
|
+
},
|
|
120
125
|
[types_1.Networks.Harmony]: {},
|
|
121
126
|
[types_1.Networks.Moonbeam]: {},
|
|
122
127
|
[types_1.Networks.Sxnetwork]: {},
|
package/lib/config/subgraphs.js
CHANGED
|
@@ -39,6 +39,9 @@ exports.IMPERMAX_SUBGRAPH_URL = {
|
|
|
39
39
|
[types_1.Networks.Canto]: {
|
|
40
40
|
[types_1.Factory.SOLV2]: 'https://api.impermax.finance/subgraphs/name/impermax-finance/impermax-canto-solv2',
|
|
41
41
|
},
|
|
42
|
+
[types_1.Networks.ZksyncEra]: {
|
|
43
|
+
[types_1.Factory.SOLV2]: 'https://api.studio.thegraph.com/query/45012/impermax-zksync-era-solv2/v1.0.0',
|
|
44
|
+
},
|
|
42
45
|
[types_1.Networks.Harmony]: {},
|
|
43
46
|
[types_1.Networks.Moonbeam]: {},
|
|
44
47
|
[types_1.Networks.Sxnetwork]: {},
|
package/lib/config/types.d.ts
CHANGED
package/lib/config/types.js
CHANGED
|
@@ -126,6 +126,9 @@ class PriceHelper {
|
|
|
126
126
|
if (tokenAddress.toLowerCase() === '0x3f56e0c36d275367b8c502090edf38289b3dea0d') { // TEMPORARY fix for MAI
|
|
127
127
|
return 1;
|
|
128
128
|
}
|
|
129
|
+
if (tokenAddress.toLowerCase() === '0xc71aaf8e486e3f33841bb56ca3fd2ac3fa8d29a8') { // TEMPORARY fix for WSTETH Canto
|
|
130
|
+
return (yield this.getDebankTokenPrice('0x5fd55a1b9fc24967c4db09c513c3ba0dfa7ff687')) * 1.12;
|
|
131
|
+
}
|
|
129
132
|
if ([
|
|
130
133
|
"0x9c67ee39e3c4954396b9142010653f17257dd39c",
|
|
131
134
|
"0x7b35ce522cb72e4077baeb96cb923a5529764a00",
|