0xPhaze / upgrade-scripts

Foundry scripts to automate and keep track of deployments and proxy upgrades.
77 stars 5 forks source link

Add support for transparent proxies #8

Open jjranalli opened 1 year ago

jjranalli commented 1 year ago

Wondering if there's any plan for supporting transparent proxies

Awesome scripts btw 🫡

0xPhaze commented 1 year ago

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?

jjranalli commented 1 year ago

@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

0xPhaze commented 1 year ago

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