Skip to content

Commit d4a0ae9

Browse files
committed
feat: configure extra gas with env variable.
1 parent 67b4079 commit d4a0ae9

File tree

1 file changed

+5
-1
lines changed
  • rust/chains/hyperlane-ethereum/src

1 file changed

+5
-1
lines changed

rust/chains/hyperlane-ethereum/src/tx.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,13 @@ where
7878
let gas_limit = if let Some(gas_limit) = tx_gas_limit {
7979
gas_limit
8080
} else {
81+
let hyp_gas_estimate_buffer: u32 = std::env::var("HYP_GAS_ESTIMATE_BUFFER")
82+
.unwrap_or(String::from("50000"))
83+
.parse()
84+
.unwrap();
8185
tx.estimate_gas()
8286
.await?
83-
.saturating_add(U256::from(GAS_ESTIMATE_BUFFER))
87+
.saturating_add(U256::from(hyp_gas_estimate_buffer))
8488
};
8589
let Ok((max_fee, max_priority_fee)) = provider.estimate_eip1559_fees(None).await else {
8690
// Is not EIP 1559 chain

0 commit comments

Comments
 (0)