OpenZeppelin / openzeppelin-sdk

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

Upgrade pushes all implementations contracts to the network #1508

Closed spalladino closed 4 years ago

spalladino commented 4 years ago

The change in https://github.com/OpenZeppelin/openzeppelin-sdk/pull/1426 makes create push only the required contracts to the network. However, running oz upgrade will push all contracts, defeating the purpose of this change.

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment upgradeable
? Pick a network development
? Pick a contract to deploy Box
✓ Contract Box deployed
All implementations have been deployed
...
✓ Instance created at 0xDb56f2e9369E0D7bD191099125a3f6C370F8ed15

~/Projects/sdk/examples/2.8.0-rc.3$ npx oz upgrade
? Pick a network development
✓ Compiled contracts with solc 0.5.16 (commit.9c3226ce)
✓ Contract Box deployed
✓ Contract Name deployed <- Should not have deployed this contract
All implementations have been deployed

Upgrade should push only the required contracts. Note that it's possible that a fix for this issue also fixes #1507.

spalladino commented 4 years ago

Fixed in #1509