Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/shared/src/price_estimation/trade_verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ impl TradeVerifier {
.from(solver_address)
.to(solver_address)
.gas(Self::DEFAULT_GAS)
// Use a high enough non-zero gas price to catch tokens with special logic
// for gas_price == 0 but also avoid reverts due to too low gas price.
// The exact price is not important since we are only interested in the used
// gas units anyway.
.gas_price(
u128::try_from(block.gas_price)
u128::try_from(block.gas_price.saturating_mul(2.into()))
.map_err(|err| anyhow!(err))
.context("converting gas price to u128")?
);
Expand Down
Loading