# How to force deploy rather than upgrade?

**URL:** <https://forum.openzeppelin.com/t/how-to-force-deploy-rather-than-upgrade/32613>\
**Category:** General\
**Tags:** erc20, proxies\
**Created:** [October 20, 2022, 10:03pm UTC](https://forum.openzeppelin.com/t/how-to-force-deploy-rather-than-upgrade/32613 "2022-10-20T22:03:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcsan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/dcsan/32/8713_2.png) [@dcsan](https://forum.openzeppelin.com/u/dcsan)\
**Post date:** [October 20, 2022, 10:03pm UTC](https://forum.openzeppelin.com/t/how-to-force-deploy-rather-than-upgrade/32613/1 "2022-10-20T22:03:24Z")

</div>

I have a proxy contract I'e deployed. I'd like to create a new contract with a new address, but each time I try I just seem to get an upgrade. Is there some way to stop the hardhat plugin detecting that I have just changed a small part of my contract?

using code as below

```nohighlight
  const instance = await upgrades.deployProxy(factory, [], {
    initializer: 'initialize',
    // @ts-ignore
    gasPrice,
  })

```

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [October 21, 2022, 1:44am UTC](https://forum.openzeppelin.com/t/how-to-force-deploy-rather-than-upgrade/32613/2 "2022-10-21T01:44:55Z")

</div>

Hi, welcome to the community! 👋

If you use the plugin `@openzeppelin/hardhat-upgrades` to deploy a proxy contract, I think you will get a new folder named `.openzeppelin`, it will contain a `NETWORK.json`, maybe `georli.json` or something else. All you deployed contracts are in this file, if you want to deploy a new implementation contract, you can clear the content in the filed `impls`, it is better to keep a backup.

---

<div class="post-metadata">

**Author:** ![dcsan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/dcsan/32/8713_2.png) [@dcsan](https://forum.openzeppelin.com/u/dcsan)\
**Post date:** [October 21, 2022, 8:19am UTC](https://forum.openzeppelin.com/t/how-to-force-deploy-rather-than-upgrade/32613/3 "2022-10-21T08:19:02Z")

</div>

Fantastic, thanks so much for your help, I would have never found this!

I wonder how openzep keeps track of which impl. goes with which proxy though? The data only seems to keep records of the separate items, eg:

```json
{
  "manifestVersion": "3.2",
  "proxies": [
    {
      "address": "0x459D17f3D42459F23a8Eb2F9ae7A609F1473E0B4",
      "txHash": "0x2e95f4a31ac262e13573b6a135dbca5971e0baa3838fe25bfae86f22bd3aab0e",
      "kind": "uups"
    },
    ...
  }
  "impls": {
    "751cdbf32cab5693b4106b13f97782207a8e61e1923d01aecd6131fd4feb1689": {
      "address": "0x6c9788D430375F51e8cFC612eee47527936E8099",
      "txHash": "0x62a12054ee46faa721656fe322b53f5daf03a21417eb239f7c4c00902e4a9fc7",
      "layout": {
        "storage": [
....
}

```

ie there is no link between the two, unless you traverse the TXs maybe.

FWIW I use a block like this to find out, so maybe there is more internal logic going on too

```nohighlight
  const proxyAddress = envState.proxyAddress;
  const logicAddress = await upgrades.erc1967.getImplementationAddress(
    proxyAddress
  );
  const adminAddress = await upgrades.erc1967.getAdminAddress(proxyAddress);

```
