foundry-zksync: call may fail or behave unexpectedly due to empty code target
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.0.2 (d053ecd 2024-11-10T00:27:05.976102717Z)
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
On a previously compiling & deployed forge project, I now have errors about cheatcodes when trying to deploy again. I made no changes to the contract or to the script since last deployment.
2024-11-10T09:49:48.856085Z ERROR foundry_zksync_core::vm::tracers::cheatcode: call may fail or behave unexpectedly due to empty code target=0x9f7cf1d1f558e57ef88a59ac3d47214ef25b6a06 calldata="c0406226"
Traces:
[204154] MockMerkleScript::setUp()
└─ ← [Return]
[204154] MockMerkleScript::run()
└─ ← [Return]
Script ran successfully.```
It says that the script runs successfully but no transaction is sent (with the ```-broadcast``` flag in the command).
Here is the script command: ```forge script MockMerkleScript --zksync --slow --chain-id 324 --build-info --build-info-path deployment --rpc-url https://mainnet.era.zksync.io -vvvvv --account XXX --password XXX --broadcast```
I tried with a dedicated RPC, but it changed nothing.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (5 by maintainers)
I just replace my alchemy API-Key by <API-KEY> in the file. I pass the ADMIN_ADDRESS value through a .env file (PS, when it isn’t available the script outputs the same error, so it doesn’t check/ exec the script). debug_log.txt I ctrl+shift+f the address and it shows nowhere beside the debug_log file I created
Hey, yes here is an example: https://github.com/L0GYKAL/zk-forge_example
I executed the foundryup-zksync command again and now my forge version is :
forge 0.0.2 (d053ecd 2024-11-11T00:25:54.225428781Z)Now I have another issue when compiling: