You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Locally It would be possible by passing the argument hardhat-artifacts-directory for example:
slither --hardhat-artifacts-directory=build .
But as the slither args are evaluated after the compile crytic-compile it is not possible to pass this argument even if it is set on the argument slither-args
# -- calling the compiler before evaluating the extra arguments ---
crytic-compile "$TARGET" $IGNORECOMPILEFLAG
if [[ -z "$SLITHERARGS" ]]; then
slither "$TARGET" $SARIFFLAG $IGNORECOMPILEFLAG $CONFIGFLAG
else
echo "[-] SLITHERARGS provided. Running slither with extra arguments"
printf "%s\n" "$SLITHERARGS" | xargs slither "$TARGET" $SARIFFLAG $IGNORECOMPILEFLAG $CONFIGFLAG
fi
Error
Traceback (most recent call last):
File "/opt/slither/bin/crytic-compile", line 8, in <module>
sys.exit(main())
File "/opt/slither/lib/python3.9/site-packages/crytic_compile/__main__.py", line 192, in main
compilations = compile_all(**vars(args))
File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 637, in compile_all
compilations.append(CryticCompile(target, **kwargs))
File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 117, in __init__
self._compile(**kwargs)
File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 548, in _compile
self._platform.compile(self, **kwargs)
File "/opt/slither/lib/python3.9/site-packages/crytic_compile/platform/hardhat.py", line 87, in compile
os.listdir(build_directory), key=lambda x: os.path.getmtime(Path(build_directory, x))
FileNotFoundError: [Errno 2] No such file or directory: 'artifacts/build-info'
Thanks
The text was updated successfully, but these errors were encountered:
Hi! Thanks for the report. This is a similar issue to the one in #3. As slither already runs crytic-compile by itself, we can probably just drop the extra call before running slither without any side effects. Once that call is gone, you should be able to specify the option through slither's config file or args.
This extra call is breaking some use-cases that require custom crytic-compile
options, as there is no way to pass them. As slither will invoke
the compilation by itself when needed, this extra call is not really
needed and should be safe to drop.
Fixes: #3, #4
Locally It would be possible by passing the argument
hardhat-artifacts-directory
for example:But as the slither args are evaluated after the compile
crytic-compile
it is not possible to pass this argument even if it is set on the argumentslither-args
Error
Thanks
The text was updated successfully, but these errors were encountered: