-
Notifications
You must be signed in to change notification settings - Fork 951
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
Add Support for Brownie #638
Comments
Hi @fubuloubu, thanks for reporting this. Can you try |
Sorry about that, I meant to do $ slither .
Brownie v1.11.4 - Python development framework for Ethereum
Compiling contracts...
Solc version: 0.5.17
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
Generating build data...
...
Generating interface ABIs...
Project has been compiled. Build artifacts saved at Yearn/contracts/build/contracts
ERROR:ContractSolcParsing:Missing inheritance <slither.solc_parsing.declarations.contract.ContractSolc object at 0x7fb00642e190>
ERROR:ContractSolcParsing:Missing inheritance <slither.solc_parsing.declarations.contract.ContractSolc object at 0x7fb006413490>
ERROR:ContractSolcParsing:Missing inheritance <slither.solc_parsing.declarations.contract.ContractSolc object at 0x7fb006413a00>
Traceback (most recent call last):
File "python3.8/site-packages/slither/__main__.py", line 692, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "python3.8/site-packages/slither/__main__.py", line 79, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "python3.8/site-packages/slither/__main__.py", line 62, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "python3.8/site-packages/slither/slither.py", line 100, in __init__
self._parser.analyze_contracts()
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 326, in analyze_contracts
self._analyze_all_enums(contracts_to_be_analyzed)
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 363, in _analyze_all_enums
all_father_analyzed = all(
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 364, in <genexpr>
self._underlying_contract_to_parser[father].is_analyzed
KeyError: None
ERROR:root:None
ERROR:root:Error in .
ERROR:root:Traceback (most recent call last):
File "python3.8/site-packages/slither/__main__.py", line 692, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "python3.8/site-packages/slither/__main__.py", line 79, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "python3.8/site-packages/slither/__main__.py", line 62, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "python3.8/site-packages/slither/slither.py", line 100, in __init__
self._parser.analyze_contracts()
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 326, in analyze_contracts
self._analyze_all_enums(contracts_to_be_analyzed)
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 363, in _analyze_all_enums
all_father_analyzed = all(
File "python3.8/site-packages/slither/solc_parsing/slitherSolc.py", line 364, in <genexpr>
self._underlying_contract_to_parser[father].is_analyzed
KeyError: None |
After a discussion with @fubuloubu, we found that the issue was coming from brownie (eth-brownie/brownie#772) I am closing this issue, I will keep track of the brownie issue to see how to better integrate brownie's projects with dependencies |
still seeing issues: Project has been compiled. Build artifacts saved at ~/Yearn/vaults/build/contracts
Traceback (most recent call last):
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/slither/__main__.py", line 712, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/slither/__main__.py", line 71, in process_all
compilations = compile_all(target, **vars(args))
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
compilations.append(CryticCompile(target, **kwargs))
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
self._compile(**kwargs)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
self._platform.compile(self, **kwargs)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/platform/brownie.py", line 77, in compile
_iterate_over_files(crytic_compile, self._target, filenames)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/platform/brownie.py", line 141, in _iterate_over_files
filename_txt = target_loaded["ast"]["absolutePath"]
KeyError: 'absolutePath'
ERROR:root:None
ERROR:root:Error in .
ERROR:root:Traceback (most recent call last):
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/slither/__main__.py", line 712, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/slither/__main__.py", line 71, in process_all
compilations = compile_all(target, **vars(args))
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
compilations.append(CryticCompile(target, **kwargs))
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
self._compile(**kwargs)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
self._platform.compile(self, **kwargs)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/platform/brownie.py", line 77, in compile
_iterate_over_files(crytic_compile, self._target, filenames)
File "~/.pyenv/versions/3.8.6/envs/yearn/lib/python3.8/site-packages/crytic_compile/platform/brownie.py", line 141, in _iterate_over_files
filename_txt = target_loaded["ast"]["absolutePath"]
KeyError: 'absolutePath' |
Hi @fubuloubu, can you share the codebase where this happens? Note that we have currently a partial support of brownie due to eth-brownie/brownie#941 |
Hey, Seeing the same issue as @fubuloubu . Any updates on this ? |
Hi @princearoragithub , We will see how to fix this issue next week. You can follow the progress here: crytic/crytic-compile#165 |
Getting some weird issues when I install
slither
in a Brownie project, probably because Brownie usespy-solcx
to manage solidity installations (andvvm
for Vyper)The text was updated successfully, but these errors were encountered: