kodadot / nft-gallery

Generative Art Marketplace
https://koda.art
MIT License
638 stars 360 forks source link

Automatic cancel expired offer and return deposit #10963

Open Jarsen136 opened 1 month ago

Jarsen136 commented 1 month ago
          /// This function is used to cancel the specified swap offer created by the `caller` account. If
/// the swap offer's deadline has not yet passed, the `caller` must be the owner of the offered
/// item; otherwise, anyone can cancel an expired offer.
/// After canceling the swap offer, the function emits the `SwapCancelled` event.
///

In human lang: If the offer is expired, we can setup a bot that will "clear" offers every N-hours

Originally posted by @vikiival in https://github.com/kodadot/nft-gallery/issues/10951#issuecomment-2340393140

vikiival commented 1 month ago

Which deposit? :D the offer nft? That has to be burned by user, or you can reuse it for the next offer

Jarsen136 commented 1 month ago

Which deposit? :D the offer nft?

Yes, the price to mint the offer nft.

That has to be burned by user, or you can reuse it for the next offer

Will the mint price return to the user if he burns the nft? It looks like no when I test it.

hassnian commented 3 weeks ago

@vikiival what was the reason for having it in the first place, reduce spam ?

maybe we can lower a bit, If the user does a lot offers it can become a substantial amount

vikiival commented 3 weeks ago

reduce spam ?

Yup, you can write a script to "mint" all of them

maybe we can lower a bit

Screenshot 2024-09-24 at 14 15 44

currently is less than a quarter (25c) If you need some DOT/KSM for testing, please hit me up