# admin.changeAdminForProxy not found

**URL:** <https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882>\
**Category:** Upgrades\
**Tags:** proxies\
**Created:** [December 2, 2020, 7:22pm UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882 "2020-12-02T19:22:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonericcook](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jonericcook/32/3733_2.png) [@jonericcook](https://forum.openzeppelin.com/u/jonericcook)\
**Post date:** [December 2, 2020, 7:22pm UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882/1 "2020-12-02T19:22:56Z")

</div>

Hello,

I am using hardhat upgrades and followed the setup steps as shown at the following links:

> **[Ethereum development environment for professionals by Nomic Labs](https://hardhat.org/plugins/hardhat-upgrades.html)**
>
> Compile, deploy, test and debug your Ethereum software. Get Solidity stack traces, console.log, mainnet forking and more.

> **[Using with Hardhat - OpenZeppelin Docs](https://docs.openzeppelin.com/upgrades-plugins/1.x/hardhat-upgrades)**

I am wanting to execute admin.changeAdminForProxy but `.admin` is not found on upgrades.

In vscode, when I hover over the red line under .admin i get the following error:

Property ‘admin’ does not exist on type ‘{ deployProxy: DeployFunction; upgradeProxy: UpgradeFunction; prepareUpgrade: PrepareUpgradeFunction; }’.ts(2339)

I am trying to execute this method: `await upgrades.admin.changeAdminForProxy(Bob.address, Alice.address)`

I am lost because these docs say that it should be there:

> **[OpenZeppelin Hardhat Upgrades API - OpenZeppelin Docs](https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#admin-change-admin-for-proxy)**

Any help would be greatly appreciated 🙂

@frangio  
@abcoathup

---

<div class="post-metadata">

**Author:** ![jonericcook](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jonericcook/32/3733_2.png) [@jonericcook](https://forum.openzeppelin.com/u/jonericcook)\
**Post date:** [December 2, 2020, 9:26pm UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882/2 "2020-12-02T21:26:41Z")

</div>

it looks like this works / doesn’t fail?

```
 await upgrades['admin'].changeProxyAdmin(Bob.address, Alice.address)
```

---

<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:** [December 2, 2020, 9:47pm UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882/3 "2020-12-02T21:47:14Z")

</div>

This was an error in our type definitions but it was fixed a few days ago. Please install the latest version of the plugin and it should be fixed.

> [@jonericcook](#):
>
> it looks like this works / doesn’t fail?

Yes, indeed it works. The problem is only in the type definitions which is what VSCode checks.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 7, 2020, 3:37am UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882/4 "2020-12-07T03:37:58Z")

</div>

Hi @jonericcook,

Just wanted to check that this was resolved after updating to the latest version of the Upgrades Plugin?

---

<div class="post-metadata">

**Author:** ![jonericcook](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jonericcook/32/3733_2.png) [@jonericcook](https://forum.openzeppelin.com/u/jonericcook)\
**Post date:** [December 7, 2020, 7:32pm UTC](https://forum.openzeppelin.com/t/admin-changeadminforproxy-not-found/4882/5 "2020-12-07T19:32:17Z")

</div>

Yes, it has been resolved! 🤙
