Skip to content

Commit

Permalink
bump estimate gas to 40% (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored and greged93 committed Oct 14, 2024
1 parent 2e377d4 commit 93fceaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/eth_provider/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ where

let gas_used = self.estimate_gas(request, block_id).await?;

// Increase the gas used by 20% to make sure the transaction will not fail due to gas.
// Increase the gas used by 40% to make sure the transaction will not fail due to gas.
// This is a temporary solution until we have a proper gas estimation.
// Does not apply to Hive feature otherwise end2end tests will fail.
let gas_used = if cfg!(feature = "hive") { gas_used } else { gas_used * 120 / 100 };
let gas_used = if cfg!(feature = "hive") { gas_used } else { gas_used * 140 / 100 };
Ok(U256::from(gas_used))
}

Expand Down

0 comments on commit 93fceaa

Please sign in to comment.