How to create an NFT Launchpad on Solana (Part 1) | by Team Shyft | | Feb, 2023 | Medium

How to create an NFT Launchpad on Solana (Part 1)

An NFT Launchpad is essentially an NFT Candy Machine used to mint and distribute NFT collections. Creators planning to launch large-scale NFT collections, without being involved with the complexities of setting up a candy machine can use an NFT launchpad.

Suppose you are a digital creator and want to launch your own NFT collection with 100+ NFTs. Minting them one by one can be tedious and mundane as they have a lot of common values, such as the creators, or the collection id. Solana offers a solution for minting multiple NFTs at once which is known as an NFT Candy Machine.

An NFT Candy Machine (abbreviated as CM) is an automated minting tool on Solana designed to create and distribute NFTs. This is very analogous to a real-world candy machine in which a lot of candies are stored, and these candies can be retrieved once we insert some coins or currency inside them. Most artists or creators aiming to launch NFT collections use automated minting tools like the candy machine.

NFT Launchpad — A CM Application.

Candy Machines are designed for large-scale NFT collection minting purposes. All NFTs in a collection contain a few common attributes such as the creator information, collection ID, etc, and other unique attributes such as the name, symbol, image, etc. Candy machines reduce the overhead of setting the individual details of each NFT as they can be pre-configured so that the common attributes can all be applied at once.

However, setting up a candy machine can be quite a hassle, especially for creators who are not familiar with the complexities and the steps involved. As an alternative, creators can either refer to third-party NFT launchpad services or can set up their own NFT launchpad using SHYFT APIs .

Read SHYFT API Documentation here .

Setting up a launchpad — Steps involved.

An NFT launchpad essentially involves setting up a candy machine that can mint and distribute NFTs in a safe and trustworthy manner, without being involved with the underlying complexities of setting up a candy machine. This is where SHYFT APIs are favorable. SHYFT provides an API-based solution for setting up , loading , unloading , and monitoring an NFT Candy Machine . No prior knowledge of the underlying details is required.

The first step for creating an NFT Launchpad is setting up a candy machine. Candy machines can be preconfigured according to the NFTs to be minted. Once this is done, we are ready to load the Candy machine with NFTs that will be minted. The final step is unloading the candy machine by the buyers of the NFT. Now let’s find out how we can do all of this using SHYFT APIs.

Before getting started.

To get started, we will need a few things.

Phantom Wallet.

We will need the Phantom wallet browser extension, you can download it from the link below.

Once done, set up your Phantom wallet account. On-screen tips are available, which will guide you through setting up and getting started. You can also find a detailed guide related to this here.

Authentication: Getting your Shyft API key.

x-api-key is an authentication parameter, which gives you access to SHYFT APIs. You can get your own API Key from the SHYFT website. Just signup with your email id here and you can get it for free.

Setting up a Candy Machine (v3)

As we know an NFT candy machine requires an initial configuration with the common attributes of the NFTs to be minted. ***SHYFT provides a one-step API-based solution for creating a candy machine.***

POST.

This API accepts the x-api-key parameter in the header, which is an authorization parameter used by SHYFT for validating its users. You can get your own x-api-key from the SHYFT website for free here . The Content-Type for this API request is application/json.

Parameters for this API call.

network : Select the Solana network cluster, which can be either devnet , testnet or mainnet-beta . The Candy machine will be created on this network. wallet : The public key of the Candy Machine creator. This wallet will be responsible for signing transactions while creating the candy machine, in the later part of this article. symbol : Accepts the symbol for NFTs that are to be minted from this Candy Machine. max_supply : The maximum number of edition NFTs that can be minted from each NFT individually minted NFT. If set to 10, each NFT minted from the CM can have 10 editions. If set to -0, all the NFTs minted will be one-of-a-kind. royalty : The secondary sale royalties to be set on minted NFT eg. 300 will give a 3% royalty to the creator. collection : Address of the collection to which the NFTs minted from the CM will belong. items_available : Total number of tokens that can be minted from the candy machine. amount : The amount which has to be transferred to the Candy Machine owner on each mint in SOL. creators (optional): Array of creators, default is creator address with 100% share. This has to be specified in a specific format as mentioned below. And the first creator in this array will only be the verified creator.

[ “address”: “7iviPE2HZ15QCvHHCm8QzYdXKt9qReeT5P4aqSRAp7oY”, “share”: 100 > ]

item_settings (optional): Config for each token that is minted from the candy machine.

prefix_name: ‘My token BYAC’ // String, name set for all the tokens name_length: 32 // Number, max length for each token name excluding prefix_name length prefix_uri: ‘https://some.uri/abc/path’ // String, metadata path prefix for each token minted from candy machine uri_length: 12 // Number, max length for each token metadata uri excluding prefix_uri length is_sequential: false // Boolean, should candy machine mint tokens by the order in which they are inserted >

To know more about the parameters of this API call, please refer to our dev docs here.

Once successfully executed the API returns the encoded transaction and the newly created candy machine address.

“success”: true, “message”: “Created a candy machine”, “result”: “encoded_transaction”: “AgAAAAAAAAAAAAAAAAAAAAAAAAA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dkqnhk64uMcHPWviZnSREEE”, “signers”: [ “7iviPE2HZ15QCvHHCm8QzYdXKt9qReeT5P4aqSRAp7oY” ] > >

This encoded transaction received requires a signature from the wallet whose public key is mentioned in the wallet field of the API request parameter. When you loved this article and you wish to receive more information with regards to NFT assure visit the web page. To know about Signing Transactions on Solana, you can follow our dev guide here , NFT or you can also check our GitHub repo for all the functions required to sign encoded transactions. Once signed successfully, the Candy Machine (v3) with the preconfigured settings will be created.

In the next part of this series, cryptocurrency we will see how we can load and unload NFTs from the Candy Machine using SHYFT APIs. Stay Tuned!

Leave a Reply