TransactionSEALED

#■░?▓&╱&*?@●@$^#◇#&▓▪*▫◇▫▪~!╲▒▫╱▫○╳&░$▒$□▪$◇&!@○◇░!?□▓@&@?◇░◇╲╱□

Transaction ID

Timestamp

Jun 03, 2025, 10:09:07 PM UTC
8mo ago

Block Height

115,242,311

Computation

0

Execution Fee

0.00002124 FLOW

Execution Error

Error Code: 1101

panic: Cannot destroy: Moment does not exist in collection: 22274224

Error ContextLine 55
50        }
51    }
52
53    execute { 
54        if self.shouldBurnMoments { 
55            self.momentCollectionRef.destroyMoments(ids: self.momentBurnIds)
56        }
57        if self.shouldLockMoments { 
58            self.momentCollectionRef.batchLock(ids: self.momentLockIds, duration: self.lockDuration)
59        }
60    }
Call Stack
Raw Error

[Error Code: 1101] error caused by: 1 error occurred: * transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed: --> 47a430b47bb296ada657d31527187799e275c115d821e402dd87391d6f1cd3c4:55:12 | 55 | self.momentCollectionRef.destroyMoments(ids: self.momentBurnIds) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: panic: Cannot destroy: Moment does not exist in collection: 22274224 --> 0b2a3299cc857e29.TopShot:1271:23 Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.

Transaction Summary

Contract Call

Called TopShot, TopShotMarketV3, NonFungibleToken

Script Arguments

Cadence Script

1import TopShot from 0x0b2a3299cc857e29
2import TopShotMarketV3 from 0xc1e4f4f4c4257510
3import NonFungibleToken from 0x1d7e57aa55817448
4
5// this tx locks and burns moments in a TopShot collection
6// useful to complete challenges in one tx
7transaction() {
8    let shouldBurnMoments: Bool
9    let shouldLockMoments: Bool
10    let momentCollectionRef: auth(NonFungibleToken.Update) &TopShot.Collection
11    let topshotSaleV3Collection: auth(TopShotMarketV3.Cancel) &TopShotMarketV3.SaleCollection?
12    let momentBurnIds: [UInt64]
13    let momentLockIds: [UInt64]
14    let lockDuration: UFix64
15    
16    prepare(acct: auth(Storage, Capabilities) &Account) {
17       self.momentBurnIds = [25587887,18269317,22274224,34176979,29348911,21135064,26542036,19662283,17993205,26241630]
18       self.momentLockIds = []
19       self.lockDuration = UFix64.fromString("31536000.0") ?? panic("unable to get lock duration")
20       
21       self.momentCollectionRef = acct.storage.borrow<auth(NonFungibleToken.Update) &TopShot.Collection>(from: /storage/MomentCollection)
22            ?? panic("Could not borrow from MomentCollection in storage")
23        self.topshotSaleV3Collection = acct.storage.borrow<auth(TopShotMarketV3.Cancel) &TopShotMarketV3.SaleCollection>(from: TopShotMarketV3.marketStoragePath)
24        
25        self.shouldBurnMoments = self.momentBurnIds.length != 0
26        self.shouldLockMoments = self.momentLockIds.length != 0
27
28        if self.shouldBurnMoments { 
29            // delist any of the moments that are listed and are going to be burned(this delists for both MarketV1 and Marketv3)
30            if let saleCollection = self.topshotSaleV3Collection  {
31                for id in self.momentBurnIds {
32                    if saleCollection.borrowMoment(id: id) != nil{
33                        // cancel the moment from the sale, thereby de-listing it
34                        saleCollection.cancelSale(tokenID: id)
35                    }
36                }
37            }
38        }
39
40        if self.shouldLockMoments { 
41            // delist any moments that are going to be locked
42            if let saleCollection = self.topshotSaleV3Collection  {
43                for id in self.momentLockIds {
44                    if saleCollection.borrowMoment(id: id) != nil{
45                        // cancel the moment from the sale, thereby de-listing it
46                        saleCollection.cancelSale(tokenID: id)
47                    }
48                }
49            }
50        }
51    }
52
53    execute { 
54        if self.shouldBurnMoments { 
55            self.momentCollectionRef.destroyMoments(ids: self.momentBurnIds)
56        }
57        if self.shouldLockMoments { 
58            self.momentCollectionRef.batchLock(ids: self.momentLockIds, duration: self.lockDuration)
59        }
60    }
61}