0xFable icon indicating copy to clipboard operation
0xFable copied to clipboard

Ensure the same card cannot figure in the same deck multiple time

Open norswap opened this issue 2 years ago • 2 comments

This should be checked as part of checkDeck in Inventory.sol.

We could modify the sorting doing there to preserve the unique NFT ID, then we only have to check all the instances of a similar card for similarity.

Once we have a frontend deck builder, we should also check this constraints (and others) there at add-time — although they won't be enforced contract-side when adding.

Alternatively, we could get rid of the notion of adding and removing cards from a deck and only mandate that decks are updated wholesale. This is potentially costly in terms of calldata, which is the main cost for rollups, so I do not think it's the way to go.

norswap avatar Oct 21 '23 14:10 norswap

Hi . I would like to work on this issue.

Prabhat1308 avatar Feb 15 '24 09:02 Prabhat1308

I believe I misunderstood something and @eviterin is actually already working on this! He will confirm.

norswap avatar Feb 15 '24 14:02 norswap