Closed YoungHorn1999 closed 2 months ago
update sdk to 0.1.40-alpha
should work, pushed to master
It seems like there is not have the 0.1.40-alpha yet?
thank u so much, it works for almost token now. I meet a new error in routeSwap, when I swap BdV3mqyMwwy7NiFS7pY45qz18zcQTF5xjRQWLsscrtqp to sol by the routeSwap, found 1 pool, but the code throw error show there don't have route
please upgrade sdk to version 0.1.42-alpha
and see code below to set log visible, I added some logs to show what happened.
this error might caused by input amount too small (makes output amount to 0) or insufficient pool liquidity.
you can upgrade sdk and set larger input amount and try again.
https://github.com/raydium-io/raydium-sdk-V2-demo/commit/9bc0d2da9e8a7093e326994bb446182884d0c148#diff-1cccd777077d6bd8943af4b047c4edd63f9c08d450ea1c051d4f73d55b6ca429R27
after upgrade, I swap the token BdV3mqyMwwy7NiFS7pY45qz18zcQTF5xjRQWLsscrtqp and the value is 0.000123u, why it deposit 1sol to create token account, it's too much, it seems like have some problem?
Please provide txId
3M5EhdzFBkpXjnME3hT8JtFhXEVQ7uJ3w8NHzwQ5muZB7oCNrxNaHJASL9BFPr1VMsoERHQaAUhh8mnRAsPtcg69
Normally, it should only deposit 0.002SOL to create token account, but it deposit 1SOL
I think there have a bug causes the deposit amount to be proportional to the transaction amount. When the money in the wallet is less than the deposit amount, the transaction will fail. the tx in the pic is 4uxNNxXQfzKNBgWUHkUJfGpT6Dp2tmgWfsESiha5fcVUS6fucrqzMvgPn5uVxgcBeErV6BC7SzHhsFWmy1r4hid9
I run yarn dev trade/routeSwap.ts, swap 3B5wuUrMEi5yATD7on46hKfej3pfmd7t1RKgrsN3pump to SOL, the tx is on chain, and the code don't throw error, but the solscan always show this error: Program Error: "Instruction #3 Failed - The program expected this account to be already initialized" how can I make the tx success