Deployed upgradeable ERC20, Proxy, and Admin based upon @abcoathup forum post for Upgradeable ERC20, token name, symbol, and supply were entered in 2_deployer_js script, I entered initial supply amount in the script to be 50,000 tokens, migrated it to live and only 0.0000.....5 tokens were actually deployed. And this seems to be because I should have added additional zeroes onto the 50,000 to account for ethereum number formatting standards....Am I correct in thinking this? Can I upgrade the contract to deploy the correct amount of tokens? I need to fix this as soon as possible @abcoathup
Environment
Truffle Upgrades 1.31, VSCode Wsl2,
Details
The upgraded ERC20 and migrations script did not deploy the correct amount of tokens. Nor did I notice any specific instructions regarding total supply input in js script.
Yeah, the default decimals is 18, so if you want to set the total supply is 50000 token, it should be 5000 * 10 ** 18, as for how to upgrade the contract, you can have a look at this article: OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat
Thanks. I transferred ownership of the admin proxy into my gnosis safe. It then appears that I should be able to add a minter which would then allow me to mint the correct token amount, correct?
In terms of the total supply “formula” that you listed - do you mean that I can enter the exact sequence of numbers and operators you mentioned - 5000*10**18 directly into the java script migrations file in the exact location where I originally inputted 50000? Are you saying I wont have any issues with js or the compiler picking up the correct initial supply?
It baffles me that afer 10 years of innovations, upgrades, proxies, and now eth2 beacon chain that we still have to manually transform the initial supply to mesh with Ethereum…
You would need to upgrade to a new implementation contract which included the minting functionality to increase the supply, either as a one off or to allow further minting.