Skip to content

Commit

Permalink
feat: configurable priority fee numerator
Browse files Browse the repository at this point in the history
  • Loading branch information
tkporter committed Jan 18, 2025
1 parent fed42c3 commit c6ee3d7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rust/main/chains/hyperlane-sealevel/src/rpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,14 @@ impl SealevelRpcClient {
}
}

let priority_fee_numerator: u64 = std::env::var("SVM_PRIORITY_FEE_NUMERATOR")
.ok()
.and_then(|s| s.parse::<u64>().ok())
.unwrap_or_else(|| 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,
Expand Down

0 comments on commit c6ee3d7

Please sign in to comment.