TransactionSEALED
╱○▓╱■~*■◇*▒^^◇■█◇●■▫◇^@◆╳~$@?▫@▫$█*^@~╱*$^%╲%░▪▓!^□╳^◆■╳▓▒■◆^▓^□
Transaction ID
Execution Fee
0.00005085 FLOWTransaction Summary
Contract CallCalled NonFungibleToken, MetadataViews, Cryptoys
Script Arguments
0idUInt64
100656
Cadence Script
1/// This transaction withdraws an NFT from the signers collection and destroys it
2import NonFungibleToken from 0x1d7e57aa55817448
3
4import MetadataViews from 0x1d7e57aa55817448
5
6import Cryptoys from 0xca63ce22f0d6bdba
7
8transaction(id: UInt64) {
9
10 /// Reference that will be used for the owner's collection
11 let collectionRef: auth(NonFungibleToken.Withdraw) &Cryptoys.Collection
12
13 prepare(signer: auth(BorrowValue) &Account) {
14 // borrow a reference to the owner's collection
15 self.collectionRef = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &Cryptoys.Collection>(
16 from: Cryptoys.CollectionStoragePath
17 ) ?? panic("Account does not store an object at the specified path")
18
19 }
20
21 execute {
22
23 // withdraw the NFT from the owner's collection
24 let nft <- self.collectionRef.withdraw(withdrawID: id)
25
26 destroy nft
27 }
28
29 post {
30 !self.collectionRef.getIDs().contains(id): "The NFT with the specified ID should have been deleted"
31 }
32}