From b46496442d25b8dd750e088a4dd8bb70263e9885 Mon Sep 17 00:00:00 2001 From: Trevor Porter Date: Mon, 20 Jan 2025 15:18:54 +0000 Subject: [PATCH] feat: configurable priority fee numerator (#5202) ### Description ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --------- Co-authored-by: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> --- rust/main/chains/hyperlane-sealevel/src/rpc/client.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs b/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs index 4832fb7ae5..3e4a17ee85 100644 --- a/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs +++ b/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs @@ -421,9 +421,14 @@ impl SealevelRpcClient { } } + let priority_fee_numerator: u64 = std::env::var("SVM_PRIORITY_FEE_NUMERATOR") + .ok() + .and_then(|s| s.parse::().ok()) + .unwrap_or(PRIORITY_FEE_MULTIPLIER_NUMERATOR); + // Bump the priority fee to be conservative - let priority_fee = (priority_fee * PRIORITY_FEE_MULTIPLIER_NUMERATOR) - / PRIORITY_FEE_MULTIPLIER_DENOMINATOR; + let priority_fee = + (priority_fee * priority_fee_numerator) / PRIORITY_FEE_MULTIPLIER_DENOMINATOR; Ok(SealevelTxCostEstimate { compute_units: simulation_compute_units,