Как создать нфт на солане

Пошаговая инструкция как получить 1000 монет WAN и конвертировать их в 200 USDT на Binance
Solana NFT Marketplace — это онлайн-платформа, разработанная на блокчейне Solana, специально для торговли невзаимозаменяемыми токенами (NFT). Solana — это высокопроизводительный блокчейн, который обеспечивает быстрые транзакции с низкими комиссиями.
Solana NFT Marketplace предоставляет возможность создания, продажи, покупки и обмена цифровых активов в виде уникальных NFT, таких как цифровые искусственные произведения, виртуальные земли, коллекционные карточки, игровые предметы и другие цифровые объекты.
Пользователи могут загружать свои NFT на платформу, устанавливать цены, продавать их другим участникам, а также просматривать и приобретать NFT, созданные другими художниками и разработчиками. Solana NFT Marketplace обеспечивает прозрачность, безопасность и надежность с помощью технологии блокчейн и смарт-контрактов.
Такие платформы позволяют художникам, разработчикам игр и другим творческим лицам продавать свои уникальные цифровые активы напрямую покупателям, минуя посредников и традиционные рынки. Solana NFT Marketplace является одним из множества маркетплейсов, работающих на блокчейне Solana, и предлагает уникальные возможности для торговли и владения NFT.
Как создать NFT на Solana
Для создания NFT на блокчейне Solana вы можете следовать следующим шагам:
- Установите кошелек Solana. Вы можете использовать официальный кошелек Solana или другие кошельки, совместимые с блокчейном Solana.
- Получите SOL (местную криптовалюту Solana). Вы должны иметь некоторое количество SOL для оплаты комиссий за транзакции и создание NFT.
- Выберите платформу для создания NFT на Solana. Некоторые популярные платформы включают Solanart, Solible, Magic Eden и другие. Перейдите на выбранную вами платформу.
- Подключите свой кошелек Solana к платформе. Обычно это делается путем нажатия на кнопку «Подключить кошелек» и выбора Solana в списке поддерживаемых сетей.
- Создайте свой NFT. На платформе вы обычно будете предоставлять информацию о вашем NFT, такую как название, описание, изображение или видео, цена и другие детали. Следуйте указаниям платформы для заполнения всех необходимых полей.
- Загрузите медиа-файлы. Вы должны предоставить изображение или видео, которое будет использоваться в вашем NFT. Обычно платформа предоставляет возможность загрузить файлы непосредственно с вашего компьютера.
- Установите цену и другие параметры. Укажите цену продажи вашего NFT и другие параметры, такие как разрешение торговли или аукционные условия.
- Подтвердите создание NFT. После заполнения всех необходимых полей и загрузки медиа-файлов платформа запросит ваше подтверждение для создания NFT. Убедитесь, что у вас достаточно SOL для оплаты комиссии за создание NFT, и подтвердите транзакцию.
- Дождитесь подтверждения транзакции. После отправки транзакции на блокчейн Solana вам может потребоваться некоторое время для подтверждения и включения вашего NFT в блокчейн. После этого ваш NFT будет доступен для просмотра и покупки другими участниками.
Обратите внимание, что каждая платформа может иметь некоторые отличия в процессе создания NFT на Solana, поэтому важно следовать инструкциям, предоставляемым выбранной платформой.
How to create an NFT on Solana? A complete step-by-step guide
![]()
From pixelated art selling for millions to NBA video highlights selling for thousands of dollars, NFTs have created a lot of buzz in 2021. Are you a beginner who wants to create some NFT projects? In today’s guide, we will discuss everything about creating an NFT on the Solana blockchain.
So, Why Choose Solana to Begin with?
Well, if you know about Ethereum crypto, Solana is almost a similar one. Both ETH and Solana allow people to build on top of their blockchain platform by using smart contracts. So, why should you choose Solana over Ethereum? Because it is much more scalable with faster block times and low transaction fees.
Before we get into the details of the mining process, let’s discuss what is NFT crypto in the first place.
NFT: A Gist
A non-fungible token is basically a group of data saved on a blockchain that certifies any digital asset to be one-of-a-kind and interchangeable. To create an NFT, you must build a token that represents a file, photo, video, or whatever you want. So, how does an NFT expert use the Solana blockchain to develop tokens? Let’s get into the step-by-step details.
Learn how to work with Solana
Before we start talking about the list, make sure that you have all the required tools installed on your system. To help a first-timer like you get a grasp on Solana, here are the three easy steps to follow:
1.Setting Up a Solana Wallet : A wallet is where you will store all your tokens and NFTs. There are many different ways to create a wallet but we will talk about the command lines in today’s blog.
First of all, install the Solana Tool Suite you need to create your wallet. Once installed, open the terminal (on Linux/Mac) or Command Prompt (on Windows).
Now in the terminal/Command Prompt, move to the desktop and create a folder to store your NFT crypto data by giving the below-mentioned command:
solana-keygen new — outfile SolanaWallet/my-keypair.json
Finally, create the wallet and secure it with a password. Voila! Your new Solana wallet is ready. At this point, you will receive a public address that will be a long string of numbers and letters. Save this PUB KEY as later you have to use it several times.
Now that, you have a wallet, you will need some SOL, the currency of Solana blockchain (just like Ethereum’s ETH). You can get some free SOL on the devnet, the playground version of Solana. When you are going live on the real deal, you will be using the mainnet.
To get one free SOL on the devnet, you have to give the command like:
Boom! Now you have 1 SOL in your wallet on the devnet. If you want a better way to use your wallet, you can also use Solana Explorer. Visit the website, go to the top right corner change the button to devnet from mainnet, paste in YOUR_ADDRESS and your account will get 1 SOL!
You can also use the Phantom Wallet, a Chrome/Brave extension that makes it quite easy to interact with Solana Dapps. However, once you are ready with your wallet, let’s move on to the next step of your NFT crypto creation.
2.Creating Your Own Token : Now the process of creating your own token might sound a bit complex but relax, you can do it! At first, you need to set your configuration to use the devnet:
Next, you need to point to the location of your keypair.json file on your desktop:
solana config set — keypair SolanaWallet/my-keypair.json
The final step is creating your token with just this one command:
Boom! You have created your token successfully. Your token is a string of numbers and letters just like your public address.
So, how to store your new token in your wallet? Well, you need to create an account:
spl-token create-account YOUR_TOKEN
Once you have an account in your wallet to accept all the tokens, it’s time for you to mind some tokens!
spl-token mint YOUR_TOKEN 420
That’s how you can add 420 new tokens and sell or send them to whoever you want. Do you want to add more tokens? Run all the above-mentioned commands again and create as many tokens as you want!
The Final Thoughts
Hope you found this NFT learn session quite helpful to understand how the Solana blockchain works. You can easily create multiple tokens, import wallets, and transfer all your tokens between the wallets.
If you want to learn more about minting NFT on the Solana blockchain, you can always opt for a crypto trading certification before getting started with your projects.
Создать NFT на Блокчейне Solana
Вы, вероятно, знаете, что большинство NFT−проектов созданы на базе сети Ethereum. И хотя цепочка Ethereum по-прежнему остается самым популярным решением для чеканки и купли-продажи NFTs, многие участники рынка ищут ему замену, из-за общей перегрузки сети и стремительного роста платы за газ. Solana (SOL) — одна из возможных и весьма интересных альтернатив, стоимость которой с начала года выросла с 1.60 до 225 долларов и продолжает стремительно расти.
Как и Ethereum, блокчейн Solana предназначен для создания смарт-контрактов и децентрализованных приложений, в том числе запуска различных NFT-проектов — от художественных коллекций до маркетплейсов для чеканки и продажи различных невзаимозаменяемых токенов. В этой статье речь пойдет именно о таких проектах — мы расскажем, как разработать свое NFT-решение на базе Solana, и почему вам стоит выбрать именно этот блокчейн, а не Ethereum или другой блокчейн.
Обзор блокчейна Solana
Основанная бывшими инженерами Qualcomm, Intel и Dropbox в конце 2017 года, Solana представляет собой открытую децентрализованную блокчейн-сеть, ориентированную на обеспечение масштабируемости без ущерба для стоимости транзакций, децентрализации и безопасности. Говоря по сути, это более быстрый, безопасный и устойчивый к цензуре аналог Эфириума, обеспечивающий открытую инфраструктуру, необходимую для глобального внедрения блокчейн-решений.
Работе Solana на базе улучшенного алгоритма консенсуса Proof of Stake (PoS). Главная особенность Solana PoS — это протокол Proof-of-History (PoH), который позволяет каждому узлу локально генерировать временные метки с вычислениями SHA256. Это устраняет необходимость в широковещательной передаче меток времени по сети, повышая общую эффективность сети Solana, что и позволяет добиться очень высокой скорости и масштабируемости блокчейна.
У проекта есть собственная монета — SOL. Как и в сети Ethereum, с помощью SOL можно инициировать смарт-контракты и децентрализованные приложения, а также оплачивать сетевые сборы. В момент запуска, весной 2020 года, SOL продавался за 0.60 доллара, сейчас его цена превышает 225 долларов (то есть курс вырос в 375 раз за полтора года).
7 преимуществ Solana для NFT
Взрывной рост курса SOL, который мы не видели на рынке с 2014–2018 годов, объясняется преимуществами Solana в сравнении с его основными конкурентами — Ethereum и Binance Smart Chain, в том числе для запуска NFT-решений. Более того, всего за год с момента запуска Solana стала вторым по популярности пространством для запуска NFT после Ethereum, с запуском нескольких проектов каждый день.
Многие считают его настоящим «убийцей Ethereum», так как сеть Solana может обрабатывать до 65 000 транзакций в секунду по цене всего 0.00025 доллара за одну транзакцию. Причем, в перспективе команда разработчиков Solana обещает достичь пропускную способность 700 000 транзакций в секунду. Для сравнения: сеть Ethereum способна обрабатывать в среднем 16,5 транзакции в секунду, тогда как как плата за транзакцию в среднем составляет 46 долларов (2 декабря 2021 года). То есть сеть Solana почти в 4 000 раз быстрее и в 185 000 раз дешевле Ethereum.

