You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub resource interface PackNFTCollectionPublic {
pub fun deposit(token: @NonFungibleToken.NFT)
pub fun getIDs(): [UInt64]
pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT
pub fun borrowPackNFT(id: UInt64): &PackNFT.NFT? {
// If the result isn't nil, the id of the returned reference
// should be the same as the argument to the function
post {
(result == nil) || (result?.id == id):
"Cannot borrow PackNFT reference: The ID of the returned reference is incorrect"
}
}
}
The text was updated successfully, but these errors were encountered:
This makes it easier to use the public functions via a single interface.
e.g.:
https://github.com/dapperlabs/nba-smart-contracts/blob/master/contracts/TopShot.cdc#L525
https://github.com/onflow/kitty-items/blob/master/cadence/contracts/KittyItems.cdc#L46
For PackNFT, this would be:
The text was updated successfully, but these errors were encountered: