Skip to main content

Mint in thirdweb contracts

Introduction

Mint an NFTs in any thirdweb's mintable contract using this API.

Deploy new contract

note

If you have already deployed a contract skip the step from 2 to 6.

  1. Log into 0xmint API page and click on Collections tab.
  2. Go to collection tab and Click on create collection button on the top right of the section.
  3. Select Thirdweb in the given option.
  4. Select the collection type (ERC721 or ERC1155)
  5. Enter the name and symbol for your collection and click on create collection button.
  6. Sign the transaction with the connected.
  7. On successfull completion of transaction, a new contract will be deployed and it will be listed under the thirdweb tab.
  8. Click on Grant role button, to give our minter wallet the permission to mint.

End point:

https://api.0xmint.io/v3/mint

Request type : application/form-data
Request method : POST

ParametersTypeDescription
Header
x-api-key
stringAPI key from dashboard
Header
x-auth-token
stringJWT token
walletstringThe owner of the contract
contractAddressstringThe contract address created from the API page
tostringThe address to which the NFT to be airdropped
metadatastringThe metadata of an NFT in stringified JSON
imagefileThe NFT image
supplynumber(Only for ERC1155 contract. Default value is 1)

Response:

200 - Mint successfull

{
"result": {
"id": {
"type": "BigNumber",
"hex": "0x01"
},
"receipt": {
"to": "0xD6f5c6DFcE2fB1028313DDC69378c891E364f12e",
"from": "0x58BCa4AeCcB83d16B65FCd850F78814A8d6F04a0",
"contractAddress": null,
"transactionIndex": 92,
"gasUsed": {
"type": "BigNumber",
"hex": "0x039471"
},
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000108000000000000000000000040000000000000000000000000008000008800000000000040000000100000000000000000000020000000000000000000800000000000080000090000010200100000000000000000000000000000000000000000000000000000000000010000000200000040000100010800000000000000000020200004000000000000000004000000002000000000001000000000000000000000000000000100000000060000000000000000000000000000000000000000000000000000000000000100000",
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96",
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"logs": [
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0xD6f5c6DFcE2fB1028313DDC69378c891E364f12e",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000002631e5e8717faead0eba72fed5694ad1fa0d3581",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x",
"logIndex": 437,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96"
},
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0xD6f5c6DFcE2fB1028313DDC69378c891E364f12e",
"topics": [
"0x9d89e36eadf856db0ad9ffb5a569e07f95634dddd9501141ecf04820484ad0dc",
"0x0000000000000000000000002631e5e8717faead0eba72fed5694ad1fa0d3581",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d4e7256316f564b3347576f70337034785a44575461563255554c7070476b6a745065753875727a6755547a362f30000000000000000000",
"logIndex": 438,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96"
},
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0x0000000000000000000000000000000000001010",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x00000000000000000000000058bca4aeccb83d16b65fcd850f78814a8d6f04a0",
"0x00000000000000000000000026c80cc193b27d73d2c40943acec77f4da2c5bd8"
],
"data": "0x0000000000000000000000000000000000000000000000000020d043dcfce6050000000000000000000000000000000000000000000000003d6768a58c38fcfb000000000000000000000000000000000000000000000ffcc90bcc1a998a11620000000000000000000000000000000000000000000000003d469861af3c16f6000000000000000000000000000000000000000000000ffcc92c9c5e7686f767",
"logIndex": 439,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96"
}
],
"blockNumber": 40342721,
"confirmations": 2,
"cumulativeGasUsed": {
"type": "BigNumber",
"hex": "0xf9da12"
},
"effectiveGasPrice": {
"type": "BigNumber",
"hex": "0x221be4e2af"
},
"status": 1,
"type": 2,
"byzantium": true,
"events": [
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0xD6f5c6DFcE2fB1028313DDC69378c891E364f12e",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000002631e5e8717faead0eba72fed5694ad1fa0d3581",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x",
"logIndex": 437,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96",
"args": [
"0x0000000000000000000000000000000000000000",
"0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
{
"type": "BigNumber",
"hex": "0x01"
}
],
"event": "Transfer",
"eventSignature": "Transfer(address,address,uint256)"
},
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0xD6f5c6DFcE2fB1028313DDC69378c891E364f12e",
"topics": [
"0x9d89e36eadf856db0ad9ffb5a569e07f95634dddd9501141ecf04820484ad0dc",
"0x0000000000000000000000002631e5e8717faead0eba72fed5694ad1fa0d3581",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d4e7256316f564b3347576f70337034785a44575461563255554c7070476b6a745065753875727a6755547a362f30000000000000000000",
"logIndex": 438,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96",
"args": [
"0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
{
"type": "BigNumber",
"hex": "0x01"
},
"ipfs://QmNrV1oVK3GWop3p4xZDWTaV2UULppGkjtPeu8urzgUTz6/0"
],
"event": "TokensMinted",
"eventSignature": "TokensMinted(address,uint256,string)"
},
{
"transactionIndex": 92,
"blockNumber": 40342721,
"transactionHash": "0x935baa28296ff84aba0b724f84adbec6a63c40bb97563763a16c91e26d7f5c7f",
"address": "0x0000000000000000000000000000000000001010",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x00000000000000000000000058bca4aeccb83d16b65fcd850f78814a8d6f04a0",
"0x00000000000000000000000026c80cc193b27d73d2c40943acec77f4da2c5bd8"
],
"data": "0x0000000000000000000000000000000000000000000000000020d043dcfce6050000000000000000000000000000000000000000000000003d6768a58c38fcfb000000000000000000000000000000000000000000000ffcc90bcc1a998a11620000000000000000000000000000000000000000000000003d469861af3c16f6000000000000000000000000000000000000000000000ffcc92c9c5e7686f767",
"logIndex": 439,
"blockHash": "0xe7f92737556d851ea7e4a8d3405dffdba0feb98785ff547b0e7991020df80a96"
}
]
}
}
}