nft-storefront icon indicating copy to clipboard operation
nft-storefront copied to clipboard

"error: ambiguous restricted type" while trying to deploy on emulator

Open javiermanzano opened this issue 3 years ago • 1 comments

Hi,

I'm getting this error when trying to deploy on emulator

error: ambiguous restricted type
   --> f8d6e0586b0a20c7.NFTStorefront:350:47
    |
350 |             nftProviderCapability: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: ambiguous restricted type
   --> f8d6e0586b0a20c7.NFTStorefront:384:47
    |
384 |             nftProviderCapability: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)

I thought it was because of some changes that I did but it also appeared when cloning from scratch.

Any ideas?

Thanks! any help is appreciated! 🙏

javiermanzano avatar Feb 20 '22 19:02 javiermanzano

Did you deploy the NonFungibleToken contract to the emulator, and change the imports to use the corresponding emulator addresses for both contracts?

albeethekid avatar Feb 20 '22 20:02 albeethekid