I am trying to create a clone from a contract that has some privileged functions and inherits from Ownable
.
I realized that after cloning the owner
variable is zeroed, so any privileged function, such as transferOwnership
, will not run.
I noticed that Ownable
has a internal function _transferOwnership
that is not protected by onlyOwner
modifier. I thought about calling it in my initializer function.
I just want to confirm that this is the right way to do it or it has a more recommended way to achieve this.
Thanks