Когда дело доходит до обработки NFT, разница становится еще более существенной. Для чеканки и отправки невзаимозаменяемых токенов на Ethereum нужно больше вычислительных ресурсов, чем для отправки обычных ETH и токенов стандарта ERC-20, потому что для обработки NFT необходимо взаимодействовать с настраиваемым смарт-контрактом. Следовательно, плата за газ будет еще больше — иногда более 100 долларов, что может быть дороже, чем сам NFT-актив. Тогда как чеканка NFT на Solana составляет всего 0,00001 SOL, или 0.015 доллара.
Скорость и стоимость обработки невзаимозаменяемых токенов — это не единственные плюсы нового блокчейна. Вот на какие еще преимущества вы можете рассчитывать, если решите разработать свое NFT-решение на базе Solana.
Solana легче программировать
В основе Ethereum – язык программирования Solidity, который был специально разработан для работы со смарт-контрактами. Это объектно- и предметно-ориентированный JavaScript-подобный язык, который появился лишь в 2014 году, из-за чего он страдает от «проблем молодости». Solana работает на Rust — одном из самых популярных языков программирования. На Rust можно создавать самые разные приложения, такие как новые блокчейны, маркетплейсы или игры, при этом он прост в использовании и более привычен, чем Solidity. Это делает блокчейн Solana более доступным для развертывания приложений, чем Ethereum, что вместе с низкими комиссиями и привело к экспоненциальному росту экосистемы Solana.
Отметим еще, что за Rust стоит одно из самых активных сообществ разработчиков. Например, на Github насчитывается более 24 000 пользователей, которые вносили правки на Rust, тогда как на Solidity — языке программирования Ethereum — всего 3 500 пользователей. Очевидно, что в случае языка Solidity речь идет о пользователях, деятельность которых напрямую связана с Ethereum, тогда как Rust используется в огромном множестве проектов помимо Solana. Тем не менее, факт остается фактом: вам будет намного проще найти хорошего разработчика для запуска NFT-решения на Solana, чем на базе Ethereum. И стоимости их работы, скорее всего, будет ниже.
Но и это еще не все. Для разработки смарт-контрактов, приложений и NFT-решений на Solana необязательно использовать Rust. Команда Solana создала специальный протокол LLVM для компиляции смарт-контрактов и Dapps, написанных на других языках для компиляторов WASM. Благодаря LLVM разработчики могут легко и быстро перенести свои Dapps из других популярных WASM-сетей, таких как Dfinity, EOS, Polkadot и Ethereum 2.0, в экосистему Solana.
У Solana нет никаких проблемы с мемпулом
Мемпул — это зона ожидания, где все действительные транзакции ждут подтверждения сетью. Одно из главных преимуществ Solana перед Ethereum и многими другими блокчейнами в том, что у нового блокчейна нет периода ожидания обработки транзакции и добавления этой транзакции в цепочку блокчейна. По сути, у Solana нет мемпула — все транзакции подтверждаются почти мгновенно в течение 400 мс. Тогда как в Ethereum подтверждение транзакции занимает до четырех минут, если не больше, — когда нагрузка повышается, транзакции застревают в мемпуле.
Экосистема Solana расширяется намного быстрее
Хотя на Ethereum по-прежнему запускается больше всего смарт-контрактов, децентрализованных приложений и NFT-решений, они сталкиваются со многими проблемами, связанными с ценой, скоростью и масштабируемостью. В блокчейне Solana нет таких проблем, благодаря чему количество смарт-контрактов, Dapps и NFT в этой сети растет в геометрической прогрессии. Помимо этого, Solana также может поддерживать больше монет, чем Эфириум. Благодаря этим вещам сеть Solana все чаще выбирают для запуска блокчейн-стартапов и NFT-проектов.
Solana более устойчивый и использует меньше ресурсов
Все блокчейны имеют одинаковую задачу — обмен данными. Представьте себе блокчейн c 100 000 активных участников. Когда в такой сети добываете новый блок, эта информация должна быть независимо передана всем компьютерам почти 100 000 раз. Если блокчейн «медленный», у него появляются проблемы с пропускной способностью, что замедляет работу экосистемы.
Solana решает эту проблему с помощью протокола Turbine, который разбивает каждый блок на разные пакеты, передает каждый пакет группе компьютеров, которые затем передают данные другой группе, а та в свою очередь передает их еще одной группе и т. д. Таким образом Turbine уменьшает использование полосы пропускания, минимизирует время обработки и делает сеть более устойчивой к сбоям.
Solana является более экологичной экосистемой
Основная сеть Ethereum все еще использует для добычи блоков алгоритм консенсуса Proof of Work (PoW), который требует высоких вычислительных мощностей, из-за чего поддержание сети приводит к высокому потреблению электроэнергии — уже сейчас Ethereum потребляет больше электричества, чем Бельгия или Израиль. Таким образом, Ethereum способствует повышению выброса CO2 в атмосферу и, следовательно, усилению глобального потепления.
Блокчейн Solana использует улучшенный алгоритм Proof of Stake (PoS), который на 99,9% более энергоэффективнее, чем PoW. Это означает, что Solana просто лучше для окружающей среды, что делает ее более привлекательной для запуска NFT.
Более высокая пропускная способность
Мы уже писали выше, что Solana сильно превосходит Ethereum по количеству транзакций в секунду (TPS). Так, обработка одной транзакции (добыча блока) в сети Ethereum занимает от 10 до 15 секунд, а сеть в целом может обрабатывать только от 15 до 45 транзакций в секунду. Напротив, Solana требуется всего 400 миллисекунд для добычи блока, и может обрабатывать до 65 000 транзакций в секунду.
Однако стоит отметить, что в 2022 году Ethereum обновится до Ethereum 2.0, и ожидается что после этого сеть будет иметь пропускную способность до 100 000 транзакций в секунду. В Solana говорят, что к этому времени пропускная способность их сети также увеличится, и преимущество в скорости сохранится за их проектом.
Стоимость обработки транзакции (комиссии)
Размер комиссий в Ethereum также скорее всего изменится после перехода блокчейна на PoS в 2022 году. Однако даже после этого стоимость транзакций в сети Эфириума, скорее всего, будет выше, чем в Solana. Это обусловлено тем, что Solana использует протоколы PoH и Turbine для ускорения обработки данных. Кроме того, Solana также по-другому работает со смарт-контрактами, и это также снижает нагрузку на сеть, а значит, и стоимость транзакций. Это особенно важно при запуске NFT, так как для их обработки система всегда обращается к смарт-контрактам.
Особенности смарт-контрактов Solana
Для того чтобы разработчики смарт-контрактов и приложений смогли воспользоваться всеми преимуществами высокопроизводительной сети Solana, команда проекта создала механизм обработки гиперпараллельных транзакций под названием Sealevel. Он предназначен для горизонтального масштабирования между графическими процессорами и твердотельными накопителями. Обратите внимание, что остальные блокчейны — это однопоточные системы. Solana — единственный на сегодня работающий блокчейн (а не идея), который поддерживает параллельное выполнение транзакций (а не только проверку подписи) в одном сегменте.
В Solana учетные записи, которые взаимодействуют с программами, хранят данные, относящиеся ко взаимодействию с программами, что создает логическое разделение состояния (учетные записи) и логики контракта (программы). В этом принципиальное различие между смарт-контрактами на основе Solana и EVM. То есть можно сказать, что учетные записи на Ethereum — это не то же, что учетные записи на Solana. Так, в Solana учетные записи могут хранить данные (включая информацию о кошельках), в отличие от учетных записей Ethereum, которые являются ссылками на кошельки.
В дополнение к этому Solana предлагает CLI (Command-line Interface) и JSON RPC API, которые могут использоваться Dapps для взаимодействия с Solana. Кроме того, они также могут использовать один из существующих SDK, позволяющих клиентам общаться с программами блокчейна и Solana. Здесь больше об этом.
How To Create NFT on Solana With IPFS
In case you slept through all of 2021, NFTs (non-fungible tokens) are hot. They have evolved from “random jpegs” to self-contained applications, access tokens, communities, and more. With increased creativity and expanding support across multiple blockchains, NFTs don’t look to be going away any time soon.
While Ethereum might be the first blockchain one thinks of when talking about NFTs, there are plenty of other chains out there to consider. I previously wrote about creating NFTs on the Flow blockchain, but an increasingly popular choice is Solana. Solana recently overtook Ethereum in total transaction volume in November of 2021, and Rarity Sniper (a tool for creating rarity rankings on NFT collections) moved to support Solana in 2021 after initially supporting Ethereum only.
With that as our background, let’s take a look at how to create an NFT collection on Solana using Pinata and IPFS. This is an especially interesting tutorial because Solana has been closely linked to Arweave, but many projects prefer IPFS for its rapid content access and reliability. Metaplex, a project built to make creating NFT projects on Solana easier is has IPFS support baked in, and this includes the ability to use Pinata to store content and serve that content through a dedicated IPFS gateway.
Setting Up The Development Environment
To begin, make sure you sign up for a Pinata account. You can test with a free account, but for a mainnet NFT launch, you may want to consider the Professional Plan with a Dedicated IPFS Gateway.
Once you’ve signed up for an account, you really just need to make sure you have the following installed (each is linked to the installed instructions of you need to install them):
- Node.js version 16.13.0 or newer is recommended
- Git version 2.32.0 or newer
- Yarn version 1.22.17 or newer
- ts-node version 10.4.0 or newer
- solana cli
For what it’s worth, we will be following much of the instructions on Metaplex’s website with some modifications that allow us to upload content to IPFS through Pinata.
Preparing The Assets
This tutorial is not going to go through the process of generating assets for your NFT project. That’s a totally separate endeavor that has to happen before the contract can be deployed to Solana. So, assuming you have the art created, we’ll walk through how to prep this for upload to IPFS through Metaplex.
The first step is to create a folder for your NFT project assets. From the command line, that will look like this:
Exit fullscreen mode
Inside that folder, create another folder called assets. In the assets folder, you will add all of your images. It’s important that each of your images be labeled in a base 0 index format. That means the first image would be 0.png and the second would be 1.png and so on.
Once your images are in the folder, you will need to create the metadata for these images. If you have any experience with Ethereum NFT metadata, you’ll feel right at home with Solana NFT metadata. The structure is nearly identical. Let’s took a look at a basic JSON metadata file structure for NFTs on Solana:
Exit fullscreen mode
Just like with the Ethereum metadata standard, the Solana metadata standard has a name, image, and description. Additionally, you can include attributes (just like with ETH), a symbol, and collection details. In Ethereum projects, the token symbol is generally assigned at contract deployment and not in the metadata. Another difference is the properties portion of the Solana metadata. This is required and it allows you to include an array of files for your NFTs. You have to have at least one file in that array which points to the same asset as the image property, but you can include other files that make up your entire NFT. This is a really interesting concept that should be explored further, but for the sake of this post, we will only be operating with single asset NFTs.
Ok, so we know we have images in the folder. We know those images need to be named in a specific way. And we know that we need JSON metadata files. How are we now going to get those JSON files created and added to the assets folder. You could do this manually, but with a 10,000 NFT project, that would be nearly impossible.
Let’s write a script to create the metadata files.
From your command line, make sure you are in the nft-project folder. We will create a new file called metadata-generator.js by running this command: touch metadata-generator.js .
In your code editor, open that new file. It’s empty, but we’ll fill it in now. We need to loop through all of the images in our assets folder and create a unique JSON file for each. We need to name and save that JSON file in the same assets folder. To do this, we will make use of the Node.js fs which is built into Node.js.
In your metadata-generator.js file add this code:
Exit fullscreen mode
To run your script and generate the metadata, you should run this command from the root your project folder: node metadata-generator.js .
When the script is finished, you’ll have an assets folder that has images and JSON files together.
Using Metaplex
Metaplex is a tool that makes launching an NFT project on Solana much easier. Rather than having to write your own smart contract like you would have to do with Ethereum, Metaplex has pre-written contracts that projects can plug into. To make this work, Metaplex has to be able to access the files associated with the NFTs, then it needs to be able to upload those files and associated them with each token to be minted.
Metaplex has support for IPFS through a few services, but we’ll be focusing on using Pinata.
We will be following the standard Metaplex Candy Machine guide found here. The first step is going to be to clone Metaplex. Run the following command in your terminal:
Exit fullscreen mode
We are cloning the directory into the home directory so that we don’t have to remember where the project was cloned. Inside the new metaplex repo is code to support the JavaScript CLI we will be making use of. So, we need to install dependencies for that CLI code.
yarn install —cwd
Now, let’s make sure the install worked. Remember, we installed ts-node? We’re going to use that now to run a command for the metaplex cli.
Exit fullscreen mode
This should print out a version if everything was installed properly. Now, we need to make sure the Solana CLI is working. Run this command to get the version number:
Exit fullscreen mode
If that works, you’re good to go. If not, double check that you have installed the Solana CLI Toolkit. Next, we’re going to use that CLI to create devnet wallet. The Solana devnet is where we can experiment without fear of incurring any real financial impact.
Run this command to create your new devnet wallet and store the keys:
Exit fullscreen mode
Now, we can set the default keypair for our Solana CLI interactions:
Exit fullscreen mode
Finally, let’s let the CLI know that we intent to interact with the devnet:
Exit fullscreen mode
To confirm this all worked as expected, we can fetch the configuration for Solana like this:
Exit fullscreen mode
This should print out the configuration information. If so, you’re ready to get airdropped some SOL!
This is, of course, devnet SOL, but it’s still necessary to interact with the devnet. Run this command:
Exit fullscreen mode
When that is complete, you can run this command to verify your devnet wallet has the SOL:
Exit fullscreen mode
You should see that your devnet wallet has 2 SOL.
With all of the initial Solana and Metaplex installation and configuration done, we will move on to configuring out NFT drop.
Drop Configuration
This is the most important part of the entire drop, so you should read about it in full here. Metaplex uses a tool called Candy Machine for NFT drops like this, and it’s important to make sure your project is configured properly.
In the root of your project, create a JSON file called config.json . Then, enter a configuration like this:
Exit fullscreen mode
This may feel like a lot, but this is actually just the minimum configuration required. There’s a lot more you can add. Don’t worry, though. We’re keeping it simple. You only need to change five things in this file. The first change is to set the storage property to point to pinata.
Then, you need to decide if you are going to use a Pinata Dedicated Gateway or not. Doing so will give you and anyone who loads your NFTs the best possible performance. But, while recommended it’s not required. If you do decide to get a Dedicated Gateway, you’ll need to upgrade to the Professional Plan in Pinata.
Next, you need to get a JWT for Pinata API access. To do so, click the dropdown menu in the top-right, click API Keys, then generate a new API Key. You can either select specific endpoints the key should have access to (pinFileToIPFS) or you can make it an admin key which has full access. This is up to your security preferences, but the key must have access to pinFileToIPFS. You can read more about scoped API keys here.
When you’ve created your key a modal will display your API Key, API Secret, and your JWT. We only need the JWT, so copy that and paste it into the pinataJwt configuration file property’s value.
If you created a Dedicated Gateway, you can paste in your Dedicated Gateway’s URL in the pinataGateway section of the config file. If you did not upgrade and do not have a Dedicated Gateway, you should update that property to look like this:
Exit fullscreen mode
Finally, you just need to set the number of items in your NFT collection for the number property and the price in SOL for the price property.
That’s all you need. Now, there’s a lot more you can do, but I want to point out something that a lot of projects probably want to do, and that’s hide the NFT assets until after a reveal date. This is possible with Metaplex and Candy Machine with hidden settings. You can read about that here. We won’t be doing that in this tutorial. The NFT project in this tutorial will represent a mint with immediate reveal.
The final thing you’ll want to change in the config file is the solTreasuryAccount. This should probably point to your devnet wallet address, but it can be any Solana wallet address. To get your devnet wallet address, you can run this in the command line:
Exit fullscreen mode
We’re about ready to upload some assets and create our NFT contract!
Uploading To Pinata and Solana
We’ve finished all the prep work. It’s time to upload. Fortunately, this is really simple.
In the root of the project directory, run this command in the command line:
Exit fullscreen mode
This command will take your config file parse it so that Metaplex knows how to upload your files and how to get the NFT mint info onto Solana. You’ll see in your command line each upload of your asset folder’s metadata and your asset folders images. Depending on how many files you are uploading this process could take a long time.
When the process is done, you’ll need to do one more thing. You’ll need to verify the upload. This helps you know if everything is ready to go and if your NFTs can be minted. You just need to run this command:
Exit fullscreen mode
If all goes well, you should see a message that includes Ready to deploy!. This means your project is ready to go.
Your NFT drop is ready for minting! But what do we do now? You probably want to create a website to allow for minting. Fortunately, the Metaplex code base has us covered.
Creating a Minting App
Remember, we cloned the the full repository for Metaplex? We cloned that into our home directory. So, from your command line, let’s change to our home directory and into the metaplex project, directly into the sample React app:
Exit fullscreen mode
You’ll need to install the dependencies like this:
yarn install
Then, open the project in your code editor. You’ll see a .env file in that folder. You should update it to look like this:
Exit fullscreen mode
Remember, we used the Candy Machine ID to look up our project on the Solana Explorer? We are going to paste that same ID where is says YOUR CANDY MACHINE ID.
Now, you can run the app with:
Exit fullscreen mode
When the app load, you should see:
You will be able to choose a Solana wallet to connect with. Regardless of which wallet you choose, you’ll need to make sure it has some devnet SOL in it. Remember when we airdropped ourselves some devnet SOL? We can also do that with another address. Connect your wallet, make sure you’re on devnet, then copy the wallet address. From the command line run:
Exit fullscreen mode
Once this is complete, you should have SOL in your browser-based wallet and can now mint one of your new NFTs. To do so, just click the Mint button:
You’ll need to confirm the transaction. When you do so, the minting process should only take a few seconds. Once it’s complete, your new NFT should show up in your wallet’s NFT collection.
The image you see of your NFT is being loaded from Pinata. Depending on if you provided a Dedicated Gateway URL in your config file, the NFT is loading through your custom gateway or a public IPFS gateway. Note: If you provided a Dedicated Gateway URL in the config, your NFT asset will not only load quicker but will be cached so that all subsequent loads are instant. You can see this in the example below using Phantom Wallet. The two NFTs that are stuck loading are using a public IPFS gateway. The two that load almost instantly are loaded through a Dedicated Gateway.
Wrapping Up
The benefits of using IPFS for the storage of NFT assets are well-documented. IPFS offers quick retrieval (especially when using a Pinata Dedicated Gateway), IPFS offers content addressability, and IPFS is portable. Ownership of NFTs can transfer in both the token sense and the media sense.
However, it has not always been easy to use IPFS with Solana NFT projects. Hopefully, this tutorial helps change that. Hopefully, it can lead to more creative projects.
Happy pinning, and happy drop days!