I have this smart contract called Party.sol
pragma solidity 0.8.17;
import "../tokens/IERC721.sol";
import "./PartyGovernanceNFT.sol";
import "./PartyGovernance.sol";
I'm trying to extract the call graph using slither :
slither Party.sol --print call-graph
I get this error :
crytic_compile.platform.exceptions.InvalidCompilation: Invalid solc compilation Error: Source "tokens/IERC721.sol" not found: File not found. Searched the following locations: "".
--> Party.sol:4:1:
|
| import "../tokens/IERC721.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is there any configuration I need to do to the compiler or slither in order to read correctly the imports?
I got exctly what I expected, I putted a description and code and got out what I looked for
When encountering the error while analyzing the
Party.solsmart contract with slither, it is essential to verify that theIERC721.solfile is located in the correct directory relative toParty.sol.Double-checking the import statement's relative path is also crucial, as
../tokens/IERC721.solsuggests that theIERC721.solfile should be in a directory one level above the location ofParty.solEnsuring the accurate placement of files and correct import paths should usually resolve the issue.If needed, consider using the full absolute path or configuring slither to include the correct path to the "tokens" directory.
If the error persists, it might be helpful to explore crytic-compile library documentation for additional insights on compiling contracts.