Deep Mind AI
  • Introduction
  • Examples
    • Getting Started with NextJS
    • Telegram Agent
    • Persistent Agent with PostgreSQL
    • AI Guided Market Making Agent
    • Discord Agent Integration
  • Guides
    • Add your own tool
    • Setup locally
    • Test it out
  • Features
    • Transfer Tokens
    • Stake SOL
    • Deploy SPL Token
    • Check Token Balances
    • Token Data Retrieval
    • Deploy NFT Collection
    • Mint NFT
    • Tensor NFT Marketplace
    • Jupiter Exchange Swaps
    • Solana Name Service (SNS)
    • Launch Token on Pump.fun
Powered by GitBook
On this page
  • ​Usage
  • ​Parameters
  • ​Example Prompts
  • ​Example Implementation
  • ​Metadata Format
  • ​Implementation Details
  • ​Error Handling
  • ​Best Practices
  • ​Response Format
  • ​Related Functions
  • ​Common Issues
  1. Features

Deploy NFT Collection

Learn how to deploy NFT collections on Solana

PreviousToken Data RetrievalNextMint NFT

Last updated 3 months ago

Deploy a new NFT collection on Solana with customizable parameters including name, metadata URI, and royalties.

Usage

const collection = await agent.deployCollection({
  name: "My Collection",
  uri: "https://arweave.net/collection.json",
  royaltyBasisPoints: 500  // 5% royalty
});

console.log("Collection Address:", collection.collectionAddress.toString());

Parameters

Parameter
Type
Required
Description

name

string

Yes

Name of the collection

uri

string

Yes

Metadata URI for the collection

royaltyBasisPoints

number

No

Royalty percentage in basis points (100 = 1%)

Example Prompts

Natural Language Prompts

"Create a new NFT collection called 'Awesome Art' with 5% royalties"

"Deploy an NFT collection with metadata from my Arweave URI"

"Launch a collection named 'Pixel Warriors' with 7.5% creator royalties"

"Create a free collection with no royalties for my community"
// Basic collection deployment
{
  "name": "Awesome Art",
  "uri": "https://arweave.net/collection.json"
}

// Collection with royalties
{
  "name": "Pixel Warriors",
  "uri": "https://arweave.net/metadata.json",
  "royaltyBasisPoints": 750
}

// Community collection without royalties
{
  "name": "Community Collection",
  "uri": "https://arweave.net/community.json",
  "royaltyBasisPoints": 0
}
import { SolanaAgentKit } from "solana-agent-kit";

async function deployArtCollection(agent: SolanaAgentKit) {
  try {
    const collection = await agent.deployCollection({
      name: "Digital Art Collection",
      uri: "https://arweave.net/art-collection.json",
      royaltyBasisPoints: 500  // 5% royalty
    });

    console.log("Collection deployed:", {
      address: collection.collectionAddress.toString(),
      name: "Digital Art Collection"
    });

    return collection;
  } catch (error) {
    console.error("Collection deployment failed:", error);
    throw error;
  }
}

Your collection URI should point to a JSON file with this structure:

{
  "name": "My Collection",
  "symbol": "MYCOL",
  "description": "A unique collection of digital art",
  "image": "https://arweave.net/collection-image.png",
  "external_url": "https://example.com",
  "properties": {
    "files": [
      {
        "uri": "https://arweave.net/collection-image.png",
        "type": "image/png"
      }
    ]
  }
}
  • Creates verified collection with Metaplex standards

  • Supports custom royalty configurations

  • Automatically handles token program initialization

  • Supports collection-wide metadata

  • Uses Metaplex’s certified collection standard

try {
  const collection = await agent.deployCollection(options);
} catch (error) {
  if (error.message.includes("invalid uri")) {
    // Handle metadata issues
  } else if (error.message.includes("insufficient funds")) {
    // Handle balance issues
  }
}
  1. Metadata Preparation

    • Host metadata on permanent storage (e.g., Arweave)

    • Include high-quality collection image

    • Provide comprehensive description

    • Include all required properties

  2. Royalty Configuration

    • Consider market standards

    • Plan distribution model

    • Document royalty splits

    • Verify basis points calculation

  3. Collection Management

    • Save collection address securely

    • Document deployment details

    • Plan update strategy

    • Consider governance

  4. Technical Considerations

    • Verify metadata before deployment

    • Test with small transactions

    • Monitor network conditions

    • Use reliable RPC endpoints

// Successful response
{
  status: "success",
  message: "Collection deployed successfully",
  collectionAddress: "7nE9GvcwsqzYxmJLSrYmSB1V1YoJWVK1KWzAcWAzjXkN",
  name: "My Collection"
}

// Error response
{
  status: "error",
  message: "Error message here",
  code: "ERROR_CODE"
}
  • mintNFT: Mint NFTs to the collection

  • getBalance: Check wallet balance

  • transfer: Transfer NFTs

  • fetchMetadata: Get collection metadata

  1. Metadata Issues

    • Invalid URI format

    • Missing required fields

    • Temporary storage links

    • Incorrect file types

  2. Transaction Failures

    • Insufficient funds

    • Network congestion

    • RPC node issues

    • Invalid parameters

  3. Royalty Configuration

    • Invalid basis points

    • Missing creator addresses

    • Incorrect percentages

    • Verification failures

LangChain Tool Prompts

Example Implementation

Metadata Format

Implementation Details

Error Handling

Best Practices

Response Format

Related Functions

Common Issues

​
​
​
​
​
​
​
​
​
​
​
​
​