Contract Interface NonFungibleToken
The main NFT contract interface. Other NFT contracts will import and implement this interface
Interfaces
INFT
Interface that the NFTs have to conform to The metadata views methods are included here temporarily because enforcing the metadata interfaces in the standard would break many contracts in an upgrade. Those breaking changes are being saved for the stable cadence milestone
Provider
Interface to mediate withdraws from the Collection
Receiver
Interface to mediate deposits to the Collection
CollectionPublic
Interface that an account would commonly publish for their collection
Structs & Resources
NFT
Requirement that all conforming NFT smart contracts have to define a resource called NFT that conforms to INFT
Collection
Requirement for the concrete resource type to be declared in the implementing contract
Functions
createEmptyCollection()
Creates an empty Collection and returns it to the caller so that they can own NFTs
Returns: A new Collection resource
Events
ContractInitialized
Event that emitted when the NFT contract is initialized
Withdraw
Event that is emitted when a token is withdrawn, indicating the owner of the collection that it was withdrawn from.
If the collection is not in an account's storage, from
will be nil
.
Deposit
Event that emitted when a token is deposited to a collection.
It indicates the owner of the collection that it was deposited to.