I CREATED a simple new smart contract to deploy proxies
but proxies not deploying
ERROR Error: Contract TruffleContract does not have a function Initialize
Environment
truffle5, truffle-upgrades plugin
Details
when i made “npxtruffle deploy” it show this error
ERROR Error: Contract TruffleContract does not have a function Initialize
Code to reproduce
solidity simple code
// SPDX-License-Identifier: UNLICENSE
pragma solidity ^0.8.0;
import "./IERC20Upgradeable.sol";
import "./extensions/IERC20MetadataUpgradeable.sol";
import "./utils/ContextUpgradeable.sol";
import "./proxy/utils/Initializable.sol";
import "./OwnableUpgradeable.sol";
import "./ERC20Upgradeable.sol";
import "./utils/math/SafeMathUpgradeable.sol";
contract Zoe_cash_v1 is Initializable, OwnableUpgradeable,ERC20Upgradeable {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
function Initialize(uint256 _minsupply) internal initializer {
__ERC20_init("ZOE CASH", "ZOE");
_minsupply = 100000000 ether;
}
}
migration code
const Zoe_cash_v1 = artifacts.require('Zoe_cash_v1');
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
module.exports = async function (deployer) {
await deployProxy(Zoe_cash_v1, [""], { deployer, initializer: 'Initialize' });
};