You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use a combination of OZ version 4 and 5 in the same repository because we have a set of different contracts in the same project.
To do that we have entries like the following: "@openzeppelin/contracts-upgradeable-5.0.2": "npm:@openzeppelin/[email protected]" in the package.json file.
Openzeppelin V5 upgradables expect a to have the regular contracts (non upgradables) in a fixed place.
When we try to compile we get: Error HH411: The library @openzeppelin/contracts, imported from @openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol, is not installed. Try installing it using npm.
This is because ERC721Upgradeable is importing: IERC721 from @openzeppelin/contracts/token/ERC721/IERC721.sol so it expects to have IERC721.sol inside the @openzeppelin/contracts directory.
It seems that having the regular version of the contracts as a implicit dependency of the upgradable ones is a bad idea or if this is the choose solution it sounds like a good idea to add the version to the directory (and also to the package.json dependencies).
The text was updated successfully, but these errors were encountered:
"@openzeppelin/contracts-upgradeable-5.0.2": "npm:@openzeppelin/[email protected]"
in thepackage.json
file.Error HH411: The library @openzeppelin/contracts, imported from @openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol, is not installed. Try installing it using npm.
ERC721Upgradeable
is importing:IERC721
from@openzeppelin/contracts/token/ERC721/IERC721.sol
so it expects to haveIERC721.sol
inside the@openzeppelin/contracts
directory.It seems that having the regular version of the contracts as a implicit dependency of the upgradable ones is a bad idea or if this is the choose solution it sounds like a good idea to add the version to the directory (and also to the package.json dependencies).
The text was updated successfully, but these errors were encountered: