Created
May 25, 2022 18:00
-
-
Save frangio/23dab6a10711fbd1e0ad0f95179c6c30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; | |
contract MyTokenV1 is Initializable, ERC20Upgradeable { | |
function initialize() initializer public { | |
__ERC20_init("MyToken", "MTK"); | |
} | |
} | |
contract MyTokenV2 is Initializable, ERC20Upgradeable, ERC20PermitUpgradeable { | |
function initializeV2() reinitializer(2) public { | |
__ERC20Permit_init("MyToken"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment