TransactionSEALED
~╳~*?○#█*▓╳~╳▪■╳◆◆■□~#█╳!&■╳&#%▫■~□!○^▫@╱╱░▒◆▒╳▓◇?*@╱▓□?$□!●○$●▒
Transaction ID
Execution Error
Error Code: 1009
error caused by: 1 error occurred:
Raw Error
[Error Code: 1009] error caused by: 1 error occurred: * transaction verification failed: [Error Code: 1006] invalid proposal key: public key 6 on account f380b22ef386ac7e does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 6 on account f380b22ef386ac7e does not have a valid signature: signature is not valid
Transaction Summary
TransactionScript Arguments
0identifierString
A.921ea449dffec68a.FlovatarComponent.NFT
1recipientAddrAddress
2ids[UInt64]
[ "127190" ]
Cadence Script
1import NonFungibleToken from 0x1d7e57aa55817448
2import StorageRent from 0x707adbad1428c624
3import ViewResolver from 0x1d7e57aa55817448
4import MetadataViews from 0x1d7e57aa55817448
5
6
7// This transaction is for transferring and NFT from
8// one account to another
9
10transaction(identifier: String, recipientAddr: Address, ids: [UInt64]) {
11
12 prepare(signer: auth(Storage, BorrowValue) &Account) {
13
14 let type = CompositeType(identifier)
15 let identifierSplit = identifier.split(separator: ".")
16 let address = Address.fromString("0x".concat(identifierSplit[1]))!
17 let name = identifierSplit[2]!
18 let viewResolver = getAccount(address).contracts.borrow<&{ViewResolver}>(name: name)
19 ?? panic("Could not borrow ViewResolver from NFT contract")
20 // get the recipients public account object
21 let recipient = getAccount(recipientAddr)
22
23 let collectionData = viewResolver.resolveContractView(
24 resourceType: type,
25 viewType: Type<MetadataViews.NFTCollectionData>()
26 ) as! MetadataViews.NFTCollectionData? ?? panic("Could not resolve NFTCollectionData view")
27 // borrow a reference to the signer's NFT collection
28 let collectionRef = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>(from: collectionData.storagePath)
29 ?? panic("Could not borrow a reference to the owner's collection")
30
31 // borrow a public reference to the receivers collection
32 let depositRef = recipient
33 .capabilities
34 .borrow<&{NonFungibleToken.Collection}>(collectionData.publicPath)
35 ?? panic("Could not borrow a reference to the receiver's collection")
36
37 for withdrawID in ids {
38 // withdraw the NFT from the owner's collection
39 let nft <- collectionRef.withdraw(withdrawID: withdrawID)
40
41 // Deposit the NFT in the recipient's collection
42 depositRef.deposit(token: <-nft)
43 }
44
45 StorageRent.tryRefill(recipientAddr)
46
47 }
48}