Trait Templates

Trait Templates are JSON files that encompass a collection of traits, which can be recorded on the blockchain, and mapped to Non-Fungible Tokens (NFTs).

Understanding Traits

Traits are unique descriptors that, when combined, form the core identity of a Non-Fungible Token (NFT). They function as the driving force behind the versatility and value of NFTs.

The Purpose of Trait Templates

Trait Templates provide a standardized set of attributes and features that can be applied to NFTs to bestow them with exclusive properties. These templates act as building blocks, facilitating the construction of more intricate ERC-721 token structures.

By defining a collection of shared attributes and behaviors, developers can selectively combine different templates to generate tokens with a broad spectrum of functionality and customization options.

The Structure of a Trait Template

A Trait Template is structured as a JSON file, containing an array of traits that are subsequently added to the blockchain and assigned to NFTs. In essence, it is a package of data objects submitted collectively, simplifying the management of metadata for multiple NFTs simultaneously.

Creating a Compatible Trait Template

To create a Trait Template compatible with our platform, it must be a valid JSON file. Each trait is represented as an object with four fields:

  1. value: This field represents the value of the trait, such as "Background 01" in the example above.

  2. trait_type: This field defines the name of the trait, such as "Background" in the example above.

  3. render_order: This field specifies the order in which the trait should be rendered. For example, if two traits have the same renderOrder value, they will be rendered in the order they appear in the JSON file.

  4. image_url: This field provides a URL to an image that represents the trait, such as a background or an accessory.

Here's an example of a unique trait in JSON code:

{
  "value": "Jersey 15, Stance 02",
  "trait_type": "Jersey"
  "render_order": "4"
  "image_url": "ar://PHVlm5NP_cmlKB9SPWymrnYxa4DOUs935yrCvlf1c_c",
  "original_minter_royalty_bips": "200",
  "artist_royalty_bips": "200",
  "artist_address": "0x956fefb316a11fa5b528f1fe0eee2b2e2e62ae60",
  "original_minter_address": "0x7b7ec6cfa269d17f8484fd031748d80929f96491",
},

You can add as many traits as needed for your collection, and there is no limit to the number of traits that can be included in a Trait Template.

Here's a snippet of a Trait Template JSON file:

[
  // ... (previous traits)
{
  "value": "Jersey 15, Stance 02",
  "trait_type": "Jersey"
  "render_order": "4"
  "image_url": "ar://PHVlm5NP_cmlKB9SPWymrnYxa4DOUs935yrCvlf1c_c",
  "original_minter_royalty_bips": "200",
  "artist_royalty_bips": "200",
  "artist_address": "0x956fefb316a11fa5b528f1fe0eee2b2e2e62ae60",
  "original_minter_address": "0x7b7ec6cfa269d17f8484fd031748d80929f96491",
},
  // ... (other traits)
]

To mint a new NFT collection, the first step is to submit a Trait Template that includes all of the collection's traits. The Trait Template should be submitted as a JSON file. There is no limit to the number of traits it can contain.

Please note that the collection owner needs to submit the Trait Templates before minting a new collection. When minting, you will indicate which trait templates should be used for the token.

Ready to create your own Trait Template? Get started here:

Last updated