[Compilers] <Troubles with setting up zksolc in Forge to the newest version> #737
-
Team or ProjectNo response Which compiler are you using?
Which version of Solidity or Vyper?0.8.20 zksolc/zkvyper version?1.5.4 Explain the issueI am trying to fork, compile, and then deploy the https://github.com/aave-dao/aave-v3-origin instance locally on my zkSync chain built within zkStack. But while compiling a contracts I have many errors/challenges one of them has been mentioned here ( matter-labs/hardhat-zksync#1475), Since it seems like Foundry-zksync has the newest version of compiler up to 1.5.4 I also tried to update to the new version of zksolc 1.5.6 with the build binaries from sources by following the tutorial: https://github.com/matter-labs/era-compiler-solidity, however after pointing to new 1.5.6 compiler with (forge build --zk-solc-path ./target/*/zksolc --via-ir --zksync) I was getting the error "Stack too deep". Apart from the errors mentioned above, my question is: how do I point Forge to use the currently newest version of zksolc (1.5.6), instead of 1.5.4??. Doing so I think would solve most of the issues above. I have also tried the other way around with downgrading the zksolc version to for example version 1.5.3: foundryup-zksync --version nightly-a1155ab78056eca730343d4268b851750e453166 but I am getting the following errors. Note: The newest instance of aave-v3-origin is Foundry-based (project structure), switching for Hardhat would be quite challenging. Link to your repo?No response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
To point Forge to use the newest version of zksolc (1.5.6) instead of 1.5.4, you can specify the path to the new compiler binary directly in your command. You mentioned using the command:
This is generally the correct approach. Ensure that the path you provide (
If you continue to experience issues even after ensuring the correct compiler path and version, it might be helpful to open an issue on the Foundry-zksync GitHub page or seek further assistance from the community or documentation specific to these tools. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Have you tried adding it to the
|
Beta Was this translation helpful? Give feedback.
must be inside
profile.default.zksync
though 👀. And if it's in thefoundry.toml
there's no need to specify it with--zk-solc-path
.