@hawksightco/hawk-sdk 1.3.125 → 1.3.127
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 +9 -7
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -2290,6 +2290,7 @@ class MeteoraDlmmClaimReward2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2290
2290
|
})
|
|
2291
2291
|
.remainingAccounts(this.ix.keys.slice(10))
|
|
2292
2292
|
.instruction();
|
|
2293
|
+
console.log(`claimReward:`, JSON.stringify(claimReward, null, 2));
|
|
2293
2294
|
const sighash = util.sighash("meteora_dlmm_claim_reward_2_automation");
|
|
2294
2295
|
claimReward.data.set(sighash, 0);
|
|
2295
2296
|
// Instruction via main hawksight contract
|
|
@@ -2303,6 +2304,7 @@ class MeteoraDlmmClaimReward2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2303
2304
|
})
|
|
2304
2305
|
.remainingAccounts(claimReward.keys.slice(2))
|
|
2305
2306
|
.instruction();
|
|
2307
|
+
console.log(`claimRewardIx:`, JSON.stringify(ix, null, 2));
|
|
2306
2308
|
// Override the instruction
|
|
2307
2309
|
this._ix = ix;
|
|
2308
2310
|
});
|
|
@@ -2536,16 +2538,16 @@ class MeteoraDlmmWithdraw2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2536
2538
|
// Adjust by token type
|
|
2537
2539
|
const pdaTokenType = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.pdaTokenType;
|
|
2538
2540
|
if (pdaTokenType === types_1.TokenType.LTA) {
|
|
2539
|
-
this.ix.keys[
|
|
2540
|
-
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);
|
|
2541
2543
|
}
|
|
2542
2544
|
else if (pdaTokenType === types_1.TokenType.STA) {
|
|
2543
|
-
this.ix.keys[
|
|
2544
|
-
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);
|
|
2545
2547
|
}
|
|
2546
2548
|
else {
|
|
2547
|
-
this.ix.keys[
|
|
2548
|
-
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);
|
|
2549
2551
|
}
|
|
2550
2552
|
// Generate IX via extension contract
|
|
2551
2553
|
// @ts-ignore
|
|
@@ -2556,7 +2558,7 @@ class MeteoraDlmmWithdraw2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2556
2558
|
hawksightAuthority,
|
|
2557
2559
|
position: this.ix.keys[0].pubkey,
|
|
2558
2560
|
lbPair: this.ix.keys[1].pubkey,
|
|
2559
|
-
binArrayBitmapExtension:
|
|
2561
|
+
binArrayBitmapExtension: this.ix.keys[2].pubkey,
|
|
2560
2562
|
userTokenX: this.ix.keys[3].pubkey,
|
|
2561
2563
|
userTokenY: this.ix.keys[4].pubkey,
|
|
2562
2564
|
reserveX: this.ix.keys[5].pubkey,
|