Batch Minting Assets
Batch Minting Assets is a useful mutation if you are planning on minting assets to multiple users through a single transaction.
Using this request will allow you to mint an asset to users of your project.
The
MintAsset
request has one single mutation.Mutation | Usage |
---|---|
MintAsset | Mint one or more assets into a single transaction. |
It's important to keep in mind that although there's no limit on the number of mint objects you can send through the mutation, there's a limit on the number of mint events that can be added into a single transaction. In this case, if you specify to try and mint more than 150 assets from one request, it will be split into multiple transactions in the wallet to sign.
The
value
property is only applicable in case you are minting FTs as NFTs are assumed to have a value of 1.mutation {
MintAsset(
assetId: "xxxxxxxxxxx"
mints: [
{ to: "WalletAddress", value: 1 }
{ to: "WalletAddress", value: 1 }
{ to: "WalletAddress", value: 1 }
]
wallet: "WalletAddress"
send: true
) {
asset {
name
id
}
transactionId
id
value
wallet {
ethAddress
}
}
}
If all the request parameters are correct, this should be the expected response.
{
"data": {
"MintAsset": {
"asset": {
"name": "Tassio Test 2",
"id": "708000000000088e"
},
"transactionId": null,
"id": 31237,
"value": "1",
"wallet": {
"ethAddress": "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406"
}
}
}
}
After approving the transaction, the tokens should be minted over to the address once the transaction is completed.
Last modified 10mo ago