-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import TopShot from 0xTOPSHOTADDRESS | ||
import NonFungibleToken from 0xNFTADDRESS | ||
import PackNFT from 0xPACKNFTADDRESS | ||
import MetadataViews from 0xMETADATAVIEWSADDRESS | ||
import NonFungibleToken from "NonFungibleToken" | ||
import PackNFT from "PackNFT" | ||
import TopShot from "TopShot" | ||
|
||
// Check to see if an account looks like it has been set up to hold Pinnacle NFTs and PackNFTs. | ||
pub fun main(address: Address): Bool { | ||
/// Check if an account has been set up to hold Pinnacle NFTs. | ||
/// | ||
access(all) fun main(address: Address): Bool { | ||
let account = getAccount(address) | ||
return account.getCapability<&{ | ||
NonFungibleToken.Receiver, | ||
NonFungibleToken.CollectionPublic, | ||
TopShot.MomentCollectionPublic, | ||
MetadataViews.ResolverCollection | ||
}>(/public/MomentCollection).check() && | ||
account.getCapability<&{ | ||
NonFungibleToken.CollectionPublic | ||
}>(PackNFT.CollectionPublicPath).check() | ||
} | ||
return account.capabilities.borrow< | ||
&TopShot.Collection>(/public/MomentCollection) != nil && | ||
account.capabilities.borrow< | ||
&PackNFT.Collection>(PackNFT.CollectionPublicPath) != nil | ||
} |