Hey Guys Hi ALl !
*I'm trying to use SLITHER (analizy tool ) but when i try to use it on a contract what inherit from Openzeppelin it give me this error(photo)
Error: Source "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol" not found: File not found."
Error: Source "@openzeppelin/contracts/access/Ownable.sol" not found: File not found.
This is My Contract :
contract WeakToken is ERC20Pausable, Ownable{
etc…….
}
Some of you used SLITHER Tool ?
And you try with contract what inherit from Openzeppeling ?*
Best Answer
Slither use crytic-compile for compiling your contracts. If you specify the path to your contract
crytic-compile
will try to compile it using your installedsolc
version.solc
can't resolve your"@openzeppelin"
imports. I am going to guess you are using some tooling like Hardhat or Truffle, if you are I would recommend usingslither .
instead of specifying the path to the contract; in this way, crytic can realize you are using a framework like Hardhat and compile with it.Another solution could be using the
--solc-remaps
fromcrytici-compile
, your command would be something like:Answering your last questions: Yes, I have used slither with contracts that inherit from openzeppelin contracts. IMO The easiest way would be using Hardhat or Truffle.