MoonSHRD / UniversalNFTMarketplace

Universal NFT Marketplace
Other
9 stars 0 forks source link

[todo] Store last sold price for nft in MetaMarketplace.sol #112

Closed JackBekket closed 2 years ago

JackBekket commented 2 years ago

Store last sold price for nft in MetaMarketplace.sol

Users should know what was the last price this nft has been sold

Not sure yet where exactly this info should store

JackBekket commented 2 years ago

add mapping (uint => uint) lastSoldPrice inside Marketplace struct (https://github.com/MoonSHRD/UniversalNFTMarketplace/blob/master/contracts/721/singleton/MetaMarketplace.sol#L48)

JackBekket commented 2 years ago

add getter for this variable respectively

JackBekket commented 2 years ago

set sold price (probably) when

  1. purchase (https://github.com/MoonSHRD/UniversalNFTMarketplace/blob/master/contracts/721/singleton/MetaMarketplace.sol#L243)
  2. acceptBuyOffer(https://github.com/MoonSHRD/UniversalNFTMarketplace/blob/master/contracts/721/singleton/MetaMarketplace.sol#L376)
JackBekket commented 2 years ago

and check it in tests