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

Содержание
  1. Как пришла идея к созданию своей коллекции?
  2. Install Sugar​
  3. Mint a NFT​
  4. Deploy a Candy Machine​
  5. Candy Machine Collections​
  6. Выход на паблик
  7. Prerequisites
  8. Create a Config File​
  9. How to get NFT Mint Addresses
  10. Candy Machine V1
  11. Candy Machine V2
  12. Что мне для этого понадобилось?
  13. How to get the owner of an NFT
  14. Опустошение Candy Machine и выход на маркетплейс
  15. Candy Machine v2
  16. How to create a Candy Machine
  17. How to delete a Candy Machine
  18. How to find Candy Machine using wallet address
  19. How to find Candy Machine using its address
  20. How to find minted NFTs from a Candy Machine
  21. How to insert items into a Candy Machine
  22. How to mint an NFT from a Candy Machine
  23. Как деплоил нфт?
  24. Set Up Your Project​
  25. Creating the minting website
  26. День минта
  27. Tutorial Annotation as of September 17th, 2021
  28. Setting mint date
  29. Setup​
  30. Install the Solana CLI Tool Suite​
  31. Prerequisite Knowledge​
  32. Solana Wallet​
  33. Setting up a devnet wallet (for testing)​
  34. Funding your devnet wallet​
  35. Minting Our NFT
  36. What is a Metaplex Candy Machine?
  37. Verify Successful Deployment​
  38. Пролог
  39. How to create an NFT
  40. Upload to Arweave
  41. Mint the NFT
  42. How to Deploy Candy Machine v2
  43. 1. Install Metaplex Candy Machine v2
  44. 2. Set up a Solana Wallet
  45. 3. Configure Candy Machine
  46. 4. Prepare Your NFTs
  47. 5. Deploy the Candy Machine
  48. 6. Mint Tokens
  49. 7. Sign Mints
  50. 8. Set Up a Website
  51. Как создавалась данная коллекция?
  52. How to get all NFTs from a wallet?
  53. Guide Overiew

Как пришла идея к созданию своей коллекции?

Зима 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 видов зубов, которые в день генерации нфт в основную сеть были перерисованными ибо они не попадали под гуманоида

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

Install Sugar​

To install Sugar, simply copy and paste and run this command in your terminal:

This will download and run an install script from the Metaplex Sugar repo. The install script checks your OS and downloads the correct binary for it and installs it on your system PATH, so you can run the Sugar command from any directory on your system.

Output
Command line tool for creating and managing Metaplex Candy Machines.



-h, --help Print help information
-l, --log-level <LOG_LEVEL> Log level: trace, debug, info, warn, error, off
-V, --version Print version information

bundlr Interact with the bundlr network
collection Manage the collection on the candy machine
create-config Interactive process to create the config file
deploy Deploy cache items into candy machine config on-chain
freeze Commands for the Candy Machine Freeze feature
hash Generate hash of cache file for hidden settings
help Print this message or the help of the given subcommand(s)
launch Create a candy machine deployment from assets
mint Mint one NFT from candy machine
reveal Reveal the NFTs from a hidden settings candy machine
show Show the on-chain config of an existing candy machine
sign Sign one or all NFTs from candy machine
thaw Thaw an NFT or all NFTs in a candy machine
unfreeze-funds Unlock treasury funds after freeze is turned off or expires
update Update the candy machine config on-chain
upload Upload assets to storage and creates the cache config
validate Validate JSON metadata files
verify Verify uploaded data
withdraw Withdraw funds from candy machine account closing it

Mint a NFT​

Finally, to round off this tutorial we will mint an NFT from our candy machine to ensure it works as expected. Run:

to mint one NFT to your wallet address.

Output

Minting to PanbgtcTiZ2PveV96t2FHSffiLHXXjMuhvoabUUKKm8
▪▪▪▪▪ Signature: jAUVJv4ezyumvKYWvuEsMcDtWRujCK4xFL9q8MCe7PmDiVuAGHNY5PFGKUH5hY4PnqtGMyvDjX821xxCiGAChzQ

✅ Command successful.

