TransactionSEALED
╲!█░▫?◆╳○◇~~^■#▒▓╲▒▓╳▪▪%╱○*▫%▒%●~#◆◆▫&▒#□□^#▫◆%╲~▪○◇^@*@!!◇!╱?@▓
Transaction ID
Execution Fee
0.00002149 FLOWExecution Error
Error Code: 1101
assertion failed: offer is expired
Error ContextLine 35
30 }
31 // Get the NFT ressource and widthdraw the NFT from the signers account
32 let nftCollection = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &TopShot.Collection>(from: /storage/MomentCollection)
33 ?? panic("Cannot borrow NFT collection receiver from account")
34 let nft: @TopShot.NFT <- nftCollection.withdraw(withdrawID: nftId) as! @TopShot.NFT
35 self.offer.accept(
36 item: <-nft,
37 receiverCapability: self.receiverCapability
38 )
39 }
40 execute {Raw Error
[Error Code: 1101] error caused by: 1 error occurred: * transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed: --> 63e728c95a2ce561f400d247efb4a20cb1bae5f24f518d439bcca4d7e8a8df72:35:8 | 35 | self.offer.accept( 36 | item: <-nft, 37 | receiverCapability: self.receiverCapability 38 | ) | ^ --> b8ea91944fd51c43.OffersV2:234:33 error: assertion failed: offer is expired --> 322d96c958eb8c46.FlowtyOffersResolver:23:16 Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.
Transaction Summary
Contract CallCalled TopShot, FungibleToken, NonFungibleToken +4 more
Script Arguments
Cadence Script
1import TopShot from 0x0b2a3299cc857e29
2import FungibleToken from 0xf233dcee88fe0abe
3import NonFungibleToken from 0x1d7e57aa55817448
4import OffersV2 from 0xb8ea91944fd51c43
5import DapperOffersV2 from 0xb8ea91944fd51c43
6import DapperUtilityCoin from 0xead892083b3e2c6c
7import TopShotMarketV3 from 0xc1e4f4f4c4257510
8
9transaction(nftId: UInt64, offerId: UInt64, DapperOfferAddress: Address) {
10 let dapperOffer: &DapperOffersV2.DapperOffer
11 let offer: &{OffersV2.OfferPublic}
12 let receiverCapability: Capability<&{FungibleToken.Receiver}>
13 prepare(signer: auth(Storage, Capabilities) &Account) {
14 // Get the DapperOffers resource
15 self.dapperOffer = getAccount(DapperOfferAddress)
16 .capabilities.borrow<&DapperOffersV2.DapperOffer>(DapperOffersV2.DapperOffersPublicPath)
17 ?? panic("Could not borrow DapperOffer from provided address")
18 // Set the fungible token receiver capabillity
19 self.receiverCapability = signer.capabilities.get<&{FungibleToken.Receiver}>(/public/dapperUtilityCoinReceiver)!
20 assert(self.receiverCapability.borrow() != nil, message: "Missing or mis-typed DapperUtilityCoin receiver")
21 // Get the DapperOffer details
22 self.offer = self.dapperOffer.borrowOffer(offerId: offerId)
23 ?? panic("No Offer with that ID in DapperOffer")
24 // Delist any of the listings for the moment for this offer (this delists for both MarketV1 and Marketv3)
25 if let topshotSaleV3Collection = signer.storage.borrow<auth(TopShotMarketV3.Cancel) &TopShotMarketV3.SaleCollection>(from: TopShotMarketV3.marketStoragePath) {
26 if topshotSaleV3Collection.borrowMoment(id: nftId) != nil{
27 // cancel the moment from the sale, thereby de-listing it
28 topshotSaleV3Collection.cancelSale(tokenID: nftId)
29 }
30 }
31 // Get the NFT ressource and widthdraw the NFT from the signers account
32 let nftCollection = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &TopShot.Collection>(from: /storage/MomentCollection)
33 ?? panic("Cannot borrow NFT collection receiver from account")
34 let nft: @TopShot.NFT <- nftCollection.withdraw(withdrawID: nftId) as! @TopShot.NFT
35 self.offer.accept(
36 item: <-nft,
37 receiverCapability: self.receiverCapability
38 )
39 }
40 execute {
41 self.dapperOffer.cleanup(offerId: offerId)
42 }
43}