Comments (9)
I'm not familiar with Slither. Does it run the compiler itself, or can it use the Hardhat-generated artifacts?
from hardhat-dependency-compiler.
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.
@krasi-georgiev See the options added in 1.1.0
.
from hardhat-dependency-compiler.
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.
You need to set keep
to true
.
from hardhat-dependency-compiler.
Might also need to hardhat clean
.
from hardhat-dependency-compiler.
Yep I see the logic now, thanks, it worked!
from hardhat-dependency-compiler.
ooh shoot, now solhint complains
https://github.com/tellor-io/chorus/runs/2028100038
from hardhat-dependency-compiler.
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)
- Unexpected hardhat test workflow HOT 1
- 'dependencyCompiler' does not exist in type 'HardhatUserConfig' HOT 1
- Add Vyper support
- Error: resolved path must be inside of sources directory HOT 11
- Get artifact of solidity file in external GitHub repository HOT 1
- With the option keep:false solhint fails HOT 3
- Doesn't work with GitHub actions HOT 2
- does not take into account dependency resolution HOT 2
- Error HH306: The 'file' parameter expects a value, but none was passed. HOT 1
- Document usage of Hardhat overrides
- Error: temporary source directory must have been generated by hardhat-dependency-compiler HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardhat-dependency-compiler.