matter-labs / foundry-zksync

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

test(zk): add test for create2 computation with L2Contract #549

Closed Karrq closed 2 months ago

Karrq commented 2 months ago

refactor(test:zk): extract computeCreate2Address

Motivation

We have tests to check that CREATE2 works and that it produces the expected address, but not that the expected address matches what L2ContractHelper computes.

Solution

Add a test which depends on the L2ContractHelper to compute the address.

Notes

All tests of this kind (checkin create2 address is correct) have been moved to the new test (which has some deps) as a logical group