flow-nft
flow-nft copied to clipboard
Listing view
Many solutions on flow today offer an listing for an NFT. This can be:
- flowty offering a loan
- schwap offering a schwap
- nft storefront listing something for sale
- .find listing a name for auction or sale
This list is not complete obviously. Just some examples.
I think it would be nice to have a common view for all of these cases where you can say that "this item is listed as X".
I do not have a implementation for this but I think it should be possible to specify
- what FT type if any that is required
- what item that is listed
- what price that is required if any
- a description of the sale
- a url to where you can see the listing in a web ui
Are you sure this should be a view? Seems like something that should be specific to the marketplaces. This seems like it could be more complicated than it is worth
I made the issue so yes I think it makes sense.
There are various premutations of storefront, auctions, open bids and contracts based on the old markerplace (flovatar/versus). The ability for these to say "i am a listing for this NFT" is important to beeing able to browse and discover data without having to hardcode things.
However I can always create this as a view under the find umbrella, but I would rather it be shared.
This would require putting a bunch of logic in the NFT contract code that has to know about marketplace listings and such, which seems out of the scope for what the NFT contract should know about.
Maybe I did not make the issue clear enough, I am not saying that a Listing view should be implemented for an NFT. What I am arguing is that a it could be added as a view in the Storefront resource in https://github.com/onflow/nft-storefront/blob/main/contracts/NFTStorefront.cdc#L388 and in similar places.
Views and ViewResolvers are valid for any kind of resource on Flow, not just NFTs.
If it isn't a view for NFTs, it probably shouldn't be in the MetadataViews contract. It could probably be defined in the storefront contract or somewhere else.
Does it make sense to close this issue because it doesn't seem to make sense any more?
It is ok for me to close it.