Setting Owner on Upgradeable ERC-20 Contract

Using this tutorial: Openzeppelin-upgrades, and OpenZeppelin Contracts Wizard Transparent upgradeable

Everything seems to be working but when deploying using Hardhat, The returned owner is 0x0., and I don't seem to get any errors either, Any help is appreciated, thanks!

:1234: Code to reproduce

Here is the deploy script

// scripts/deploy.js
async function main() {

    const accounts = await ethers.provider.listAccounts();
    console.log("Accounts[0]:", accounts[0]);

    // We get the contract to deploy
    const Sample = await ethers.getContractFactory("Sample");
    console.log("Deploying Sample...");
    const sample = await Sample.deploy();
    await sample.deployed();
    console.log("Sample deployed to:", sample.address);
    await sample.initialize();
    console.log("Sample initialized.");
    console.log("Sample owner:", await sample.owner());
    .then(() => process.exit(0))
    .catch(error => {

And here is the console Output when deploying:

Compilation finished successfully
Accounts[0]: 0x4Ce...
Deploying Sample...
Sample deployed to: 0xdDB...
Sample initialized.
Sample owner: 0x000...

:computer: Environment


Hi, welcome! :wave:

Your script looks like ok, so could you please share your contract code at here?

And it seems like you only deploy an implementation without proxy contract.

Thank you for taking a look, I really appreciate it!
Here's the contract

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/// @custom:security-contact
contract Sample is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable, PausableUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable {
    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() initializer {}

    function initialize() initializer public {
        __ERC20_init("Sample", "SA");

    function pause() public onlyOwner {

    function unpause() public onlyOwner {

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);

    function _beforeTokenTransfer(address from, address to, uint256 amount)
        super._beforeTokenTransfer(from, to, amount);

    // The following functions are overrides required by Solidity.

    function _afterTokenTransfer(address from, address to, uint256 amount)
        override(ERC20Upgradeable, ERC20VotesUpgradeable)
        super._afterTokenTransfer(from, to, amount);

    function _mint(address to, uint256 amount)
        override(ERC20Upgradeable, ERC20VotesUpgradeable)
        super._mint(to, amount);

    function _burn(address account, uint256 amount)
        override(ERC20Upgradeable, ERC20VotesUpgradeable)
        super._burn(account, amount);


Again thank you so much for taking the time to look at this.