Crossmint has a pre-audited library of smart contracts that serve most use cases. However, if you have custom needs, you can also bring your own contract and leverage Crossmint’s scalable infrastructure to mint and distribute the NFTs. Crossmint will execute transactions at the maximum rate the blockchain can handle, pay gas fees, and create wallets for users who don’t have one, all with enterprise SLAs and customer support.

Certain API functionality may not be available with custom contracts, unless Crossmint supports those functions and is granted permission on the contract to execute them.

This guide only applies to EVM chains. Contact us is you have custom needs in other chains.

Bringing your own contract is a premium feature. To activate it, contact us

Prerequisites

  • Your minting contract must have a function that allows free mints. This function must whitelist one of Crossmint’s treasury addresses. Contact us to obtain the wallet address to whitelist.
  • NFTs must follow the ERC721 standard. For ERC1155 support, contact us.

Integration Guide

1. Register Your Smart Contract

On the console, go to the "Collections" tab and click on New collection. Next, follow the steps in the wizard to enter your contract details and identify the function used to mint NFTs. Refer to the section below for common advanced scenarios when importing your contract.

2. Contract Review

Copy the collectionID from the collection page in the Crossmint console and share it with your Crossmint point of contact. The team will validate the contract meets the requirements, set it up to be used with the minting tools, and provide you a new collectionID which you can use to make calls to the API.

3. Mint

You can now invoke any of the “minting” functions documented in the API reference. Contact us if you need access to any other function, like editing or burning.

The body of the request should follow this structure:

{
    "recipient": "<chain>:<address>", // or <email:<email_address>:<chain>
    "contractArguments": {
        // JSON object with the arguments to the mint function and specified value
    }
}

Ensure you are passing all parameters needed to call your mint function, except for the one specifying the recipient, which is populated by Crossmint.

For example:

{
  "recipient": "polygon:0xasimo..."
  "contractArguments": {
    "quantity": 1,
    "signature": "0xabc..."
  }
}

This request will mint and deliver the NFT. If you specify an email address as the recipient, it will create a wallet on-the-fly.

Note that you can’t pass custom metadata, as that’s controlled at the smart contract level.

Refer back to the minting guide to learn how to listen to mint completion, and minting API reference for advanced options.