FT TransferNFT TransferSEALED
╳%▓◆●█#╳@▒▫▓&$~▫^@▓▫╳╲*●%░░@◇▪○╳~■●◆▓$■▫□╲□!◇╱▪!#■$▓@█@#%^◆▫~*!%
Transaction ID
Execution Fee
0.0017 FLOWTransaction Summary
FT TransferNFT Transfer
Called NonFungibleToken, MetadataViews, Mneme
Contracts
Script Arguments
Copy:
0toAddress
1idUInt64
4
Cadence Script
1import NonFungibleToken from 0x1d7e57aa55817448
2import MetadataViews from 0x1d7e57aa55817448
3 import Mneme from 0x0e964e9e2b53ed06
4
5 transaction(to: Address, id: UInt64) {
6 // The NFT resource to be transferred
7 let tempNFT: @{NonFungibleToken.NFT}
8
9 prepare(signer: auth(BorrowValue) &Account) {
10 // borrow a reference to the signer's NFT collection
11 let withdrawRef = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>(
12 from: Mneme.CollectionStoragePath
13 ) ?? panic("The signer does not store a NFT Collection object at the path ".concat(Mneme.CollectionStoragePath.toString())
14 .concat("The signer must initialize their account with this collection first!"))
15
16 self.tempNFT <- withdrawRef.withdraw(withdrawID: id)
17 }
18
19 execute {
20 // get the recipients public account object
21 let recipient = getAccount(to)
22
23 // borrow a public reference to the receivers collection
24 let receiverRef = recipient.capabilities.borrow<&{NonFungibleToken.Receiver}>(Mneme.CollectionPublicPath)
25 ?? panic("The recipient does not have a NonFungibleToken Receiver at ".concat(Mneme.CollectionPublicPath.toString()))
26
27 // Deposit the NFT to the receiver
28 receiverRef.deposit(token: <-self.tempNFT)
29 }
30 }