TransactionSEALED
╱?╲%██#?●▒@╱&^$#╳■■◆▓▪█■□~░□▓^╲@%▓╳*!?█□□#□●~#^╳╳?▪╲╱▫█▓@╱$■●!╱□
Transaction ID
Execution Fee
0.0001 FLOWExecution Error
Error Code: 1101
cannot find declaration `PinnacleEmpty` in `0000000012345abc.PinnacleEmpty`
Error ContextLine 3
1import PDS from 0xb6f2481eba4df97b
2import PackNFT from 0xedf9df96c92f4595
3import PinnacleEmpty from 0x0000000012345abc
4import NonFungibleToken from 0x1d7e57aa55817448
5import MetadataViews from 0x1d7e57aa55817448
6
7transaction (
8 distId: UInt64,Call Stack
→
Raw Error
[Error Code: 1101] error caused by: 1 error occurred: * transaction preprocess failed: [Error Code: 1101] cadence runtime error: Execution failed: error: cannot find declaration `PinnacleEmpty` in `0000000012345abc.PinnacleEmpty` --> 3c4aea4aae6ed2f0edcc9bf0b633c0d299e4fcdaae796722e1623c338731390f:3:7 | 3 | import PinnacleEmpty from 0x0000000012345abc | ^^^^^^^^^^^^^ available exported declarations are: See documentation at: https://cadence-lang.org/docs/language/imports Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.
Transaction Summary
Contract Call
Called PDS, PackNFT, PinnacleEmpty +2 more
Script Arguments
Copy:
0distIdUInt64
6531
1packIdUInt64
146235048861432
2nftContractAddrs[Address]
3nftContractNames[String]
[ "PinnacleEmpty" ]
4nftIds[UInt64]
[ "2934" ]
5saltString
2404ddbb9a2d87c5306481b5de410c7d4cf3c08cc216fb3046c4b11d0ec9d2bc
6ownerAddress
7openRequestBool
false
8collectionStoragePathStoragePath?
storage/PinnacleEmptyNFTCollection
Cadence Script
1import PDS from 0xb6f2481eba4df97b
2import PackNFT from 0xedf9df96c92f4595
3import PinnacleEmpty from 0x0000000012345abc
4import NonFungibleToken from 0x1d7e57aa55817448
5import MetadataViews from 0x1d7e57aa55817448
6
7transaction (
8 distId: UInt64,
9 packId: UInt64,
10 nftContractAddrs: [Address],
11 nftContractNames: [String],
12 nftIds: [UInt64],
13 salt: String,
14 owner: Address,
15 openRequest: Bool,
16 collectionStoragePath: StoragePath?
17) {
18 prepare(pds: auth(BorrowValue) &Account) {
19 let collectionData = PinnacleEmpty.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
20 ?? panic("ViewResolver does not resolve NFTCollectionData view")
21
22 let cap = pds.storage.borrow<auth(PDS.Operate) &PDS.DistributionManager>(from: PDS.DistManagerStoragePath)
23 ?? panic("pds does not have Dist manager")
24 let p = PackNFT.borrowPackRepresentation(id: packId)
25 ?? panic ("No such pack")
26
27 if openRequest && p.status == PackNFT.Status.Revealed {
28 let recvAcct = getAccount(owner)
29 let recv = recvAcct.capabilities.borrow<&{NonFungibleToken.CollectionPublic}>(collectionData.publicPath)
30 ?? panic("Unable to borrow Collection Public reference for recipient")
31 cap.openPackNFT(
32 distId: distId,
33 packId: packId,
34 nftContractAddrs: nftContractAddrs,
35 nftContractNames: nftContractNames,
36 nftIds: nftIds,
37 recvCap: recv,
38 collectionStoragePath: collectionStoragePath
39 )
40 } else {
41 cap.revealPackNFT(
42 distId: distId,
43 packId: packId,
44 nftContractAddrs: nftContractAddrs,
45 nftContractNames: nftContractNames,
46 nftIds: nftIds,
47 salt: salt
48 )
49 }
50 }
51}