Programmatically deploying upgradeable proxies

Hi @bonedaddy and @kallolborah,

If you are deploying proxy contracts using a factory, then you won't currently be able to use Upgrades Plugins to do prepareUpgrade.

For some automated testing to test upgrade safety using a proxy, you could deploy your upgradeable contract using Upgrades Plugins deployProxy and then perform upgradeProxy in your test. See the testing example in OpenZeppelin Upgrades: Step by Step Tutorial for Truffle

For testing your deployment using the factory, you can't currently use Upgrades Plugins to prepare the upgrade, instead you would need to deploy the new implementation contract and then call the proxy to upgrade.

It is a hash of the contact creation code, see: https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/175

1 Like