Two copies of Ownable?
Closed this issue · 2 comments
During the process of installing ZOS it appears that both the openzeppelin-solidity
and openzeppelin-zos
packages get installed. This is evident from the presence of both those packages in the resulting node_modules directory and by looking in the package.json file in tutorials like the Basil tutorial. Unfortunately this leads to two copies of the Ownable
contract being resident in a ZOS project:
./node_modules/openzeppelin-solidity/contracts/ownership/Ownable.sol
./node_modules/openzeppelin-zos/contracts/ownership/Ownable.sol
Given that the problem I'm currently having right now has to do with a revert error occurring during the onlyOwner owner check that is part of the call to the BasilERC721 contract created during the Basil tutorial, is it possible this is the reason why? I find it hard to believe the ZOS-LIB core code would make a mistake like passing the wrong owner address to proxied/logic-contract thereby creating the issue I'm having. Given that I've also had the occasional problem during a Truffle console compile as part of a debugging attempt, where it complained about the Ownable contract being included twice, I'm wondering if this is the root cause of the issue I'm having?
I'm going to removing one of those Ownable instance as an experiment. I'm guessing it will just break everything, but it's worth a try.
It shouldn't be a problem. However, you shouldn't be importing both contracts under the same symbol.
OTOH, Truffle will complain because it cannot handle multiple contracts with the same name, to deal with that we have implemented Contracts.js
Thanks.