How to create a Marketplace and NFTs on Metaplex?

The world of NFTs is growing exponentially with the inception of new projects every day. Still, finding a way to be part of this phenomenon can seem daunting at first. Metaplex comes into play to simplify this process and offer a stable, user-friendly platform for individuals and their projects.

This tutorial will give you an in-depth understanding of the creation process, its customization, and the creation and sale of your NFTs.

Prerequisites for the creation a marketplace

To create it you first need:

The creation process

First, please follow the steps mentioned thereafter carefully, not to make any mistakes. It is possible that parts of the process have changed since the publication of this tutorial.

Fork the Metaplex repository

Fork the Metaplex Repo

Log in to Github and go to the Metaplex repository at this web address. Once you are there, click the “Fork” button in order to generate a Repository on your Github account.

Clone the Repository

Open Visual Studio Code and open a new terminal by following these steps:

  1. Terminal
  2. New terminal
Open a new terminal

In the terminal, and from your local development folder, do as follows:

  1. Copy this command : git clone https://github.com/yourusername/metaplex.git
  2. Replace « yourusername » with your Github handle and press “Enter”.
Clone the Repository

Once the Repository is cloned, open the corresponding folder in Visual Studio Code.

Change the marketplace wallet address

To do this, you need a Solana address. If you don’t have one, we recommend using the Phantom extension to get one. Feel free to check out this tutorial “How to use Phantom” to learn more about this tool.

Once this Solana address is created, follow these next steps:

  1. Go to the Visual Studio Code folder menu
  2. Open the file named ‘js/packages/web/.env’
  3. Once opened, paste your address on the first line after the “=” symbol and save by pressing “ctrl+S”
Change the wallet address

Change the deployment address

  • Without a custom domain name

Open the file named ‘js/packages/web/package.json’. Here, spot the two following lines:

Change the deployment address

There will then be two things to change:

  1. Specify the URL of your Repository instead of “https://github.com/metaplex-foundation/metaplex”. For instace “https://github.com/my-name/my-metaplex”.
  2. Set ASSET_PREFIX to the name of your Repository (for example, ASSET_PREFIX=/my-metaplex/)

If it all went well and no mistakes were made, the lines should look as follows:

Result of the deployment address change – without a custom domain name
  • With a custom domain name

In case you own a domain name and wish for it to lead to your marketplace, the deployment address change is done similarly to the previous section, except that you’ll need to erase the ASSET_PREFIX part of the second line. You should therefore have the code lines look like this:

Result of the deployment address change – with a custom domain name

In the case of a custom domain name:

  1. Create a new file named CNAME in this folder: ‘js/packages/web/public’.
  2. You then simply need to type your domain name in this file and save it.

Building and deployment

After completing the previous actions, the building and deployment of your code is an important phase.

If you encounter any errors during this process, please refer to the following section of the tutorial.

  • Possible error messages and solutions

At this point, please launch the following commands in the terminal successively:

  1. cd js
  2. yarn

When the dependencies are downloaded to your computer, you can check that everything is fine by executing the “yarn bootstrap” command.

Result of the “yard bootstrap” command

After checking that the command was executed successfully, launch the “yarn build” command.

Result of the “yarn build” command

After creating your “build”, execute the two following commands in order to deploy it:

  1. cd packages/web
  2. yarn deploy

After executing these, here are the steps to follow:

  1. Go back to Github
  2. Access your Repository
  3. Go to the Settings section
  4. Click on Pages to get the URL of your marketplace

If you chose to use a custom domain name, your marketplace will be accessible through this domain name.

To finalize the creation of your marketplace, please do as follows:

  1. Access your marketplace
  2. Log in to your wallet
  3. Click on “Init Store”
  4. Confirm the transaction
Finalization of the marketplace

Note:
Before you actually make your marketplace live, you can test it works correctly by initializing it on the devnet.

To do this:

  1. Click on the logo at the top-right of the screen
  2. Click on “mainnet-beta”
  3. Select the devnet
  4. Click on « Init Store » and confirm the transaction.

You need $SOL on the devnet to do this.

Marketplace initialization on the devnet

