TransactionSEALED

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

Transaction ID

Timestamp

Aug 22, 2024, 03:32:43 PM UTC
1y ago

Block Height

85,094,841

Computation

0

Proposerseq:0 key:0

Authorizers

1

Transaction Summary

Contract Call

Called TopShot, Market, TopShotMarketV3

Script Arguments

Cadence Script

1import TopShot from 0x0b2a3299cc857e29
2import Market from 0xc1e4f4f4c4257510
3import TopShotMarketV3 from 0xc1e4f4f4c4257510
4
5// This transaction is for a user to stop a moment sale in their account
6
7// Parameters
8//
9// tokenID: the ID of the moment whose sale is to be delisted
10
11transaction() {
12
13	prepare(acct: AuthAccount) {
14
15		// borrow a reference to the owner's sale collection
16		if let topshotSaleV3Collection = acct.borrow<&TopShotMarketV3.SaleCollection>(from: TopShotMarketV3.marketStoragePath) {
17
18			// cancel the moment from the sale, thereby de-listing it
19			topshotSaleV3Collection.cancelSale(tokenID: 21043864)
20			
21		} else if let topshotSaleCollection = acct.borrow<&Market.SaleCollection>(from: /storage/topshotSaleCollection) {
22			// Borrow a reference to the NFT collection in the signers account
23			let collectionRef = acct.borrow<&TopShot.Collection>(from: /storage/MomentCollection)
24				?? panic("Could not borrow from MomentCollection in storage")
25		
26			// withdraw the moment from the sale, thereby de-listing it
27			let token <- topshotSaleCollection.withdraw(tokenID: 21043864)
28
29			// deposit the moment into the owner's collection
30			collectionRef.deposit(token: <-token)
31		}
32	}
33}