Hello everyone, I once deployed the PinataPartyContract on my testnet account then I removed that contract. When I again tried to deploy the same contract, I got this error :
failed to save object: path /storage/NFTCollection in account 0XXXXXXXX already stores an object.
I understand that the user account still contains the collection object. How do I check and destroy it everytime I deploy a new contract. Can you guess provide me with the correct code as I have already tried this
if let oldToken ← acct.load<@KittyItemsMarket.Collection>(from: KittyItemsMarket.CollectionStoragePath) {
destroy oldToken
}
it does not understand ‘acct.load’,as it only getting deployed on the account first, so it does not get deployed. I guess self.something would be used Please help.