OpenZeppelin / openzeppelin-sdk

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

Push contracts selectively during upgrades #1509

Closed frangio closed 4 years ago

frangio commented 4 years ago

Fixes https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1508. Fixes https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1507.

This PR is going to release/2.8 directly because the same fix is already implemented in the soon-to-be-merged #1497. In fact this change is mostly the same one found in https://github.com/OpenZeppelin/openzeppelin-sdk/commit/fc5926e96b9ba82c338c4b5fa8b3af2405866d59 of that PR.

There's a change that seems unrelated, making an argument into an array, but because upgrade can work on multiple contracts at once the way to obtain the contracts that need to be pushed gets us an array. I think in practice it will always be of length 1 but we can't be sure.

There are no tests in this PR because we currently have no tests for implicit commands like push is for update.