kodadot / nft-gallery

Generative Art Marketplace
https://kodadot.xyz
MIT License
616 stars 353 forks source link

Mass Minting in drop page #9136

Closed yangwao closed 4 months ago

yangwao commented 5 months ago

we've been briefly chatting about this feature as it would be worth if someone want to buy from one collection right away like 10 pieces and don't want to wait long.

Would be nice to materialize this so we can speed up mints and don't need to wait 1-by-1 minting

Design

image

after:

file: https://www.figma.com/file/JXNtryaNYhY0XJNArzvPQx/Handoff?type=design&node-id=394-6126&mode=design&t=k6t3uvZZb3DCxEFi-11

exezbcz commented 5 months ago

How will the random generation be handled? I don't want to get the same X items in one purchase.

exezbcz commented 5 months ago

done in:

vikiival commented 5 months ago

How will the random generation be handled? I don't want to get the same X items in one purchase.

as everything is done currently on the client side the process is fairly simple:

TL;DR Answer to your question is 3 bullet points

newraina commented 5 months ago

sends request to allocate workers tries to allocate minimum of (I want, available) - eg. I wanna 3, available to mint 2 - I get 2 after allocation the mint fn is called

@vikiival Are these tasks dependent on the new fxart worker? or can the waifu worker handle them? Based on the current code, I can't seem to find a method to mass mint using waifu.

vikiival commented 5 months ago

Are these tasks dependent on the new fxart worker? or can the waifu worker handle them?

needs to be implemented, waifu worker will be deprecated for drops.

However first 3 can be implemented tho

newraina commented 5 months ago

@yangwao Is it possible to grant access to a private-worker for external contributors? if not, hoping that fxart will offer public API doc

exezbcz commented 5 months ago
  • the app must generate 3 new generative arts (random input) - so we ensure it is captured.

okay, user might need to wait in the confirmation dialog

something like this. image

vikiival commented 5 months ago

so we ensure it is captured

  • instead of the preview there is skeleton loader

You must see the preview. App cannot allow you to mint if you do not have the preview

So it will be 42,43,44

exezbcz commented 5 months ago

so we ensure it is captured

  • instead of the preview there is skeleton loader

You must see the preview. App cannot allow you to mint if you do not have the preview

So it will be 42,43,44

The state designed is loading the variation

yangwao commented 5 months ago

@newraina do you still want to work on this one?

yangwao commented 5 months ago

hoping that fxart will offer public API doc

cc @vikiival can you copy needed stuff, please?

newraina commented 5 months ago

do you still want to work on this one?

@yangwao busy this week, someone else could take it on :)

vikiival commented 5 months ago

cc @vikiival can you copy needed stuff, please?

Correct impl is waiting on:

but we can do it now as:

POST /drops/allocate/:id

Body as already in code

and do

const mints: ArrayOfBodiesForClaim = []
const raffles = await Promise.allSettled(mints.map(mint => claim(mint)))

TL;DR call the same api more times (the CODE above is just a PSEUDOCODE)

yangwao commented 5 months ago

@kodadot/internal-dev free for grabs, should be easy they say, @vikiival will help you assist

exezbcz commented 4 months ago

👀

hassnian commented 4 months ago

👋

kodabot commented 4 months ago

ASSIGNED - @hassnian 🔒 LOCKED -> Tuesday, February 27th 2024, 05:48:59 UTC -> 72 hours

kodabot commented 4 months ago

ASSIGNMENT EXPIRED - @hassnian has been unassigned.