Candy machine nft как пользоваться
Перейти к содержимому

Candy machine nft как пользоваться

  • автор:

How to Launch a Solana NFT Collection with Credit Card Support using Candy Machine

Derick Sozo Ruiz

Solana is one of the fastest blockchains built for scale. It powers some of the most famous NFT drops that you might know, like DeGods, Solana Monkey Business, OkayBears, and others.

In this article, you will go from zero to hero by launching an NFT drop in Solana. We’ll call it Solana Heroes. It will consist of 10 randomly generated hero names uploaded to the Solana blockchain.

What you’ll build

This guide will teach you all the knowledge to create a custom Solana NFT drop.

You’ll learn how to set up a Candy Machine instance, mint an NFT with Devnet SOL, and finally allow minting with a credit card for even more accessibility.

By the time you finish, you’ll have a website that looks something like the following available on the internet for your users:

Let’s get started.

What is Candy Machine?

Candy Machine is a fully on-chain generative NFT distribution program that powers many of the NFT drops that you know and love.

We’ll use the second iteration, v2, created by Metaplex Labs. Metaplex has a partnership with Solana Labs, with over 10.6M NFTs minted using the service so far.

Thankfully Metaplex provides a lot of the necessary tooling to get started. We’ll be utilizing these tools to help us build faster.

Installing the necessary prerequisites

To make sure you’re all set for this tutorial, you’ll need the following tools installed on your machine.

The above links are the individual instructions to install these on your machine.

Also, the commands we’re using throughout this tutorial are running on a UNIX machine. If you’re using Mac OS with an Apple M1 Chip and running these commands locally or on Windows, there might be some additional tools you have to install. Please see the Metaplex documentation for those.

We recommend setting up a container on Codeanywhere, GitHub Codespaces, or Repl.it to help you run these commands more easily.

Creating and configuring a new Solana wallet

Now that you have all the prerequisites installed, we’ll set up our candy machine instance.

First, let’s create a directory for our NFT drop where all our files will live.

We’ll generate a new Solana address that we’ll use for this Candy Machine specifically. To do that run the following command:

If you’re getting errors at this stage, make sure you’ve correctly installed the Solana CLI. It may not be in your path. Go back into the Solana CLI docs and read the instructions for adding it to your path. That’s out of the scope of this tutorial.

When you run the above solana-keygen command, it will ask you for a password. Just keep it blank because we’re only using it for testing purposes. However, in production, make sure you set a solid password.

After successfully creating the new keypair, you should see something like the following in the terminal:

Below you’ll see your pubkey and your seed phrase. Make sure you copy all of this information and store it somewhere safe because we’ll need it soon.

Let’s run a few more commands to set up our new Solana address configuration.

This command will set the contract address you just generated as the default in your Solana configuration.

Here we’ll set the URL to use Metaplex’s Devnet. It’s good because we’re only testing, but you’ll need a different URL when you’re ready to move to production.

After successfully running the above three commands, you should see a message that looks like the following:

Great, now you have a wallet, and the next steps are to add some SOL into your Devnet Solana wallet so we can conduct transactions.

Running that command will put some SOL into your wallet. You should keep this number between 1 and 2, or else it will fail. Currently, the maximum airdrop request limit is 2 SOL, with a total daily limit of 24 SOL.

If it doesn’t work the first time, try again. But, if you’re having trouble after trying a few times, you can also use SolFaucet to get some Devnet SOL into your wallet.

If you need to know your address again, run the solana address command. Then, copy that value and put it into the input field on SolFaucet.

Downloading the Image Assets

We’ve provided the generated hero images in a ZIP file, including all the necessary metadata. You’ll get access to it by running the command below. Now let’s get it into your project and unzip it.

First, this will download a file called assets.zip from a CDN. Then, it will unzip the contents into a new folder called assets that lives in your solana-heroes directory.

You might not have it installed if you run into errors with the unzip command. You can run sudo apt install unzip if you’re on Ubuntu. If you’re on Mac or a different OS you can manually download the assets here.

You’ll have a directory called assets with 10 JSON files and 10 PNG files.

Setting up your Candy Machine Config

The most crucial part of setting up your Candy Machine instance is your configuration settings.

For Candy Machine v2, it’s specified in a single JSON file. We’ll walk you through creating the config file with Sugar here. If you want to learn more specifics, visit the configuration page of the Metaplex docs, where they go into more detail.

Running the above command initiates the config creation process. We’ll also run through filling in the prompts.

