Resource Collection
_10pub resource Collection {_10_10 pub var ownedNFTs: {UInt64: NFT}_10}
Requirement for the concrete resource type to be declared in the implementing contract
Implemented Interfaces:
Provider
Receiver
CollectionPublic
Functions​
withdraw()
​
_10fun withdraw(withdrawID: UInt64): NFT
Removes an NFT from the collection and moves it to the caller
Parameters:
- withdrawID : The ID of the NFT that will be withdrawn
Returns: The resource containing the desired NFT
deposit()
​
_10fun deposit(token: NFT)
getIDs()
​
_10fun getIDs(): [UInt64]
borrowNFT()
​
_10fun borrowNFT(id: UInt64): &NFT