Minting a Collectible
Before minting an edition of a collectible, it is required to use the following mutation in order to update the operators of the smart contract to allow, if that is the case, for an ORB infused collectible to be minted.
The mutation UpdateOperator needs to be called no matter if the collectible has been infused with $ORB tokens or not.
Use the following Mutation to update the operators of the smart contract.
In terms of the input variables of the mutation, here are a few tips to help you understand the process:
contractAddress: This is the contract address of the ORB token.
operator: This is the collectionId of the collectible on which this mutation will have an effect on. More specifically, this is the collectionId under which you have created your collectible, which you wish to now mint.
owner: This is the developer wallet that has created the collectible - the owner of the collectible.
tokenId: The tokenId of the collectible the update operator function will be applied to.
type: This is set by default to "add_operator" in order to allow the ORB tokens to be transferred with the collectible on every mint and send.
Once the transaction has been signed from the developer, multiple editions of the collectible can be minted to any wallet address.
Minting editions of a collectible to a wallet
Minting a collectible to a wallet is a very straight forward process once the operator has been updated on it. Here are a few things to keep in mind:
The developer can mint editions of a collectible their wallet, or to any other specified wallet
The number of editions to be minted must never exceed the maximum editions of the collectible.
Only the developer wallet - the wallet address which created a collectible - has the right to mint a collectible.
Use the following Mutation to mint editions of a collectible to a specified wallet.
A few things to note when wanting to mint a collectible:
amount: The number of editions you wish to mint. This number needs to always be less than, or equal, to the maximum number of editions created.
collectionId: The collectionId that the collectible belongs to.
to: The wallet address to which the collectible will be minted to. This can be any wallet address, or even the developer wallet.
tokenId: The tokenId of the collectible you wish to mint.
Once the transaction has been accepted from the developer wallet, the collectible is minted to the specified wallet address. The hash of the transaction is provided as a response and can always be monitored to make sure it is successful on the blockchain.
When minting editions of a collectible which has been previously infused with ORB tokens, make sure you have a sufficient amount of $ORB tokens before minting them, otherwise the transaction will fail. For example let's assume you have previously created a collectible, and chosen to infuse each edition with 3 $ORB tokens. If you now wish to mint 5 editions of this collectible, you will need to have 3*5=15 $ORB tokens minimum balance in the developer wallet. Remember, with the infusion mechanism, the $ORB tokens are withdrawn from the developer wallet at the time of minting.
Last updated