Since we are just testing let’s set the NFT price to 0.1 .

Yes, since we only have 10 images we will have a total NFT supply of 10.

Sugar automatically looks through our metadata files and found that we set the NFT symbol to NB.

Same thing here, Sugar automatically found that this value was preset in our metadata.

This prompt asks us when we want our Candy Machine to allow minting. We can just input in now to set the mint date to the current time.

For the purpose of this tutorial, we will just be using 1 wallet.

You’ll put the public address of the Solana wallet that you created earlier in this property. If you forgot the address, run the solana address command in a separate terminal to get access to this again.

This asks us what percentage of royalties go to the creator wallet.

Arrow down to End Settings and press ENTER.

Once again you’ll put the public address of the Solana wallet that you created earlier in this property. If you forgot the address, run the solana address command in a separate terminal to get access to this again.

Arrow down to NFT Storage and press ENTER

To get an auth token, we first need to make an account at nft.storage and head over to the API page, and click on + New Key . We then copy this key paste it into our terminal and press enter.

We might want to update our Candy Machine’s config file in the future so let’s choose yes.

We may also want to update our NFTs metadata in the future (ex: make an NFT that “reveals” after a specific date). Choose option yes.

If we look inside our project folder we should see that a config.json file was created for us.

Getting your hero NFT images uploaded

Great, now that our Candy Machine config is fully set up and configured, let’s upload our hero images and deploy it.

This uploads all our images and metadata from our assets folder to IPFS using nft.storage

This actually deploys our Candy Machine to the Solana devnet.

Let’s go ahead and verify that our deployment was successful.

We can are able mint an NFT to our own creator wallet address straight from the terminal by running this command. You can then view the minted NFT by searching your wallet address on the solana explorer.

Creating a front-end for your Solana Drop

Congratulations. You’ve successfully uploaded your Solana Heroes NFT drop to the blockchain. Now let’s create a website where users can mint an NFT.

Thankfully, Crossmint helps to make this very simple for you too. We provide a starter kit that sets everything up for you — all you need to do is input a few lines of information.

It already comes with Crossmint integrated, which we’ll discuss later, but first, you’ll be able to mint with only your Solana wallet.

This command will clone the start kit Github directory and install all the necessary development dependencies with the yarn or npm install command.

After running the above command(s), you’ll be in the candy-machine-react-ui and see a few different files. One you’ll notice is called .env.template . We’ll need to clone this and input our specific information. It looks something like the following.

First, run this command cp .env.template .env (Note: If copy and pasting this command does not work, type it out).

Now in the .env file, uncomment all the lines related to development mode at the top of the file.

The candy machine public key you got when you uploaded your assets will go in the REACT_APP_CANDY_MACHINE_ID field.

If you don’t have access to it anymore, you can find it again by going into the following directory:

Inside this file, you’ll see the candyMachine property that contains the ID.

Minting your first hero NFT with Phantom

Now that you have all the environment variables in place, you can start the development server with the following command: yarn dev

Depending on how you’re running these commands on your machine, the URL you visit will be http://localhost:3000 .

After visiting that URL, you will see a website that looks something like the following:

Now the Phantom extension becomes essential. We’ll use it here to mint an NFT on the Solana Devnet with our Devnet SOL.

Click on the connect button and connect your phantom wallet. It will ask you to input your password.

You should see the button text changed to Mint now that you’re connected. Click that, and a popup by Phantom will appear asking you to proceed with a transaction.

After clicking mint, and it successfully succeeds, you should now see the NFT in your wallet.

Integrating Crossmint and allowing Credit Card Checkout

Great! You’re making even more progress. You minted your first NFT from your Solana Heroes collection we created using some Devnet SOL. We can make this process easier with Crossmint to allow users to mint with their credit cards.

First, create your Developer Account on the Crossmint Developer Console by visiting the following URL:

Make sure you visit staging.crossmint.com to create a collection that you can use for testing purposes.

First, you need to log in, and it’ll ask you to login in via email. Afterward, you’ll see the following screen:

You’ll see a screen that asks you, How did you hear about us?. It’s optional, but you can enter something like Solana Medium article. Next, accept our policy agreement and then click on Create your account button.

Next, you’ll be presented with a blank screen. Click on the green create a collection button to get started.

Make sure you’re on the Solana tab to start registering your Candy Machine.

For many of these values, feel free to input what you want. However, the most crucial property to fill out is the Candy Machine ID. Grab the ID for your Candy Machine, and paste it here.

