Skip to content

Commit

Permalink
Merge branch 'hyperlane-xyz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ljankovic-txfusion authored Jan 13, 2025
2 parents b48be06 + 9ab961a commit ed0f5a9
Show file tree
Hide file tree
Showing 16 changed files with 1,582 additions and 134 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-kangaroos-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Deploy to new chains: artela, guru, hemi, nero, xpla.
2 changes: 1 addition & 1 deletion .registryrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
115d44069109f3ef43caeed5632f6255d9a3390a
2184e5e3064ddec2734aa53c1aff6d9f7d958bdf
17 changes: 15 additions & 2 deletions rust/main/chains/hyperlane-sealevel/src/rpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::{
const COMPUTE_UNIT_MULTIPLIER_NUMERATOR: u32 = 11;
const COMPUTE_UNIT_MULTIPLIER_DENOMINATOR: u32 = 10;

const PRIORITY_FEE_MULTIPLIER_NUMERATOR: u64 = 125;
const PRIORITY_FEE_MULTIPLIER_NUMERATOR: u64 = 110;
const PRIORITY_FEE_MULTIPLIER_DENOMINATOR: u64 = 100;

pub struct SealevelTxCostEstimate {
Expand Down Expand Up @@ -401,7 +401,20 @@ impl SealevelRpcClient {
/ COMPUTE_UNIT_MULTIPLIER_DENOMINATOR,
);

let priority_fee = priority_fee_oracle.get_priority_fee(&simulation_tx).await?;
let mut priority_fee = priority_fee_oracle.get_priority_fee(&simulation_tx).await?;

if let Ok(max_priority_fee) = std::env::var("SVM_MAX_PRIORITY_FEE") {
let max_priority_fee = max_priority_fee.parse()?;
if priority_fee > max_priority_fee {
tracing::info!(
priority_fee,
max_priority_fee,
"Estimated priority fee is very high, capping to a max",
);
priority_fee = max_priority_fee;
}
}

// Bump the priority fee to be conservative
let priority_fee = (priority_fee * PRIORITY_FEE_MULTIPLIER_NUMERATOR)
/ PRIORITY_FEE_MULTIPLIER_DENOMINATOR;
Expand Down
Loading

0 comments on commit ed0f5a9

Please sign in to comment.