Asset Builder skill for CW721 NFT operations on Xion. Use this skill when users want to: - Create NFT collections - Mint NFT tokens (standard or with royalties) - Predict contract addresses before deployment - Batch mint multiple tokens - Query NFT contracts Supports 5 NFT types: cw721-base, cw2981-royalties, cw721-expiration, cw721-metadata-onchain, cw721-non-transferable. Triggers on: NFT, CW721, CW721 NFT, NFT collection, NFT token, mint NFT, minting, create NFT collection, NFT royalties, NFT royalty, NFT soulbound, non-transferable NFT, expirable NFT, on-chain metadata NFT, metadata-onchain, predict NFT address, batch mint NFT, batch mint tokens, mint multiple NFTs, NFT contract, NFT on Xion, Xion NFT, CosmWasm NFT, CosmWasm 721, asset builder, NFT 徽章, NFT 凭证, 创建 NFT, 铸造 NFT, NFT 版税.
CW721 NFT Asset Builder for Xion blockchain. Create, mint, and manage NFT collections with gasless transactions.
xion-toolkit-init skill)xion-oauth2 skill)# 1. List available NFT types
xion-toolkit asset types
# 2. Create collection
xion-toolkit asset create --type cw721-base --name "My Collection" --symbol "NFT"
# 3. Mint token
xion-toolkit asset mint --contract xion1... --token-id "1" --owner xion1...
| Type | Use Case | Example |
|---|---|---|
cw721-base | Standard NFTs without special features |
| Art collections, basic tokens |
cw2981-royalties | Commercial NFTs with royalties | Marketplace sales, creator earnings |
cw721-non-transferable | Soulbound credentials, badges | Certifications, achievements, SBTs |
cw721-expiration | Time-limited access tokens | Event tickets, subscriptions |
cw721-metadata-onchain | Fully on-chain data | On-chain art, immutable records |
Decision Guide:
cw2981-royaltiescw721-non-transferablecw721-expirationcw721-metadata-onchaincw721-basexion-toolkit asset types
Output:
{
"success": true,
"types": [...],
"count": 5
}
xion-toolkit asset create \
--type cw721-base \
--name "My Collection" \
--symbol "NFT" \
[--minter xion1...] \
[--salt "my-salt"]
# Standard mint
xion-toolkit asset mint \
--contract xion1... \
--token-id "1" \
--owner xion1... \
[--token-uri "ipfs://..."]
# Mint with royalties (CW2981)
xion-toolkit asset mint \
--contract xion1... \
--token-id "1" \
--owner xion1... \
--asset-type cw2981-royalties \
--royalty-address xion1... \
--royalty-percentage 0.05
# Mint with expiration
xion-toolkit asset mint \
--contract xion1... \
--token-id "1" \
--owner xion1... \
--asset-type cw721-expiration \
--expires-at "2025-12-31T23:59:59Z"
xion-toolkit asset predict \
--type cw721-base \
--name "My Collection" \
--symbol "NFT" \
--salt "my-unique-salt"
# Create tokens.json
cat > tokens.json << 'EOF'
[
{"token_id": "1", "owner": "xion1abc...", "token_uri": "ipfs://QmHash1"},
{"token_id": "2", "owner": "xion1def...", "token_uri": "ipfs://QmHash2"}
]
EOF
# Batch mint
xion-toolkit asset batch-mint \
--contract xion1... \
--tokens-file tokens.json
# Get NFT info
xion-toolkit asset query \
--contract xion1... \
--msg '{"nft_info": {"token_id": "1"}}'
# Get all tokens
xion-toolkit asset query \
--contract xion1... \
--msg '{"all_tokens": {}}'
路径 (Path): skills/xion-asset/scripts/
| Script | Description |
|---|---|
types.sh | List available asset types |
create.sh | Create NFT collection |
mint.sh | Mint NFT token |
predict.sh | Predict contract address |
batch-mint.sh | Batch mint from JSON |
query.sh | Query NFT contract |
All commands return JSON:
Success:
{"success": true, ...}
Error:
{"success": false, "error": "...", "error_code": "..."}
Common Errors:
INVALID_ASSET_TYPE - Use one of the 5 supported typesINVALID_ROYALTY_PERCENTAGE - Must be 0.0-1.0INCOMPLETE_ROYALTY_INFO - Both address and percentage requiredINVALID_OPTION_FOR_TYPE - Option not valid for this asset typeBefore executing any command, ensure all required parameters are collected.
Determine which operation the user wants to perform (types, create, mint, predict, batch-mint, query).
Refer to the schemas/ directory for detailed parameter definitions.
Collect ALL missing required parameters in a SINGLE interaction:
Example for mint: "I need the following to mint an NFT:
- Contract address
- Token ID (unique identifier)
- Owner address (who will own the NFT)
- (Optional) Token URI for metadata"
Will execute: mint
├─ Contract: xion1abc...
├─ Token ID: 1
├─ Owner: xion1owner...
└─ Token URI: ipfs://QmHash...
Confirm? [y/n]
See schemas/ directory for detailed parameter definitions:
| Schema File | Command | Description |
|---|---|---|
types.json | types | List NFT types |
create.json | create | Create collection |
mint.json | mint | Mint NFT token |
predict.json | predict | Predict address |
batch-mint.json | batch-mint | Batch mint from file |
query.json | query | Query contract |
| Parameter | Required | Description |
|---|---|---|
type | Yes | NFT type (cw721-base, cw2981-royalties, etc.) |
name | Yes | Collection name |
symbol | Yes | Collection symbol |
minter | No | Minter address |
salt | No | Unique salt for predictable address |
Note: See
schemas/create.jsonfor complete parameter list including conditional parameters.
| Parameter | Required | Description |
|---|---|---|
contract | Yes | NFT contract address |
token-id | Yes | Unique token ID |
owner | Yes | Token owner address |
token-uri | No | Metadata URI |
asset-type | No | Asset type (default: cw721-base) |
royalty-address | Conditional | Required for cw2981-royalties |
royalty-percentage | Conditional | Required for cw2981-royalties |
expires-at | Conditional | Required for cw721-expiration |
Note: See
schemas/mint.jsonfor complete parameter list including conditional parameters.
Conditional Parameters:
- Default
asset-typeiscw721-baseroyalty-address/royalty-percentage: Required forcw2981-royaltiesexpires-at: Required forcw721-expiration
| Parameter | Required | Description |
|---|---|---|
contract | Yes | NFT contract address |
tokens-file | Yes | JSON file with token data |
network | No | Network (default: testnet) |
Note: See
schemas/batch-mint.jsonfor complete parameter list including conditional parameters.
| Parameter | Required | Description |
|---|---|---|
type | Yes | NFT type |
name | Yes | Collection name |
symbol | Yes | Collection symbol |
salt | Yes | Unique salt |
minter | No | Minter address |
Note: See
schemas/predict.jsonfor complete parameter list including conditional parameters.
| Type | Code ID | Features |
|---|---|---|
cw721-base | 522 | Standard NFT |
cw721-metadata-onchain | 525 | On-chain metadata |
cw721-expiration | 523 | Time-based expiry |
cw721-non-transferable | 526 | Soulbound NFT |
cw2981-royalties | 528 | Royalties at mint time |
Use the validation script to check parameters before execution:
./skills/scripts/validate-params.sh xion-asset mint '{"contract": "xion1abc...", "token-id": "1", "owner": "xion1owner..."}'