Help: Compare two deployed implementations to see if they are "upgrade safe"

Hi, we are using OZ Upgrades Plugin. We had our previously deployed implementations in mainnet.json but when we deployed the new implementations (to do the upgrade later), we used deployImplementation() by mistake and not prepareUpgrade() which was the original intention.

Do we have a workaround now to compare these implementations and make sure they are upgrade safe before calling upgradeTo() ? (both of them are deployed in Mainnet now)

Also, the new implementations are also now registered on mainnet.json is there any problem with that? Or the result in the file is the same wether deployImplementation or prepareUpgrade was used?

Thanks!
Julian

@ericglau Any suggestion on what we can do here? Also really worried about the impact on the network file (if any) by using that way instead of prepareUpgrade. Thanks pal!!

@julianmrodri You should be able to simply call prepareUpgrade even if the implementation was already deployed. It will detect the already deployed implementation from the mainnet.json and not redeploy it, but will still perform upgrade safety checks.

1 Like

Thanks!, so I guess in terms of the network file I should not worry. Its the same end result.

Yes, the network file should look the same. prepareUpgrade just performs additional validations compared to what deployImplementation does.

1 Like