Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.43k stars 115 forks source link

Factoring out NFT pallet #3397

Open bedeho opened 2 years ago

bedeho commented 2 years ago

Background

Currently, we have NFTs fully backed into the content pallet, specifically into the videos/content of each pallet.

Question

What if we factored out the NFT functionality into its own pallet.?

This would basically entail that we create a new pallet, call it nft, which has public methods for issuing and de-issuing nfts, which can be called from any other module in the runtime. Then, all the user facing actions around managing nft ownership/bidding etc., is done through extrinsics in that pallet, and those actions are authenticated using normal membership authenticator.

It would have the following benefits

  1. Simplifying the content pallet, which is getting very large, and all of the nft functionality is generally quite orthogonal.
  2. NFT features could be used for multiple purposes, not just channel videos? Ideas like video comments (not-metaprotocol!)

It would have the disadvantage of introducing a type-system discontinuity at the pallet boundry, as always, having to do with actions like issuing or de-issuing NFTs, but that seems managable. Its the same situation we will have for project_tokens.

It should not have any effect on QN/CLI/Atlas, beyond very superficial changes around which pallet has extrinsics.

┆Issue is synchronized with this Asana task by Unito

bedeho commented 2 years ago

We decided to not do this until project_token pallet was done, as it will be a solid guide for how to split state and do integration cleanly.

bedeho commented 2 years ago

Splitting up into two separate tasks

  1. Preparing a plan: https://github.com/Joystream/joystream/issues/3658
  2. Doing it: this issue.

We only do 2 if one seems safe, simple and promising.