TransactionSEALED
#╲?%▓?╱╲%@~▓^▓!░@●◇▒@!!@^$^╱?█#!●●◆?╱%░@░%?▓@◇▫?!◆?●$@◇?&?~░$%^#
Transaction ID
Execution Fee
0.00102 FLOWTransaction Summary
Contract Call
Called NonFungibleToken, MetadataViews, KARAT1B6HZGSBT
Script Arguments
Copy:
0idUInt64
8
Cadence Script
1/// transactions/nft/burn.cdc
2
3import NonFungibleToken from 0x1d7e57aa55817448
4import MetadataViews from 0x1d7e57aa55817448
5import KARAT1B6HZGSBT from 0x821778140b0d29e9
6
7transaction(id: UInt64) {
8
9 /// Reference that will be used for the owner's collection
10 let collectionRef: auth(NonFungibleToken.Withdraw) &KARAT1B6HZGSBT.Collection
11
12 prepare(signer: auth(BorrowValue) &Account) {
13 let collectionData = KARAT1B6HZGSBT.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
14 ?? panic("ViewResolver does not resolve NFTCollectionData view")
15
16 // borrow a reference to the owner's collection
17 self.collectionRef = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &KARAT1B6HZGSBT.Collection>(
18 from: collectionData.storagePath
19 ) ?? panic("Account does not store an object at the specified path")
20 }
21
22 execute {
23 // withdraw the NFT from the owner's collection
24 let nft <- self.collectionRef.withdraw(withdrawID: id)
25 destroy nft
26 }
27
28 post {
29 !self.collectionRef.getIDs().contains(id): "The NFT with the specified ID should have been deleted"
30 }
31}