Upgradable contract error: Deployment at address is not registered

Hi,

I have an upgradable smart contract using truffle , few days back i was upgrading the contract on mainnet but the migration timedout just before the new implementation was deployed, as the contract deployement cost was quite high (around $1000) and i was unable to deploy the implementation again , i decided to manually call the upgrade on the proxyAdmin to upgrade the contract but due to this truffle has no info about the new implementation and the new implementation is not in the mainnet.json file .

Now when i am trying to go for an upgrade through truffle i am getting the following error regarding the implementation which is not in the mainnet.json file:

Deployment at [address] address is not registered

Is there any way to add the implementation in the mainnet.json file for the upgrade to go through truffle as i can again deploy manually but i need truffle/oz to check for any issues in the contract if there are any (memory based etc)

There is no built-in way in the plugin to add the implementation in the mainnet.json file yet, although we want to add it very soon:

In the meantime, you could fix it manually by deploying locally to Ganache and copying over the relevant portion of the .openzeppelin/unknown-1337.json file, though this is a somewhat sensitive operation. If you want help I can guide through it. Otherwise you can wait until we add this feature in the plugin.

Thanks , I thought of this as well but wasnt sure , I tried it out copied the implementation portion from testnet json to mainnet and after replacing the txhash and the implementation address it seems to be working fine.

1 Like