Example of upgrade safe ERC20?

Would you happen to have an example of making the contract initializable/upgradeable in OpenZeppelin v3?

1 Like

Hi @PradhumnaPancholi,

We need to use OpenZeppelin Contracts Ethereum Package, the contract names have UpgradeSafe suffix, and instead of constructors we need to use an initializer:

A great place to start is the Preset ERC20PresetMinterPauser in OpenZeppelin Contracts Ethereum Package:

We can use OpenZeppelin Upgrades Plugins for Truffle and Buidler to deploy upgradeable contracts: https://docs.openzeppelin.com/upgrades-plugins/1.x/

If you get stuck I can put together a simple example.