Upgradable contract deploying using hardhat ignition

I have a contract like this:

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

import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable {

    function initialize(address initialOwner) initializer public {
        __ERC721_init("MyToken", "MTK");
        __Ownable_init(initialOwner);
    }
}

Question: How to write a script to deploy this contract using hardhat-ignition?

2 Likes

Same problem here. I simply can't find a way to deploy a proxy using ignition.

On the other hand, by using normal scripts, I'm getting ProviderError: execution reverted.

The contract compiles properly and was deployed yesterday using ignition with no problem as a normal contract (not proxy)