Now you can open your wallet in an explorer like Solana Explorer and view the NFT you just minted by clicking on the «Tokens» tab.

Congratulations! You have successfully configured, created, and deployed your first candy machine!

Deploy a Candy Machine​

To create and deploy a candy machine, run the deploy command:

Output

✅ Command successful.

Once this finishes, if you open up the cache.json file again you will see that the candy machine values have been filled in as we now have a candy machine created on-chain.

Candy Machine Collections​

Setting or removing a collection for a Candy Machine will only impact NFTs that have yet to be minted. This will not change NFTs from your Candy Machine that have already been minted.

To set the collection for your Candy Machine, run the set_collection command:

ts-node ~/deprecated-clis/src/candy-machine-v2-cli.ts set_collection 



Successful output example:

wallet public key: bob1upX2AoA7HAHzDTPMcYhWWnYJeMJturpswReqqP4
(node:7714) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(node:7714) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
Candy machine address: 6KyiTBupdBKFRvppJFa7LHhNYyQet8uTci9PiMkb6Niw
Collection metadata address: 6KVxzViK7v3nMKJxsgTBCXoZAgWc7TPWUy5YszuPytDL
Collection metadata authority: bob1upX2AoA7HAHzDTPMcYhWWnYJeMJturpswReqqP4
Collection master edition address: 8uK5BmKsGYyngQ81iFbXkSdbhN2cN4NZCzyXH18k6sBg
Collection mint address: FyLAtLXi1UcyBNbmz6G9rcxT6Qg7HhoT9PsTitmkVsyE
Collection PDA address: 7ULQrCp4MWZ4dMoaGdY52cZucmq8vHJxpogFSJXK8ee1
Collection authority record address: BHkQpLrDPq6JBAzW8nMHVP9Hz4L6P1rqtXNhR8EEo2Jq

The -m option is the mint account of the collection NFT you want to set for your Candy Machine. This is the same account as the one you would see in mint/hash lists.

If you have already set a collection for your Candy Machine, you can also remove it with the remove_collection command:

ts-node ~/deprecated-clis/src/candy-machine-v2-cli.ts remove_collection 


Successful output example:

wallet public key: bob1upX2AoA7HAHzDTPMcYhWWnYJeMJturpswReqqP4
(node:14972) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(node:14972) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
Candy machine address: 6KyiTBupdBKFRvppJFa7LHhNYyQet8uTci9PiMkb6Niw
Authority address: bob1upX2AoA7HAHzDTPMcYhWWnYJeMJturpswReqqP4
Collection PDA address: 7ULQrCp4MWZ4dMoaGdY52cZucmq8vHJxpogFSJXK8ee1
Metadata address: 6KVxzViK7v3nMKJxsgTBCXoZAgWc7TPWUy5YszuPytDL
Mint address: FyLAtLXi1UcyBNbmz6G9rcxT6Qg7HhoT9PsTitmkVsyE
Collection authority record address: BHkQpLrDPq6JBAzW8nMHVP9Hz4L6P1rqtXNhR8EEo2Jq

Выход на паблик

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

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

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

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

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

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

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

Prerequisites

If you have a different version of Node installed on your system, you can use nvm which allows you to quickly install and use different versions of node via the command line.

Create a Config File​

The config file tells Sugar how to configure your candy machine with values such as number of assets, what creators to use, what settings to apply, etc. To create a config file we are going to use the Sugar create-config interactive command.

Про NFT:  Гбпоу мо нфт официальный сайт

We will now get a series of questions we need to answer to set up our config file.

? What is the price of each NFT? ›
? Found 10 file pairs in "assets". Is this how many NFTs you will have in your candy machine? (y/n) ›

This is the number of NFTs we are configuring our candy machine to mint and must match the number of asset pairs we have in our assets directory. In this case, Sugar has detected we have 10 asset files pairs, so we can simply input y to confirm this is correct.

? Found symbol "TEST" in your metadata file. Is this value correct? (y/n) ›

Sugar has detected the symbol for our NFT from our assets files so once again we can just input y to confirm this is correct.

? What is the seller fee basis points? ›

