How to upgrade contracts that was created via a factory contract without any CLI?

Hi @itinance,

You could deploy the new logic contract using oz push and then call either upgradeTo or upgradeToAndCall of AdminUpgradeabilityProxy with the address of the new logic contract.

You could get the new logic address from App via getImplementation (https://github.com/OpenZeppelin/openzeppelin-sdk/blob/d39fa3da52562c585a5d6e8785e25245c0d5ee5b/packages/lib/contracts/application/App.sol#L97).

As @Dennison suggested, another option is to manually modify network.json though it isn’t terribly scaleable.

You may want to add a feature request in the GitHub repository: https://github.com/OpenZeppelin/openzeppelin-sdk

2 Likes