Itheum / itheumcore-elrond-data-nft-marketplace

MuliversX blockchain Data NFT marketplace (Data Market)
0 stars 0 forks source link

Add an optional maxPerAddress parameter in the marketplace #45

Closed damienen closed 6 months ago

damienen commented 6 months ago

Requirements:

  1. Whenever someone lists they can specify an optional maxQuantity parameter which limits how many of those NFTs an address can buy
  2. If they don't send such a parameter, the maxDefaultQuantity is set to be used instead
bucurdavid commented 6 months ago

Should be delivered with this PR: https://github.com/Itheum/sdk-mx-data-nft/pull/129

damienen commented 6 months ago

Seems like you added a maxQuantity per TX, but a max quantity per ADDRESS is needed. (see updated descriprition above as well)

damienen commented 6 months ago

Code reviewed. Looks good. But to be noted: it's a breaking changes for the addOffer endpoint

damienen commented 6 months ago

https://github.com/Itheum/itheumcore-elrond-data-nft-marketplace/blob/ce15a874eb1661145d71ab19313eef0850e17d9e/src/storage.rs#L29

We should return how much the user can buy on his address for each offer in offer out (not how much IN TOTAL, but how much considering what he has bought so far)

Change should be reflected in the SDK as well

damienen commented 6 months ago

Solved. Closing