Subscribe to our Blog

Subscribe to Crossmint's blog to receive updates on the latest case studies, Web3 technical guides, and more.

Subscribe Crossmint Blog cover image
Rohit Ramesh profile image Rohit Ramesh

How to Create and Mint NFTs on SKALE

Start deploying smart contracts and minting NFTs in SKALE in minutes, using simple API calls and no-code tools.

How to Create and Mint NFTs on SKALE

This guide will show you how to deploy smart contracts, create, and mint NFTs on SKALE using Crossmint.

By the end, you will learn how to:

This guide will take you 10 mins to complete (approximately).

Let's get started!

Table of Contents:


What is SKALE?

SKALE is a decentralized, Ethereum-compatible blockchain network designed to improve scalability and performance. It enables developers to create and run high-speed, low-cost, and secure decentralized applications (dApps). SKALE achieves this through its elastic sidechains, which can run smart contracts, execute transactions, and handle storage independently, thus reducing congestion on the Ethereum mainnet. This enhances the user experience by providing faster transaction times and lower fees while maintaining interoperability with Ethereum.

Create and Mint NFTs with No-code

Using Crossmint, you can create NFT collections and mint NFTs without needing to write any code.

Below is an in-depth guide that will teach you how to create and mint NFTs without any coding required. Get started with it in less than 10 mins!

How to Create an NFT Collection and Mint NFTs with No-code
In under 10 mins, learn how to create NFT Collections, create and mint NFTs with no-code.

Setup

In this section, you will learn how to create and mint NFTs on scale with Crossmint's API. There are two different environments, they are staging and production environments.

Creating a Developer Account and API Key

To get started, make sure that you have a Crossmint developer account. If not, please sign up - Crossmint Console.

After that, follow these steps:

  1. Navigate to API Keys Section: Log into Crossmint's Console and navigate to "Developers" section and click on "API Keys".
  2. Choose the Type of API Key: Opt for a Server-side API Key required for operations like NFT collection creation or minting.
  3. Select Scopes: Select scopes that determine the API key’s access level. Essential scopes include:
    1. "nfts.create"
    2. "nfts.read"
    3. "collections.create"
    4. "collections.read"

You need the scopes specified above to create NFT Collections and create NFTs.

Create and Mint NFTs on SKALE

Create an NFT Collection on SKALE

In order to mint NFTs, you first need an NFT Collection (i.e., deploy a smart contract on SKALE). So, let's learn how to create an NFT Collection using Crossmint's API.

Prepare Your Collection's Metadata

Every NFT collection has a defined metadata. The metadata includes the name, image URL representing the collection, a description of the collection, and the collection symbol (for EVM only).

Here's an example of how to prepare this metadata:

const collectionMetadata = {
  chain: "skale-nebula", // Specify 'skale-nebula' for the SKALE blockchain
  metadata: {
    name: "SKALE Collection", // Your collection's name
    imageUrl: "https://www.example.com/collection-image.png", // URL of the collection's representative image
    description: "An NFT Collection on SKALE.", // Description of your collection
    symbol: "skl" // Collection symbol (EVM chains only)
  },
  fungibility: "non-fungible", // Specify whether the collection is non-fungible or semi-fungible
  supplyLimit: 100, // The maximum number of NFTs in the collection
  payments: {
    price: "0.001", // Price per NFT in the native currency
    recipientAddress: "0xYourWalletAddress" // Your wallet address to receive payments
  },
  reuploadLinkedFiles: true // Indicates if URLs in metadata should be reuploaded to IPFS
};

The Javascript object "collectionMetadata" configures the metadata for your NFT collection. Adjust these values as per your requirement.

Make sure to replace the placeholders ("https://www.example.com/collection-image.png" and "0xYourWalletAddress") with your actual collection image URL and recipient wallet address.

Create the NFT Collection

Now that we have our collection's metadata configured, we will make a POST request to Crossmint's endpoint to create our NFT collection.

const axios = require('axios'); // Ensure you have axios installed

const createCollection = async (metadata) => {
  const API_URL = "https://www.crossmint.com/api/2022-06-09/collections/";
  const API_KEY = "your_api_key_here"; // Replace with your actual Crossmint API key
  
  try {
    const response = await axios.post(API_URL, metadata, {
      headers: {
        "X-API-KEY": API_KEY,
      },
    });
    
    console.log("Collection created successfully:", response.data);
    return response.data; // This includes the collection ID and action ID
  } catch (error) {
    console.error("Failed to create collection:", error.response.data);
  }
};

createCollection(collectionMetadata).then((data) => {
  console.log("Created Collection ID:", data.id);
  console.log("Deployment Action ID:", data.actionId);
});

In this step, we're sending a POST request with our collection's metadata and including our API key in the request headers for authentication. Upon success, we log the response data.

Verify Deployment Status

After calling the Crossmint API to create the NFT Collection, you can verify whether it has been deployed successfully on the SKALE blockchain. You can do this by making another API call to check the status of your action (in this case, creating a collection).

const ACTION_ID = "your_action_id_here"; // Replace with your actual action ID

