Proxy vs Clone

I'm trying to understand if there is any reason to use Proxy.sol over Clones.sol when deploying non-upgradeable proxies. Given the gas savings of Clones.sol, does anyone have ideas why someone would use Proxy.sol instead?


1 Like

I'd be interested in the OZ team's explanation as well as I was about to start a project that used the clone class.

My understanding was that the proxy class was intended to be the core of the upgradable pattern classes and not really intended to be used solo while the clone class was intended to be used directly when upgradability wasn't needed.

1 Like

This is correct. But my doubt is why do we have to use the contracts inside the contracts-upgradeable directory when implementing a factory with the Clones contract.

If you use proxy they can keep the values of the variables in each update. For example a list of wallets and the amount of each one.