wonka-js icon indicating copy to clipboard operation
wonka-js copied to clipboard

Ability to mint multiple tokens at once?

Open edwardysun opened this issue 3 years ago • 4 comments

Just curious, would it be possible to add a quantity argument to mintCandyMachineToken and be able to batch mint more than one token at a time?

Thanks, Edward

edwardysun avatar Feb 14 '22 22:02 edwardysun

Can you tell me more about the use case?

zkhalapyan avatar Feb 14 '22 23:02 zkhalapyan

For context, our use case is trying to make a backend that mints and then transfers an NFT or multiple (up to 5) NFTs to a specified wallet address. We're supporting a fiat flow with credit card purchases and this backend is executed when the credit card transaction is complete.

This is more of a nice-to-have for us, not a must have. Right now, I just run a loop up to the quantity needed, but ideally there could be a batch (up to 5) mint. Thanks for this library you've made. It's been really helpful so far!

edwardysun avatar Feb 15 '22 18:02 edwardysun

Ah, I see. I think the easy way of doing this would be wrap the wonka call in a Promise.all(..), but if atomicity is important, much better to do through Rust. Another approach would be just to batch the transactions at a lower level. I wonder if @kunalmodi has any thoughts.

Would you be up for a quick chat? We've quietly been building NFT infra that should save you a lot of extra work. We have only opened it up to our close partners, but seems like it might be helpful to you as well.

Here is our calendly, but happy work around your schedule. Also, seems like you worked at Nextdoor. Have you met Aaron Sarnoff? He used to be our manager actually! 🙂

zkhalapyan avatar Feb 15 '22 20:02 zkhalapyan

Scheduled time on your calendar. Looking forward to chatting!

edwardysun avatar Feb 15 '22 20:02 edwardysun