I am getting a not found error even if I have installed the openzeppelin libraries and imported correctly. Why am I getting this error?
Error HH404: File @openzeppelin/contracts/ownership/Ownable.sol, imported from contracts/PositionManager.sol, not found.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
I am using Hardhat 2.6.4;
The error message tells you that it cannot find the Ownable file when it is trying to import it so the question is, how do you put an Ownable file on the path that you are trying to import? hint: it has to do with installing the
The correct import statement for OpenZeppelin Contracts 4.x is:
The position of the Ownable.sol file has changed to the packages\OpenZeppelin\email@example.com\contracts\access and you are probably going with a deprecated version of the doc.