Coder Social home page Coder Social logo

Comments (9)

ItsNickBarry avatar ItsNickBarry commented on June 18, 2024

I'm not familiar with Slither. Does it run the compiler itself, or can it use the Hardhat-generated artifacts?

from hardhat-dependency-compiler.

krasi-georgiev avatar krasi-georgiev commented on June 18, 2024

By the looks of the output it uses hardhat to compile and probably it uses the artifacts after that

Here is the output.

slither .  
'npx hardhat compile' running
Nothing to compile

(node:2977304) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2977304) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/slither_analyzer-0.7.0-py3.8.egg/slither/__main__.py", line 712, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/usr/local/lib/python3.8/dist-packages/slither_analyzer-0.7.0-py3.8.egg/slither/__main__.py", line 71, in process_all
    compilations = compile_all(target, **vars(args))
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
    self._compile(**kwargs)
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
    self._platform.compile(self, **kwargs)
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/platform/hardhat.py", line 145, in compile
    path = convert_filename(
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/utils/naming.py", line 102, in convert_filename
    raise InvalidCompilation(f"Unknown file: {filename}")
crytic_compile.platform.exceptions.InvalidCompilation: Unknown file: contracts/_hardhat-dependency-compiler/tellorplayground/contracts/TellorPlayground.sol
ERROR:root:None
ERROR:root:Error in .
ERROR:root:Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/slither_analyzer-0.7.0-py3.8.egg/slither/__main__.py", line 712, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/usr/local/lib/python3.8/dist-packages/slither_analyzer-0.7.0-py3.8.egg/slither/__main__.py", line 71, in process_all
    compilations = compile_all(target, **vars(args))
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 1076, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 137, in __init__
    self._compile(**kwargs)
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/crytic_compile.py", line 987, in _compile
    self._platform.compile(self, **kwargs)
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/platform/hardhat.py", line 145, in compile
    path = convert_filename(
  File "/home/krasi/.local/lib/python3.8/site-packages/crytic_compile/utils/naming.py", line 102, in convert_filename
    raise InvalidCompilation(f"Unknown file: {filename}")
crytic_compile.platform.exceptions.InvalidCompilation: Unknown file: contracts/_hardhat-dependency-compiler/tellorplayground/contracts/TellorPlayground.sol

from hardhat-dependency-compiler.

ItsNickBarry avatar ItsNickBarry commented on June 18, 2024

@krasi-georgiev See the options added in 1.1.0.

from hardhat-dependency-compiler.

krasi-georgiev avatar krasi-georgiev commented on June 18, 2024

Thanks for adding this.
Not sure why the slither team doesn't reply.

I added it but still getting the same error.
https://github.com/tellor-io/chorus/blob/main/hardhat.config.js#L84

Here is the CI run
https://github.com/tellor-io/chorus/runs/2027921857

from hardhat-dependency-compiler.

ItsNickBarry avatar ItsNickBarry commented on June 18, 2024

You need to set keep to true.

from hardhat-dependency-compiler.

ItsNickBarry avatar ItsNickBarry commented on June 18, 2024

Might also need to hardhat clean.

from hardhat-dependency-compiler.

krasi-georgiev avatar krasi-georgiev commented on June 18, 2024

Yep I see the logic now, thanks, it worked!

from hardhat-dependency-compiler.

krasi-georgiev avatar krasi-georgiev commented on June 18, 2024

ooh shoot, now solhint complains
https://github.com/tellor-io/chorus/runs/2028100038

from hardhat-dependency-compiler.

ItsNickBarry avatar ItsNickBarry commented on June 18, 2024

I have an idea of how to fix that. Please open a new issue and I'll get to it as soon as I can.

from hardhat-dependency-compiler.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.