Closed miaoluyao closed 4 months ago
you can check realtime average fees in here if you want to go through smoothly, better set equal or higher than 'high' level.
computeBudgetConfig: { units: 600000, microLamports: 89025, },
Is that so?
yes, if it's still too slow, you also can watch avg fees here. note: sol * 10**9 = microlamports https://solanacompass.com/
const getFeesInfo = async () => { try { const response = await axios.get('https://solanacompass.com/api/fees?cacheFreshTime=' + (5 60 1000)); const json = response.data; const { avg } = json?.[15] ?? {};
if (!avg) {
return undefined;
}
return Math.ceil(avg);
} catch (error) { console.error('Error fetching fees info:', error); return undefined; } }; const microLamports = await getFeesInfo();
Thanks
If the priority fee I use is too low, has expired: block height exceeded will appear.(If the computeBudgetConfig parameter is not passed, "has expired: block height exceeded." will also appear.) How should I set a reasonable prioritization fee?
Below is a comparison of the two transactions
raydium.io solscan 0.000022186 SOL
raydium-sdk-V2-demo 0.060005 SOL