impermax-sdk 2.1.306 → 2.1.308
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.
|
@@ -6,7 +6,7 @@ exports.POOL_TOKEN_ROUTER = {
|
|
|
6
6
|
[types_1.Networks.Ropsten]: '',
|
|
7
7
|
[types_1.Networks.Mainnet]: '',
|
|
8
8
|
[types_1.Networks.Polygon]: '',
|
|
9
|
-
[types_1.Networks.Arbitrum]: '',
|
|
9
|
+
[types_1.Networks.Arbitrum]: '0x544DAC9EB8f2D0bFEB9637180f7A751BE1690cD8',
|
|
10
10
|
[types_1.Networks.Avalanche]: '',
|
|
11
11
|
[types_1.Networks.Moonriver]: '',
|
|
12
12
|
[types_1.Networks.Aurora]: '',
|
|
@@ -26,6 +26,7 @@ exports.POOL_TOKEN_ROUTER = {
|
|
|
26
26
|
[types_1.Networks.Sonic]: '0x35A0e3C5adbddF6D917353f9b468C5cdE80ee380',
|
|
27
27
|
[types_1.Networks.Linea]: '',
|
|
28
28
|
};
|
|
29
|
+
// TODO: currently this router only supports stakedLpToken
|
|
29
30
|
exports.ROUTER = {
|
|
30
31
|
[types_1.Networks.Ropsten]: {
|
|
31
32
|
[types_1.Factory.V2V1]: ''
|
|
@@ -40,8 +41,8 @@ exports.ROUTER = {
|
|
|
40
41
|
[types_1.Factory.SOL_STABLE]: '',
|
|
41
42
|
},
|
|
42
43
|
[types_1.Networks.Arbitrum]: {
|
|
43
|
-
[types_1.Factory.V2V1_1]: '',
|
|
44
|
-
[types_1.Factory.V2V2]: '',
|
|
44
|
+
[types_1.Factory.V2V1_1]: '0x8f4065D7cf393E1E82CC6141DC638431c70970Fb',
|
|
45
|
+
[types_1.Factory.V2V2]: '0xF09D8F374Bab880D7AbDD6EBe34e3e62EB1C2232',
|
|
45
46
|
[types_1.Factory.SOLV2]: '0x29B13902056Ff454d22be99fc4e2BE5931aEdaBB',
|
|
46
47
|
},
|
|
47
48
|
[types_1.Networks.Avalanche]: {
|
|
@@ -7,5 +7,4 @@ import { Address, NetworkVaultTypeIndex, NetworkFactoryIndex, NetworkIndex } fro
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const IMPERMAX_POOLS_API: NetworkFactoryIndex<string>;
|
|
9
9
|
export declare const IMPERMAX_VAULT_API: NetworkVaultTypeIndex<string>;
|
|
10
|
-
export declare const NFTLP_FEE_API: NetworkFactoryIndex<Address>;
|
|
11
10
|
export declare const NFTLP_UNIV3_API: NetworkIndex<Address | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NFTLP_UNIV3_API = exports.
|
|
3
|
+
exports.NFTLP_UNIV3_API = exports.IMPERMAX_VAULT_API = exports.IMPERMAX_POOLS_API = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
/**
|
|
6
6
|
* Private API Endpoints which we might need to use in future for non-core
|
|
@@ -68,36 +68,6 @@ exports.IMPERMAX_VAULT_API = {
|
|
|
68
68
|
},
|
|
69
69
|
[types_1.Networks.Linea]: {},
|
|
70
70
|
};
|
|
71
|
-
// :lendingPoolId/:tokenId
|
|
72
|
-
// TODO: Deprecated this and use NFTLP_UNIV3_API?
|
|
73
|
-
exports.NFTLP_FEE_API = {
|
|
74
|
-
[types_1.Networks.Ropsten]: {},
|
|
75
|
-
[types_1.Networks.Mainnet]: {},
|
|
76
|
-
[types_1.Networks.Polygon]: {},
|
|
77
|
-
[types_1.Networks.Arbitrum]: {
|
|
78
|
-
[types_1.Factory.V3]: "https://arbitrum-nftlp-uniswapv3.up.railway.app/42161/"
|
|
79
|
-
},
|
|
80
|
-
[types_1.Networks.Avalanche]: {},
|
|
81
|
-
[types_1.Networks.Moonriver]: {},
|
|
82
|
-
[types_1.Networks.Aurora]: {},
|
|
83
|
-
[types_1.Networks.Cronos]: {},
|
|
84
|
-
[types_1.Networks.Fantom]: {},
|
|
85
|
-
[types_1.Networks.Harmony]: {},
|
|
86
|
-
[types_1.Networks.Moonbeam]: {},
|
|
87
|
-
[types_1.Networks.Sxnetwork]: {},
|
|
88
|
-
[types_1.Networks.Canto]: {},
|
|
89
|
-
[types_1.Networks.ZksyncEra]: {},
|
|
90
|
-
[types_1.Networks.Base]: {
|
|
91
|
-
[types_1.Factory.V3]: "https://base-nftlp-uniswapv3.up.railway.app/8453/"
|
|
92
|
-
},
|
|
93
|
-
[types_1.Networks.Mantle]: {},
|
|
94
|
-
[types_1.Networks.Scroll]: {},
|
|
95
|
-
[types_1.Networks.Optimism]: {},
|
|
96
|
-
[types_1.Networks.Real]: {},
|
|
97
|
-
[types_1.Networks.Blast]: {},
|
|
98
|
-
[types_1.Networks.Sonic]: {},
|
|
99
|
-
[types_1.Networks.Linea]: {},
|
|
100
|
-
};
|
|
101
71
|
exports.NFTLP_UNIV3_API = {
|
|
102
72
|
[types_1.Networks.Ropsten]: null,
|
|
103
73
|
[types_1.Networks.Mainnet]: null,
|
|
@@ -77,7 +77,7 @@ class OffchainAccountNftlpUniswapV3 extends offchainAccountNftlp_1.default {
|
|
|
77
77
|
this.cache.newlyEarnedFees = {};
|
|
78
78
|
if (tokenId in this.cache.newlyEarnedFees)
|
|
79
79
|
return this.cache.newlyEarnedFees[tokenId];
|
|
80
|
-
const
|
|
80
|
+
const network = this.getLendingPool().getLendingPool().getOffchain().network;
|
|
81
81
|
const lendingPoolId = this.getLendingPool().getLendingPool().getPairAddress();
|
|
82
82
|
const api = private_api_1.NFTLP_UNIV3_API[network];
|
|
83
83
|
if (!api) {
|
|
@@ -85,7 +85,7 @@ class OffchainAccountNftlpUniswapV3 extends offchainAccountNftlp_1.default {
|
|
|
85
85
|
return { amountX: 0, amountY: 0 };
|
|
86
86
|
}
|
|
87
87
|
try {
|
|
88
|
-
const positionFees = await fetch(api.concat(
|
|
88
|
+
const positionFees = await fetch(api.concat(`fees/${lendingPoolId}/${tokenId}`)).then(i => i.json());
|
|
89
89
|
this.cache.newlyEarnedFees[tokenId] = { amountX: Number(positionFees.newlyEarnedFees0), amountY: Number(positionFees.newlyEarnedFees1) };
|
|
90
90
|
return this.cache.newlyEarnedFees[tokenId];
|
|
91
91
|
}
|