Skip to content

Add support for providing fee per CU in Solana #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2025

Conversation

qrilka
Copy link
Contributor

@qrilka qrilka commented Aug 13, 2025

In this initial version we use a static value, later we could add an
option to set it dynamically (e.g. using Priority Fee API from Helius)

In this initial version we use a static value, later we could add an
option to set it dynamically (e.g. using Priority Fee API from Helius)
@qrilka qrilka requested a review from psibi August 13, 2025 11:28
Copy link

cloudflare-workers-and-pages bot commented Aug 13, 2025

Deploying kolme with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0be505
Status: ✅  Deploy successful!
Preview URL: https://5f1e5b23.kolme.pages.dev
Branch Preview URL: https://solana-fee-per-cu.kolme.pages.dev

View logs

@qrilka
Copy link
Contributor Author

qrilka commented Aug 13, 2025

This follows https://solana.com/docs/core/fees but uses only fixed fee per CU. For dynamic priority fees we could add support for Priority Fee API from Helius https://www.helius.dev/docs/priority-fee-api or something from other node providers. Public node don't provide options like that

@@ -58,10 +59,14 @@ impl<App: KolmeApp> Submitter<App> {
pub fn new_solana(
kolme: Kolme<App>,
keypair: kolme_solana_bridge_client::keypair::Keypair,
fee_per_cu: Option<u64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing optional value, do you think we can have something like a builder pattern, where we do set_fee_per_cu instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I like the idea as it probably could allow us to add a callback for fee API as well.
At the moment with only one argument that looks to be over-complication.

@qrilka qrilka merged commit 3b2626a into six-sigma-launch Aug 15, 2025
2 of 3 checks passed
@qrilka qrilka deleted the solana-fee-per-cu branch August 15, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants