I'm trying to get my head around the Ownable role in Upgradeable contracts in open zeppelin.
It seems there have been a lot of updates recently and most tutorials and answers are therefore outdated.
I've used this tutorial: https://medium.com/upstate-interactive/how-to-build-a-contract-factory-that-creates-contract-clones-efcc9619be0b
It mentions the use of @openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol
that has an initiate
function that I should use.
However, this package seems to be outdated an there is now import @openzeppelin/upgrades/contracts/ownership/Ownable.sol
, containing a promising OpenZeppelinUpgradesOwnable
, but it seems to be just a copy and paste from the normal Ownable
.
I basically want to have a simple thing: Deploy a contract via a Proxy Factory and set the owner within contact creation as argument:
function initialize(string memory tokenName, string memory tokenSymbol, address owner) public {
_name = tokenName;
_symbol = tokenSymbol;
// SET THE OWNER HERE
}
What are best practises around that?
Is it as well possible to add multiple owners?