Creating a Collection

Create your first Collection

Use the following mutation to create your collection in ORB.

CreateCollection
mutation CreateCollection($gameId: String!, $input: CreateCollectionInput!) {
  CreateCollection(gameId: $gameId, input: $input) {
    collectionId
    collectionName
    metadata
  }
}
Input Variables
"gameId" : "game:5TGNoEBCOb8ozhchjuqGv"
"input": {
    "imageUri": "http://test.com/test/imgs/SmileyBears.png",
    "metadataUrl": "http://test.com/test/json/ORB3/collectionTest.json"
  }

In order to create your collection in ORB, you will need to provide the gameId of the project the collection will be created in, as well as the imageUri of the collection and the collection's metadata. The imageUri of the collection can be either an IPFS file, or a url pointing to an image file. The metadata file follows the same principles. Please refer here, for the correct format when creating the metadata files on Tezos.

Once you call the mutation, you will receive the following transaction. Upon signing the transaction, the collection will be created in the ORB platform.

Sample Response
  "data": {
    "CreateCollection": {
      "collectionId": "KT1SjwraTtii88ZaEs8ReU6wkUreTvM8qfaa",
      "collectionName": "Smiley Bears",
      "metadata": {
        "name": "Smiley Bears",
        "description": "Smiley Bears is a captivating video game designed for kids, where they embark on an enchanting journey with lovable, cuddly bears, exploring a magical forest, solving puzzles, and learning valuable skills along the way.",
        "interfaces": [
          "TZIP-12"
        ],
        "authors": [
          "Smiley Bears"
        ],
        "license": {
          "name": "MIT"
        },
        "thumbnailUri": "http://95.217.56.136/tsd/img/ORB3/SmileyBears.png"
      }
    }
  }
}

Once you sign the transaction, and the collection is created, you will receive a response similar to the one above. This response shows the initial information that was registered together with the creation of your collection. It includes information such as the name of the collection, and the metadata attached to it.

The collectionId, which you will receive as a response, is the unique identifier of your collection, and coincides with the contract address the collection is deployed on Tezos.

You can retrieve the collectionIds created from a specified wallet address at any point, as well as use them to fetch information about a specific collection.

Last updated