# Upgradable contract error: Deployment at address is not registered

**URL:** <https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388>\
**Category:** Upgrades\
**Created:** [May 28, 2021, 9:35pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388 "2021-05-28T21:35:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dev](https://forum.openzeppelin.com/u/dev)\
**Post date:** [May 28, 2021, 9:35pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388/1 "2021-05-28T21:35:06Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [May 28, 2021, 9:45pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388/2 "2021-05-28T21:45:18Z")

</div>

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:

> <https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/175>
>
> Some users may want to register an existing proxy for use with the plugins. It's… possible to do this if the source code for the implementation is available. We should try to do this automatically on \`deployProxy\` and \`upgradeProxy\`, and maybe provide a way for the user to trigger it manually.
> 
> Related to https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/174.

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.

---

<div class="post-metadata">

**Author:** ![dev](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dev](https://forum.openzeppelin.com/u/dev)\
**Post date:** [May 28, 2021, 10:36pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388/3 "2021-05-28T22:36:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cainuriel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/cainuriel/32/5410_2.png) [@Cainuriel](https://forum.openzeppelin.com/u/Cainuriel)\
**Post date:** [March 25, 2024, 10:24pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388/4 "2024-03-25T22:24:35Z")

</div>

How to solve this problem manually?

Deployment from Remix for example?

And with hardhat how to solve it?

This `forceImport function` has to be placed in the main proxy contract?

Is there any kind of example to test its use?

Finally, after placing this function, should it be removed to continue updating normally?

---

<div class="post-metadata">

**Author:** ![ericglau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ericglau/32/15149_2.png) [@ericglau](https://forum.openzeppelin.com/u/ericglau)\
**Post date:** [March 26, 2024, 6:55pm UTC](https://forum.openzeppelin.com/t/upgradable-contract-error-deployment-at-address-is-not-registered/9388/5 "2024-03-26T18:55:22Z")

</div>

The `forceImport` function should be used to automate this. I've added more details in comment: [Upgradable contract error with Hardhat: "Deployment at address is not registered" - #2 by ericglau](https://forum.openzeppelin.com/t/upgradable-contract-error-with-hardhat-deployment-at-address-is-not-registered/40003/2).
