Closed mmdcuan closed 1 month ago
Please provide full code block and wallet address so I can test it out, thanks
const transaction = transactions[0]
transaction.sign([owner]);
txid = await connection.sendTransaction(transaction, {
skipPreflight: false,
maxRetries: 2,
});
how to filter fetchRoutePoolBasicInfo(), only new token?
'Program log: Instruction: InitializeAccount', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3442 of 599550 compute units', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success', 'Program routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS invoke [1]', 'Program log: process_swap_base_in_with_user_account:RouteSwapBaseInArgs { amount_in: 80044744, minimum_amount_out: 80102364 }', 'Program log: Error: ExpectedAccount', 'Program routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS consumed 12244 of 596108 compute units', 'Program routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS failed: custom program error: 0x3'
fetchRoutePoolBasicInfo doesn't support any filter I can't debug with only logs, I need full code block, thx also, I suggest using src/api/swap.ts to do routing swap.
expected account, successfully used swapbaseout
I use routeSwap, only send transaction,
const { execute, transactions } = await raydium.tradeV2.swap({ routeProgram: Router, txVersion, swapInfo: targetRoute, swapPoolKeys: poolKeys, ownerInfo: { associatedOnly: true, checkCreateATAOwner: true, }, computeBudgetConfig: { units: 600000, microLamports: 10000, }, })
const transaction = transactions[0] transaction.sign([owner]); txid = await connection.sendTransaction(transaction, { skipPreflight: false, maxRetries: 2, });
please try run demo code, I tested it and works well and try not to sign and manipulate transactions by yourself
actually just want skipPreflight: false, in the original menu it doesn't exist or const { txIds } = await execute({ sequentially: true,skipPreflight: false }) ?
yes, just use const { txIds } = await execute({ sequentially: true, skipPreflight: false })
cuz routeSwap might have more than 1 tx and your code might have bugs sometimes.
and according to our exp, set skipPreflight to false might encounter some unexpected bugs too, we don't suggest set it to false
if using jito or fee from api?
const { data } = await axios.get<{
id: string
success: boolean
data: { default: { vh: number; h: number; m: number } }
}>(${API_URLS.BASE_HOST}${API_URLS.PRIORITY_FEE}
)
how ?
skipPreflight: true will drain the fee if an error occurs and the bot continues to execute
on log 1728421175428 Raydium_tradeV2 sdk logger debug ["direct error",6,"HAwjqG1Vg1XHvYqudzX9xAtb8akyttYStDC7NBWj9NWW","No enough initialized tickArray"]
That means your clmm pool don't have enough liquidity so it will not able to be swappable route.
thanks
Program log: Error: ExpectedAccount', on routeSwap