Skip to main content
  1. Base Contract: Your contract must extend the CW721 Metadata Onchain contract from Public Awesome.
  2. Minting Function: The contract must include a minting function that allows Crossmint to mint NFTs on behalf of users.
  3. Minter Ownership: The CW721 Metadata Onchain contract supports updating minter ownership to allow Crossmint to execute minting messages. This is implemented through the update_minter_ownership function which can be called to add or remove minting permissions.
Make sure your contract is properly tested and audited before deployment. While the base CW721-metadata-onchain contract is audited, any custom extensions you add should be thoroughly tested.
The following example demonstrates how to implement requirements 1 and 2 by extending the CW721 Metadata Onchain contract:
msg: ExecuteMsg format will be like:
The base contract already provides:
  • On-chain metadata storage
  • Standard NFT operations (mint, transfer, approve, etc.)
  • Built-in metadata types and validation

Updating Minter Ownership

To allow Crossmint to mint NFTs on your behalf, you need to update the minter ownership of your contract. This is done using the update_minter_ownership function.

Command

Parameters

Replace the following placeholders:
  • <your-contract-address> - Your deployed contract address
  • CROSSMINT_ADDRESS - Crossmint’s address (see below)
  • <your-wallet> - Your wallet name

Crossmint Addresses

Use the appropriate address based on your environment: You can verify that the ownership request has been executed by quering
And response should be like
Then, when Crossmint receives a mint request (either by the minting API or a successful checkout), the system will automatically verify get_minter_ownership upon your contract, and if the pending_owner address, matches the environment <CROSSMINT_ADDRESS>, the following message will be executed on your contract

Registering Your Contract

To register your Xion contract with Crossmint:
  1. Deploy your contract to the Xion network
  2. Go to the Crossmint Console
  3. Navigate to “Token Collections”
  4. Click “New Collection”
  5. Select “Xion” as the blockchain
  6. Enter your contract address
  7. Follow the remaining steps in the wizard