The seller fee basis points is the amount of royalty we want to charge on secondary sales (all sales after the candy machine minting). Basis points are percentage times 100, so e.g. 500 basis points is 5%, and 150 is 1.5%. Input the value you wish to use for this and press «enter» to go to the next step.

The candy machine «go live date» is when the candy machine becomes active and minting from it is allowed. We can either input a date here in the format specified or we can input «now» for the current time. Input «now» and hit enter to go to the next step.

? How many creator wallets do you have? (max limit of 4) ›

Here we enter the number of creators who are part of this project and who we want to receive royalties from secondary sales. For this tutorial we will use one creator so input «1» and press enter.

? Enter creator wallet address #1 ›

Now we need to provide the Solana wallet address for each creator. In this case, we only have one creator, and we are going to use our own address for that creator, so we can run solana address in a separate terminal window to retrieve the address of the wallet we configured in a previous step. Input this value and press enter.

We only have a single creator, so we put in 100 here.

✔ SPL Token Mint
✔ Whitelist Mint
✔ End Settings
✔ Hidden Settings
✔ Freeze Settings
? What is your SOL treasury address? ›

Once again we will use the address of our keypair set in the Solana config in a previous step. If you have it handy you can enter it here, otherwise, you can run solana address again in a separate window to retrieve it.

? What upload method do you want to use? ›
? Do you want to retain update authority on your NFTs? We HIGHLY recommend you choose yes. (y/n) ›

This is an advanced setting and lets us give away update authority to the owner of each NFT individually, but we do not recommend doing this initially as it will prevent you from fixing any mistakes you make in your candy machine after NFTs are minted. Select yes for this case by inputting y.

? Do you want your NFTs to remain mutable? We HIGHLY recommend you choose yes. (y/n) ›

Similarly, we recommend leaving your NFTs as mutable so you, the update authority, can fix any issues post-mint. You can always set your NFTs to be immutable later using a third-party tool such as Metaboss, but this is a one way street: once set immutable, you can never make them mutable again. Input y to select yes and leave your NFTs mutable.


Saving config to file: "config.json"

Successfully generated the config file. 🎉

✅ Command successful.

Open up the generated file, config.json, in your favorite text or code editor (e.g. VS Code). You should see a file similar to this:

  "11 Aug 2022 18:19:16 +0000"

Your values will be different depending on and what you input for various settings.

In this step, we will upload all our assets file pairs to Arweave via Bundlr.

Sugar currently supports four upload methods: Arweave via Bundlr, IPFS via NFT Storage, Shadow Drive and AWS.

Output
Found 10 asset pair(s), uploading files:

-> pubkey: PanbgtcTiZ2PveV96t2FHSffiLHXXjMuhvoabUUKKm8
-> lamports: 5939049 (◎ 0.005939049)


Sending data: (Ctrl+C to abort)


Sending data: (Ctrl+C to abort)

10/10 asset pair(s) uploaded.

✅ Command successful.

Sugar commands are designed to be robust and commands such as upload and deploy will pick up where they left off when you run them again. You may occasionally get an error such as:

In such cases it’s safe to rerun the command until it succeeds.

However, some upload methods such as Bundlr, do cost funds to upload and store the data. If you successfully upload your data and then run it again, it will charge you again. If you do this repeatedly with a large amount of data it can cost you a significant amount of SOL. Once you have successfully uploaded your data you should not have to do it again, as the cache file will store all the links to the data. Ask on the Metaplex Discord if you run into any unexpected issues.

When uploading is finished, sugar will have created a cache.json file in our project directory. Open this file, and you will see something similar to:

Output
  "Studious Crab #1"
"Studious Crab #2"
"Studious Crab #3"
"Studious Crab #4"
"Studious Crab #5"
"Studious Crab #6"
"Studious Crab #7"
"Studious Crab #8"
"Studious Crab #9"
"Studious Crab #10"

Each asset from our assets directory has been uploaded to Arweave and a link to it stored in the cache file. You can open one of these links in the browser to see what this looks like. Within the data in the metadata link, there is another link to the image. Both of these links are stored for each item in the cache file.

If you look at the candy machine values at the top, you’ll see they are empty because we have not actually created a candy machine yet. We will do that next.

