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.2d4c3caffbeab845.FLOAT.NFT
1childAddrAddress
2receiverAddress
3ids[UInt64]
[ "217703303195673" ]
Cadence Script
1import HybridCustody from 0xd8a7e05a7ac670c0
2import CapabilityFilter from 0xd8a7e05a7ac670c0
3import NonFungibleToken from 0x1d7e57aa55817448
4import MetadataViews from 0x1d7e57aa55817448
5import ViewResolver from 0x1d7e57aa55817448
6
7
8
9transaction(identifier: String, childAddr: Address, receiver: Address, ids: [UInt64]) {
10 prepare(signer: auth(Storage) &Account) {
11 let type = CompositeType(identifier)
12 let identifierSplit = identifier.split(separator: ".")
13 let address = Address.fromString("0x".concat(identifierSplit[1]))!
14 let name = identifierSplit[2]!
15
16 let viewResolver = getAccount(address).contracts.borrow<&{ViewResolver}>(name: name)
17 ?? panic("Could not borrow ViewResolver from NFT contract")
18 // signer is the parent account
19 // get the manager resource and borrow childAccount
20 let m = signer.storage.borrow<auth(HybridCustody.Manage) &HybridCustody.Manager>(from: HybridCustody.ManagerStoragePath)
21 ?? panic("manager does not exist")
22 let childAcct = m.borrowAccount(addr: childAddr) ?? panic("child account not found")
23
24 let collectionData = viewResolver.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
25 ?? panic("Could not get the vault data view for <NFT> ")
26
27 //get Ft cap from child account
28 let capType = Type<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>()
29 let controllerID = childAcct.getControllerIDForType(type: capType, forPath: collectionData.storagePath)
30 ?? panic("no controller found for capType")
31
32 let cap = childAcct.getCapability(controllerID: controllerID, type: capType) ?? panic("no cap found")
33 let providerCap = cap as! Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>
34 assert(providerCap.check(), message: "invalid provider capability")
35
36 // Get a reference to the child's stored vault
37 let collectionRef = providerCap.borrow()!
38
39
40 let receiverAcc = getAccount(receiver)
41 let receiverRef = receiverAcc.capabilities.get<&{NonFungibleToken.Receiver}>(collectionData.publicPath)!.borrow()
42 ?? panic("Could not borrow receiver reference to the recipient's Vault")
43
44 for id in ids {
45 // Withdraw tokens from the signer's stored vault
46 let nft <- collectionRef.withdraw(withdrawID: id)
47 receiverRef.deposit(token: <- nft)
48 }
49 }
50}