[Dev Tools] forge test --zksync
fails when deploying 3 contracts inside a prank
#878
-
Team or ProjectAbstract EnvironmentTestnet Select the Dev Tool you are usingFoundry Provide the version of the tool (if applicable)forge 0.0.2 (1b49d91 2025-01-11T00:32:40.171777000Z) Provide a brief description of the functionality you're trying to implement and the issue you are running into.When deploying 3 contracts inside a prank, Deploying 3 contracts without a prank succeeds Minimal repro: Repo Link (Optional)https://github.com/coffeexcoin/foundry-zksync-create-prank-error-repro Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey! I've done some research, and this error corresponds to the It shouldn't happen normally due to deployment nonces, but looks like during the execution the nonce (neither "normal" or "deployment") is not incremented, e.g. the following code: uint256 nonce = vm.getNonce(owner);
console.log("account_nonce", nonce);
counter2 = new Counter();
console.log("counter2", address(counter2));
uint256 nonce2 = vm.getNonce(owner);
console.log("account_nonce", nonce2); gives us
This seems to be related to this logic -- we conditionally decide whether to increment the nonce for applied calls. If I change I will pass this to the foundry team and we will investigate. |
Beta Was this translation helpful? Give feedback.
-
I just ran this again and it looks like this has been semi-fixed in matter-labs/foundry-zksync#839. I say "semi" as the tests now pass but we are logging out a stream of logs that show as an error while it shouldn't. Will follow up once we correct those logs but tests are now passing ✅ . |
Beta Was this translation helpful? Give feedback.
I just ran this again and it looks like this has been semi-fixed in matter-labs/foundry-zksync#839. I say "semi" as the tests now pass but we are logging out a stream of logs that show as an error while it shouldn't. Will follow up once we correct those logs but tests are now passing ✅ .