Is there anything bad with removing a contracts initializer on upgrades? Or in my case im thinking of changing the logic in the initializer and use it as a reinitializer function. Is this bad practice?
Should i be creating a intializer_V2() function instead?
Environment
Hardhat
If you delete the original initializer, then that logic would not be available to any newly deployed proxies that use the new implementation.
Instead, you can use a separate reinitializer function and include versioning, so that if a new proxy is deployed later on, you can call the initializers in order. In this case, v2's reinitializer is more of a migration function to get from v1 to v2.
1 Like
Thank you for another excellent answer Eric. This answered my question perfectly
1 Like