%■▒#$◆●◆%~~░□╳▪&▓□◇&^█╲█■▓$○□~▫◆*#!^@▒●~╱??◇╳●@○██&*╳░%○◆#▫▪░*█▫
Transaction ID
Execution Fee
0.0001 FLOWExecution Error
incorrect argument label
26 acct.capabilities.publish(cardCollectionCap, at: cardCollectionData.publicPath)
27 }
28
29 let cardToTransfer: @HWGaragePack.NFT <-acct.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>(from: HWGaragePack.CollectionStoragePath)!.withdraw(withdrawID: cardEditionID) as! @HWGaragePack.NFT
30 HWGaragePack.transfer(uuid: cardToTransfer.uuid, id: cardToTransfer.id, packSeriesId: cardToTransfer.packSeriesID, cardEditionId: cardToTransfer.id, toAddress: to)
31 getAccount(to).capabilities.get<&{NonFungibleToken.Receiver}>(HWGaragePack.CollectionPublicPath).borrow()!.deposit(token: <-cardToTransfer)
32
33 }
34 execute {
35 }
36}Raw Error
[Error Code: 1101] error caused by: 1 error occurred: * transaction preprocess failed: [Error Code: 1101] cadence runtime error: Execution failed: error: value of type `HWGaragePack.NFT` has no member `packSeriesID` --> 697c8584e70c95dd9ce7d41f58d76c8f1e1532edaac87b7bb3ac5fed546bcd1f:31:109 | 31 | HWGaragePack.transfer(uuid: cardToTransfer.uuid, id: cardToTransfer.id, packSeriesId: cardToTransfer.packSeriesID, cardEditionId: cardToTransfer.id, toAddress: to) | ^^^^^^^^^^^^ the member is not defined on the type; check for typos or if the member exists on the type error: incorrect argument label --> 697c8584e70c95dd9ce7d41f58d76c8f1e1532edaac87b7bb3ac5fed546bcd1f:31:123 | 31 | HWGaragePack.transfer(uuid: cardToTransfer.uuid, id: cardToTransfer.id, packSeriesId: cardToTransfer.packSeriesID, cardEditionId: cardToTransfer.id, toAddress: to) | ^^^^^^^^^^^^^^ expected `packEditionId`, got `cardEditionId`; replace the current argument label See documentation at: https://cadence-lang.org/docs/language/functions Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.
Transaction Summary
Contract CallCalled NonFungibleToken, MetadataViews, HWGaragePack
Script Arguments
Cadence Script
1import NonFungibleToken from 0x1d7e57aa55817448
2import MetadataViews from 0x1d7e57aa55817448
3import HWGaragePack from 0xd0bcefdf1e67ea85
4
5transaction(
6 cardEditionID: UInt64
7 , to: Address
8 ) {
9
10 prepare(acct: auth(BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue, UnpublishCapability) &Account) {
11 // Setup Card Collection
12 let cardCollectionData: MetadataViews.NFTCollectionData = HWGaragePack.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
13 ?? panic("ViewResolver does not resolve NFTCollectionData view")
14
15 // exit if cardCollection exists
16 if acct.storage.borrow<&HWGaragePack.Collection>(from: cardCollectionData.storagePath) == nil {
17 // create a new empty cardCollection for HWGaragePack
18 let cardCollection: @{NonFungibleToken.Collection} <- HWGaragePack.createEmptyCollection(nftType: Type<@HWGaragePack.NFT>())
19
20 // save HWGaragePack cardCollection to the account
21 acct.storage.save(<-cardCollection, to: cardCollectionData.storagePath)
22
23 // create a public capability for the HWGaragePack cardCollection
24 acct.capabilities.unpublish(cardCollectionData.publicPath) // remove any current pubCap
25 let cardCollectionCap: Capability<&HWGaragePack.Collection> = acct.capabilities.storage.issue<&HWGaragePack.Collection>(cardCollectionData.storagePath)
26 acct.capabilities.publish(cardCollectionCap, at: cardCollectionData.publicPath)
27 }
28
29 let cardToTransfer: @HWGaragePack.NFT <-acct.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>(from: HWGaragePack.CollectionStoragePath)!.withdraw(withdrawID: cardEditionID) as! @HWGaragePack.NFT
30 HWGaragePack.transfer(uuid: cardToTransfer.uuid, id: cardToTransfer.id, packSeriesId: cardToTransfer.packSeriesID, cardEditionId: cardToTransfer.id, toAddress: to)
31 getAccount(to).capabilities.get<&{NonFungibleToken.Receiver}>(HWGaragePack.CollectionPublicPath).borrow()!.deposit(token: <-cardToTransfer)
32
33 }
34 execute {
35 }
36}