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
Hey!
Although you have a function named Initialize, but it is an internal function, as for what is a internal function, I think you can look at the documentation:
Internal functions can only be called inside the current contract (more specifically,
inside the current code unit, which also includes internal library functions and
inherited functions) because they cannot be executed outside of the
context of the current contract.
so if you want to call it, you should use public or external like this:
function Initialize(uint256 _minsupply) public initializer {
__ERC20_init("ZOE CASH", "ZOE");
_minsupply = 100000000 ether;
}
As an aside, please see the documentation on installing and usage OpenZeppelin Contracts upgradeable, as you appear to have copied the contracts locally:
ok brother if need i can send my migrations and truffle contig but the problem is when you are using upgradeable token info,
you need set all the information in your deploy.js like “name,symbol,addres,supply” in the same order if the order are incorrect, then js will not work