Last active
February 26, 2021 16:48
-
-
Save polluterofminds/88086c739e39794305512dfb3d034045 to your computer and use it in GitHub Desktop.
4 - PinataPartyContract
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
pub fun createEmptyCollection(): @Collection { | |
return <- create Collection() | |
} | |
pub resource NFTMinter { | |
pub var idCount: UInt64 | |
init() { | |
self.idCount = 1 | |
} | |
pub fun mintNFT(): @NFT { | |
var newNFT <- create NFT(initID: self.idCount) | |
self.idCount = self.idCount + 1 as UInt64 | |
return <-newNFT | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment