Skip to main content

πŸ”° 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 NameDescriptionMutable/Immutable
ownerOwner of the NFT collectionI
offchain_dataLink/Json to the collection’s offchain metadata. More information below.I
nftsList of NFTs belonging to the collectionM
limitLimit 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_closedCreator 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 NameDescription
nameName of the collection
descriptionDescription of the collectionbelow.
profile_imageAvatar/Profile image assigned to the collection
banner_imageBanner 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

    FeaturesConstraints
    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:

  1. User create his metadata in a json format
  2. User upload it to IPFS retrieving the CID
  3. User create the collection spcifying the CID and the optional desired limit
  4. User retrieves the collection id
Minting an NFT with a collection

The following is the workflow proposed for minting an NFT with a collection:

  1. User has already created a collection and knows the corresponding id
  2. User create his NFT metadata in a json format
  3. User upload the metadata to IPFS retrieving the CID
  4. 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:

  1. User has already created a collection and knows the corresponding id
  2. User has already created an NFT and knows the corresponding id
  3. 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:

  1. User has already create a collection WITHOUT specifying a limit and know the corresponding id
  2. User triggers the "limit_collection" function specifying the collection id and the maximum number of NFTs in the collection.
  3. Collection now has a maximum number (limit)
Closing a collection

The following is the workflow proposed for closing a collection:

  1. User has already created a collection and knows the corresponding id
  2. User triggers the "close_collection" function specifying the collection id
  3. Collection is now close and can't accept any more NFTs
Burning a collection

The following is the workflow proposed for burning a collection:

  1. User has already created a collection (EMPTY) and knows the corresponding id
  2. User triggers the "burn_collection" function specifying the collection id
  3. 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:

  1. User has already created a collection and has NFTs in it and knows the corresponding id
  2. 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.
  3. User triggers the "burn_collection" function specifying the collection id
  4. Collection does not exist anymore