How to get NFT Mint Addresses

Candy Machine V1

Press </> button to view full source

 Connection clusterApiUrl PublicKey bs58 connection candyMachineId firstCreatorAddress PublicKey metadataAccounts connection // The mint address is located at byte 33 and lasts for 32 bytes. dataSlice offset length filters // Only get Metadata accounts. dataSize // Filter using the first creator. memcmp offset bytes firstCreatorAddress metadataAccountsmetadataAccountInfo bs58metadataAccountInfoaccountdata
candyMachineId

Candy Machine V2

If you’re using a Candy Machine v2, you’ll first need to access its «Candy Machine Creator» address which is a simple PDA using candy_machine and the Candy Machine v2 address as seeds. Once you have the creator address, you can use it the same way we were for v1.

Press </> button to view full source

 Connection clusterApiUrl PublicKey bs58 connection candyMachineId firstCreatorAddress PublicKey metadataAccounts connection // The mint address is located at byte 33 and lasts for 32 bytes. dataSlice offset length filters // Only get Metadata accounts. dataSize // Filter using the first creator. memcmp offset bytes firstCreatorAddress metadataAccountsmetadataAccountInfo bs58metadataAccountInfoaccountdata getCandyMachineCreator candyMachine PublicKey PublicKey PublicKey Buffer candyMachine candyMachineCreator candyMachineId candyMachineCreator

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

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

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

How to get the owner of an NFT

If you have the mint key of an NFT, you can find its current owner by sneak-peeking at the largest token account for that mint key.

Remember that NFTs have a supply of 1, and they are indivisible, meaning that only one token account will hold that token at any point in time, whilst all other token accounts for that mint key will have a balance of 0.

Once the largest token account is identified, we can retrieve its owner.

Press </> button to view full source

 Connection PublicKey connection tokenMint largestAccounts connection tokenMint largestAccountInfo connection largestAccountsvalueaddress largestAccountInfovaluedataparsedinfoowner 

Опустошение Candy Machine и выход на маркетплейс

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

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

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

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

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

Про NFT:  Разблокировка NFT-адреса: основные платформы и шаги для начала

Вот такая получилась статья, возможно она вам поможет!

Candy Machine v2

Metaplex JS SDK now supports creating and updating Candy Machine v2 via code. It enable the developers to interact with the Candy Machine v2 program and create, update, and delete Candy Machines as well as mint NFTs from them.

How to create a Candy Machine

Press </> button to view full source

 keypairIdentity Metaplex sol toBigNumber Keypair Connection connection payer Keypair // request airdrop airdropSignature connection payerpublicKey // creating metaplex instance with payer as the authority metaplex Metaplexconnectionpayer // creating a candy machine candyMachine metaplex sellerFeeBasisPoints // 0.05% royalties price // 0.0001 SOL itemsAvailable // 5 items available 

How to delete a Candy Machine

Press </> button to view full source

 Metaplex keypairIdentity sol toBigNumber Connection Keypair connection payer Keypair // request airdrop airdropSignature connection payerpublicKey // creating metaplex instance with payer as the authority metaplex Metaplexconnectionpayer // creating a candy machine candyMachine metaplex sellerFeeBasisPoints // 0.05% royalties price // 0.0001 SOL itemsAvailable // 5 items available // deleting the candy machine response metaplex candyMachine 

To find all the Candy Machines whose authority is a certain public key, we have use the findAllByopen in new window function along with the type parameter as authority

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection authority candyMachines metaplex type publicKey authority candyMachinescandyMachine index /** * #1 Candy Machine ID - HSZxtWx6vgGWGsWu9SouXkHA2bAKCMtMZyMKzF2dvhrR */

How to find Candy Machine using wallet address

To fetch the Candy Machine object via its wallet address, we have use the findAllByopen in new window function along with the type parameter as wallet. You can get the wallet address of the Candy Machine from the «Anchor data» tab in the explorer.

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection wallet candyMachines metaplex type publicKey wallet candyMachinescandyMachine index /** * #1 Candy Machine ID - HSZxtWx6vgGWGsWu9SouXkHA2bAKCMtMZyMKzF2dvhrR */

