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
376 stars 116 forks source link

How come EthBox is a proxy without `is Migratable`? #129

Closed mesqueeb closed 5 years ago

mesqueeb commented 6 years ago

From the docs, it was clear that upgradable proxies should be: is Migratable

However, follownig the governance-with-multisig guide, I noticed that EthBox is just contract EthBox {

The guide mentions "3- Create a new upgradeable instance of your contract"

However, from the steps I fail to understand which step exactly makes EthBox an upgradable contract:

$ npx zos add EthBox // compile
$ npx zos push --skip-compile --network local // create `zos.local.json`
$ npx zos create EthBox --network local // deploy contract
spalladino commented 6 years ago

Hey @mesqueeb, thanks for the report! This is an issue that has come up several times, although on different projects. The recommended way to use upgradeable contracts is by extending Migratable, but they can work perfectly without relying on that contract. As a matter of fact, the only requirement is that you don't have a constructor.

We have logged an issue to review the Migratable base contract and document it appropriately, that we'll be workin on during this sprint. I hope it helps clarify things!

mesqueeb commented 6 years ago

I'm just really confused how it's possible for it to be upgradable. Is zeppelin CLI using a special deploy method where it's not deploying it as a regular contract but as something else?

spalladino commented 6 years ago

Yep! The CLI actually deploys your contract, but when you create an instance, it creates a proxy to that contract. You can read more about that here.

facuspagnuolo commented 5 years ago

The main concern raised in the issue was answered above. Since there was no more activity, we are closing it. If there are any further questions please open a new issue. Thanks!