matter-labs / foundry-zksync

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

Support vm.mockCalls cheatcode #721

Open Jrigada opened 1 week ago

Jrigada commented 1 week ago

Mocks multiple call to an address, returning specified data for each call. Calldata can either be strict or a partial match, e.g. if you only pass a Solidity selector to the expected calldata, then the entire Solidity function will be mocked. function mockCalls(address, bytes calldata, bytes[] calldata) external;

elfedy commented 1 week ago

This was added by foundry: https://github.com/foundry-rs/foundry/pull/9024, we should support this already in theory, just need to test it works?

Jrigada commented 1 week ago

Yes!