Upgrade (layout) compatibility between OZ 4.x and 5.x

I wanted to check if there's upgrade compatibility between OZ Contracts 4.x and 5.x, or in which contracts the compatibility was preserved and which is wasn't.

I want to migrate some contracts that use ERC4626 and AccessControl from 4.x to 5.0 or 5.1. And I want to check if I will need to deploy brand new contracts or if, in principle, is safe to upgrade a 4.x contract with a 5.x one.

Thanks!

Upgrading between major versions for existing deployments is not supported, and is not safe. See discussion in How to upgrade a contract deployed with version 4.9.0 using 5.0.0 contracts?

1 Like

In version 5.0.0, I use this upgrade way...

5.0 TransparentUpgradeableProxy upgradeAndCall error - Support / Upgrades - OpenZeppelin Forum