Customize your Metaplex marketplace

In this part, we will go into customization elements of your marketplace, notably how to do the following:

  • Add information about sellers on your marketplace
  • Add sellers or make your marketplace public
  • Change the title of your marketplace
  • Add its name to the navigation bar

Add information about sellers on your marketplace

You have the possibility to add information about the sellers (or creators) who use your marketplace, by adding for each of them a name, profile picture, and bio.

Here are the steps to follow to do this:

  1. Open the file named ‘js/packages/web/src/config/userNames.json’.
  2. In it, add the information about your sellers while carefully respecting the format of objects already present in the file.
Add information about sellers on your marketplace

After adding the relevant information, save the file by pressing “Ctrl+S“. Then, make sure you are in the ‘js’ folder in the terminal and execute the following commands:

  1. yarn build
  2. cd packages/web
  3. yarn deploy

Once this is done, go back to your marketplace and refresh the page while pressing the “shift” key. Your modifications should now appear.

Result after adding a seller’s name and profile picture

Add sellers or make your marketplace public

You can choose whether or not your marketplace will be public, which would mean that anyone can sell on it without a need for your permission.

On the contrary, if you decide to work with a whitelist, you’ll need to manually add the addresses of sellers who are authorized to sell on your marketplace.

To set this up, follow these steps:

  1. Go to ‘YOUR_URL/#/admin’ by replacing “YOUR_URL” with the URL of your marketplace.
  2. You’ll then have access to your marketplace’s administration panel.
Administration panel

Here, you can choose to make your marketplace public or not using the button at the top-right of the panel.

Public / Whitelist marketplace

In the case of a whitelist marketplace, you will need to manually add your sellers by clicking on the “Add Creator” button.

Add a seller in the case of a whitelist marketplace

Don’t forget to click “Submit” to confirm your modifications.

Change the title of your marketplace

You are able to change the marketplace title that is displayed in the tab of your browser. By default this is the title that appears:

Default marketplace title

Here’s how to change it:

  1. Open the file named ‘js/packages/web/src/pages/_app.tsx’.
  2. Change the following line by replacing “Metaplex NFT Marketplex” with the desired title.
Change the title of your marketplace

Once the title is changed, save by pressing “Ctrl+S“. Then, make sure you are in the ‘js’ folder and execute the following commands:

  1. yarn build
  2. cd packages/web
  3. yarn deploy

Once this is done, go back to your marketplace and refresh the page while pressing the “shift” key. The modification should now appear.

Add the name of your marketplace to the navigation bar

Lastly, you can add the name of your marketplace in the navigation bar. Here is the bar in question:

Default navigation bar

Pour la modifier, effectuez les étapes suivantes :
Here is how to change it

  1. Open the file named ‘js/packages/web/src/components/Notifications/index.tsx’.
  2. Modify the following line by replacing “M” with the name of your marketplace.
Add the name of your marketplace to the navigation bar

Once the name is changed, save by pressing “Ctrl+S“. Then, make sure you are in the ‘js’ folder and execute the following commands:

  1. yarn build
  2. cd packages/web
  3. yarn deploy

Once this is done, go back to your marketplace and refresh the page while pressing the “shift” key. The modification should now appear.

Navigation bar after the name was changed

Create and sell your NFTs

Now we have seen how to create a marketplace on Metaplex, all that is left is for you to know how to add content to it. You have the possibility to transform your works into NFTs and sell them directly on your marketplace.

Create your NFTs

Go to your marketplace and log in to your wallet. We recommend the use of Phantom in this regard. Once again, you can read more about this software in this tutorial: “How to use Phantom”.

Once logged in to your wallet, you’ll see two buttons on the righthand side: “Create” and “Sell“. The first allows you to mint NFTs and the second to sell them through the creation of an auction.

To generate an NFT, first click on “Create” and choose the type of NFT you wish to make in the list that appears.

Types of NFTs available on Metaplex

Upload your creation or enter the link to it, then click on “Continue to mint”.

Upload your creation

You now have to describe your creation by adding a title, description, supply maximum (the maximum quantity that can be created), as well as attributes. Once this is done, click on “Continue to royalties“.

