matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
299 stars 130 forks source link

fix(zk): propagate env during `transact` #477

Closed Karrq closed 4 months ago

Karrq commented 4 months ago

Motivation

Gas prices during transaction simulation were left to the default of 0, leading to problems and inconsistencies during tx simulation (for scripting). In normal execution, the cheatcode tracer takes care of setting the right values after the initial revm validation.

Solution

Propagate the environment (from fork or else) to the backend before running transact