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:
- A Github account
- A code editor such as Visual Studio Code
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
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:
- Terminal
- New terminal
In the terminal, and from your local development folder, do as follows:
- Copy this command : git clone https://github.com/yourusername/metaplex.git
- Replace « yourusername » with your Github handle and press “Enter”.
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:
- Go to the Visual Studio Code folder menu
- Open the file named ‘js/packages/web/.env’
- Once opened, paste your address on the first line after the “=” symbol and save by pressing “ctrl+S”
Change the deployment address
- Without a custom domain name
Open the file named ‘js/packages/web/package.json’. Here, spot the two following lines:
There will then be two things to change:
- Specify the URL of your Repository instead of “https://github.com/metaplex-foundation/metaplex”. For instace “https://github.com/my-name/my-metaplex”.
- 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:
- 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:
In the case of a custom domain name:
- Create a new file named CNAME in this folder: ‘js/packages/web/public’.
- 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:
- cd js
- yarn
When the dependencies are downloaded to your computer, you can check that everything is fine by executing the “yarn bootstrap” command.
After checking that the command was executed successfully, launch the “yarn build” command.
After creating your “build”, execute the two following commands in order to deploy it:
- cd packages/web
- yarn deploy
After executing these, here are the steps to follow:
- Go back to Github
- Access your Repository
- Go to the Settings section
- 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:
- Access your marketplace
- Log in to your wallet
- Click on “Init Store”
- Confirm the transaction
Note:
Before you actually make your marketplace live, you can test it works correctly by initializing it on the devnet.
To do this:
- Click on the logo at the top-right of the screen
- Click on “mainnet-beta”
- Select the devnet
- Click on « Init Store » and confirm the transaction.
You need $SOL on the devnet to do this.
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:
- Open the file named ‘js/packages/web/src/config/userNames.json’.
- In it, add the information about your sellers while carefully respecting the format of objects already present in the file.
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:
- yarn build
- cd packages/web
- 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.
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:
- Go to ‘YOUR_URL/#/admin’ by replacing “YOUR_URL” with the URL of your marketplace.
- You’ll then have access to your marketplace’s administration panel.
Here, you can choose to make your marketplace public or not using the button at the top-right of the panel.
In the case of a whitelist marketplace, you will need to manually add your sellers by clicking on the “Add Creator” button.
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:
Here’s how to change it:
- Open the file named ‘js/packages/web/src/pages/_app.tsx’.
- Change the following line by replacing “Metaplex NFT Marketplex” with the desired title.
Once the title is changed, save by pressing “Ctrl+S“. Then, make sure you are in the ‘js’ folder and execute the following commands:
- yarn build
- cd packages/web
- 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:
Pour la modifier, effectuez les étapes suivantes :
Here is how to change it
- Open the file named ‘js/packages/web/src/components/Notifications/index.tsx’.
- Modify the following line by replacing “M” with the name of your marketplace.
Once the name is changed, save by pressing “Ctrl+S“. Then, make sure you are in the ‘js’ folder and execute the following commands:
- yarn build
- cd packages/web
- 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.
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.
Upload your creation or enter the link to it, then click on “Continue to mint”.
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.
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!
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:
- Log in to your wallet
- Click on the “Sell” button
- 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.
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”.
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“.
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“.
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
- 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
- Solution
Here’s what you’ll have to do to resolve this issue:
- Start “Windows Powershell” as an Admninistrator
- Execute the following command: “set-executionpolicy unrestricted”
- Confirm with “Y” (for Yes)