# Upgrade of NFTStorefrontV2 contract coming on testnet and mainnet

**URL:** <https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511>\
**Category:** Flow Ecosystem\
**Created:** [March 28, 2023, 8:50am UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511 "2023-03-28T08:50:10Z")\
**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 28, 2023, 8:50am UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/1 "2023-03-28T08:50:10Z")

</div>

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

This upgrade adds a new method to clean up the ghost listings of a seller and this upgrade also introduces a method in the `ListingPublic` interface called **hasListingBecomeGhosted** that tells whether the listing becomes ghosted or not.

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

- CanaryNet: Thursday, March 30th
- Testnet: Thursday, March 30th

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

- Mainnet: Friday, March 31 (This date may be delayed)

The NFTStorefrontV2 code that will be used for the upgrade can be found in [this PR](https://github.com/onflow/nft-storefront/pull/79).

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

**Why This Change is Happening**

- Adding the **cleanupGhostListings()** function proves advantageous for sellers, as it facilitates the removal of listings that no longer possess the corresponding NFT. Marketplaces, too, can harness this function to routinely purge ghost listings, thereby ensuring the accuracy and validity of displayed offerings on their dashboards.
- The addition of the **hasListingBecomeGhosted()** function provides invaluable insights to marketplaces and other decentralized applications (dApps) that seek to feature listings on their platforms. This function effectively discerns whether a given listing is ghosted, thereby promoting transparency and

**Action Required**  
NO ACTION REQUIRED

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:** ![brianmin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/brianmin/32/1068_2.png) [@brianmin](https://forum.flow.com/u/brianmin)\
**Post date:** [March 29, 2023, 12:28pm UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/2 "2023-03-29T12:28:34Z")

</div>

> [@Destructor](#):
>
> hasListingBecomeGhosted

This functionality will also be very useful for marketplaces by checking that the listing still exists and preventing the cadence script from panicing when it is unable to borrow the NFT reference from the listing.  
This would have to be used as there is no guarantee that ghost listings would be cleaned up.

---

<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 30, 2023, 4:56pm UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/3 "2023-03-30T16:56:22Z")

</div>

Address of the NFTStorefrontV2 for sandboxnet = 0x848853b371a72163

---

<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 31, 2023, 4:04pm UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/4 "2023-03-31T16:04:49Z")

</div>

NFTStoreforntV2 (0x2d55b98eb200daef) Address get updated on testnet

---

<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:** [April 12, 2023, 1:48pm UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/5 "2023-04-12T13:48:53Z")

</div>

NFTStoreforntV2 (0x4eb8a10cb9f87357) Address get updated on Mainnet

---

<div class="post-metadata">

**Author:** ![brianmin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/brianmin/32/1068_2.png) [@brianmin](https://forum.flow.com/u/brianmin)\
**Post date:** [April 12, 2023, 9:43pm UTC](https://forum.flow.com/t/upgrade-of-nftstorefrontv2-contract-coming-on-testnet-and-mainnet/4511/6 "2023-04-12T21:43:40Z")

</div>

Another thing I noticed while using the **hasListingBecomeGhosted** function is that the naming is a bit unintuitive because it seems to return ‘false’ if the listing has become ghosted, whereas the name suggests it should return ‘true’.
