Module4: cannot run slither on single sol file #211
-
slither . works fine 'forge config --json' running ERROR:Slither:Unable to compile all targets. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I haven't used Slither so much to run into this error, but in the output you provided, it says |
Beta Was this translation helpful? Give feedback.
-
When you're trying to run Slither on a single file, it doesn't know which Solidity version should be used. You can manually specify it in foundry.toml file in the root of the project like so and it'll run: foundry.toml [profile.default]
src = "src"
out = "out"
libs = ["lib"]
+ solc = '0.7.6'
remappings = ['@openzeppelin/contracts=lib/openzeppelin-contracts/contracts']
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options |
Beta Was this translation helpful? Give feedback.
-
What if I already use |
Beta Was this translation helpful? Give feedback.
When you're trying to run Slither on a single file, it doesn't know which Solidity version should be used. You can manually specify it in foundry.toml file in the root of the project like so and it'll run:
foundry.toml