@hawksightco/hawk-sdk 1.3.35 → 1.3.37
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 +22 -20
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -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,29 +2310,31 @@ 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);
|
|
2329
2329
|
// Instruction via main hawksight contract
|
|
2330
2330
|
// @ts-ignore
|
|
2331
2331
|
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
2332
|
-
.
|
|
2332
|
+
.iyfExtensionExecute(depositIx.data)
|
|
2333
2333
|
.accounts({
|
|
2334
|
+
farm,
|
|
2334
2335
|
userPda,
|
|
2335
2336
|
authority,
|
|
2337
|
+
iyfProgram,
|
|
2336
2338
|
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
2337
2339
|
})
|
|
2338
2340
|
.remainingAccounts(depositIx.keys.slice(4))
|