onflow / freshmint

Apache License 2.0
68 stars 17 forks source link

Mint NFTs into a queue #142

Closed psiemens closed 1 year ago

psiemens commented 2 years ago

This PR updates the minting transactions for all NFT contracts to mint NFTs into a FreshmintQueue.CollectionQueue instance.

The NFTs are still deposited into the same collections as before. This only adds the queue as a layer on top. The queue can then be used to operate a drop that distributes NFTs in the same order they were minted.

psiemens commented 1 year ago

@bshahid331 I moved the queue creation logic to the mint transactions.

I moved the simple string helpers to the contracts but kept the getOrCreateQueue and getOrCreateCollection helpers in the transactions because I don't want to promote a pattern where a contract function accepts an entire AuthAccount object. I really don't like the redundant code, but given that it works, I think I'm OK leaving it for now.