Closed pikonha closed 6 months ago
Installing the Openzepellin v2.5.1
causes other errors such as the following caused by the Ownable contract been placed in a different directory.
Error:
failed to resolve file: "/Users/lpicollo/dev/blockful/external-resolver/packages/contracts/lib/openzeppelin-contracts/access/Ownable.sol": No such file or directory (os error 2); check configured remappings.
--> "/Users/lpicollo/dev/blockful/external-resolver/packages/contracts/lib/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol"
"@openzeppelin/contracts/access/Ownable.sol"
fixed in [this issue](fixed in this issue)
According to the package.json the ENS contracts rely on Openzeppelin
^v4.1.0
.The problem is that OffchainDNSResolver, LowLevelCallUtils and UniversalResolve call the
isContract
function from an address which isn't supported on the Openzepplin contract since version2.x.x
(currently on5.x.x
), see docs.I've tried installing version
4.x.x
but it also doesn't expose this function, which led me to monkey patch the latest version of Openzeppelin to be able to deploy the following code locally:Is there any official workaround for it or am I doing something wrong?
The monkey patch I had to do was to add the following function on the Openzeppelin Address library: