Closed metarsit closed 7 months ago
@metarsit IMO official doc and Helius article are the best for kicking-off.
Your code looks good to me. You're trying to set the prioritization fee as 6_500
Lamports in your example.
500_000 * 3_000 * 0.000001 + 5_000 = 6_500
where:
500_000
- compute unit limit
3_000
- compute unit price
0.000001
- convert microlLamports to Lamports
5_000
- base fee in Lamports
If you can't land your tx with 6_500
Lamports, current commissions may be higher due to congestion.
I'd suggest using getrecentprioritizationfees RPC method to understand the current market condition. And here is an example of the call in this SDK
Thank you for a great share on the information @0xvbetsun! I understand this a bit better now. However, I have tried to set even crazier fee but the success rate is still very low. Is there any other way to improve the success rate?
You're welcome, @metarsit I don't, actually, have a super-secret technique to achieve a 100% landing rate. Just a well-known recommendations:
Here is a page from Tritone One with those recommendations
Also, you can get some inspiration for how to send tx directly to the current leader from Helius Atlas
Thanks both! I will apply these changes! ❤️
Context (TLDR;)
Current code
Some help I may need
I really appreciate any help you can provide. I am pretty new to this and hope I can get a kickstart on this. Thank you very much.