FactoryProxy pattern for cheap deployments of upgradeable contracts

Recently watched Hadrien's great video on Cheap Contract Deployment Through Clones. While explaining that if upgradeability isn't a requirement then the best pattern is to use a CloneFactory, he mentions that the FactoryProxy by itself isn't even really upgradeable, and adds that one would have to use the TransparentProxy pattern to achieve the desired result, but that there would need to be an upper layer on top of that is well.

Given the great work with both openzeppelin-upgrades and openzeppelin-contracts-upgradeable, I was wondering what then is the preferred pattern for an upgradeable contract that we plan to deploy many times? i.e. if you do want to be able to upgrade the implementation but also want the cheaper deployment prices, what is the best pattern between the various tools to achieve the desired result?

UPDATE: I think this pattern checks the box of what I was looking for! Would be cool if this was incorporated into Open Zeppelin as well.

The reason it hasn't been incorporated so far is that it's few lines of code that have some challenge to generalize. Because each factory is about a specific kind of contract you would want to deploy.

1 Like