impermax-sdk 2.1.477 → 2.1.478
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/offchainNftlpAeroCL.js +0 -3
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpAeroCL.d.ts +1 -0
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpAeroCL.js +4 -0
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpGenericCL.d.ts +1 -1
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpGenericCL.js +0 -8
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.d.ts +1 -0
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.js +4 -0
- package/package.json +1 -1
|
@@ -57,9 +57,6 @@ class OffchainNftlpAeroCL extends offchainNftlpGenericCL_1.default {
|
|
|
57
57
|
if (delta < 0)
|
|
58
58
|
delta += Q256;
|
|
59
59
|
rewardRatePerUnitOfLiquidity = Number(delta) / Q128 / deltaTime / 1e18;
|
|
60
|
-
console.log(mostRecentTimestamp, leastRecentTimestamp, deltaTime);
|
|
61
|
-
console.log(currentRewardGrowthGlobalX128, pastRewardGrowthGlobalX128, delta);
|
|
62
|
-
console.log(rewardRatePerUnitOfLiquidity);
|
|
63
60
|
}
|
|
64
61
|
const priceA = await this.getLendingPool().getBorrowableA().getTokenPriceAccurate();
|
|
65
62
|
const priceB = await this.getLendingPool().getBorrowableB().getTokenPriceAccurate();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OnchainInteractionsNftlpGenericCL from "./onchainInteractionsNftlpGenericCL";
|
|
2
2
|
export default class OnchainInteractionsNftlpAeroCL extends OnchainInteractionsNftlpGenericCL {
|
|
3
3
|
protected getMintEmptyAction(tickSpacing: number, tickLower: string, tickUpper: string): Promise<any>;
|
|
4
|
+
claim(tokenId: number, onTransactionHash: Function): Promise<any>;
|
|
4
5
|
}
|
|
@@ -9,5 +9,9 @@ class OnchainInteractionsNftlpAeroCL extends onchainInteractionsNftlpGenericCL_1
|
|
|
9
9
|
const actionsGetter = this.getActionsGetter();
|
|
10
10
|
return await actionsGetter.methods.getMintAeroEmptyAction(tickSpacing.toString(), tickLower, tickUpper).call();
|
|
11
11
|
}
|
|
12
|
+
async claim(tokenId, onTransactionHash) {
|
|
13
|
+
const nftlp = this.getNftlp().getNftlp();
|
|
14
|
+
return this.getLendingPool().send(nftlp.methods.claim(this.getAccountAddress(), tokenId), onTransactionHash);
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
exports.default = OnchainInteractionsNftlpAeroCL;
|
|
@@ -30,5 +30,5 @@ export default abstract class OnchainInteractionsNftlpGenericCL extends OnchainI
|
|
|
30
30
|
}>;
|
|
31
31
|
private _getUpdatePositionActions;
|
|
32
32
|
execute(tokenId: number, actions: Array<any>, permits: Permits, withCollateralTransfer: boolean, ethValue: BigNumber, onTransactionHash: Function): Promise<any>;
|
|
33
|
-
claim(tokenId: number, onTransactionHash: Function):
|
|
33
|
+
abstract claim(tokenId: number, onTransactionHash: Function): any;
|
|
34
34
|
}
|
|
@@ -222,13 +222,5 @@ class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.defau
|
|
|
222
222
|
const router = this.getRouter();
|
|
223
223
|
return this.getLendingPool().send(router.methods.execute(await this.getNftlp().getNftlpAddress(), tokenId == -1 ? general_1.MAX_UINT : tokenId.toString(), this.encodeActions(actions), this.encodePermits(permits), withCollateralTransfer), onTransactionHash, ethValue);
|
|
224
224
|
}
|
|
225
|
-
async claim(tokenId, onTransactionHash) {
|
|
226
|
-
const nftlp = this.getNftlp().getNftlp();
|
|
227
|
-
console.log("contract");
|
|
228
|
-
console.log(nftlp);
|
|
229
|
-
console.log(nftlp.methods);
|
|
230
|
-
console.log(tokenId, this.getAccountAddress());
|
|
231
|
-
return this.getLendingPool().send(nftlp.methods.claim(this.getAccountAddress(), tokenId), onTransactionHash);
|
|
232
|
-
}
|
|
233
225
|
}
|
|
234
226
|
exports.default = OnchainInteractionsNftlpGenericCL;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OnchainInteractionsNftlpGenericCL from "./onchainInteractionsNftlpGenericCL";
|
|
2
2
|
export default class OnchainInteractionsNftlpUniswapV3 extends OnchainInteractionsNftlpGenericCL {
|
|
3
3
|
protected getMintEmptyAction(tickSpacing: number, tickLower: string, tickUpper: string): Promise<any>;
|
|
4
|
+
claim(tokenId: number, onTransactionHash: Function): Promise<any>;
|
|
4
5
|
}
|
|
@@ -10,5 +10,9 @@ class OnchainInteractionsNftlpUniswapV3 extends onchainInteractionsNftlpGenericC
|
|
|
10
10
|
const actionsGetter = this.getActionsGetter();
|
|
11
11
|
return await actionsGetter.methods.getMintUniV3EmptyAction((0, uniswapV3General_1.uniV3TickSpacingToFee)(tickSpacing).toString(), tickLower, tickUpper).call();
|
|
12
12
|
}
|
|
13
|
+
async claim(tokenId, onTransactionHash) {
|
|
14
|
+
const nftlp = this.getNftlp().getNftlp();
|
|
15
|
+
return this.getLendingPool().send(nftlp.methods.claim(this.getAccountAddress(), tokenId), onTransactionHash);
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
exports.default = OnchainInteractionsNftlpUniswapV3;
|