blockframes / nft

NFT project
0 stars 0 forks source link

Multi Collections #85

Open pldespaigne opened 2 years ago

pldespaigne commented 2 years ago

What would it takes to make our app handle several collections instead of one ?

pldespaigne commented 2 years ago

It seems that on open sea, 1 contract = 1 collection! (except for there own public contract) So we have 3 options:

  1. deploy one contract per collection, super bad idea imo & very expensive
  2. use open sea public contract, less flexibility, we are locked in, we need to change the app, but it cost less in crypto
  3. we use one contract with one collection but we can adapt the app to make it look like there is several collection, we use a little less open sea so we need to code a little more (custom collection page)
pldespaigne commented 2 years ago

After some research, the best solution is just to use our own contract with a single collection. We can add a "Title"/"Movie" attribute in the metadata of a NFT (in our db), and then pre-filter marketplace page with this attribute.

Example: https://testnets.opensea.io/assets/our-very-own-shiny-store?search[stringTraits][0][name]=Title&search[stringTraits][0][values][0]=Blood%20Machine

pldespaigne commented 2 years ago
  • Can our smart-contract handle multiple collections ?

Not really, but we can do as if it was the case from the user point of view, i.e. user will see only Blood Machine NFTs on the Blood Machine marketplace on our app.


  • How does that work with open sea iframes ?

We will be using an attribute to split NFTs by titles, we can then use a filter query in the iframe url to pre-filter marketplaces


  • What would be the impact on the db & code ?

We "just" need to add an open sea readable attribute on every NFTs, so we could filter them, something like that for example:

attributes: [
  { trait_type: "Title", value: "Blood Machine" },
]