TransactionSEALED
▫█╱?&▒■╲▓●■%&▫○$●▪◆●@▒@╱▫█@█!▒●●▫#▪!□◆▒*%!╱◇●▪#░░?&@~!░#%◆▫&#╲◇╱
Transaction ID
Execution Fee
0.00278 FLOWTransaction Summary
Contract CallCalled NBAsageNFT, FungibleToken, NonFungibleToken +1 more
Script Arguments
0NFTReceiverAddress
1priceUFix64
1.50000000
2nameString
NBAsage Yes
3descriptionString
Yes NFT of NBAsage is the positive opinion minted on Flow network. The users owning this asset posts their Yes opinions
4thumbnailString
https://arweave.net/fKgGBtyEk4XUo07r9sCMNrIlwOguL4aax6rMXFRJHJQ
5cuts[UFix64]
[]
6royaltyDescriptions[String]
[]
7royaltyBeneficiaries[Address]
[]
8questionIDString
4JPREz6uq6WyEl7O
9sideBool
true
10signatureString
a0523ab41323140f4fb8c938206b5f40f145ce4687b1d040e14b9f9e4020f08fe9125621385ddf78f57076ee9e18e70c2430b6fb25c91280b7b0444fa20b51e2
11saltUInt64
123
12nonceInt64
356418
13nft_countUInt64
2
Cadence Script
1import NBAsageNFT from 0x7d09be7121e058eb
2import FungibleToken from 0xf233dcee88fe0abe
3import NonFungibleToken from 0x1d7e57aa55817448
4import MetadataViews from 0x1d7e57aa55817448
5
6transaction(
7 NFTReceiver: Address,
8 price: UFix64,
9 name: String,
10 description: String,
11 thumbnail: String,
12 cuts: [UFix64],
13 royaltyDescriptions: [String],
14 royaltyBeneficiaries: [Address],
15 questionID: String,
16 side: Bool,
17 signature: String,
18 salt: UInt64,
19 nonce: Int64,
20 nft_count: UInt64
21) {
22
23 let paymentVault: @{FungibleToken.Vault}
24
25 prepare(acct: auth(BorrowValue) &Account) {
26
27 // Access the vault of the buyer to pay the sale price of the listing.
28 let mainVault = acct.storage.borrow<auth(FungibleToken.Withdraw) &{FungibleToken.Vault}>(from: /storage/usdcFlowVault)
29 ?? panic("Cannot borrow USDC Token vault from acct storage")
30
31 self.paymentVault <- mainVault.withdraw(amount: price)
32
33 }
34
35 execute {
36 // Create the royalty details
37 var count = 0
38 var royalties: [MetadataViews.Royalty] = []
39 while royaltyBeneficiaries.length > count {
40 let beneficiary = royaltyBeneficiaries[count]
41 let beneficiaryCapability = getAccount(beneficiary).capabilities.get<&{FungibleToken.Receiver}>(
42 MetadataViews.getRoyaltyReceiverPublicPath()
43 )
44
45 if !beneficiaryCapability.check() {
46 panic("Beneficiary does not have Receiver configured at RoyaltyReceiverPublicPath")
47 }
48
49 royalties.append(
50 MetadataViews.Royalty(
51 receiver: beneficiaryCapability,
52 cut: cuts[count],
53 description: royaltyDescriptions[count]
54 )
55 )
56 count = count + 1
57 }
58
59
60
61 // Call the purchaseNFT function
62 NBAsageNFT.purchaseNFT(
63 NFTReceiver: NFTReceiver,
64 paymentVault: <-self.paymentVault,
65 amount: price,
66 name: name,
67 description: description,
68 thumbnail: thumbnail,
69 royalties: royalties,
70 questionID: questionID,
71 side: side,
72 signature: signature,
73 salt: salt,
74 nonce: nonce,
75 count: nft_count
76 )
77 }
78}