Issue related to openzeppelin-contracts-ethereum-package Ownable.sol

With the latest implementation of Ownable.sol , there is no way straight fwd way to set owner other than the deployer.

One need to deploy and then need to transferOwnership from the deployer account.

This is not so optimal pattern , especially , if using the upgradable proxy pattern where the actual deployer…is the a contract which does not provide a way to do that …like this

In the previous implementation of Ownable there was an initilize function which enable that.
/** * @dev Initializes the contract setting the deployer as the initial owner. */ function initialize(address sender) public initializer { _owner = sender; emit OwnershipTransferred(address(0), _owner); }


1 Like

Hi @Oren,

Thanks for raising.
Discussion on this issue can be found in OpenZeppelin Contracts:

Also see the following comment: