@hawksightco/hawk-sdk 1.3.36 → 1.3.38
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 +21 -21
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -2242,8 +2242,8 @@ class MeteoraDlmmDeposit2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2242
2242
|
* Modifies transaction keys for the purpose of depositing liquidity.
|
|
2243
2243
|
*/
|
|
2244
2244
|
replace() {
|
|
2245
|
-
this.
|
|
2246
|
-
this.
|
|
2245
|
+
this.ix.keys[9].pubkey = this.userPda;
|
|
2246
|
+
this.ix.keys[9].isSigner = false;
|
|
2247
2247
|
}
|
|
2248
2248
|
/**
|
|
2249
2249
|
* Replaces Meteora CPI with Hawksight CPI that calls the target Meteora CPI.
|
|
@@ -2288,16 +2288,16 @@ class MeteoraDlmmDeposit2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2288
2288
|
// Adjust by token type
|
|
2289
2289
|
const pdaTokenType = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.pdaTokenType;
|
|
2290
2290
|
if (pdaTokenType === types_1.TokenType.LTA) {
|
|
2291
|
-
this.ix.keys[
|
|
2292
|
-
this.ix.keys[
|
|
2291
|
+
this.ix.keys[3].pubkey = util.generateLimitToken(this.userPda, tokenXMint);
|
|
2292
|
+
this.ix.keys[4].pubkey = util.generateLimitToken(this.userPda, tokenYMint);
|
|
2293
2293
|
}
|
|
2294
2294
|
else if (pdaTokenType === types_1.TokenType.STA) {
|
|
2295
|
-
this.ix.keys[
|
|
2296
|
-
this.ix.keys[
|
|
2295
|
+
this.ix.keys[3].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenXMint);
|
|
2296
|
+
this.ix.keys[4].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenYMint);
|
|
2297
2297
|
}
|
|
2298
2298
|
else {
|
|
2299
|
-
this.ix.keys[
|
|
2300
|
-
this.ix.keys[
|
|
2299
|
+
this.ix.keys[3].pubkey = util.generateAta(this.userPda, tokenXMint, tokenXMintInfo.info.owner);
|
|
2300
|
+
this.ix.keys[4].pubkey = util.generateAta(this.userPda, tokenYMint, tokenYMintInfo.info.owner);
|
|
2301
2301
|
}
|
|
2302
2302
|
// @ts-ignore
|
|
2303
2303
|
const depositIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
@@ -2310,19 +2310,19 @@ class MeteoraDlmmDeposit2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2310
2310
|
authority,
|
|
2311
2311
|
iyfProgram,
|
|
2312
2312
|
hawksightAuthority,
|
|
2313
|
-
position: this.ix.keys[
|
|
2314
|
-
lbPair: this.ix.keys[
|
|
2315
|
-
binArrayBitmapExtension: this.ix.keys[
|
|
2316
|
-
userTokenX: this.ix.keys[
|
|
2317
|
-
userTokenY: this.ix.keys[
|
|
2318
|
-
reserveX: this.ix.keys[
|
|
2319
|
-
reserveY: this.ix.keys[
|
|
2320
|
-
tokenXMint: this.ix.keys[
|
|
2321
|
-
tokenYMint: this.ix.keys[
|
|
2322
|
-
tokenXProgram: this.ix.keys[
|
|
2323
|
-
tokenYProgram: this.ix.keys[
|
|
2324
|
-
eventAuthority: this.ix.keys[
|
|
2325
|
-
meteoraDlmmProgram: this.ix.keys[
|
|
2313
|
+
position: this.ix.keys[0].pubkey,
|
|
2314
|
+
lbPair: this.ix.keys[1].pubkey,
|
|
2315
|
+
binArrayBitmapExtension: this.ix.keys[2].pubkey,
|
|
2316
|
+
userTokenX: this.ix.keys[3].pubkey,
|
|
2317
|
+
userTokenY: this.ix.keys[4].pubkey,
|
|
2318
|
+
reserveX: this.ix.keys[5].pubkey,
|
|
2319
|
+
reserveY: this.ix.keys[6].pubkey,
|
|
2320
|
+
tokenXMint: this.ix.keys[7].pubkey,
|
|
2321
|
+
tokenYMint: this.ix.keys[8].pubkey,
|
|
2322
|
+
tokenXProgram: this.ix.keys[10].pubkey,
|
|
2323
|
+
tokenYProgram: this.ix.keys[11].pubkey,
|
|
2324
|
+
eventAuthority: this.ix.keys[12].pubkey,
|
|
2325
|
+
meteoraDlmmProgram: this.ix.keys[13].pubkey,
|
|
2326
2326
|
}).instruction();
|
|
2327
2327
|
const sighash = util.sighash("meteora_dlmm_deposit_2_automation");
|
|
2328
2328
|
depositIx.data.set(sighash, 0);
|