How to set Ownership during deployment

Hi @ngurmen,

You need to call __Ownable_init() to initialize the owner in your initialize function.

When you deploy your contract you also need to call the initialize function. You can do this using the Upgrade Plugins.

If you were to deploy a contract with an initialize function without using the Upgrades Plugins (e.g. as a regular, non-upgradeable contract), you should ensure that you deploy and call initialize in the same transaction, as any account can call initialize.

Please see the documentation for how to use OpenZeppelin Contracts Upgradeable:
https://docs.openzeppelin.com/contracts/3.x/upgradeable

You can follow these step by step tutorials to deploy an upgradeable contract.