Creating a Collectible

Creating your first Collectible

You can use the following Mutation in order to create your first Collectible in ORB.

CreateToken
mutation CreateToken($input: CreateTokenInput!) {
  CreateToken(input: $input) {
    tokenCreator
    tokenId
    transactionHash
  }
}
Input Variables
"input" : {
    "collectionId": "KT1VBVsiieCdUupcb1BpbKrrT5Hp2EA4CQ6J",
    "infusedAmount": 0,
    "maxEditions": 10,
    "metadata": "http://test/json/BearToken.json"
  }

In order to create a Collectible in ORB, you will need to provide the collectionId of the collection the Collectible will be created under, as well as the infusion amount of ORB tokens you wish to add to your Collections, the maximum number of editions this collectible will have, and the metadata file.

The metadata file can either be an IPFS file, or a url pointing to an json file. The metadata file follows the standard principles of Tezos. Please refer here, for the correct format when creating the metadata files on Tezos.

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

Sample Response
{
  "data": {
    "CreateToken": {
      "tokenCreator": "tz1i7SnAcekYtyPv1RZ9YBbnd8ScNcREVaDK",
      "tokenId": 0,
      "transactionHash": "opC2d7YNYCgGRApPnP5vUX7LeuLrkkHz62ER2uvu9FWymau7Xa2"
    }
  }
}

Once the transaction has been signed from the developer, a new collectible will be created. Upon the creation, the developer will receive the tokenId of the newly created collectible, along with the transaction hash of the transaction and the wallet that created the collectible.

$ORB Infusion

When creating a collectible in ORB, the developer has the option to choose the number of $ORB tokens it will be infused with. If this number is set to 0, then the collectible will not be infused with any $ORB tokens at all. Any other value in that parameter will allow the collectible to be infused with the respective $ORB tokens.

The developer wallet does not need to have the amount of $ORB tokens they want to infuse their collectibles at the time of creation. When creating a collectible and choosing to infuse it with $ORB tokens, the information of the infusion amount will be send to the smart contract, but the $ORB tokens will not be debited. The ORB tokens are withdrawn from the developer wallet only when a token is minted.

The process of creating a collectible, and choosing to infuse it with ORB tokens, is the same as described above. There are no changes to the mutation, transaction or response.

Last updated