matter-labs / foundry-zksync

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

Invariant tests for vm switching capabilities #661

Open Karrq opened 2 weeks ago

Karrq commented 2 weeks ago

Core to foundry-zksync design is VM switching, allowing foundry to run contract code in EVM and EraVM, along with migrating various parts of the state to provide a consisent experience across the boundary.

A variety of tests are present, but considering the possible usages of foundry, it's rather unfeasible to encode all of it in a few tests.

Fuzz and invariant tests should be able to explore a lot of the usage space and give foundry-zksync more confidence that the various migration happen correctly and reversibly