How to find Candy Machine using its address

To find a Candy Machine using its address, we have to use the findByAddressopen in new window function.

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection candyMachineId candyMachine metaplex address candyMachineId 

How to find minted NFTs from a Candy Machine

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection candyMachineId candyMachine metaplex candyMachine candyMachineId 

How to insert items into a Candy Machine

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection candyMachineId metaplex candyMachineId items name "My NFT #1" uri name "My NFT #2" uri name "My NFT #3" uri 

How to mint an NFT from a Candy Machine

By default, the owner of the minted NFT would be metaplex.identity().publicKey. If you want to mint the NFT to some other wallet, pass that public key along with the newOwner parameter

Press </> button to view full source

 Connection PublicKey Metaplex connection metaplex connection candyMachineId // by default, the owner of the minted nft would be `metaplex.identity().publicKey`. if you want to mint the nft to some other wallet, pass that public key along with the `newOwner` parameter candyMachine metaplex candyMachine candyMachineId // newOwner: new PublicKey("some-other-public-key"); 

Как деплоил нфт?

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

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

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

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

Set Up Your Project​

Next we are going to set up a simple project directory with some example assets which you can download from here. Extract the zip file and rename the folder to ‘assets’.

We will run all our Sugar commands from within the project directory and Sugar will create our config and cache files in that directory. If we do this, we can elide the cache and config files from our commands as Sugar will look in the current directory for config.json and cache.json files.

Creating the minting website

Go to metaplex/js/packages/candy-machine-ui . You’ll see a file named .env.example . Delete the .example part so that the file would be named .env . Now, here, go to the .cache folder in the root directory and open the devnet-temp.json file. Just around the beginning of that JSON file, you’ll see the value of your candyMachine .Copy that and past is your REACT_APP_CANDY_MACHINE_ID value.

Since we’re going to be on the devnet, we’ll not change anything. If it was mainnet, we’d have to specify that.

Now to go metaplex/js/packages/candy-machine-ui/src and open the index.tsx file. You’ll see the file contents as:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import reportWebVitals from './reportWebVitals';
import './index.css';
ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root'),
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

Enter fullscreen mode

Exit fullscreen mode

ReactDOM.render(<App />, document.getElementById('root'));

Enter fullscreen mode

Exit fullscreen mode

yarn install && yarn start

And that’s it! Your NFTs are now ready to be minted.

День минта

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

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

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

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

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

Tutorial Annotation as of September 17th, 2021

Screen Shot 2021-09-17 at 7.15.48 PM

The only thing I would note about the top instructions is, I would also run

brew install jq

Enter fullscreen mode

Exit fullscreen mode

The yarn run package:macos build step did not work for me. I had to run:

npx pkg . -d --targets node14-macos-x64 --output bin/macos/metaplex

Enter fullscreen mode

Exit fullscreen mode

Next I used zsh and my path is /usr/local/bin so my command was

 cp bin/macos/metaplex /usr/local/bin

Enter fullscreen mode

Exit fullscreen mode

Screen Shot 2021-09-17 at 7.28.49 PM

I created a folder called assets in a random directory. I then added 5 images and 5 .json files. Here is my json file from 0.png

                                          

Enter fullscreen mode

Exit fullscreen mode

Now it’s my understanding that matrix replaces the url once you upload. The parts that matter are seller_fee_basis_points and creators. I’m not totally sure what is required, but this was a good read about the metadata file.

Next I verified all the properties they were looking for. This is where brew install jq is helpful. Lastly I just cd into assets directory so my final command was:

metaplex upload . --env devnet --keypair ~/.config/solana/devnet.json

Enter fullscreen mode

Exit fullscreen mode

The articles mentions multiple errors, I did not get any. Next we need to look at our cache file to grab the config id:

code .cache/devnet-temp

Enter fullscreen mode

Exit fullscreen mode

I would then give it a few minutes. The article says to call a metaplex verify but that cannot be done without a create candy machine. To create one in my terminal I run

metaplex create_candy_machine --keypair ~/.config/solana/devnet.json

Enter fullscreen mode

Exit fullscreen mode

