TransactionSEALED
▓&!╱$#!▒◇▓~$&╱●$◆▓!#□▒╳#&○▒?■!^╳@?□●○▒▫!&■@~%#~!$■╳□!▪█^●?%!◆▫!?
Transaction ID
Execution Fee
0.000001 FLOWTransaction Summary
Contract CallCalled NonFungibleToken, KeeprItems, MetadataViews
Script Arguments
0recipientAddress
1withdrawIDUInt64
3838690
Cadence Script
1import NonFungibleToken from 0x1d7e57aa55817448
2import KeeprItems from 0x5eb12ad3d5a99945
3import MetadataViews from 0x1d7e57aa55817448
4
5// This transaction transfers a Keepr Item from one account to another.
6
7transaction(recipient: Address, withdrawID: UInt64) {
8 prepare(signer: AuthAccount) {
9
10 // get the recipients public account object
11 let recipient = getAccount(recipient)
12
13 // borrow a reference to the signer's NFT collection
14 let collectionRef = signer.borrow<&KeeprItems.Collection>(from: KeeprItems.CollectionStoragePath)
15 ?? panic("Could not borrow a reference to the owner's collection")
16
17 // borrow a public reference to the receivers collection
18 let depositRef = recipient.getCapability(KeeprItems.CollectionPublicPath)!.borrow<&{NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection}>()!
19
20 // withdraw the NFT from the owner's collection
21 let nft <- collectionRef.withdraw(withdrawID: withdrawID)
22
23 // Deposit the NFT in the recipient's collection
24 depositRef.deposit(token: <-nft)
25 }
26}