2

In a Solidity source file I have an import along the lines of...

import 'https://github.com/<username>/<repo>/<source>.sol';

which works fine in Browser Solidity but solc (ver 0.3.6) cannot import it and returns an error along the lines of:

Source "<source>.sol" not found: File not found.

From the path resolution documentation I was of the understanding that solc could discover such import paths as Browser Solidity has demonstrated.

Am I missing something (perhaps the URL is wrong) or is it just not a feature yet?

1 Answer 1

4

According to this, solc does not allow to import from github directly. You need to clone the repo and remap the directory path to be able to use them like in browser-solidity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.