upgrade-scripts icon indicating copy to clipboard operation
upgrade-scripts copied to clipboard

Add support for transparent proxies

Open jjranalli opened this issue 2 years ago • 3 comments

Wondering if there's any plan for supporting transparent proxies

Awesome scripts btw 🫡

jjranalli avatar May 06 '23 19:05 jjranalli

What doesn't work? I haven't tried it myself, but I imagine it should be quite easy to adapt. Can you adapt the example here to work with transparent proxies?

  • https://github.com/0xPhaze/upgrade-scripts/blob/master/exampleOZ/src/ExampleSetupScript.sol

0xPhaze avatar May 09 '23 07:05 0xPhaze

@0xPhaze sure, I'll be able to do it later this week.

upon further investigation, the issue should come from the fact that in UUPS proxies the upgrade logic is located in the implementation, while in Transparent proxies it lives in the proxy.

so when calling setUpProxy it reverts in assertIsERC1967Upgrade at this line, as the function looks for the proxiableUUID in the implementation

jjranalli avatar May 09 '23 16:05 jjranalli

Would a simple override of the function work? I can take a look at it if you get stuck anywhere

0xPhaze avatar May 09 '23 19:05 0xPhaze