• Home
  • Guides
  • How to Create a Fixed Price (USDC) NFT Drop on Solana
How to Create a Fixed Price (USDC) NFT Drop on Solana
By Rohit Ramesh profile image Rohit Ramesh
4 min read

How to Create a Fixed Price (USDC) NFT Drop on Solana

Use Crossmint to fix the price of your NFT collection, the integration is exactly the same as when adding credit card to your drop.

NFT drops can be configured to have a fixed price in USD, in almost every major chain. In this blog post we explain how to set up an NFT drop in Solana to have a fixed price in USDC.

NFT Drop on Solana with Fixed Price (USDC)

If you’re an NFT seller, you may be concerned about how hard it is to set a price for your NFT drop, when the price of crypto (SOL, ETH, MATIC, AVAX…) is going up and down 10% every other day. It makes it hard to commit to a price to your community, as well as to do financial forecasting for your project.

If you’re a buyer new to crypto, you may be more familiar with prices denominated in a familiar currency.

NFT drops can be configured to have a fixed price in USD, in almost every major chain. In this blog post we explain how to set up an NFT drop in Solana to have a fixed price in USDC. At the end, we also explain how to accept Credit Card payments for the drop, so you can increase the amount of users who can buy.

What we’re going to make

At the end of this tutorial, you’ll have a working Candy Machine that accepts payments in a fixed amount of dollars, using USDC (a highly trusted regulated stablecoin that is always worth $1).

Your users will be able to buy with USDC, which can be purchased on FTX or directly from your Phantom wallet. In addition, they’ll be able to buy directly with a credit card using Crossmint.

Tutorial

This tutorial assumes you are already familiar with setting up a Solana NFT drop using Candy Machine and you have one ready to configure. If you aren’t familiar, check out this other post which explains how to do so step by step.

‍We’ll divide the tutorial in three steps:

  1. Configuring the candy machine to accept a fixed price in USDC
  2. Testing in Devnet
  3. Accepting Credit Card Payments

STEP 1. Configuring the candy machine to accept a fixed price in USDC

Go to the folder where your Solana Candy Machine is being configured. There, open `config.json`, where you will want to change two parameters:

  1. `splToken`: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
This is the address that corresponds to the USDC token mint. Every candy machine accepting USDC payments must use this address.
Warning: this address only works on mainnet. If you’re looking to test in devnet read on.

2. `splTokenAccount`: The USDC associated token account for your treasury wallet

This is the address in which your USDC is to be deposited. Read on for instructions on how to find it

STEP 2. Finding your spl token account

Your ‘splTokenAccount’ is not the same as your wallet address. In Solana, each wallet has an associated token account for each kind of token that it holds. In this case, you need to find the token account associated with USDC for your treasury wallet.

First, deposit some USDC (e.g. one dollar) into your treasury wallet. You can do so by having someone else send it to you via phantom, or from a crypto exchange like FTX.

Second, look up the USDC token account from your wallet. Here’s how to do so in Phantom:‍

1. Click on USDC from your main phantom landing page

2. Tap the three dots on the top right and click to view on solscan

3. Copy the token account from Solscan

Uploading your candy machine config

As you would do if setting up a regular Candy Machine, once your candy machine config file is final, be sure to follow the usual instructions to upload it. If you are editing an existing candy machine file, then follow these instructions to update it: https://docs.metaplex.com/candy-machine-v2/update

Testing in Devnet

Testing in devnet requires a couple more steps, because the USDC token doesn’t exist there. So, instead, you have to create your own fake dollars.

‍The easiest way to do this is to reach out in the Crossmint discord, where we’ll be happy to airdrop you some devnet-dollars. But if you want to create your own, you can follow Solana’s documentation and create your own somewhat easily: https://spl.solana.com/token#example-creating-your-own-fungible-token

Once you have a hold of some devnet dollars, be sure to update your test candy machine `config.json` file as follows:

STEP 3. Accepting Credit Card payments

Crossmint supports drops in USDC out of the box in Solana! The integration is exactly the same as when adding credit card to your drop.

All you have to do is register your candy machine ID in the Crossmint console, and then add the client SDK to your minting site, which takes less than 10 lines of code. No special configuration is needed in the console nor in the SDK to make USDC payments work, Crossmint automatically detects the configuration from the Blockchain.

For instructions on how to add Credit Card payments to your Solana Candy Machine drop using Crossmint, check out our documentation or blog.

By Rohit Ramesh profile image Rohit Ramesh
Updated on
Guides