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

Interface build invokes get_path incorrectly #473

Closed
apguerrera opened this issue May 2, 2020 · 0 comments · Fixed by #475
Closed

Interface build invokes get_path incorrectly #473

apguerrera opened this issue May 2, 2020 · 0 comments · Fixed by #475
Labels
bug Something isn't working

Comments

@apguerrera
Copy link

Environment information

  • brownie Version: 1.8.0
  • ganache-cli Version: x.x.x
  • solc Version: 0.6.2
  • Python Version: 3.7
  • OS: osx

What was wrong?

Interface build get_path is incorrect

File "brownie/_cli/main.py", line 58, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/compile.py", line 32, in main
project.load(project_path)
File "brownie/project/main.py", line 551, in load
return Project(name, project_path)
File "brownie/project/main.py", line 154, in init
self.load()
File "brownie/project/main.py", line 205, in load
self._compile_interfaces(interface_hashes)
File "brownie/project/main.py", line 291, in _compile_interfaces
abi = compiler.solidity.get_abi(source)[name]
File "brownie/project/compiler/solidity.py", line 97, in get_abi
compiled = solcx.compile_source(contract_source, allow_empty=True, output_values=["abi"])
File "solcx/main.py", line 94, in compile_source
stdoutdata, stderrdata, command, proc = solc_wrapper(**compiler_kwargs)
File "solcx/utils/string.py", line 78, in inner
return force_obj_to_text(fn(*args, **kwargs))
File "solcx/wrapper.py", line 177, in solc_wrapper
stderr_data=stderrdata,
SolcError: An error occurred during execution
> command: /Users/adrian/.solcx/solc-v0.6.2 --combined-json abi -
> return code: 1
> stderr:

    > stdout:
    Error: Source "IERC20.sol" not found: File not found.

--> :8:1:
|
8 | import "./IERC20.sol";
| ^^^^^^^^^^^^^^^^^^^^^^

Error: Source "IERC777.sol" not found: File not found.
--> :9:1:
|
9 | import "./IERC777.sol";

How can it be fixed?

import "../interfaces/IERC20.sol";

even though the interface referenced is in the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants