✨
Playground
  • OVERVIEW
    • What is Playground?
    • Core Features
    • API Authentication
  • Guides
    • Trait Templates
      • Create a New Trait Template
        • Adding Media to Trait Templates
        • Setting Render Order for Traits
      • Get Started With a Pre-Made Trait Template
        • Access Passes
        • Achievement Badges
    • Minting New Traits
      • Trait Minting Flows
      • Gas Fee Options for Trait Minting
    • Migrating Metadata for Existing NFT Collections
      • Updating the BaseURI
  • Concepts
    • What are Traits?
      • Ownership and Transfers of Traits
      • Verified Traits
      • Artist Royalties
    • Media
    • Rendering
    • Access Controls
Powered by GitBook
On this page
  1. Guides
  2. Trait Templates

Create a New Trait Template

PreviousTrait TemplatesNextAdding Media to Trait Templates

Last updated 2 years ago

Creating a Trait Template for NFTs

Follow these steps to create a Trait Template:

1. Create a new JSON file

Open a JSON editor such as Visual Studio Code or Sublime Text, and create a new JSON file. Alternatively, you can start with our sample JSON file.

2. Fill in trait information

Traits must be represented as objects with the following attributes:

  • value: This field represents the value or title of the Trait (e.g., 'Background 1' or 'Sunglasses').

  • trait_type: This field defines the type of the trait and is used to group a series of traits under one category. On NFT Marketplaces, the trait_type is displayed as Attributes.

  • renderOrder: This field specifies the order in which the trait should be rendered. For instance, renderOrder 0 will not show up visually on the NFT, while renderOrder 1 is typically the Background, and so on.

  • imageUrl: This field provides a URL to an image of the trait, such as a background or an accessory. Learn how to generate the imageUrl in the Media Upload section of our documentation.

Here's an example of a unique trait in JSON code, including an imageUrl field that points to an image hosted on Arweave:

{
  "value": "Background 02",
  "trait_type": "Background"
  "render_order": "1"
  "image_url": "ar://PHVlm5NP_cmlKB9SPWymrnYxa4DOUs935yrCvlf1c_c",
  "original_minter_royalty_bips": "200",
  "artist_royalty_bips": "200",
  "artist_address": "0x956fefb316a11fa5b528f1fe0eee2b2e2e62ae60",
  "original_minter_address": "0x7b7ec6cfa269d17f8484fd031748d80929f96491",
},

3. Add traits to your collection

Add as many traits as needed for your collection. There is no limit to the number of traits that can be included in a Trait Template.

4. Save and upload the JSON file

Save the JSON file and upload it to the Degen Engine Trait Template submission page, or send it to the API.

After following these steps, you're ready to begin minting traits.

Minting New Traits
5KB
Trait Template Sample.json