bentobox
bentobox copied to clipboard
Slither does not run
Error HH12: Trying to use a non-local installation of Hardhat, which is not supported.
Please install Hardhat locally using npm or Yarn, and try again.
For more info go to https://hardhat.org/HH12 or run Hardhat with --show-stack-traces
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/slither/__main__.py", line 712, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/usr/lib/python3.9/site-packages/slither/__main__.py", line 71, in process_all
compilations = compile_all(target, **vars(args))
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
compilations.append(CryticCompile(target, **kwargs))
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
self._compile(**kwargs)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
self._platform.compile(self, **kwargs)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/platform/hardhat.py", line 81, in compile
(compiler, version_from_config, optimized) = _get_version_from_config(config_file)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/platform/hardhat.py", line 193, in _get_version_from_config
raise InvalidCompilation(f"{config} not found")
crytic_compile.platform.exceptions.InvalidCompilation: cache/solidity-files-cache.json not found
ERROR:root:None
ERROR:root:Error in .
ERROR:root:Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/slither/__main__.py", line 712, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/usr/lib/python3.9/site-packages/slither/__main__.py", line 71, in process_all
compilations = compile_all(target, **vars(args))
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
compilations.append(CryticCompile(target, **kwargs))
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
self._compile(**kwargs)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
self._platform.compile(self, **kwargs)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/platform/hardhat.py", line 81, in compile
(compiler, version_from_config, optimized) = _get_version_from_config(config_file)
File "/home/keno/.local/lib/python3.9/site-packages/crytic_compile/platform/hardhat.py", line 193, in _get_version_from_config
raise InvalidCompilation(f"{config} not found")
crytic_compile.platform.exceptions.InvalidCompilation: cache/solidity-files-cache.json not found
Also ~works with slither --ignore-compile
, but you have run the compile task first.
However, it only analyses 1 contract?
INFO:Slither:. analyzed (1 contracts with 72 detectors), 2 result(s) found
Edit Or does it mean it found 2 issues in 1 contract? :)