Skip to content

Commit

Permalink
feat: configurable priority fee numerator (#5202)
Browse files Browse the repository at this point in the history
### Description

<!--
What's included in this PR?
-->

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->

---------

Co-authored-by: Daniel Savu <[email protected]>
  • Loading branch information
tkporter and daniel-savu authored Jan 20, 2025
1 parent 5f9a7c8 commit b464964
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 @@ -421,9 +421,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(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 b464964

Please sign in to comment.