@hawksightco/hawk-sdk 1.3.31 → 1.3.32
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 +8 -7
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -2257,6 +2257,7 @@ class MeteoraDlmmDeposit2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2257
2257
|
const authority = this.authority;
|
|
2258
2258
|
const iyfProgram = addresses_1.IYF_MAIN;
|
|
2259
2259
|
const hawksightAuthority = addresses_1.HS_AUTHORITY;
|
|
2260
|
+
console.log(`MeteoraDlmmDeposit2Automation farm:`, farm.toString());
|
|
2260
2261
|
// Get token mints X and Y
|
|
2261
2262
|
const tokenXMint = this.ix.keys[7].pubkey;
|
|
2262
2263
|
const tokenYMint = this.ix.keys[8].pubkey;
|
|
@@ -2286,22 +2287,22 @@ class MeteoraDlmmDeposit2Automation extends HawksightMeteoraAutomationCpi {
|
|
|
2286
2287
|
// Adjust by token type
|
|
2287
2288
|
const pdaTokenType = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.pdaTokenType;
|
|
2288
2289
|
if (pdaTokenType === types_1.TokenType.LTA) {
|
|
2289
|
-
this.ix.keys[5].pubkey = util.generateLimitToken(this.userPda,
|
|
2290
|
-
this.ix.keys[6].pubkey = util.generateLimitToken(this.userPda,
|
|
2290
|
+
this.ix.keys[5].pubkey = util.generateLimitToken(this.userPda, tokenXMint);
|
|
2291
|
+
this.ix.keys[6].pubkey = util.generateLimitToken(this.userPda, tokenYMint);
|
|
2291
2292
|
}
|
|
2292
2293
|
else if (pdaTokenType === types_1.TokenType.STA) {
|
|
2293
|
-
this.ix.keys[5].pubkey = util.generateUserPdaStorageAccount(this.userPda,
|
|
2294
|
-
this.ix.keys[6].pubkey = util.generateUserPdaStorageAccount(this.userPda,
|
|
2294
|
+
this.ix.keys[5].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenXMint);
|
|
2295
|
+
this.ix.keys[6].pubkey = util.generateUserPdaStorageAccount(this.userPda, tokenYMint);
|
|
2295
2296
|
}
|
|
2296
2297
|
else {
|
|
2297
|
-
this.ix.keys[5].pubkey = util.generateAta(this.userPda,
|
|
2298
|
-
this.ix.keys[6].pubkey = util.generateAta(this.userPda,
|
|
2298
|
+
this.ix.keys[5].pubkey = util.generateAta(this.userPda, tokenXMint, tokenXMintInfo.info.owner);
|
|
2299
|
+
this.ix.keys[6].pubkey = util.generateAta(this.userPda, tokenYMint, tokenYMintInfo.info.owner);
|
|
2299
2300
|
}
|
|
2300
2301
|
// @ts-ignore
|
|
2301
2302
|
const depositIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
2302
2303
|
.meteoraDlmmDeposit2Automation(activeId, maxActiveBinSlippage, strategyParametersMinBinId, strategyParametersMaxBinId, strategyParametersStrategyType, strategyParametersParameters)
|
|
2303
2304
|
.accounts({
|
|
2304
|
-
farm,
|
|
2305
|
+
farm: addresses_1.USDC_FARM,
|
|
2305
2306
|
userPda,
|
|
2306
2307
|
authority,
|
|
2307
2308
|
iyfProgram,
|