# Upgrade to FungibleToken contract coming on testnet and mainnet

**URL:** <https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441>\
**Category:** Flow Protocol\
**Created:** [March 10, 2023, 4:54pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441 "2023-03-10T16:54:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Destructor](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Destructor](https://forum.flow.com/u/Destructor)\
**Post date:** [March 10, 2023, 4:54pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/1 "2023-03-10T16:54:57Z")

</div>

We want to let you know that there will be an upgrade to the **FungibleToken** smart contract standard.

This upgrade adds a new method for receivers to specify the vault types that they can receive. This will not cause a breaking change to any existing deployed Fungible Token contracts or contracts that have types that implement `FungibleToken.Receiver` because it includes a default implementation for the method.

**Expected dates to get the changes in effect is as follows:**

- CanaryNet: Wednesday, March 15th
- Testnet: Thursday, March 16th

And assuming that the upgrades on the canary and testnet go well,

- Mainnet: Wednesday, March 22 (This date may be delayed)

The `FungibleToken` code that will be used for the upgrade can be found in [this PR](https://github.com/onflow/flow-ft/pull/123).

**Note** - We are open to changing the timeline if the community provides feedback on the suggested change.

**Why This Change is Happening**

- Adding type information to `FungibleToken.Receiver` capabilities has the potential to streamline the FT receiving process and minimize transaction failures.
- The current `FungibleToken.Receiver` interface only contains the `deposit` method. It does not offer a clear-cut method for knowing the `Vault` types that a particular receiver can receive. To address this issue, `getSupportedVaultTypes` function was suggested. More details can be found in the [FLIP](https://github.com/onflow/flips/blob/fungibleToken-standard-improvement/flips/20230206-fungible-token-vault-type-discovery.md)

**Action Required**

- For any custom receivers like `TokenForwarding`, `FungibleTokenSwitchboard` contract or any resource in other contracts that conforms `FungibleToken.Receiver` should define a `getSupportedVaultTypes` function to return an array of `Vault` types that the `Receiver` can take in the `deposit()` method. Until this change is made, custom receivers will only return an empty dictionary for this method (`{}`) as the return value.

The proposed interface features a default implementation of the `getSupportedVaultTypes()` function, ensuring that existing FTs will not encounter any breakage and will have a ready-made implementation available. This default implementation also eliminates the need for upgrading existing FTs, but they should still upgrade eventually for clarity purposes.

In this [PR](https://github.com/onflow/flow-ft/pull/123/), the Flow team has also implemented the `getSupportedVaultTypes` function for the `FungibleTokenSwitchboard` and `TokenForwarding` contracts.  
These contracts will be upgraded at the same time as `FungibleToken` on their respective networks.

If you have any questions regarding these changes, please ask in the PR comments, on Discord in the #developers channel, or reply here.

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [March 15, 2023, 7:07pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/2 "2023-03-15T19:07:45Z")

</div>

The contract has been upgraded on Canary to account `0xee82856bf20e2aa6`

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [March 16, 2023, 6:39pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/3 "2023-03-16T18:39:02Z")

</div>

These contracts have been updated on testnet:

- `FungibleToken` - `0x9a0766d93b6608b7`
- `FungibleTokenSwitchboard` - `0x9a0766d93b6608b7`
- `TokenForwarding` - `0x51ea0e37c27a1f1a`

---

<div class="post-metadata">

**Author:** ![dryrunner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/dryrunner/32/641_2.png) [@dryrunner](https://forum.flow.com/u/dryrunner)\
**Post date:** [March 18, 2023, 9:37pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/4 "2023-03-18T21:37:18Z")

</div>

Put a comment there: [https://github.com/onflow/flips/pull/69](https://github.com/onflow/flips/pull/69)

---

<div class="post-metadata">

**Author:** ![bluesign](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/bluesign/32/1359_2.png) [@bluesign](https://forum.flow.com/u/bluesign)\
**Post date:** [March 20, 2023, 10:06am UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/5 "2023-03-20T10:06:26Z")

</div>

I commented there [0], but also writing here: Why did we change the `getSupportedVaultTypes` signature to `pub fun getSupportedVaultTypes(): {Type: Bool}` from `pub fun getSupportedVaultTypes(): [Type]` ?

This is pretty ugly also does not make any sense.

[0] [https://github.com/onflow/flow-ft/pull/127](https://github.com/onflow/flow-ft/pull/127)

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [March 22, 2023, 5:15pm UTC](https://forum.flow.com/t/upgrade-to-fungibletoken-contract-coming-on-testnet-and-mainnet/4441/6 "2023-03-22T17:15:31Z")

</div>

These contracts have been updated on mainnet:

- `FungibleToken` - `0xf233dcee88fe0abe`
- `FungibleTokenSwitchboard` - `0xf233dcee88fe0abe`
- `TokenForwarding` - `0xe544175ee0461c4b`
