Build

Individuals

Community

DeFi

Build

Individuals

NFTs on XPR Network for Developers - Part 1

NFTs on XPR Network for Developers - Part 1

NFTs are revolutionizing digital ownership, and XPR Network stands at the forefront of this transformation with its powerful Atomic Assets standard. Whether you're an artist looking to tokenize your creations, a developer building the next big NFT platform, or a collector seeking to understand the technology, this comprehensive guide will walk you through everything you need to know about NFTs on XPR Network.

Why Choose XPR Network for NFTs?

XPR Network offers distinct advantages for NFT creation and trading:

  • Low Fees: Minimal transaction costs compared to other blockchain platforms

  • Fast Transactions: Quick confirmation times for minting and trading

  • Eco-Friendly: Energy-efficient Proof-of-Stake consensus

  • Powerful Standards: The Atomic Assets standard provides robust NFT functionality

  • Rich Ecosystem: Integrated marketplace, trading, and development tools

Understanding the Atomic Assets Standard

The Atomic Assets standard is the backbone of NFT functionality on XPR Network. It provides a hierarchical system that makes NFT creation and management both flexible and efficient:


Think of it like this:

  • Collection: Generally a group of artworks that share the same style/concept.

  • Schema: The definition of the data that belongs to every asset produced from the collection. Be careful, it should be the same as your collection and the schema!

  • Template: The reproducible artwork, think of it like a stencil or stamp. You can either limit the number of mints or keep it unlimited.

  • Asset: The final individual piece produced from the template that can owned by a user.

Getting Started: Creating Your First NFT

Step 1: Setting Up Your Collection

Every NFT journey begins with creating a collection. Every NFT journey begins with creating a collection. The is the root level of your NFT project.

View createcol Action in explorer

View createcol Action documentation

{
    "author": "yourcreator",
    "collection_name": "yourcollname",
    "allow_notify": true,
    "authorized_accounts": ["yourcreator"],
    "notify_accounts": [],
    "market_fee": 0.05,
    "data": [
        {"key": "name", "value": ["string", "Your Amazing Collection"]},
        {"key": "description", "value": ["string", "Welcome to the future of digital art"]},
        {"key": "img", "value": ["string", "QmYourIPFSHash"]},
        {"key": "social_links", "value": ["string", "https://twitter.com/yourcollection"]}
    ]
}

Pro Tip

  • Choose a memorable `collection_name` - it's permanent and becomes part of your brand but remember it should have 12 chars (no more no less) and follow the same rule as your XPR Network name (chars range from a to z lower case and 1 to 5) .

  • market_fee, the royalties you earn on each resell, is limited to 0.15 (mean 15%) but don’t be too greedy.

  • notify_accounts is important for dev, it allow you to inform accounts that change (through actions) has occurred on the collection tree (collection, schema,template,asset)

Step 2: Creating Your Schema

The schema defines what attributes your NFTs can have, and you can be really creative with. A schema is a kind of blueprint of what your template (at creation time) and assets (at mint time) can accept as data. 

Attributes allow you to achieve any kind of use case for your NFT, from pure art/collectible to video game assets through real world assets (RWA). They come in two flavors: mutable attributes and immutable attributes. 

  • Mutable attributes can be modified by the collection owner or authorized account over the time (like power, force, experience …)

  • Immutable attributes is set once for all (like first name / last name, origin ….)

By default schema should have at least these 3 fields (name,description, image). Schema let you define attributes with predefined types, for the list of available types you can check Atomic Assets wiki on github

Once created, you can add new fields, but you can’t remove one.

View createschema Action in explorer

View createschema Action documentation

{
    "authorized_creator": "yourcreator",
    "collection_name": "yourcollname",
    "schema_name": "artwork",
    "schema_format": [
        {"name": "name", "type": "string"},
        {"name": "artist", "type": "string"},
        {"name": "img", "type": "ipfs"},
        {"name": "video", "type": "ipfs"},
        {"name": "description", "type": "string"},
        {"name": "rarity", "type": "string"},
        {"name": "edition", "type": "uint32"},
        {"name": "attributes", "type": "string[]"},
        {"name": "creation_date", "type": "time"}
    ]
}

Step 3: Creating Templates

As stated above, a template is a reproducible artwork, like a stencil or stamp used to produce assets. 

View createtempl Action in explorer

View createtempl from documentation

{
    "authorized_creator": "yourcreator",
    "collection_name": "yourcollname",
    "schema_name": "artwork",
    "transferable": true,
    "burnable": true,
    "max_supply": 100,
    "immutable_data": [
        {"key": "name", "value": ["string", "Cosmic Dreams #1"]},
        {"key": "artist", "value": ["string", "Digital Virtuoso"]},
        {"key": "img", "value": ["string", "QmYourArtHash"]},
        {"key": "description", "value": ["string", "First in the Cosmic Dreams series"]},
        {"key": "rarity", "value": ["string", "Legendary"]},
        {"key": "attributes", "value": ["string[]", ["animated", "3D", "interactive"]]}
    ]
}

Pro Tip: 

  • Be sure to set a correct max_supply, you cannot change it after

  • Always set transferable to true unless you know what you’re doing

Step 4: Minting Your NFTs

The final step is minting your actual NFTs using your template.

View mintasset Action on explorer

View mintasset Action from documentation

{
    "authorized_minter": "yourcreator",
    "collection_name": "yourcollname",
    "schema_name": "artwork",
    "template_id": 1,
    "new_asset_owner": "recipient",
    "immutable_data": [],
    "mutable_data": [
        {"key": "edition", "value": ["uint32", 1]},
        {"key": "creation_date", "value": ["time", "1641234567"]}
    ],
    "tokens_to_back": []
}

Pro Tips for Minting:

  • Use template_id from your created template

  • Add unique mutable data per NFT if needed

  • Consider batch minting for collections through specialmint contract

  • Verify ownership after minting

Taking it to Market (Selling your NFT)

Atomic Market is the contract that enables people to buy minted assets, read the new tutorial "Start selling NFTs with Atomic Market" in our Part 2 blog to learn how to sell your NFT.

Advanced Features

Collection Management

Best Practices for Success

For Creators

  1. Plan Your Collection

    • Design a clear structure

    • Consider future expansions

    • Create compelling metadata

  2. Quality Control

    • Test all metadata renders

    • Verify IPFS uploads

    • Double-check attributes

  3. Market Strategy

    • Plan launch timing

    • Set appropriate prices

    • Engage with community

For Developers

  1. Error Handling

    • Implement robust checks

    • Monitor transactions

    • Handle edge cases

  2. User Experience

    • Clear error messages

    • Transaction feedback

    • Intuitive interfaces

Advanced Topics

Atomic Assets RAM Optimization

Understanding RAM usage is crucial for scaling:

  • Collections: ~0.5KB

  • Schemas: ~0.3KB per attribute

  • Templates: ~1KB

  • Assets: ~0.3KB

Community and Resources

Official Resources

NFTs on XPR Network represent a perfect blend of efficiency, functionality, and user experience. Whether you're creating digital art, building a marketplace, or collecting unique assets, the Atomic Assets standard provides all the tools you need for success.

Remember: The NFT space moves quickly. Stay engaged with the community, keep learning, and don't be afraid to innovate. Your next creation could be the next big thing in the NFT world.

Need help? Join the XPR Network community - we're here to support your NFT journey.

The XPR Newsletter

Second To Layer None

The XPR Newsletter

Second To Layer None

The XPR Newsletter

Second To Layer None

Subscribe to our newsletter for the latest development updates, bounties, product launches + more.