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:
value
: This field represents the value of the trait, such as "Background 01" in the example above.trait_type
: This field defines the name of the trait, such as "Background" in the example above.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.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:
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:
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