Open DanielForTests opened 4 months ago
The flag should probably be removed unless we re-add support (see https://github.com/crytic/crytic-compile/issues/187). Slither needs to perform a full semantic analysis of contracts referenced in an AST and requiring a user to determine the necessary JSON artifacts sounds like it would be difficult to use. What is your use case? Perhaps we can offer an alternative
My mistake, I opened the issue from the wrong account. That's me.
I see, so it was removed and is no longer available. I wanted to use it for analyzing individual contracts. Currently, you can only reduce the scope to files, but a file File.sol
might contain two contracts contract ContractA
and contract ContractB
that are completely separate "root contracts" (i.e. they are not inherited by anything else and are the final contracts meant for deployment)
I want to be able to analyze just ContractA
if I want to.
I know this is a pretty rare use case, but our platform demands it. I think what I will have to do is parse the AST of the entire project, determine a sort of dependency/inheritance graph and using those filter out the issues from the json output of slither which are not related to the contract I want reviewed.
Just as things are currently, analyzing a single file is quite buggy regardless. If the project uses foundry for example, slither .
works just fine but specifying a contract makes slither get the wrong evm version (always chooses paris) if foundry.toml
doesn't specify an exact solc_version
,. Thankfully I can work around this
The flag should probably be removed unless we re-add support (see crytic/crytic-compile#187). Slither needs to perform a full semantic analysis of contracts referenced in an AST and requiring a user to determine the necessary JSON artifacts sounds like it would be difficult to use. What is your use case? Perhaps we can offer an alternative
I would like to analyse smart contract AST with your Contract class, since it exposes a very well designed api for the AST structure. Now, how to parse an AST from the solc compilation with Slither? It should be very useful to provide this functionality.
Describe the issue:
The
--help
command claims you can use the flag--solc-ast
to provide a contract as a json AST, however it does not do anything at all.Code example to reproduce the issue:
https://github.com/DanielForTests/foundry_without_packages
Version:
0.10.3
Relevant log output: