I've been using the transparent upgradeable proxy for a long time. The version before 5.0 contained
two function called upgradeTo and upgradeToAndCall which was was easy to use as I don't wanna initialize the proxy everytime I upgrade.
The new version doesn't seem to have the upgradeTo function, it only contains upgradeToAndCall , what is the work around? If I send empty data e.g. 0x00, will it work like upgradeTo?
UUPSUpgradeable, TransparentUpgradeableProxy and ProxyAdmin: Removed upgradeTo and upgrade functions, and made upgradeToAndCall and upgradeAndCall ignore the data argument if it is empty. It is no longer possible to invoke the receive function (or send value with empty data) along with an upgrade. (#4382)
I also tried to run a simulation, seems like it is calling the given data in the implementation. because 0x577a342e99b0064ea759ca22e5630a6da20c6c5c is the current implementation contract.
Also I can't seem to find any exact error, even in tenderly the error is not clear, it just seems that the current implementation contract got called and it failed.
In the previous versions, we had to deploy the proxyAdmin and pass it's address in the proxy constructor, but in V5 the proxy deploys it's own admin. It also makes the passed admin address the owner of new admin contract.
So basically when I used the old method with the new contract, my Proxy's admin was the admin contract that it deployed, and the other admin contract I deployed became the owner of this admin contract. Resulting in this mess.