And it returns: candy machine pubkey. Keep this value close.



Setting mint date

To set the mint date you need to pass in a date string. I learned this by running metaplex update_candy_machine -h

Metaplex update options

Now we have all the necessary values set, we need to head over to our .env file on our frontend.

// from .cache/devnet-temp
// config value
REACT_APP_CANDY_MACHINE_CONFIG=
// return value from create_candy_machine
// candy machine pubkey
REACT_APP_CANDY_MACHINE_ID=
// I just put my solana wallet address?
REACT_APP_TREASURY_ADDRESS=
// unix date
// 1631923920
REACT_APP_CANDY_START_DATE=1631923920
REACT_APP_SOLANA_NETWORK=devnet
REACT_APP_SOLANA_RPC_HOST=https://explorer-api.devnet.solana.com

Enter fullscreen mode

Exit fullscreen mode

I didn’t include quotes with my values. After all of this you should be able to Yarn Start and be able to connect your wallet.

Hope this helps someone!

Setup​

This tutorial targets macOS, Linux, and Windows Subsystem Linux (WSL), but all commands and screenshots are from a macOS system. It should work on any of those three systems. For installing on Windows see the Windows method on the installation page.

Install the Solana CLI Tool Suite

The Solana CLI Tool Suite is useful to have for Solana development, and we will use the config file to store our keypair file path and RPC node url to simplify the Sugar commands we run, by eliding those options.

Once finished, come back here to resume the tutorial.

Prerequisite Knowledge​

  • You should have a basic understanding of how to find and use a terminal on your OS, including navigating directories, and running commands: an example of a terminal for macOS is iTerm2.
  • You should have basic familiarity with what Solana is but don’t need advanced technical knowledge.
  • You should have basic familiarity with the Metaplex Standard but, again, do not need advanced technical knowledge.

Solana Wallet​

output: solana-cli 1.9.1

You can check your wallet address:

and your balance:

output: 4 SOL

We highly recommend trying to first deploy a Candy Machine on Solana devnet, before moving to the mainnet-beta environment. This way you can freely test different settings without having to move SOL to your wallet.

In this guide we will use devnet, although all commands presented will work in a similar fashion once you are in mainnet-beta.

Setting up a devnet wallet (for testing)

The steps described here will create a wallet to be used in the Solana devnet environment. In normal circumstances you would redact your mnemonic, store it somewhere safe and take advantage of the --outfile flag.

Про NFT:  Погрузитесь в мир Hydraverse NFT: путешествие для новичков

To create a new wallet, we will use the solana-keygen command:

solana-keygen new --outfile ~/.config/solana/devnet.json
Output
Generating a new keypair

For added security, enter a BIP39 passphrase

NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text

BIP39 Passphrase (empty for none):

Save this seed phrase and your BIP39 passphrase to recover your new keypair:
## REDACTED ##

The next step is to make this our default keypair:


and make sure we are on the devnet:

If all the above steps are successful, your configuration be similar to:

Output
Config File: ~/.config/solana/cli/config.yml
WebSocket URL: wss://metaplex.devnet.rpcpool.com/ (computed)
Keypair Path: ~/.config/solana/devnet.json

Funding your devnet wallet

In order to add SOL to your devnet wallet, you can request funds from a faucet:

Output
Requesting airdrop of 2 SOL


If the command is successful, you will see the updated balance at the end. Make sure you are entering the airdrop amount that is within the airdrop limit. Currently, the maximum airdrop request limit is 2 SOL and there is a daily total limit of 24 SOL.

Do not send real SOL to a devnet wallet.

Minting Our NFT

To mint our NFT, we can use mint_one_token like so:

$ ts-node metaplex/js/packages/cli/src/candy-machine-cli.ts mint_one_token --env devnet --keypair ~/.config/solana/devnet.json

Enter fullscreen mode

Exit fullscreen mode

If all goes well, you can now open your phantom wallet, open the collectibles page (It’s beside the $ symbol on the bottom) and voila! Your newly minted NFT will be there!

What is a Metaplex Candy Machine?

