Skip to content
This repository was archived by the owner on Jul 11, 2019. It is now read-only.
This repository was archived by the owner on Jul 11, 2019. It is now read-only.

Consider removing proxy creation from the responsibilities of App #210

@frangio

Description

@frangio

We currently have a ProxyFactory contract that provides an API to create proxies and initialize them. The functionality is exposed through BaseApp as create and createAndCall.

The main motivation behind these functions was to provide an atomic way to create a proxy and initialize it. This was needed because with initializer functions initialization is a function call separate from contract creation. With the upcoming initializer contracts model (OpenZeppelin/openzeppelin-labs#120), initialization is done atomically at the moment the proxy is created.[1]

Since the atomicity will already be guaranteed, it's no longer a motivation for create and createAndCall. We're only left with the downsides of forcing proxy creation to happen through the App: mainly that the original msg.sender that requests the instance is lost. Another possible downside is that the App is stuck with one implementation of Proxy, whereas if deployment happened separately it could use different versions of Proxy if there are new optimizations or features.

Additionally, we think reducing the interface and the responsibilities of App is a good idea.

Thus, we want to consider removing create and createAndCall from App, and to deploy proxies with normal contract creation transactions.


[1] After discussing this we realized that we could already guarantee atomicity by invoking the initializer function through a delegatecall directly to the logic contract in the proxy constructor. We may want to implement this now by changing the proxy in this way, instead of waiting for initializer contracts to land.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:refactorRefactor existing code without adding new featurestopic:upgradeabilityUpgreadeability for user contracts

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions