impermax-sdk 1.2.19 → 1.2.21
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.
|
@@ -5,7 +5,7 @@ const types_1 = require("../types");
|
|
|
5
5
|
exports.LENDING_VAULT_WATCHER = {
|
|
6
6
|
[types_1.Networks.Ropsten]: '',
|
|
7
7
|
[types_1.Networks.Mainnet]: '',
|
|
8
|
-
[types_1.Networks.Polygon]: '',
|
|
8
|
+
[types_1.Networks.Polygon]: '0xd129cc3a352289ec73ab4a64d630121aad5b9e31',
|
|
9
9
|
[types_1.Networks.Arbitrum]: '0x0C6BE493CEFbFc135249156762d9977803B67B42',
|
|
10
10
|
[types_1.Networks.Avalanche]: '',
|
|
11
11
|
[types_1.Networks.Moonriver]: '',
|
package/lib/config/subgraphs.js
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WHITELIST_SUBGRAPH_URL = exports.CONFIG_MANAGER_SUBGRAPH_URL = exports.XIMX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = exports.LENDING_VAULT_SUBGRAPH_URL = exports.IMPERMAX_CHEF_SUBGRAPH_URL = exports.IMPERMAX_SUBGRAPH_URL = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
|
+
/*
|
|
6
|
+
* Unsupported networks by latest SDK update (old subgraph version)
|
|
7
|
+
* - Ethereum
|
|
8
|
+
* - Arbitrum
|
|
9
|
+
* - Avalanche
|
|
10
|
+
* - Moonriver
|
|
11
|
+
* - Aurora
|
|
12
|
+
* - Fantom
|
|
13
|
+
* - Canto
|
|
14
|
+
* - ZkSync
|
|
15
|
+
*/
|
|
5
16
|
exports.IMPERMAX_SUBGRAPH_URL = {
|
|
6
17
|
[types_1.Networks.Ropsten]: {
|
|
7
18
|
[types_1.Factory.V2V1]: 'https://api.thegraph.com/subgraphs/name/impermax-finance/impermax-x-uniswap-v2-ropsten'
|
|
@@ -57,12 +57,7 @@ class OffchainBorrowable extends offchainPoolToken_1.default {
|
|
|
57
57
|
// Borrow tracker
|
|
58
58
|
getBorrowTracker() {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
|
|
61
|
-
const poolTokenData = yield this.getPoolTokenData();
|
|
62
|
-
const farmingPoolData = poolTokenData.farmingPool;
|
|
63
|
-
if (farmingPoolData === null)
|
|
64
|
-
return "0x0000000000000000000000000000000000000000";
|
|
65
|
-
return farmingPoolData.id;
|
|
60
|
+
return this.getPoolTokenParam("borrowTracker");
|
|
66
61
|
});
|
|
67
62
|
}
|
|
68
63
|
// Borrow Index
|
package/lib/offchain/offchain.js
CHANGED
package/lib/offchain/query.js
CHANGED
|
@@ -47,12 +47,14 @@ function lendingPoolsQuery(factory, addressesFilter) {
|
|
|
47
47
|
reserveFactor
|
|
48
48
|
kinkBorrowRate
|
|
49
49
|
kinkUtilizationRate
|
|
50
|
+
adjustSpeed
|
|
50
51
|
borrowIndex
|
|
51
52
|
accrualTimestamp
|
|
52
53
|
exchangeRate
|
|
53
54
|
totalBalanceUSD
|
|
54
55
|
totalSupplyUSD
|
|
55
56
|
totalBorrowsUSD
|
|
57
|
+
borrowTracker
|
|
56
58
|
farmingPool ${farmingPoolStr}
|
|
57
59
|
}`;
|
|
58
60
|
const collateralStr = `{
|
|
@@ -273,7 +275,7 @@ exports.lendingVaultsUserQuery = lendingVaultsUserQuery;
|
|
|
273
275
|
function proposalsMetaQuery(rangeBegin, rangeLength, descending) {
|
|
274
276
|
return (0, graphql_tag_1.default) `{
|
|
275
277
|
proposals(
|
|
276
|
-
orderBy:
|
|
278
|
+
orderBy: idInt,
|
|
277
279
|
orderDirection: ${descending ? "desc" : "asc"},
|
|
278
280
|
first: ${rangeLength},
|
|
279
281
|
skip: ${rangeBegin}
|