π° Collections
π€ What is an NFT collection?β
These digital items are distinguishable from one another by a unique number. That number or serial number for NFTs is a token ID, which is stored on the blockchain. The serial number works in the same way as a barcode and the code corresponds to the information about that particular item: how it looks, its distinguishing attributes, the artist or organization that made it, and more.
NFTs represent proof of ownership on the blockchain. Creators need a way to group NFTs in a higher order entity. This entity is a collection. If a collection is created, NFTs can be put in it at its creation or after.
Abstractβ
In EVM / Smart Contract based, collection are represented by smart contract. It implies some advantages and drawback. "Buyers" need to mint their NFT themselves, each contract will have its own set of rules, the smart contract can follow or not some standards. At Ternoa, you can create and be the owner of a collection. When minting NFTs, you can specify this collection and put it on sale. The NFTs will always be part of this collection and it's origin / grouping can be ensured over time. Collections will always follow the same set of rules.
π― Objectiveβ
Collections are used to represent all the assets in a single (or multiple) contract addresses and help users group items from the same creator. They have one or more owners and are typically associated with important metadata such as creator royalties and descriptions.
The main objective of collections are to give a way to group NFTs. Grouping can have multiple meaning, eg. having the same NFT in a high quantity grouped in the same collection or having multiple NFTs sharing the same types of attributes, while still being different, gathered in one entity. This can ease navigation in dApps and more generally improve user experience while using Ternoa's chain.
Specificationβ
Ternoa Improvment proposal 101 is the technical implementation specifications for the Collection feature on Ternoa network. Find all details on: TIP-101
πΎ Ternoa Collection Metadataβ
π’ On-Chain Metadata - Collectionβ
Field Name | Description | Mutable/Immutable |
---|---|---|
owner | Owner of the NFT collection | I |
offchain_data | Link/Json to the collectionβs offchain metadata. More information below. | I |
nfts | List of NFTs belonging to the collection | M |
limit | Limit defines the total number of NFTs a collection can have. Limit is optional at the time of collection creation and thus can only be defined once. | M(once), if limit is set or the collection is closed β I |
is_closed | Creator of the collection cannot add more NFTs to the collection if marked as closed. At the time of the collection creation this parameter is set to default: false. However, creator can chose to close the collection at any point of time after the collection has been created. | M(once), if the collection is closed β I |
π’ Off-Chain Metadata - Collection - Not Enforceableβ
Collection, like NFTs, have their own metadata that are store in json in either IPFS, a private server, any other type of storage. Metadatas cannot be enforced but we suggest this format:
Field Name | Description |
---|---|
name | Name of the collection |
description | Description of the collectionbelow. |
profile_image | Avatar/Profile image assigned to the collection |
banner_image | Banner image for the collection |
off-chain metadata example :
{ "name": "My Awesome collection", "description": "A cool description of my collection", "profile_image": "Profile picture of the collection (Link / IPFS / Any)", "banner_image": "Banner picture of the collection (Link / IPFS / Any)"}
This metadata is stored offchain and only the CID (in case of IPFS), the link or the string corresponding to offchain data, will be stored on chain.
Constraintsβ
Collection must not be close or limited to add an NFT in it
Collection must be owned to add NFT in it
Collection must be owned to close it
Collection must be owned to add a limit
Collection must be empty to be burned
Features Constraints CREATION - Have enough CAPS to create a collection
BURN - All NFTs should be burned before burning the collection
- A collection needs to be owned in order to be burned
CLOSE - Only an owner can close the collection
- Owner can close a closed collection
LIMIT - Only an owner can limit the collection
- A collection can only be limited once
- A closed collection cannot be limited
π Workflowsβ
Creating a collection
The following is the workflow proposed for creating a collection:
- User create his metadata in a json format
- User upload it to IPFS retrieving the CID
- User create the collection spcifying the CID and the optional desired limit
- User retrieves the collection id
Minting an NFT with a collection
The following is the workflow proposed for minting an NFT with a collection:
- User has already created a collection and knows the corresponding id
- User create his NFT metadata in a json format
- User upload the metadata to IPFS retrieving the CID
- User create his NFT by specifying the CID, royalties, soulbound flag but most importantly the collection id.
Adding an NFT to a collection
The following is the workflow proposed for adding an NFT to a collection:
- User has already created a collection and knows the corresponding id
- User has already created an NFT and knows the corresponding id
- User triggers the "add_nft_to_collection" function specifying the nft id and the collection id
Adding a limit to a collection
The following is the workflow proposed for adding a limit to a collection:
- User has already create a collection WITHOUT specifying a limit and know the corresponding id
- User triggers the "limit_collection" function specifying the collection id and the maximum number of NFTs in the collection.
- Collection now has a maximum number (limit)
Closing a collection
The following is the workflow proposed for closing a collection:
- User has already created a collection and knows the corresponding id
- User triggers the "close_collection" function specifying the collection id
- Collection is now close and can't accept any more NFTs
Burning a collection
The following is the workflow proposed for burning a collection:
- User has already created a collection (EMPTY) and knows the corresponding id
- User triggers the "burn_collection" function specifying the collection id
- Collection does not exist anymore
Burning a collection with NFT in it
The following is the workflow proposed for burning a collection with NFT in it:
- User has already created a collection and has NFTs in it and knows the corresponding id
- User triggers the "burn_nft" function for each NFTs in the collection. If he doesn't own all the NFTs, hs won't be able to burn them and burn the collection.
- User triggers the "burn_collection" function specifying the collection id
- Collection does not exist anymore