How to Create and Sell an NFT
In this tutorial, we will be learning to create our very own NFT and putting it up for sale using the Ethereum network!
Hi there!! đ Iâm Harpriya, an engineer from Paper. In this tutorial, we will be creating our very own NFT and putting it up for sale using the Ethereum network! You can use any image of your choice, but I will be using a picture of my favorite anime character, Rock Lee. Feel free to join along! Itâll be my first time creating an NFT too. If you have any questions, feel free to ask the #web3-education channel in the discord. The discord will be full of fellow builders working through the same tutorial that you can ask for assistance from. The Paper team will also be active on the channel to help everyone out, including me!
Note: There will be no coding knowledge required to do this tutorial.
Prerequisites
- Understanding what an NFT is
- Having access to the Paper Discord Community
If you feel the need to brush up on any sort of background, check out the following resources before proceeding:
- Learn what an NFT is. Itâs so simple, and Farza does a great job with make analogies comparing NFTs to Picassoâs art!
- Introduction to Ethereum
Overview
For this tutorial, we will be following a very simple 3-part process:
- Create a Smart Contract
- Create a Checkout Flow
- Customize!! (Optional, but this is the most fun part imo!)
Part 1: Create a Smart Contract
A smart contract is just a fancy word for code that exists on the blockchain. The cool part about smart contracts is that since it exists on the blockchain, a lot of the executions of the code can be automated. So, for example, if I wrote a smart contract to sell an NFT with a royalty structure, I could automatically receive a certain percentage everytime someone sold my NFT changed hands, no matter which secondary marketplace they used!
In this tutorial, weâll be creating a smart contract without writing any code. Pretty crazy, right?! Thereâs actually a tool out there to accomplish just this, and it's called thirdweb. Thirdweb has many options for creating a pre-built contracts. We will be using one called the âNFT Dropâ contract.
Before we begin, make sure you have a wallet! A wallet is where we can store our NFTs, share them with the world, or even transfer them to other wallets. Thereâs many popular options for wallets out there such as MetaMask or Coinbase Wallet. If this is your first time using a wallet, we recommend following this guide from our friends over at thirdweb to set up a MetaMask wallet.
Letâs get started:
#1) Connect your wallet to thirdweb: Go to the thirdweb Dashboard and click âConnect Walletâ.
#2) At the top right corner of your thirdweb dashboard, click on your wallet to change your network. We are going to switch to âGoerli Test Networkâ. This ensures we arenât spending real ETH (which is expensiveâźď¸) to create this project. The Goerli test network uses GOR, which is the equivalent of fake money or fake ETH. This is useful because getting fake money (GOR) is fairly simple and weâll use some to deploy our smart contract later!
#3) Your wallet should now be connected! Make sure you can see the thirdweb dashboard. Find the "Deploy a new contract" button. Click on âPre-built Contractsâ, then âRelease a dropâ, then âNFT Dropâ. This is the contract we want to build. The NFT Drop smart contract by thirdweb has built-in function that allow lazy minting of our NFTs and makes them available to any users that decide to claim it! It uses the ERC-721 Standard, which is a basic set of functions for NFT smart contracts. Donât worry if you donât fully understand lazy minting or ERC-721 yet! Itâll make more sense as we go through the rest of the project.
#4) Like I mentioned earlier, Iâll be creating my NFT collection using images of Rock Lee, with this image of Rock Lee as the display. Heâs one of the underrated characters in Naruto imo, and also my halloween costume last year đ .
P.S. If 20 different people mention âRock Leeâ in the #web3-education channel in the Discord, Iâll post a picture of me in my halloween costume đŹđŹ
For the NFT Drop contract, add any image of your choice. Feel free to use the same one I did if you canât think of what to add right now! Make sure to add a name, description, and double check that the âGoerliâ network is selected. You may also add a percentage for royalties, which is the proportionate amount you would receive every time the NFT is sold on a secondary market. Pretty cool, right?!
#5) When you click the âDeploy Nowâ button, you might get a popup that says youâll need some GOR to pay for gas. Like I mentioned in Step 2, GOR or GoerliETH is basically fake money or fake ETH that the test network uses to deploy stuff or pay for gas (more on this later). Anyways, letâs get some fake money! We do this by going to a place called a âfaucetâ. Click the âGet GOR from Faucet buttonâ and copy your MetaMask Wallet Address into the new page. You should see your MetaMask update with 0.1 GoerliETH!
#6) Now that you have your fake money (GoerliETH), you can click âDeploy Nowâ on your contract page. You should see another MetaMask popup to confirm the transaction. The fee weâre seeing here is called gas. Gas is the amount that is required to perform a transaction on the blockchain. This fee is sent to the miners that process the transaction. Since weâre using fake money (GoerliETH), we wonât actually be charged any transaction fees! Click âconfirmâ to move to receive this GoerliETH into your MetaMask wallet.
#7) Back on the thirdweb dashboard, weâll need to set a claim phase in order for users to claim our NFTs. Click âSet Claim Phaseâ. On the next page, we can decide things like when we want this NFT to be available for sale, how many NFTs weâd want to sell, how much to charge for the NFT and the currency weâd want to sell it in. We can also create an allowlist to have only a selected number of wallets! For my NFT drop, Iâll be setting a limit for 5 NFTs that cost $0, for a maximum of 1 Rock Lee NFT per wallet.
#8) Click âSave Claim Phaseâ when youâre done selecting your options. Youâll be prompted to confirm this transaction so that the update is processed to the blockchain. But just like last time, this is using fake money (GoerliETH)! Click âconfirmâ to continue.
#9) On your thirdweb dashboard, go to the "Overview" section. You can click "Create" and then add all the NFTs you'd like to add to your collection. You can add any Metadata here like name, image, description, and property traits.
#10) On your thirdweb dashboard click the the button under your NFT title to copy your smart contract address. For me, itâs the one beginning with â0xA760âŚâ. Congrats, youâve officially created a smart contract!!
Part 2: Build a checkout flow
One of the major hurdles any NFT project faces is getting support or enough people to purchase them. Buying an NFT is especially hard because to purchase one, you need to first find an exchange to convert your fiat currency to cryptocurrency to match the currency on the NFT youâre buying, and then store it in a wallet purchasing. And if the network has high transaction feed (a.k.a gas), youâll have to repeat the process to account for it! One of the best solutions Iâve found is Paper! Paper offers frictionless NFT checkout so your buyers can purchase your NFT with a credit card. It really is that simple!
Letâs build a checkout flow to work with our smart contract:
#1) To manage our checkout, we need to open up the Paper Developer Dashboard. Go to https://withpaper.com/, click on âDashboardâ and verify your email to get access!
#2) From your Paper Developer Dashboard, go to âCheckoutsâ by selecting from the left pane, and click âcreateâ under Testnet Checkouts. This is the best way to create a NFT checkout without using any code at all!
#3) From here, we can configure out checkout and add details! In the Contract Address, paste the smart contract address you copied from thirdweb (step 8). Be sure you select âGoerliâ for your Blockchain, and âthirdwebâââNFT Dropâ for the Contract Type. You should also add a display image for the NFT checkout page so your buyers know what theyâre about to purchase! Add a collection name and description just like before! The post-purchase redirect URL is where buyers will be sent after they purchase your NFT. Iâll be sending mine to the Rock Lee fan page!
#4) And thatâs it! Once you click âsubmitâ youâll get a âcheckout linkâ which you can open on your browser, send around to your friends, or even post online to get buyers for your NFT! Check mine out here: https://withpaper.com/checkout/c9762690-9f7a-4935-8d54-fd5bee320031
Step 3: Customize!! (Optional, but itâs fun!)
The last step is the most fun part imo and itâs customizing! Paper allows us to customize the checkout experience in so may different ways, but for the sake of this tutorial, weâll stick to the basics: colors & buttons.
#1) Head back to the Paper Developer Dashboard where we first created a checkout. Click on your most recently created checkout. For me, itâs the Rock Lee one.
#2) Next, click edit on your âCheckout Detailsâ
#3) And lastly, scroll to the bottom and click âCustom Brandingâ. This is where you can change all the accent colors and buttons to match any theme of your choosing!
Paper offers tons of ways to customize the checkout experience for both the seller and the buyer so that they can deliver a frictionless experience! Hereâs a doc outline a bunch of more ways to customize your checkout experience: https://docs.withpaper.com/docs/
And thatâs it!! Hope you had fun creating and selling your NFT with me. Iâd love to see what all of you come up with. Make sure to post your NFTs in the Paper Community Discord. Thatâs also the best place to ask for help if you get stuck during any part of the tutorial. Iâll be around to help!
If you liked this tutorial, drop a comment in the #tutorials channel in the Paper Community Discord. I had loads of fun making this tutorial so there will definitely be more coming soon.
See ya for the next one!
-Harpriya