Click on the Create Collection button. If there are no errors, Crossmint will create your collection, and you’ll go back to the main collections screen. Click on your drop, and then you’ll see the following screen.

The most important thing to grab here is your Crossmint Client ID in blue at the top of the screen. Copy this value and paste it into your website’s .env file in the REACT_APP_CROSSMINT_ID value.

Now restart the development server with yarn dev, and when you visit the http://localhost:3000 you’ll see a new Crossmint button. Clicking this button will allow you to mint with a credit card, and you’ll see the following popup:

We’re only testing, so it’s unnecessary to have accurate card information right now. So instead, we can use some test credentials.

Enter 4242 4242 4242 4242 into the card field. Then, enter any CCV and any future date for the card date. Finally, enter your name and click on the Purchase button. You should see the screen change into the minting state.

Unlike the Phantom way of minting these NFTs, the NFTs will go into your unified Crossmint wallet. Thankfully, Crossmint offers an effortless way to export these into another wallet, and we’ll go over that in another article.

To see your newly minted NFT, visit your collections page on Crossmint. We minted on Devnet and staging, so here’s the URL for you:

Make sure you log in with the same email address that you used to create your collection.

Afterward, clicking on the Collections link will see your newly minted NFT right there. The screen you see should look something like the following:

Conclusion

Congratulations! You just went from Zero to Hero and launched your first NFT drop on Solana using Candy Machine. Also, you made it more accessible than 99% of NFT drops by integrating with Crossmint and adding credit card checkout to your drop.

What is Crossmint?

Our goal at Crossmint is to help make NFTs as accessible as possible. Our first product, Crossmint Pay, is a tool for NFT creators to accept credit card payments.

It allows anyone to buy an NFT in under a minute using only their email and credit card, with no need for a wallet or cryptocurrency. We also have our minting API as a live product in beta, you can reach out to us to get access.

Follow us on Medium so you are notified when we post another article! If you have any feedback, feel free to reach out to us via Twitter. You can always chat with us on our Discord community server, featuring some of the coolest developers you’ll ever meet.

Are you a developer ready to get started? Visit the Crossmint documentation and see how you can integrate Crossmint into your project in less than 5 lines of code.

От идеи создания NFT до опустошения Candy Machine

Давным давно в 2020 г. когда я только познавал мир крипты и параллельно торговал на фондовом рынке, я состоял в открытой группе где сидели как и трейдера с стажем, так и такие новички как и я.

В данной группе мне сказали что создавай своё комьюнити, или хотя-бы найди пару человек что-бы иметь больше информации, распределять обязанности. В тот момент я видел свое комьюнити так:

Два-три человека сидят, отбирают стаки для торговли внутри дня, каждому отведено определенной сектор или же, по своим скринерам.

За пару часов до начала торговой сессии все созваниваются и обсуждают какие стаки торговать, а какие нет.

Ну и ходил я с этой идеей очень долго. Потом, когда я уже погрузился с головой в крипту понял что без команды ты никто (Только если ты не торгуешь внутри дня), ведь когда ты понимаешь что хочешь зарабатывать в крипте то ты должен как минимум знать «все» , и захватывать все сферы

Ну а далее время шло и я все продумывал как же организовать это всё

И когда я уже более менее стал стоять на своих двух я понял что лучшего времени не будет, и без каких либо уменний в рисовании и знаний программирования (Хотя я уже изучал Python, и HTML но до конца я так и не дошёл — поэтому базовые знания были) я приступил к реализации проекта…

Зима 2021 — 2022 г.

Возможно вы застали то время, когда стреляли почти-что все коллекции НФТ, многие тогда фармили WL и после чего лутали десятки иксов, и многие коллекции предлагали держателем доступ в DAO, но это было сложно назвать DAO ведь в большинстве случаев вы получали неликвидную НФТ, и грустное комьюнити которое пришло флипануть данную коллекцию, и не более. (Но есть и те кто реализовал все на высшем уровне — их можно пересчитать на пальцах)

В таких DAO люди не получали право голоса где всех просто ставили в известность постфактум

И тогда уже зародилась идея создание своей коллекции, конечно хотелось заскамить кого-то но я понимал что лучше сделать все правильно и красиво, и не залутать десятки тысяч вечно зеленых, а собрать комьюнити. На тот момент в паблике было всего-лишь 150-500 человек и я понимал что если сейчас это все делать то

  • Не наберу свою аудиторию
  • Выпаду из рынка на месяц, и пропущу всю активность с НФТ

