New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate conversion to initializers #57

Open
frangio opened this Issue Aug 30, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@frangio
Copy link
Member

frangio commented Aug 30, 2018

Since normal constructors cannot be used in upgradeable contracts, users currently have to convert the constructors to initializer functions and use a mechanism like Initializable to protect those functions.

This adds friction to the process of creating an upgradeable contract. We've been playing around with several ideas to automate this preprocessing and got down to two alternatives: 1) source code preprocessing to generate the initializer functions, 2) bytecode preprocessing to generate initializer contracts. This last idea grew out of the proposal in zeppelinos/zos-lib#61.

There are some related experiments in the labs repo: constructor without arguments, constructor with arguments but very inefficient, and source code preprocessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment