TransactionSEALED
╳*$!~▒~▪░▒●?◇█○◇▫■▪$#~▪╲~@░?▫!!▪▓░▓○╲▪█@◆□╲$█◆░▪%@&▫◇&@╲╳■□□%╳●○
Transaction ID
Execution Fee
0.00001224 FLOWTransaction Summary
Contract CallCalled TMNFT, NonFungibleToken, MetadataViews
Contracts
Script Arguments
0linkString
https://ticketmastercollectibles.com/token/pearljamchicagoil1/2278
1batchUInt32
59265754
2sequenceUInt16
2278
3limitUInt16
16500
4addressAddress
Cadence Script
1import TMNFT from 0xa8d1a60acba12a20
2 import NonFungibleToken from 0x1d7e57aa55817448
3 import MetadataViews from 0x1d7e57aa55817448
4
5 transaction(link: String, batch: UInt32, sequence: UInt16, limit: UInt16, address: Address) {
6
7 /// Local variable for storing the minter reference
8 let minterRef: &TMNFT.NFTMinter
9
10 /// Reference to the receiver's collection
11 let recipientCollectionRef: &{NonFungibleToken.Receiver}
12
13 prepare(signer: auth(BorrowValue) &Account) {
14
15 // Resolve NFT collection data from the contract
16 let collectionData = TMNFT.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
17 ?? panic("ViewResolver does not resolve NFTCollectionData view")
18
19 // Borrow a reference to the NFTMinter resource in storage
20 self.minterRef = signer.storage.borrow<&TMNFT.NFTMinter>(from: TMNFT.MinterStoragePath)
21 ?? panic("Could not borrow minter reference")
22
23 // Borrow the recipient's public NFT collection reference
24 let recipient = address
25
26 // Borrow the recipient's public NFT collection reference
27 var cap = (getAccount(recipient).capabilities.borrow<&AnyResource>(
28 collectionData.publicPath) ?? panic("Could not get receiver reference to the NFT Collection"))
29 self.recipientCollectionRef = cap as! &{NonFungibleToken.Receiver}
30 }
31
32 execute {
33
34 // Create a new NFT
35 let newNFT <- self.minterRef.mintNFT(glink: link, gbatch: batch, glimit: limit, gsequence: sequence)
36
37 // Deposit the NFT into the recipient's collection
38 self.recipientCollectionRef.deposit(token: <-newNFT)
39 log("NFT Minted and deposited to recipient's Collection")
40 }
41 }