1

I am running slither's docker image to check my solidity contracts and I keep having the following error message

Traceback (most recent call last):
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/__main__.py", line 744,         in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/__main__.py", line 87, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/__main__.py", line 70, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 95, in __init__
parser.parse_top_level_from_loaded_json(ast, path)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 211, in parse_top_level_from_loaded_json
contract.set_offset(top_level_data["src"], self._compilation_unit)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/core/source_mapping/source_mapping.py", line 124, in set_offset
self._source_mapping = self._convert_source_mapping(offset, compilation_unit)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/core/source_mapping/source_mapping.py", line 102, in _convert_source_mapping
compilation_unit, filename, s, l
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/core/source_mapping/source_mapping.py", line 44, in _compute_line
filename, start + length
File "/home/ethsec/.local/lib/python3.6/site-packages/crytic_compile/crytic_compile.py", line 291, in get_line_from_offset
return lines_delimiters[offset]

What bothers me is that the smart contracts are ok because I am able to compile and deploy them (and once deployed they seem to work as expected).

For whatever reason slither is not able to analyze them.....

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.