Source: Official Openzeppelin youtube channel
All resources related to Upgradability from Openzeppelin: Click here
Depending on where we put the upgradeTo()
function we decide b/w two types of upgradable smart contracts.
UUPS is newer than Transparent proxy.
Costs comparison of deployment and usage:
Upgrading contract with wrong order of variables compared to the older version of deployed contract throws error as we can see below:
This is becoz of the way solidity allocates the storage locaitons in a linear manner:
More sources: