1

When I try to run slither . inside my contracts folder (hardhat project), I get this super weird warning

...python3.9/site-packages/crytic_compile/crytic_compile.py", line 291, in get_line_from_offset
    return lines_delimiters[offset]
KeyError: 2394
None
Error in .

1 Answer 1

2

This will solve your problem hopefully, as it did for me. (inspired by this, even though different error https://github.com/crytic/slither/issues/103)

  1. delete artifacts and cache folders created by npx hardhat compile
  2. run a fresh npx hardhat compile
  3. run slither . => works

If you know the reason behind this error, please add your answer.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.