Xion Contract Requirements
Requirements and specifications for Xion smart contracts
-
Base Contract: Your contract must extend the CW721 Metadata Onchain contract from Public Awesome.
-
Minting Function: The contract must include a minting function that allows Crossmint to mint NFTs on behalf of users.
-
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 addressCROSSMINT_ADDRESS
- Crossmint’s address (see below)<your-wallet>
- Your wallet name
Crossmint Addresses
Use the appropriate address based on your environment:
Environment | Address |
---|---|
Staging Testnet | xion1sky4jrvn7s3u9wetshrutkmuuuu6jcwfju6qmt |
Production Mainnet | xion162pp2eunext5skljzsshhzwjpkce9d3eceyr8z |
Registering Your Contract
To register your Xion contract with Crossmint:
- Deploy your contract to the Xion network
- Go to the Crossmint Console
- Navigate to “Token Collections”
- Click “New Collection”
- Select “Xion” as the blockchain
- Enter your contract address
- Follow the remaining steps in the wizard