@hawksightco/hawk-sdk 1.3.126 → 1.3.128
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/dist/src/hsToMeteora.js +13 -9
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -2538,17 +2538,21 @@ class MeteoraDlmmWithdraw2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2538
2538
|
// Adjust by token type
|
|
2539
2539
|
const pdaTokenType = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.pdaTokenType;
|
|
2540
2540
|
if (pdaTokenType === types_1.TokenType.LTA) {
|
|
2541
|
-
this.ix.keys[
|
|
2542
|
-
this.ix.keys[
|
|
2541
|
+
this.ix.keys[3].pubkey = util.generateLimitToken(this.userPda, tokenXMint);
|
|
2542
|
+
this.ix.keys[4].pubkey = util.generateLimitToken(this.userPda, tokenYMint);
|
|
2543
2543
|
}
|
|
2544
2544
|
else if (pdaTokenType === types_1.TokenType.STA) {
|
|
2545
|
-
this.ix.keys[
|
|
2546
|
-
this.ix.keys[
|
|
2545
|
+
this.ix.keys[3].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenXMint);
|
|
2546
|
+
this.ix.keys[4].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenYMint);
|
|
2547
2547
|
}
|
|
2548
2548
|
else {
|
|
2549
|
-
this.ix.keys[
|
|
2550
|
-
this.ix.keys[
|
|
2549
|
+
this.ix.keys[3].pubkey = util.generateAta(this.userPda, tokenXMint, tokenXMintInfo.info.owner);
|
|
2550
|
+
this.ix.keys[4].pubkey = util.generateAta(this.userPda, tokenYMint, tokenYMintInfo.info.owner);
|
|
2551
2551
|
}
|
|
2552
|
+
const position = this.ix.keys[0].pubkey;
|
|
2553
|
+
const lbPair = this.ix.keys[1].pubkey;
|
|
2554
|
+
console.log(`withdraw position:`, position.toString());
|
|
2555
|
+
console.log(`withdraw lbPair:`, lbPair.toString());
|
|
2552
2556
|
// Generate IX via extension contract
|
|
2553
2557
|
// @ts-ignore
|
|
2554
2558
|
const withdrawIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
@@ -2556,9 +2560,9 @@ class MeteoraDlmmWithdraw2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2556
2560
|
.accounts({
|
|
2557
2561
|
userPda,
|
|
2558
2562
|
hawksightAuthority,
|
|
2559
|
-
position
|
|
2560
|
-
lbPair
|
|
2561
|
-
binArrayBitmapExtension:
|
|
2563
|
+
position,
|
|
2564
|
+
lbPair,
|
|
2565
|
+
binArrayBitmapExtension: this.ix.keys[2].pubkey,
|
|
2562
2566
|
userTokenX: this.ix.keys[3].pubkey,
|
|
2563
2567
|
userTokenY: this.ix.keys[4].pubkey,
|
|
2564
2568
|
reserveX: this.ix.keys[5].pubkey,
|