[Compilers] zksolc "Source code for path not found" #208
Replies: 7 comments 7 replies
-
Well i decided just to implement crutchy communication with hardhat compiler in my tests, so it's not really needed for me anymore but if it's a bug (many people told me the compiler is buggy) it's worth to fix it |
Beta Was this translation helpful? Give feedback.
-
Hi @alexhooketh , this is a bug that the zkSync Compiler team is investigating. |
Beta Was this translation helpful? Give feedback.
-
Also having the same issue with zksolc Created an example repo to reproduce the error: https://github.com/omurovec/zksolc-import-error Would appreciate some more eyes on this if possible |
Beta Was this translation helpful? Give feedback.
-
Hey @alexhooketh @omurovec - thanks for the report! In order to resolve such dependencies, the best way is to use hardhat. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am having the same issue while using 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 Finally, having this error message with other expected warnings from compiler: ...
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 |
Beta Was this translation helpful? Give feedback.
-
@ulerdogan Can you open a separate discussion for your issue please. |
Beta Was this translation helpful? Give feedback.
-
Latest release of zksolc has resolved this issue. Other issues in this Discussion have also been addressed in their associated threads. |
Beta Was this translation helpful? Give feedback.
-
Which compiler are you using?
Which version of Solidity or Vyper?
0.8.23+commit.f704f362.Darwin.appleclang
zksolc/zkvyper version?
EraVM Solidity compiler v1.3.17 (LLVM build bab511e161a8c37e5ca50be5eaa43ebb62ed958e)
Explain the issue
with these command line arguments:
zksolc --include-path=node_modules --base-path=. samples/zksync/ZksyncManager.sol
And this is what happens in my terminal:
Last error looks really strange - it doesn't have TypeError prefix and generally doesn't seem solidity-ish + zksolc exits instantly after it appears. I thought that this could be related to AddressAliasHelper.sol in the library, so I rewrote my code without using this file, and now I get this error:
So I believe it isn't related to that file. @matterlabs/zksync contracts is stored in node_modules folder in my project root (I call zksolc from the root). I also tried to compile it with solc using the same arguments and I get this
But this isn't quite related to the problem, I'll leave it there just in case
Beta Was this translation helpful? Give feedback.
All reactions