0

hello I'm trying to compile a contract with hardhat but I get the following error

HH409:Trying to import @openzeppelin/contracts/access/ownable.sol from contracts/SimpleStorage.sol, but it has an incorrect casing.

Here is my import: import "@openzeppelin/contracts/access/ownable.sol";.

Then while searching the forums I am offered another import which is the following: ./interfaces/univ3/IUniswapV3Helper.sol; but at this moment I get another error which is

error HH404 File ./interfaces/univ3/IUniswapV3Helper.sol, imported from contracts/SimpleStorage.sol, not found; 

Could you tell me what I'm not doing well, thank you.

Solidity v0.8.24

Hardhat v2.20.1

node v18.16.0

yarn v1.22.21

.

1 Answer 1

0

The error speaks for itself, "but it has an incorrect casing".

This means the import should be:

import "@openzeppelin/contracts/access/Ownable.sol";

Just the word Ownable starts with a capital O, not the small one.

I am not sure what you are trying to do, but IUniswapHelper is a different interface, completely different from Ownable. That's not an alternative for Ownable.

And if you want to use that interface you need to have it inside your directory. Do share more information about your goal, for a better explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.