Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Ape-solidity is not using compile_files and causing an error when importing #6

Closed
sabotagebeats opened this issue Sep 9, 2021 · 1 comment · Fixed by #7
Closed
Assignees

Comments

@sabotagebeats
Copy link
Contributor

(brownie) sabotage@sabotage:~/ape/token$ docker run --volume $HOME/.ape:/root/ape --volume $HOME/.vvm:/root/.vvm --volume $HOME/.solcx:/root/.solcx --volume $PWD:/root/project --workdir /root/project apeworx/ape ape compile
INFO: Compiling 'contracts/Token.sol'
INFO: Compiling 'contracts/SafeMath.sol'
Traceback (most recent call last):
  File "/usr/local/bin/ape", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/ape_compile/_cli.py", line 75, in cli
    contract_types = project.load_contracts(use_cache)
  File "/usr/local/lib/python3.8/dist-packages/ape/managers/project.py", line 117, in load_contracts
    contract_types.update(self.compilers.compile(list(needs_compiling)))
  File "/usr/local/lib/python3.8/dist-packages/ape/managers/compilers.py", line 49, in compile
    for contract_type in self.registered_compilers[extension].compile(paths_to_compile):
  File "/usr/local/lib/python3.8/dist-packages/ape_solidity/compiler.py", line 77, in compile
    for result in solcx.compile_source(
  File "/usr/local/lib/python3.8/dist-packages/solcx/main.py", line 112, in compile_source
    return _compile_combined_json(
  File "/usr/local/lib/python3.8/dist-packages/solcx/main.py", line 288, in _compile_combined_json
    stdoutdata, stderrdata, command, proc = wrapper.solc_wrapper(
  File "/usr/local/lib/python3.8/dist-packages/solcx/wrapper.py", line 158, in solc_wrapper
    raise SolcError(
solcx.exceptions.SolcError: An error occurred during execution
> command: `/root/.solcx/solc-v0.6.12 --combined-json abi,bin,bin-runtime,devdoc,userdoc -`
> return code: `1`
> stdout:

> stderr:
Error: Source "SafeMath.sol" not found: File not found.
 --> <stdin>:5:1:
  |
5 | import "./SafeMath.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^

Originally posted by @sabotagebeats in ApeWorX/ape#127 (comment)

@sabotagebeats sabotagebeats changed the title ``` bug: Ape-solidity is not using compile_files and causing an error when importing Sep 9, 2021
@sabotagebeats sabotagebeats self-assigned this Sep 9, 2021
@fubuloubu fubuloubu transferred this issue from ApeWorX/ape Sep 10, 2021
@fubuloubu
Copy link
Member

transferred this issue to the plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants