impermax-sdk 2.1.429 → 2.1.431
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/offchain/lendingPool/nftlp/offchainNftlp.d.ts +2 -1
- package/lib/offchain/lendingPool/nftlp/offchainNftlp.js +4 -0
- package/lib/offchain/offchainTypes.d.ts +6 -0
- package/lib/offchain/queries/apis/ponder/index.js +3 -0
- package/lib/offchain/queries/apis/thegraph/index.js +28 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import OffchainCollateralV3 from "../offchainCollateralV3";
|
|
2
2
|
import OffchainAccountCollateralV3 from "../../account/lendingPool/offchainAccountCollateralV3";
|
|
3
3
|
import OffchainAccountNftlp from "../../account/lendingPool/nftlp/offchainAccountNftlp";
|
|
4
|
-
import { Extension } from "../../../config/types";
|
|
4
|
+
import { Extension, Address } from "../../../config/types";
|
|
5
5
|
import { NftlpData } from "../../offchainTypes";
|
|
6
6
|
export default abstract class OffchainNftlp {
|
|
7
7
|
protected readonly collateral: OffchainCollateralV3;
|
|
@@ -21,4 +21,5 @@ export default abstract class OffchainNftlp {
|
|
|
21
21
|
getMarketPrice(): Promise<number>;
|
|
22
22
|
getOraclePrice(): Promise<number>;
|
|
23
23
|
cleanCache(): void;
|
|
24
|
+
getOracleAddress(): Promise<Address>;
|
|
24
25
|
}
|
|
@@ -133,6 +133,10 @@ export interface V2UserData {
|
|
|
133
133
|
[key in PoolTokenType]?: BorrowPosition;
|
|
134
134
|
}>;
|
|
135
135
|
}
|
|
136
|
+
export interface NftlpFactory {
|
|
137
|
+
allNftlpsLength: string;
|
|
138
|
+
oracle: Address;
|
|
139
|
+
}
|
|
136
140
|
export interface UniswapV3PoolData {
|
|
137
141
|
liquidity: string;
|
|
138
142
|
fee: string;
|
|
@@ -144,11 +148,13 @@ export interface NftlpUniswapV3Data {
|
|
|
144
148
|
dex: Extension;
|
|
145
149
|
id: Address;
|
|
146
150
|
dexFactory: Address;
|
|
151
|
+
factory: NftlpFactory;
|
|
147
152
|
uniswapV3Pools: UniswapV3PoolData[];
|
|
148
153
|
}
|
|
149
154
|
export interface NftlpUniswapV2Data {
|
|
150
155
|
dex: Extension;
|
|
151
156
|
id: Address;
|
|
157
|
+
factory: NftlpFactory;
|
|
152
158
|
dexFactory: Address;
|
|
153
159
|
}
|
|
154
160
|
export type NftlpData = NftlpUniswapV3Data | NftlpUniswapV2Data;
|
|
@@ -299,6 +299,9 @@ class TheGraphQueryBuilder {
|
|
|
299
299
|
nftlps(first: 1000) {
|
|
300
300
|
id
|
|
301
301
|
dexFactory
|
|
302
|
+
factory {
|
|
303
|
+
oracle
|
|
304
|
+
}
|
|
302
305
|
uniswapV3Pools {
|
|
303
306
|
liquidity
|
|
304
307
|
fee
|
|
@@ -558,7 +561,31 @@ class TheGraphQueryBuilder {
|
|
|
558
561
|
}`;
|
|
559
562
|
}
|
|
560
563
|
borrowersListQueryV3() {
|
|
561
|
-
return (0, graphql_tag_1.default) `{
|
|
564
|
+
return (0, graphql_tag_1.default) `{
|
|
565
|
+
positions(first: 1000) {
|
|
566
|
+
id
|
|
567
|
+
tokenId
|
|
568
|
+
user {
|
|
569
|
+
id
|
|
570
|
+
}
|
|
571
|
+
lendingPool {
|
|
572
|
+
id
|
|
573
|
+
nftlp {
|
|
574
|
+
factory
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
borrowPositions {
|
|
578
|
+
id
|
|
579
|
+
borrowBalance
|
|
580
|
+
borrowable {
|
|
581
|
+
underlying {
|
|
582
|
+
id
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
_meta { block { number } }
|
|
588
|
+
}`;
|
|
562
589
|
}
|
|
563
590
|
}
|
|
564
591
|
exports.TheGraphQueryBuilder = TheGraphQueryBuilder;
|