GameFi
  • General Intro
  • 📃R & D
  • 💻Workshop
    • 🏎️NFT Web App Integration
      • 📄Prerequirements
      • Decentralized Storage
      • Smart Contract NFTs
      • Creating the React Dapp
      • Updating Startup File, Wallet Connect & Main Menu
      • Fetching NFTs, Stacks and Hiro API
      • Rendering NFTs owned
      • Selecting an NFT
      • Mapping Scenes
      • Creating the playable game
  • 🪙Trustless Rewards - M1
    • General idea
    • Flow Lobbies
    • Smart Contract
  • 🎨Customizable NFTs - M2
    • General Idea
    • Flow Customizable NFTs
    • Smart Contracts
      • Component
      • Customizable Wrapper
  • 🎁Lootbox on Chain - M3
    • General Idea
    • Tech Explained
    • Smart Contracts
      • Item
      • Lootbox
      • Lootbox Manager
  • 📝Message Signing
    • General Idea
    • GameFi Use Cases
    • App Explained
  • 🪵SFTs
    • General Idea & Base SFTs Static Deployments
    • Metadata Structure
    • Static Flow and Smart Contracts
    • Advanced SFTs Dynamic Deployments
    • Dynamic Flow and Smart Contracts
    • Dapp Integrating SFTs
      • Front End
      • Back End
    • Resources
  • ⚡Subnets
    • Overall for subnets
  • Roadmap
  • 💾Decentralized Storage
    • Gaia
    • Pinata
    • Host SFTs and NFTs into Pinata
    • Gaia integration to host game resources
  • 🔗External Knowledge
    • Getting Started
    • Hiro API
    • Stacks Docs
    • Clarity Book
    • Hiro Tutorials
Powered by GitBook
On this page
  • Metadata structure for a resource:
  • Metadata structure for an item:

Was this helpful?

  1. SFTs

Metadata Structure

PreviousGeneral Idea & Base SFTs Static DeploymentsNextStatic Flow and Smart Contracts

Last updated 2 years ago

Was this helpful?

We have designed our game to contain SFTs divided into two categories: resources and items. We have considered resources the intermediaries to purchasing or crafting, while items can be equipped and used in order to advance into the game's plot. Each item has power attributes depending on the level and the base material which it is built of.

The structure is straight forward and simple as most data is stored directly on-chain for the attributes of the items.

Metadata structure for a resource:

{
  "sip": 16,
  "name": "Gold",
  "image": "ipfs://QmcQzR4zcamVTzCPfCRBYywHVHGVncB2o3YpojvRmakVkC/1.png",
  "attributes": [
    {
      "trait_type": "type",
      "value": "Resource"
    }
  ],
  "properties": {
    "image_in_game": "ipfs://QmcQzR4zcamVTzCPfCRBYywHVHGVncB2o3YpojvRmakVkC/1.png",
    "collection": "Base_Game_SFTs"
  }
}

We have the sip-16 specified because it follows the metadata standard. Fields to be easily readable and displayed, especially on marketplaces, such as name and image. Attributes field to describe the type, which is resource for all the resources. Properties field for the in-game image representation of the item and the collection it belongs to.

Metadata structure for an item:

{
  "sip": 16,
  "name": "Iron Sword 3",
  "image": "ipfs://QmcQzR4zcamVTzCPfCRBYywHVHGVncB2o3YpojvRmakVkC/10.png",
  "attributes": [
    {
      "trait_type": "type",
      "value": "Sword"
    },
    {
      "trait_type": "level",
      "display_type": "number",
      "value": 3
    },
    {
      "trait_type": "element",
      "value": "Iron"
    }
  ],
  "properties": {
    "image_in_game": "ipfs://QmcQzR4zcamVTzCPfCRBYywHVHGVncB2o3YpojvRmakVkC/10.png",
    "collection": "Base_Game_SFTs"
  }
}

Similar to what the resource structure looks like, with some slight updates. The name includes the element of the item ( wood, iron, enhanced ), the type of the item ( sword, armor, helmet etc. ) and the level of the item so it is easily readable on the marketplaces. These are also present in the attributes as three different ones, level also being a number. The properties are the same format as on the resource metadata.

🪵
https://stacksgamefi.mypinata.cloud/ipfs/QmdrB3pecXRiTcPUoX6mresftQHfXfSebpZNyVKzuGa57S/1.jsonstacksgamefi.mypinata.cloud
Hosted metadata on decentralized storage
https://stacksgamefi.mypinata.cloud/ipfs/QmdrB3pecXRiTcPUoX6mresftQHfXfSebpZNyVKzuGa57S/10.jsonstacksgamefi.mypinata.cloud
Hosted metadata on decentralized storage
The SFT logic