OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
431 stars 200 forks source link

Upgrading to an "unrelated" implementation contract #1491

Open frangio opened 4 years ago

frangio commented 4 years ago

After the removal of aliases (#1489) it will only be possible to upgrade to a contract with the same name. Many users keep multiple versions of the same contract side by side, with names like FooV1, FooV2. Aliases were used to change what version the name Foo refers to. One simple way in which we can cater to these users is adding a new oz upgrade-to command that can change the implementation of a proxy to one with a different name.

Syntax

oz upgrade-to [instance] [contract-name]

Example: oz upgrade-to 0x1234... FooV2.

Other

The storage layout checks should still be performed.