foundry-zksync: zkforge zkbuild Error: Failed to compile smart contracts with zksolc
Component
zkForge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (4307bfb 2024-03-20T06:25:29.717831000Z)
What command(s) is the bug in?
zkforge zkbuild and zkforge test
Operating System
macOS (Apple Silicon)
Describe the bug
When I run zkforge zkbuild I get the error:
Error:
Failed to compile smart contracts with zksolc: Could not assign standard_json to writer
How do I resolve this? Is there a flag or anything required here.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (2 by maintainers)
Hey folks 👋
We are in the process of releasing a new version of our Foundry implementation that will handle these situations much better. I apologize for the inconvenience currently being experienced, as this is an early alpha version we appreciate the reported issue. We are tracking to make a pre-release of the new version this week.
@yohanelly95 What I see you tried to specify zksol compiler with
--useoption. But this option is for sol compiler, seezkforge zkbuild --help. Try to use--use-zksolcinstead. And, also, if I am not mistaken you can’t currently specify the path to the zksol compiler (despite--helpsaying it), only the version is supported.Hey @yohanelly95! we’ve deprecated
zkforge zkbuildin favor offorge build --zksync. Could you please verify with forge instead? The same applies to test and script. This version of foundry should improve the user experience. Thank you for raising the issuesame here, the error comes up when running zkforge commands in a scaffolded project. In my case
bridge_v2When will it be solved?
@OmegaTymbJIep I see, what is the fix/workaround required then? This error persists
Issue seems to occur with all zkforge related commands. How do I fix this compiler issue? @bxpana