Skip to content

Commit

Permalink
fix(anvil): disable block gas limit in eth_call (foundry-rs#4389)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Feb 20, 2023
1 parent 624797e commit c7db4af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,9 @@ impl Backend {
let gas_limit = gas.unwrap_or(block_env.gas_limit);
let mut env = self.env.read().clone();
env.block = block_env;
// we want to disable this in eth_call, since this is common practice used by other node
// impls and providers <https://github.com/foundry-rs/foundry/issues/4388>
env.cfg.disable_block_gas_limit = true;

if let Some(base) = max_fee_per_gas {
env.block.basefee = base;
Expand Down

0 comments on commit c7db4af

Please sign in to comment.