Governance & Transparent Proxy

Hi all,

I'm looking to use OpenZeppelin's new governance contracts in some demos I'm building, however, I'm running into an issue.

Typically, when I create (transparent) upgradeable smart contracts, I follow the following steps:

  1. Deploy an implementation
  2. Deploy a proxy admin
  3. Deploy a proxy
  4. Use the proxy admin to set the implementation address to the proxy

However, I'm having a hard time doing this with the governance contracts, as I'm not sure who should be the proxy admin. Would the proxy admin be just the proxy itself? Then if I go to propose something on the proxy, the proxy will be the one to upgrade itself if need be?

I think I'm thinking about this right?

Sorry for the delay in replying to this.

When you say "who should be the proxy admin" it's a little confusing because your step 2 is "deploy a proxy admin", so it's pretty clear that the proxy admin contract is the result of your 2nd deployment. But I guess by "proxy admin" you mean the account that can use the ProxyAdmin instance to upgrade the proxy.

If you want a Governor instance that is able to upgrade itself through the governance process, then yes it would be the proxy itself. You're thinking about it correctly!

Whoops, my mistake for not following up! I went to the OZ workshop as well and you answered me there. I'm planning on just using UUPS for governance examples, it makes a lot more sense to me, and I'm willing to bet others too.

Also, it's the "cheaper" version so, that's good too.