contracts icon indicating copy to clipboard operation
contracts copied to clipboard

Request for adding get all listings method in Marketplace

Open adhbh opened this issue 2 years ago • 1 comments

Hello team, The listings method here: https://github.com/thirdweb-dev/contracts/blob/main/contracts/marketplace/Marketplace.sol#L88 works well for getting listing by listingId

However, it would be really helpful to also include get all listings function in the contract.

adhbh avatar Apr 05 '22 09:04 adhbh

[fix] I added a new function that allow user to get all listing

kaymen99 avatar Apr 05 '22 14:04 kaymen99

Hey y'all 👋🏽

We're working on the next iteration of the Marketplace contract; you can track the effort, here: https://github.com/thirdweb-dev/contracts/pull/259

We've added explicit view functions such as getAllListings and getAllValidListings that'll be included in this next iteration of the Marketplace contract: https://github.com/thirdweb-dev/contracts/blob/marketplace-v3/contracts/marketplace/direct-listings/DirectListingsLogic.sol#L301-L367

These view functions are not present in the current version of the Marketplace contract due to the contract crossing the smart contract size limit (~24.576 kb) on adding such view functions.

nkrishang avatar Oct 26 '22 06:10 nkrishang