Поэтому я стал просто искать инфу как создать свою коллекцию, и готовится к создание коллекции.

Данная НФТ дает доступ в наше закрытое DAO

В апреле 2022 года — я уже начал делать исходники для коллекции

  • Это были бейджи, которые я перерисовывал в Photoshop неделями, но так и не зашло мне это
  • Потом я вспомнил про коллекцию Portals — их коллекция в виде банковской карты, и начал кидать исходники, но тоже понял что это не то что я хотел увидеть
  • Персонажи, сначала начал с идеи персонажа, первые на ум пришли нинзя, но они за один день отвалились, и тут я увидел его странное сушество, немного посидев в Photoshop я отрисовал первого Гуманоида

Сложность была в моих кривых руках, и все что я не рисовал выходило мягко сказать говном, и в один прекрасный день родился мой первый Гуманоид

Конечно в первом варианте он был убожеством, но уже с отрисованным телом, если у него оно вообще есть)

И далее на основе этого тела я отрисовал

Humanoid — 11 разных гуманоидов, 7 из них похожие по форме, 4 залитых градиентом, и эксклюзив 9 отрисованные полностью с нуля — т.е без генерации

Background — 17 фонов скаченных из интернета с бесплатной лицензией, но не все фоны были скачаны, многие это просто градиент, и один это первая сгенерированная коллекция в размытом виде

Eyes — 5 обычных глаз, и одни в виде Thug очков

Teeth — 6 видов зубов, которые в день генерации нфт в основную сеть были перерисованными ибо они не попадали под гуманоида

Вот так и появились исходники для генерации моей первой НФТ коллекции

Выше вы уже узнали что данная коллекция рисовалась в Photoshop

Все исходники были в формате 2000х2000

Сначала сохранял гуманоидов, а после каждый отдельный атрибут, и далее стал вопрос о генерации нфт с метаданными

Прочитав документации по Ethereum и Solana выбор пал на Solana.

Узнал что все можно сделать без каких-либо знаний, я приступил к генерации нфт.

В данном случае я использовал Hashlips Art Engine — это открытый исходник для генерации нфт

Прочитав их инструкцию я сделал все по шагам, и первая коллекция сгенерирована!

  • Linux — но не обязательно, можно все сделать и в Windows — для удобного редактирования кода

И библиотеки для генерации колекции

Видео гайды есть на этом youtube канале

Ну тут все просто

  • Быстрота блокчейна
  • Дешевые комиссии
  • Не требуется создавать Смарт контракты как в Ethereum

Деплой коллекции происходил через Metaplex

Что мне для этого понадобилось?

    — Для создания кошелька — Основной инструмент деплоя нфт коллекции

Тут все так-же было по детальной инструкции

Да на заметку, опустошать Candy Machine надо после того как: Все НФТ были отчеканены, и не раньше!

Первый анонс своей коллекции был сделан 03.06.2022 в данном посте , т.е от создания первого гуманоида — 16.05 прошло 17 дней!

И уже 03.06 был создан сайт для минта — исходник лежит на github

Сайт был создан очень быстро, был взят исходник, сделал сверху удобное меню, добавил кривой блок с информацией, и в тот же день были отчеканены первые WL НФТ

Далее, я протестировал сайт, он работал нормально, только вот столкнулся с проблемой в виде минта для WL, я создал обычный токен, и данный сайт все не как не хотел брать 1 токен, а брал 0.000000001, перерыв все я понял что проблема была в сайте.

Решил я данную проблему созданием нового WL токена только уже в виде НФТ, и о чудо он берёт 1 нфт и соляну для минта

Определился с датой минта — 07.06.2022, я отправил свою коллекцию в НФТ календари, по итогу только один календарь разместил мою коллекцию.

NFTCALENDAR, а условия разрешения были очень простыми — поставить их баннер у себя на сайте, и сделать превью для своей коллекции

Я сразу ожидал что будет отчеканено не более 5-10 шт.

— Но вы спросите зачем такая большая коллекция?

А ответ будет простым — просто захотел, ибо дальше данная NFT возможно будет сжигаться, для разного рода наград.

В первый час отчеканили почти все кто хотел, далее я просто ждал окончания минта — 08.06.2022.

В день окончания также были отчеканены 1-2 НФТ.

После окончания минта, я сминтил остальные нфт, и принялся за финальные действия…

