ToucanProtocol / dynamic-fee-pools

Fee calculator contracts for Toucan Protocol pools
2 stars 3 forks source link

Slither fails to run #34

Closed 0xmichalis closed 8 months ago

0xmichalis commented 10 months ago

Slither 0.8.3 currently fails to run in the repo. I've only used 0.8.3 (this is the version we currently use internally at Toucan) but also worth to try out with the latest version of Slither. We may have to report this issue upstream but ideally we would need to pin down the exact part of the code that causes the failure so we provide a minimal reproducer.

$ slither .
'forge clean' running (wd: /home/michalis/Code/Toucan/dynamic-fee-pools)
'forge build --build-info --force' running
Compiling 55 files with 0.8.19
Solc 0.8.19 finished in 7.92s
Compiler run successful!

Traceback (most recent call last):
  File "/home/michalis/.local/lib/python3.9/site-packages/slither/__main__.py", line 744, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/home/michalis/.local/lib/python3.9/site-packages/slither/__main__.py", line 87, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "/home/michalis/.local/lib/python3.9/site-packages/slither/__main__.py", line 70, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "/home/michalis/.local/lib/python3.9/site-packages/slither/slither.py", line 95, in __init__
    parser.parse_top_level_from_loaded_json(ast, path)
  File "/home/michalis/.local/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 320, in parse_top_level_from_loaded_json
    raise SlitherException(f"Top level {top_level_data[self.get_key()]} not supported")
slither.exceptions.SlitherException: Top level UsingForDirective not supported
Error:
Top level UsingForDirective not supported
Please report an issue to https://github.com/crytic/slither/issues
0xmichalis commented 9 months ago

May be related to PRBMath

https://github.com/crytic/slither/issues/1352 https://github.com/crytic/slither/issues/1607

0xmichalis commented 9 months ago

This issue is fixed in 0.10.0

0xmichalis commented 8 months ago

Fixed by https://github.com/ToucanProtocol/dynamic-fee-pools/pull/48