matter-labs / foundry-zksync

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

Support `vm.mockFunction` cheatcode #656

Open Karrq opened 2 weeks ago

Karrq commented 2 weeks ago

Foundry added a new cheatcode that we will need to implement on the EraVM side too, as instead of returning a set value for a given input, it redirects the call to another contract

https://github.com/matter-labs/foundry-zksync/blob/b0d5261945ee8b31de57daca49f7ff2e43126f33/crates/cheatcodes/spec/src/vm.rs#L483