TransactionSEALED

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

Transaction ID

Timestamp

Aug 29, 2024, 06:00:27 PM UTC
1y ago

Block Height

85,584,826

Computation

0

Transaction Summary

Contract Call

Called NonFungibleToken

Script Arguments

0packSellerAdddressAddress
1distributionFlowIDUInt64
1607
2amountUFix64
9.00000000
3quantityUInt64
1
4dropDateString
2024-09-03T18:00:00-04:00
5expiryDateString
2024-09-10T18:00:00-04:00
6cidString
67ebcace-a59f-4120-b0af-66251f65bd0b

Cadence Script

1import PackNFT, AllDay from 0xe4cf4bdc1751c65d
2import NonFungibleToken from 0x1d7e57aa55817448
3
4transaction(packSellerAdddress: Address, distributionFlowID: UInt64, 
5            amount: UFix64, quantity: UInt64, 
6            dropDate: String, expiryDate: String, cid: String) {
7    
8    let nflAddress: Address
9
10    prepare(nfl: AuthAccount, dapper: AuthAccount, buyer: AuthAccount) {
11        self.nflAddress = nfl.address
12        
13        // Initialize the AllDay collection if the buyer does not already have one
14        if buyer.borrow<&AllDay.Collection>(from: AllDay.CollectionStoragePath) == nil {
15            // save it to the account
16            buyer.save(<-AllDay.createEmptyCollection(), to: AllDay.CollectionStoragePath)
17
18            // create a public capability for the collection
19            buyer.link<&AllDay.Collection{NonFungibleToken.CollectionPublic, AllDay.MomentNFTCollectionPublic}>(
20                AllDay.CollectionPublicPath,
21                target: AllDay.CollectionStoragePath
22            )
23                ?? panic("Could not link AllDay.Collection Pub Path");
24        }
25
26        // Initialize the PackNFT collection if the buyer does not already have one
27        if buyer.borrow<&PackNFT.Collection>(from: PackNFT.CollectionStoragePath) == nil {
28            // save it to the account
29            buyer.save(<-PackNFT.createEmptyCollection(), to: PackNFT.CollectionStoragePath);
30
31            // create a public capability for the collection
32            buyer.link<&{NonFungibleToken.CollectionPublic}>(PackNFT.CollectionPublicPath, target: PackNFT.CollectionStoragePath)
33                ?? panic("Could not link PackNFT.Collection Pub Path");
34        }
35
36        if buyer.borrow<&AllDay.Collection>(from: AllDay.CollectionStoragePath) == nil {
37            panic("failed to instantiate all day moment collection")
38        }
39        if buyer.borrow<&PackNFT.Collection>(from: PackNFT.CollectionStoragePath) == nil {
40            panic("failed to instantiate all day pack collection")
41        }
42    }
43
44    pre {
45        self.nflAddress == 0xe4cf4bdc1751c65d: "Requires valid authorizing signature"
46    }
47}