slither
slither copied to clipboard
[Bug-Candidate]: ERROR:root:Type not found enum Math.Rounding
Describe the issue:
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/solidity_types/type_parsing.py", line 194, in _find_from_type_name raise ParsingError("Type not found " + str(name)) slither.solc_parsing.exceptions.ParsingError: Type not found enum Math.Rounding
Code example to reproduce the issue:
https://github.com/Cyfrin/2025-01-zaros-part-2
Version:
0.10.3
Relevant log output:
'forge build --build-info --skip */test/** */script/** --force' running (wd: /Users/edu/Documents/codehawks/2025-01-zaros-part-2)
Traceback (most recent call last):
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/__main__.py", line 888, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/__main__.py", line 113, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/__main__.py", line 80, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/slither.py", line 202, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/slither.py", line 211, in _init_parsing_and_analyses
raise e
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/slither.py", line 207, in _init_parsing_and_analyses
parser.parse_contracts()
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 583, in parse_contracts
self._analyze_third_part(contracts_to_be_analyzed, libraries)
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 694, in _analyze_third_part
self._analyze_variables_modifiers_functions(contract)
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 793, in _analyze_variables_modifiers_functions
contract.analyze_params_functions()
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/declarations/contract.py", line 468, in analyze_params_functions
functions = self._analyze_params_elements(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/declarations/contract.py", line 566, in _analyze_params_elements
element_parser.analyze_params()
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/declarations/function.py", line 300, in analyze_params
self._parse_params(params)
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/declarations/function.py", line 1345, in _parse_params
local_var = self._add_param(param)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/declarations/function.py", line 1310, in _add_param
local_var_parser.analyze(self)
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/variables/variable_declaration.py", line 212, in analyze
self._variable.type = parse_type(self._elem_to_parse, caller_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/solidity_types/type_parsing.py", line 380, in parse_type
type_found = _find_from_type_name(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/edu/.local/pipx/venvs/slither-analyzer/lib/python3.12/site-packages/slither/solc_parsing/solidity_types/type_parsing.py", line 194, in _find_from_type_name
raise ParsingError("Type not found " + str(name))
slither.solc_parsing.exceptions.ParsingError: Type not found enum Math.Rounding
ERROR:root:Error:
ERROR:root:Type not found enum Math.Rounding