Metaplex is a command line tool that interacts with the candy-machine program. In this guide, we will use it to:

  1. Upload your images along with their metadata to arweave, then register them on the Solana blockchain.
  2. Verify that the state of your candy machine is valid and complete.
  3. Mint individual tokens.

Candy Machine is a system that manages fair mints.
• The minting process starts and finishes at the same time for everyone.
• It won’t accept your funds if there are no more NFTs to sell.

Verify Successful Deployment​

Once the deployment finishes, we can verify successful deployment with:

Output

Verification successful. You’re good to go!

✅ Command successful.

Our candy machine is now successfully deployed!

Пролог

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

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

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

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

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

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

How to create an NFT

To create an NFT you have to:

  1. Upload the image to IPFS like Arweave
  2. Upload the json metadata to IPFS like Arweave
  3. Call metaplex to create an account for the NFT

Upload to Arweave

Press </> button to view full source

 fs Arweave arweave Arweave host port protocol timeout logging // Upload image to Arweave data fs transaction arweave data data transaction wallet fs arweavetransactionstransaction wallet response arweavetransactionstransaction response id transactionid imageUrl id imageUrl // Upload metadata to Arweave metadata name "Custom NFT #1" description "A description about my custom NFT #1" seller_fee_basis_points external_url attributes trait_type value collection name family properties files uri imageUrl type category maxSupply creators address share image imageUrl metadataRequest metadata metadataTransaction arweave data metadataRequest metadataTransaction arweavetransactionsmetadataTransaction wallet metadataTransactionid arweavetransactionsmetadataTransaction
 arweavearweave_lib Wallet Transaction API_URL json# Load your arweave walletyour_ar_wallet Wallet f img_in_bytes fread# Upload image to Arweavetransaction Transactionyour_ar_wallet dataimg_in_bytes
transactionadd_tag
transactionsign
transactionsend
image_url API_URLtransaction# Define metadatametadata "Custom NFT #1" "A description about my custom NFT #1" image_url image_url# Upload metadata to Arweavemeta_transaction Transactionyour_ar_wallet datajsondumpsmetadata
meta_transactionadd_tag
meta_transactionsign
meta_transactionsend
metadata_url API_URLmeta_transaction
metadata_url

Mint the NFT

Press </> button to view full source

 Metaplex keypairIdentity Connection clusterApiUrl Keypair dotenv
dotenv connection keypair Keypair Bufferprocessenv metaplex connection metaplexkeypair feePayerAirdropSignature connection keypairpublicKey connectionfeePayerAirdropSignature mintNFTResponse metaplex uri maxSupply mintNFTResponse

You cannot mint an NFT with a different creator than your wallet. If you run into creator issues, make sure your metadata lists you as the creator.

Metaplex NFTs have metadata that is stored on Arweave. In order to get the Arweave metadata, you must get the Metaplex PDA and decode the account data.

Press </> button to view full source

 Metaplex keypairIdentity Connection clusterApiUrl Keypair PublicKey connection keypair Keypair metaplex connection metaplexkeypair mint nft metaplexmint nftmetadata 

How to Deploy Candy Machine v2

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

2. Set up a Solana Wallet

3. Configure Candy Machine

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

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.

Как создавалась данная коллекция?

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

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

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

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

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

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

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

How to get all NFTs from a wallet?

When getting all NFTs from a wallet, you’ll need to get all token accounts and then parse which ones are NFTs. This can all be done using findDataByOwneropen in new window from the Metaplex JS library.

Press </> button to view full source

 Metaplex keypairIdentity Connection clusterApiUrl Keypair PublicKey connection keypair Keypair metaplex connection metaplexkeypair owner allNFTs metaplexowner allNFTs

Guide Overiew

After what felt like walking through a mine field trying to figure out how to create my own NFT on Solana with the current guides, I decided to put together a guide myself in a very beginner friendly fashion.

I won’t be taking a deeper dive into the specifics of how everything works, but rather help people with zero knowledge of rust obtain a general understanding on how to create their very own NFT on Solana with the help of Metaplex candy machine and a web starter kit.

Note: I used Ubuntu 21.10 — Wayland for it. Some things may vary depending on the operating system you are running.

Оцените статью
NFT Эксперт