Upgradeable contract: The deployer is the owner: AssertionError

This code doesn't appear to be up to date. I don't think Ownable is even a contract when it's from the contracts-ethereum-package. I had to do this instead:

import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol"; 
import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";

contract MyContract is Initializable, OwnableUpgradeSafe {
  function initialize() public initializer {
    __Ownable_init();
}

Note I'm importing the contracts-ethereum-package version of Initializable, and also note I'm calling __Ownable_init(); instead of Ownable.initialize()

2 Likes