Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ERC 1167, Clone Factory #1162

Closed
shrugs opened this issue Aug 8, 2018 · 3 comments
Closed

Implement ERC 1167, Clone Factory #1162

shrugs opened this issue Aug 8, 2018 · 3 comments

Comments

@shrugs
Copy link
Contributor

@shrugs shrugs commented Aug 8, 2018

馃帀 Description

When 1167 is finalized in the new week, it'd be good to have an OpenZeppelin implementation.

https://eips.ethereum.org/EIPS/eip-1167

  • 馃搱 This is a feature request.
@shrugs shrugs self-assigned this Aug 8, 2018
@shrugs shrugs removed their assignment Aug 8, 2018
@jbogacz

This comment has been minimized.

Copy link
Contributor

@jbogacz jbogacz commented Sep 20, 2018

Hey folks, I'd like to take care of this if it's still not touched.

@nventuro

This comment has been minimized.

Copy link
Member

@nventuro nventuro commented Sep 20, 2018

@jbogacz go ahead! I'll gladly review your contribution once it's done :)

jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Sep 28, 2018
jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Sep 28, 2018
jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Oct 2, 2018
* Initialize master contract inside factory mock constructor

* Invoke CloneCreated event inside CloneFactory

* Add unit test to validate clone instance bytecode
jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Oct 4, 2018
jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Oct 4, 2018
* Initialize master contract inside factory mock constructor

* Invoke CloneCreated event inside CloneFactory

* Add unit test to validate clone instance bytecode
jbogacz referenced this issue in jbogacz/openzeppelin-solidity Oct 4, 2018
jbogacz added a commit to jbogacz/openzeppelin-solidity that referenced this issue Oct 4, 2018
@nventuro

This comment has been minimized.

Copy link
Member

@nventuro nventuro commented Jan 18, 2019

After much discussion, we've decided tooling is not yet ready to get something like this into OpenZeppelin. There are too many caveats related to proxies (e.g. constructors, self-destruct) that allow for easy misuse, which go against our design principles.

Having some sort of way to retrieve the constructor of a contract type at compile time, check for self destruction, etc., would allow for this to be safely implemented, at which point we will reconsider including this in the library.

Closing the issue until such a time comes 馃槢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.