OpenZeppelin / openzeppelin-labs

A space for the community to interact and exchange ideas on the OpenZeppelin platform. Do not use in production!
https://openzeppelin.com/
MIT License
375 stars 116 forks source link

Preprocessor for adapting contracts to be valid backing implementations for proxies #71

Closed spalladino closed 6 years ago

spalladino commented 6 years ago

With the fixed proxy model, any Solidity contract can be a backing implementation for a proxy as long as it does not rely on any constructor logic. Such logic needs to be moved to an initialize method, to be called only once.

Research building a preprocessing step for automating this procedure with existing contracts.

frangio commented 6 years ago

I don't think codemod is the right concept here because it is apparently a tool used for refactors.

When I proposed this idea I was talking about a preprocessing step to be always run before deploying a new version of a contract.

frangio commented 6 years ago

Alternatively a linter to validate, instead of a preprocessor.

facuspagnuolo commented 6 years ago

@spalladino can I close this one since https://github.com/zeppelinos/labs/pull/127 was already merged?

spalladino commented 6 years ago

Closed!