# Upgradeable and Interfaces

**URL:** <https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204>\
**Category:** Upgrades\
**Created:** [April 21, 2021, 2:28pm UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204 "2021-04-21T14:28:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [April 21, 2021, 2:28pm UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204/1 "2021-04-21T14:28:36Z")

</div>

How do we deal with interfaces and upgradeable? Here is my use case

I have a main proxy that is interfacing my vaults contracts. They are all upgradeable, Now if I was to upgrade my vault with a new function, I would also need to upgrade my main proxy with the new interface as well.

Is that how it’s working? I’m not certain because the doc mention that I can’t change the type of what was already declared. I can reuse it or add after it. How does this apply to interfaces?

---

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [April 21, 2021, 6:02pm UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204/2 "2021-04-21T18:02:25Z")

</div>

I found the proxy forwarding feature, This process is to forward the call to the implementation. Could I use that to forward the calls to another proxy as well so I don’t have to worry about the interface?

---

<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:** [April 22, 2021, 6:44am UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204/3 "2021-04-22T06:44:25Z")

</div>

Hi @madeindreams,

If I understand correctly you have a main contract that calls the interface of other upgradeable contracts and you want to add new functionality to that interface.

If your main contract, how do you store the state of the vault contracts. e.g. is it a mapping of the vault interface?

---

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [April 22, 2021, 1:53pm UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204/4 "2021-04-22T13:53:21Z")

</div>

Good morning @abcoathup

When I deploy a vault I record the address and other info in a struct and also have a mapping for that struct.

```
import "./myVaultInterface.sol";

uint256 vaultCounter;
mapping(uint256 => _Vaults) vaults;

struct _Vaults{
  uint256 id;
  address addr;
  string name:
}

```

So I’m wondering how to deal with that interface when the vault get upgraded with a new function.

So I’m only mapping the address of that vault.

---

<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:** [April 23, 2021, 3:25am UTC](https://forum.openzeppelin.com/t/upgradeable-and-interfaces/7204/5 "2021-04-23T03:25:54Z")

</div>

Hi @madeindreams,

You should only need to upgrade your main contract if you needed to add/change functionality that you are calling through the interface of the vault.

I assume the vault struct doesn’t need to change, so you aren’t actually changing state if you upgrade your main contract.
