Upgrade from contracts-ethereum-package to contracts-upgradeable on existing contract and got error "Proxy admin is not the one registered in the network manifest"

Hi @leckylao,

When you test an upgrade on the fork (without first doing a deploy), the ProxyAdmin for your proxy isn’t registered in your network file.

To test an upgrade, you can do a deployProxy and then an upgradeProxy. The deployProxy will deploy the implementation contract, the ProxyAdmin and the proxy. The upgradeProxy will deploy the new implementation contract and update the proxy with the new implementation contract address. See: https://docs.openzeppelin.com/upgrades-plugins/1.x/truffle-upgrades#test-usage

For an example test, see BoxV2.proxy.test.js in: OpenZeppelin Upgrades: Step by Step Tutorial for Truffle