You can now add a royalties percentage to your NFT. This percentage corresponds to the amount you will earn each time your creation is sold in the future on the secondary market. You may also split these royalties between several creators if you wish. To do this, click on “Add another creator” and indicate the creator in the list. Lastly, click on the “Continue to review” button.

Set royalties

All you have left to do is check the information, click on “Pay with SOL“, and accept the transaction.

There you go, your NFT has been created!

You created an NFT

Sell your NFTs

Now that your NFTs are created, it is time to sell them.

Here are the steps to follow in order to do this:

  1. Log in to your wallet
  2. Click on the “Sell” button
  3. Choose the type of sale you wish to go with

The different types of sales available are as follows:

  • Limited Edition : In the case of a “Limited Edition” auction, a Master Edition NFT (which does or does not have a limited maximum supply) is auctioned with a number of copies corresponding to the number of winning spots. For each winning spot, a drawing number (called Print) is minted in the order of the spot in question, and attributed to the corresponding winner. For instance, in the case of an auction with 10 winning spots, the first winner gets NFT n°1/10, the second one NFT n°2 and so on.
  • Open Edition : In the case of an “Open Edition” auction, the Master Edition NFT that is sold does not have any maximum supply. Any person who places a bid during the sale gets an NFT.
  • Tiered Auction : A “Tiered Auction” can be a mix of the three other types of auctions. For instance, the winner of the first spot could get a limited edition NFT A, whereas the one placed second could get a normal NFT drawing, and so on. Furthermore, any participant who didn’t get a spot could get a participation NFT prize from the main edition (if the Master Edition does not have a maximum supply).
  • Sell an Existing Item : This type of auction can be used to sell “normal” NFTs, Prints or Master Editions (with the associated print rights).

In this tutorial, we will only focus on the case of a “Limited Edition” sale because the three other types are relatively similar. Keep in mind that a “Limited Edition” auction will be more costly in terms of fees than the “Sale of an Existing Item“. In the case of “Limited Edition“, you’ll first need to choose the Master Edition NFT you wish to sell as well as the number of copies you want to generate. Once this is set, click “Continue to terms”.

Note: In the case of the “Sale of an Existing Item“, there is no need to specify the number of copies to be created.

Click on “Continue” since auctions are the only type of sale available at the moment.

Choose the type of sale

Next, specify the starting auction price in $SOL and the auction increment, then click on “Continue“.

Choose whether you wish for the auction to start immediately or at a predetermined date, then click on “Continue”.

Choose the auction starting date

Fill in the information about the duration of the auction and its final phase. The “Gap Time” corresponds to the start of the final phase. Therefore, if the countdown is lower than the “Gap Time” the final phase begins. In this phase, every bid placed postpones the end of the auction by the duration of the “Gap Time”. You can also indicate the “Tick Size” of the final phase. In order for winners to progress in the auction, they have to place a bid that surpasses the next highest one by a minimum of this percentage. After setting this up, click on “Continue“.

Setup of the final phase of the auction

You can now specify, if you wish to do so, which participants will get an NFT for their participation. Next, click on “Continue to review“.

Choose a participation NFT

All that is left to do is check the auction information and publish it by clicking on “Publish Auction” and confirming the transaction.

Congratulations, your auction is now live!

Possible error messages and solutions

Here are some errors that could occur while creating your marketplace and NFTs on the platform. As time goes by, new errors might pop up that we, unfortunately, couldn’t address here.

The term “yarn” is not recognized

  • Error message
Error message for the term “yarn”
  • Solution

Execute the following command in the Visual Studio Code terminal in order to install yarn: “npm install –global yarn“.

The file cannot be loaded because running scripts is disabled on this sytem

  • Error message
Error message when the file cannot be loaded
  • Solution

Here’s what you’ll have to do to resolve this issue:

  1. Start “Windows Powershell” as an Admninistrator
  2. Execute the following command: “set-executionpolicy unrestricted”
  3. Confirm with “Y” (for Yes)

Sources

What's your reaction?

Leave a comment

Minimum 4 characters