[Bug]: ERROR:ContractSolcParsing:Missing inheritance
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the issue:
Hey! I am getting this Slither error when trying to run Echidna on a minimal fuzzing harness
Slither Error
```
ERROR:ContractSolcParsing:Missing inheritance ERC721URIStorage (8f9ec1f5c5841d1dfa53980de0971b66)
Missing inheritance ID: 81571
Inheritance found:
- ERC721 (ID 30473)
- IERC4906 (ID 29440)
ERROR:ContractSolcParsing:Missing inheritance AccessPassNFT (8f9ec1f5c5841d1dfa53980de0971b66)
Missing inheritance ID: 81571
Inheritance found:
- ERC721URIStorage (ID 1785)
- Ownable (ID 112)
ERROR:ContractSolcParsing:Missing inheritance ERC20Mock (8f9ec1f5c5841d1dfa53980de0971b66)
Missing inheritance ID: 81571
Inheritance found:
- ERC20 (ID 702)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 725, in _analyze_content_top_level_function
func_parser.analyze_content()
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/declarations/function.py", line 309, in analyze_content
node_parser.analyze_expressions(self)
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/cfg/node.py", line 37, in analyze_expressions
expression = parse_expression(self._unparsed_expression, caller_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 344, in parse_expression
return parse_call(expression, caller_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 172, in parse_call
arguments = [parse_expression(a, caller_context) for a in expression["arguments"]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 172, in
arguments = [parse_expression(a, caller_context) for a in expression["arguments"]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 344, in parse_expression
return parse_call(expression, caller_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 154, in parse_call
called = parse_expression(expression["expression"], caller_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 508, in parse_expression
var, was_created = find_variable(value, caller_context, referenced_declaration)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/expressions/find_variable.py", line 449, in find_variable
raise VariableNotFound(f"Variable not found: {var_name} (context {contract})")
slither.solc_parsing.exceptions.VariableNotFound: Variable not found: mulUD60x18(UD60x18,UD60x18) (context None)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/__main__.py", line 814, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/__main__.py", line 102, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/__main__.py", line 80, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/slither.py", line 135, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/slither.py", line 145, in _init_parsing_and_analyses
raise e
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/slither.py", line 141, in _init_parsing_and_analyses
parser.parse_contracts()
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 531, in parse_contracts
self._analyze_third_part(contracts_to_be_analyzed, libraries)
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 625, in _analyze_third_part
self._analyze_variables_modifiers_functions(lib)
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 741, in _analyze_variables_modifiers_functions
self._analyze_content_top_level_function()
File "/opt/homebrew/Cellar/slither-analyzer/0.9.6/libexec/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 727, in _analyze_content_top_level_function
raise SlitherException(f"Missing {e} during top level function analyze") from e
slither.exceptions.SlitherException: Missing Variable not found: mulUD60x18(UD60x18,UD60x18) (context None) during top level function analyze
ERROR:root:Error:
ERROR:root:Missing Variable not found: mulUD60x18(UD60x18,UD60x18) (context None) during top level function analyze
ERROR:root:Please report an issue to https://github.com/crytic/slither/issues
```
### Code example to reproduce the issue:
I have pushed the harness on [this branch](https://github.com/Voltz-Protocol/v2-core/blob/feat/slither-issue/integration/test/fuzzing/Harness.sol). To reproduce the issue, please first follow the instructions in the [README](https://github.com/Voltz-Protocol/v2-core/tree/feat/slither-issue#install-dependencies-and-compile-contracts) to compile the contracts. Then, run the following commands:
```
- cd integration
- echidna . --contract Harness --config test/fuzzing/Harness.config.yaml
- slither . --print echidna
```
### Version:
0.9.6
### Relevant log output:
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.