Contract ExampleNFT
_10contract ExampleNFT {_10_10 totalSupply: UInt64_10_10 CollectionStoragePath: StoragePath_10_10 CollectionPublicPath: PublicPath_10_10 MinterStoragePath: StoragePath_10}
Implemented Interfaces:
NonFungibleToken
Interfaces
resource interface ExampleNFTCollectionPublic
_10resource interface ExampleNFTCollectionPublic {_10}
Defines the methods that are particular to this NFT contract collection
Structs & Resources
resource NFT
_14resource NFT {_14_14 id: UInt64_14_14 name: String_14_14 description: String_14_14 thumbnail: String_14_14 royalties: [MetadataViews.Royalty]_14_14 metadata: {String: AnyStruct}_14}
The core resource that represents a Non Fungible Token. New instances will be created using the NFTMinter resource and stored in the Collection resource
resource Collection
_10resource Collection {_10_10 ownedNFTs: {UInt64: NonFungibleToken.NFT}_10}
The resource that will be holding the NFTs inside any account. In order to be able to manage NFTs any account will need to create an empty collection first
resource NFTMinter
_10resource NFTMinter {_10}
Resource that an admin or something similar would own to be able to mint new NFTs
Functions
fun createEmptyCollection()
_10func createEmptyCollection(): NonFungibleToken.Collection
Allows anyone to create a new empty collection
Returns: The new Collection resource
Events
event ContractInitialized
_10event ContractInitialized()
The event that is emitted when the contract is created
event Withdraw
_10event Withdraw(id UInt64, from Address?)
The event that is emitted when an NFT is withdrawn from a Collection
event Deposit
_10event Deposit(id UInt64, to Address?)
The event that is emitted when an NFT is deposited to a Collection