Коллекция сминчена на 100%, иду подписывать все нфт, и столкнулся с проблемой соль в тот момент не очень быстро работала, и две подряд транзакции у меня идут с фейл, хотя если бы я сразу все чекнул в Exploler то я бы не потратил много времени на эту ошибку

Далее я выдохнув, что это не ошибка и пошёл листится на все маркетплейсы

OpenSea — самый лучший маркетплейс, листинг моментальный

Magic Eden — тут возникла проблема, хотя я так и нечего не понял — Команда отклонила ваш листинг) — но в конце концов коллекция на Magic Eden

Ну и далее я опустошаю Candy Machine на которой лежало 0.2 SOL, и всё данная коллекция была официально запушена

Выгодный обмен USDT и подарок за отзыв!

Candy Machine, разработанный Metaplex Studios, представляет собой программу для продажи NFT на блокчейне Solana. Используя интерфейс командной строки Metaplex (CLI), пользователи могут генерировать NFT и настраивать аукционы.

Отличия между Candy Machine v1 и v2

Candy Machine v2 предлагает ряд улучшений по сравнению с предыдущей версией. Он вводит непредсказуемый индекс монетизации, настройки Captcha для ограничения атак ботов, возможность создания белых списков для предварительной продажи и эксклюзивного монетизации, а также поддержку больших коллекций и скрытых выпусков.

Как использовать Candy Machine NFT?

Для успешного использования Candy Machine NFT следует выполнить следующие шаги:

  1. Установите необходимые инструменты и настройте кошелек Solana.
  2. Настройте Candy Machine, подготовьте ваши NFT.
  3. Разверните Candy Machine, начните монетизацию токенов и подпишите монетизацию.
  4. Настройте веб-сайт для продажи ваших NFT.

Candy Machine и Metaplex

Metaplex Protocol Candy Machine является ведущей программой для монетизации и распределения NFT на Solana. Это позволяет создателям безопасно и настраиваемо приводить свои цифровые активы на блокчейн.

What is Candy Machine v2? A Complete Guide

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2.

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed.

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item.

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities.

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following:

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell
  • Not having a precise and global start time
  • Projects were not producing consistent, valid NFTs
  • Structuring NFT metadata correctly
  • Protection from persistent NFT bot attacks
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way.

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT.

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.

  1. Git — an open-source and distributed version control system
  2. Node — an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser
  3. Yarn — software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node — a TypeScript-based execution environment
  5. Solana CLI — a command-line interface to interact with the Solana blockchain
  6. Metaplex — a command-line interface to interact with Metaplex

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences.

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format.

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI.

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens.

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API.

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

What is the Solana Geyser Plugin?

The Solana Geyser Plugin enables developers to access blockchain data without requesting them on-chain directly from Solana nodes.

What is a Program Derived Address (PDA)?

A Program Derived Address is a Solana account that does not have a private key, and is found using the program ID, a SHA-512 hashing function, seed array, and a bump seed.

What are compressed NFTs?

Solana's Compressed NFTs store metadata off-chain, and can save web3 developers over 99.9% of minting costs by avoiding on-chain rent fees.

Scale to any size, without any errors

Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. Plus, our legendary support will guide you every step of the way.

What is Candy Machine v2? A Complete Guide

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2.

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed.

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item.

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities.

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following:

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell
  • Not having a precise and global start time
  • Projects were not producing consistent, valid NFTs
  • Structuring NFT metadata correctly
  • Protection from persistent NFT bot attacks
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way.

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT.

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.

  1. Git — an open-source and distributed version control system
  2. Node — an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser
  3. Yarn — software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node — a TypeScript-based execution environment
  5. Solana CLI — a command-line interface to interact with the Solana blockchain
  6. Metaplex — a command-line interface to interact with Metaplex

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences.

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format.

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI.

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens.

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API.

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2.

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed.

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item.

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities.

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following:

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell
  • Not having a precise and global start time
  • Projects were not producing consistent, valid NFTs
  • Structuring NFT metadata correctly
  • Protection from persistent NFT bot attacks
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way.

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT.

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.

  1. Git — an open-source and distributed version control system
  2. Node — an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser
  3. Yarn — software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node — a TypeScript-based execution environment
  5. Solana CLI — a command-line interface to interact with the Solana blockchain
  6. Metaplex — a command-line interface to interact with Metaplex

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences.

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format.

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI.

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens.

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API.

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *