mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-17 02:01:09 +10:00
fix: sell function
This commit is contained in:
2
buy.ts
2
buy.ts
@ -324,8 +324,8 @@ async function sell(accountData: LiquidityStateV4, poolKeys: LiquidityPoolKeys):
|
|||||||
instructions: [
|
instructions: [
|
||||||
ComputeBudgetProgram.setComputeUnitLimit({ units: 400000 }),
|
ComputeBudgetProgram.setComputeUnitLimit({ units: 400000 }),
|
||||||
ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200000 }),
|
ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 200000 }),
|
||||||
createCloseAccountInstruction(tokenAccount.address, wallet.publicKey, wallet.publicKey),
|
|
||||||
...innerTransaction.instructions,
|
...innerTransaction.instructions,
|
||||||
|
createCloseAccountInstruction(tokenAccount.address, wallet.publicKey, wallet.publicKey),
|
||||||
],
|
],
|
||||||
}).compileToV0Message();
|
}).compileToV0Message();
|
||||||
const transaction = new VersionedTransaction(messageV0);
|
const transaction = new VersionedTransaction(messageV0);
|
||||||
|
|||||||
Reference in New Issue
Block a user