Collections

A Collection groups Items together and defines metadata about the group. On the blockchain, creating a collection will deploy a smart contract automatically. A collection has a one to one relationship with a smart contract on-chain.

Collection Types

Game Collection

The main collection type is a Game Collection. The use case for Game Collections is for most of a game's items: they don't need to be unique, but they still have metadata associated with them. An example could be having a Game Collection called Weapons, with Items such as Swords, Axes, and Maces. The Sword item is different than the Axe, but all Swords are identical.

Game Collection info:

  • FA(Fungible Asset) in the API
  • On EVM chains, this deploys an ERC-1155 smart contract

Example Game Collection creation payload:

{
  "publicMetadata": {},
  "gameId": "{{gameId}}",
  "name": "Magical Swords",
  "description": "Causes some damage",
  "image": "img.url",
  "symbol": "SWORD",
  "blockchainId": "{{blockchainId}}"
}

Standalone Asset

Certain use cases require every single Item in a Collection to be unique. Standalone Asset Collections are useful for Limited Edition Items, where the specific Item a player owns is important and differs from all of the others.

Standalone Asset info:

  • NFT (Non-Fungible Token) in the API
  • On EVM chains, this deploys an ERC-721 smart contract

Example Standalone Asset creation payload:

{
  "publicMetadata": {},
  "gameId": "{{gameId}}",
  "name": "Players",
  "description": "Unique collection of game players",
  "image": "img.url",
  "symbol": "PLAYER",
  "blockchainId": "{{blockchainId}}",
  "totalSupply": "100000"
}

Once an NFT Collection is created, each unique item within that collection will have its own address on the blockchain.

Standalone Currency

A Standalone Currency Collection will only have one Item, since there is no differentiation between Items within this Collection. This Collection is meant for currencies or resources inside of your game: gold, wood, etc.

Standalone Currency info:

  • FT (Fungible Token) in the API
  • On EVM chains, this deploys an ERC-20 smart contract

Example Standalone Currency creation payload:

{
  "publicMetadata": {},
  "gameId": "{{gameId}}",
  "symbol": "GOLD",
  "blockchainId": "{{blockchainId}}",
  "totalSupply": "1000000",
  "name": "Gold Coin",
  "description": "A medium of exchange for in-game goods and services.",
  "image": "img.url"
}

Marketplace Info

  • Tokens must be withdrawn to sell them on a marketplace.
  • A contract must have at least one token minted to have it display in OpenSea.
  • The maximum token supply cap is 39 billion tokens.
  • When mutating metadata you must provide all the metadata each time (it is overwritten).
  • Currently available for Polygon only.

Royalties

  • The contract uses ERC-2981 to implement Royalties on-chain
  • Add seller fees via the Stardust API by including the fee rate and recipient address to publicContractMetadata
  • A royalty can also be set on OpenSea. See Setting fees on secondary sales for more information

Additional information from OpenSea

🚧

Safe-listing Collection

Items not purchased directly from OpenSea will be hidden by default in a player's OpenSea profile. Contact your Client Success team to have the collection Safe-listed.