[Compilers] Source code for path ...
not found
#314
-
Which compiler are you using?
Which version of Solidity or Vyper?0.8.17 zksolc/zkvyper version?v1.3.22 Explain the issueHello, I am having an issue similar to the one in discussion#208, opening a new discussion thread as recommended by @dutterbutter. My goal is compiling our repo with My steps to reproduce: In terminal SOLC_VERSION="0.8.17-alpine"
docker create -it --name zksolc --entrypoint ash ethereum/solc:${SOLC_VERSION}
docker cp clave-contracts zksolc:/clave-contracts
docker start -i zksolc In the container ZKSOLC_VERSION="v1.3.22"
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-${ZKSOLC_VERSION} -O /bin/zksolc; chmod +x /bin/zksolc
zksolc -O3 \
--base-path clave-contracts \
--include-path clave-contracts/node_modules \
--combined-json abi,bin \
-o clave-contracts/build \
clave-contracts/contracts/**/*.sol Then, having this issue ...
Source code for path `@matterlabs/zksync-contracts/l2/system-contracts/BootloaderUtilities.sol` not found Additionally, if I run ...
Source code for path `@account-abstraction/contracts/samples/callback/TokenCallbackHandler.sol` not found Link to your repo? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 3 replies
-
Thanks @ulerdogan for opening this in a separate discussion! I was able to compile the contracts from the repo https://github.com/getclave/clave-contracts fine locally. To reproduce:
It is likely the issue is specific to the Docker setup. It is likely the dependencies are not being copied / installed in the container. I see the reference to them in the start command but the issue is likely there. Can you ssh into the container and see the dependencies that are being reported as missing? Is there a particular reason for this unique compiler in container setup? |
Beta Was this translation helpful? Give feedback.
-
Yes, it's being compiled with Hardhat, but my goal is generating bindings with For the versions, it's the latest version of Thanks! |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
-
@lysumeduso @tus4ncockverb @quanteauphil please avoid posting AI-generated comments in zkSync-Community-Hub. |
Beta Was this translation helpful? Give feedback.
Hey @ulerdogan, the issue is that
zksolc
doesn't operate on the Solidity source code level so it doesn't resolve dependencies passed with--include-path
nor it includes them into the list of files for compilation.Could you try passing required dependencies from
node_modules
explictly afterclave-contracts/contracts/**/*.sol
?