Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 8004

Every swap create a new account

$
0
0

In raydium sdk at each swap an account is created according to the instruction (the instruction is in the sdk itself, which must be changed somehow) and deleted.How to create an account only once and then each swap was done without this action.

    const { execute } = await raydium.liquidity.swap({        poolInfo,        poolKeys,        amountIn: new BN(amount),        amountOut: out.minAmountOut,        fixedSide: 'in',        inputMint: mintIn.address,        txVersion,        config: {          inputUseSolBalance: isInputSol,          outputUseSolBalance: isOutputSol,          associatedOnly: false,        },      });...    const { txId } = await execute({ sendAndConfirm: false, skipPreflight : false });

Viewing all articles
Browse latest Browse all 8004

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>