const checkDeploymentStatus = async (actionId) => {
  const API_URL = `https://www.crossmint.com/api/2022-06-09/actions/${actionId}`;
  
  try {
    const response = await axios.get(API_URL, {
      headers: {
        "X-API-KEY": API_KEY,
      },
    });
    
    console.log("Deployment Status:", response.data.status);
    return response.data.status; // This is the status of your collection's deployment
  } catch (error) {
    console.error("Failed to check deployment status:", error.response.data);
  }
};

checkDeploymentStatus(ACTION_ID).then((status) => {
  if (status === "success") {
    console.log("Your collection has been deployed successfully!");
  }
});

Replace "your_action_id_here" with the actual action ID you received from creating the collection. This script will check the status of the deployment and log whether it has been successfully deployed to the blockchain.

By now, you should have successfully created an NFT collection on SKALE using Crossmint's API. This means that the collection is now ready for minting NFTs, so let's learn how we can do that.

Create and Mint NFTs on SKALE

Now, we need to create and mint NFTs on the SKALE blockchain. We will again be using Crossmint's API for this. Assuming that you have already created the NFT Collection, let's proceed.

Mint an NFT on the Created Collection

To mint an NFT, you will use the collection ID of the collection you created. The collection ID is what will specify the NFT collection within which you are creating the NFTs. You'll specify the metadata for your NFT, which includes a name of the NFT, an image, a description, and the recipient information (the wallet or email address the NFT needs to be sent/minted to).

First, ensure you have the "collectionId" from the collection creation step. Then, prepare your NFT metadata and recipient details. Here's how you can do it in JavaScript:

const axios = require('axios');
const apiKey = 'YOUR_CROSSMINT_API_KEY';
const collectionId = 'YOUR_COLLECTION_ID'; // Replace with your actual collection ID
const nftMetadata = {
  name: "First SKALE NFT",
  image: "https://www.crossmint.com/assets/crossmint/logo.png",
  description: "My NFT created via the mint API!"
};
const recipient = "email:testy@crossmint.io:skale-nebula"; // Example recipient format

axios.post(`https://www.crossmint.com/api/2022-06-09/collections/${collectionId}/nfts`, {
  recipient,
  metadata: nftMetadata
}, {
  headers: {
    'X-API-KEY': apiKey
  }
})
.then(response => {
  console.log("Mint Response:", response.data);
})
.catch(error => {
  console.error("Error minting NFT:", error);
});

In this code snippet, replace "YOUR_CROSSMINT_API_KEY" with your actual API key obtained from the Crossmint Console and also replace "YOUR_COLLECTION_ID" with the collection ID you received from creating your NFT collection.

The recipient in this example uses an email and chain format, but you can replace it with a direct wallet address if preferred. Replace the email address with the target email address that you want to mint the NFT to.

If you want to deliver the NFT directly to a wallet address, the "recipient" should be formatted as "skale-nebula:<recipient_wallet_address>". Ensure that you replace "<recipient_wallet_address>" with the target wallet address.

Verify the NFT was Minted Using the Action ID

Upon making the API call, you'll receive a response with an "actionId" in the response. You can use this actionId to check the status of the NFT mint.

Below is how you can check the status:

const actionId = 'YOUR_ACTION_ID_FROM_MINTING'; // Replace with your actual action ID

const checkMintingStatus = () => {
  axios.get(`https://www.crossmint.com/api/2022-06-09/actions/${actionId}`, {
    headers: {
      'X-API-KEY': apiKey
    }
  })
  .then(statusResponse => {
    console.log("Minting Status:", statusResponse.data);
    if(statusResponse.data.status !== 'completed') {
      console.log("Minting in progress, check back later.");
    } else {
      console.log("Minting completed successfully.");
    }
  })
  .catch(error => {
    console.error("Error checking minting status:", error);
  });
}

// Initial check
checkMintingStatus();

// Optionally, set an interval to poll periodically
// setInterval(checkMintingStatus, 60000); // Check every 60 seconds

Replace "YOUR_ACTION_ID_FROM_MINTING" with the action ID you received from the minting response. This script first makes an immediate check on the minting status and logs the result. Optionally, you can enable the "setInterval" line to have it check periodically until the minting is confirmed as completed.

Conclusion

In this guide, we first learned about the SKALE Blockchain and what makes it unique. We then learned how to create and mint NFTs on SKALE, starting with creating an API key with the appropriate scopes to creating an NFT collection and minting NFTs within that NFT Collection.

And that's it! You have now learned how to create NFT Collections, and how to create and mint NFTs on SKALE using Crossmint.

What's Next?

If you are wondering how Crossmint has helped enterprises and brands by powering their NFT Drops, you can click on the link below to read all our Case Studies.

Case Studies
Access 25+ case studies, across industries, from the 30,000+ companies that have used Crossmint’s infrastructure.

If you want to learn how to use the Crossmint to create Web 3 Wallets for your users using their Email Address or any userId, please watch the YouTube video below.

Need help?

For support, please join the official Crossmint Discord Server. You can also use Crossmint Help Page for the same.

Sign up developer console

Rohit Ramesh profile image Rohit Ramesh
DevRel Engineer at Crossmint