We have expertise in creating an NFT smart contract through ThirdWeb, having successfully developed numerous NFT collections via this platform. Our personal experience showcases how well the platform works, and we fully endorse it. In this article, we are excited to share our knowledge about the process, so you can confidently create your own NFT smart contract. Non-Fungible Tokens (NFTs) have become a big deal in the world of digital art and collectibles. They provide a fresh way for creators and collectors to make, sell, and enjoy digital creations. One important part of NFTs is the “smart contract.” These contracts are like the rules for making and trading digital stuff. In this article, we’ll look at why it’s a good idea to make your own smart contract for NFTs. We’ll also talk about a recent change by OpenSea, which is a place where people can trade NFTs. This change is affecting how creators make NFT collections. Our YouTube channel also offers a video guide on creating an NFT smart contract through Thirdweb, which you may find helpful.
Using Thirdweb to Create Smart Contracts
Thridweb.com makes it easy to create smart contracts and decentralized apps (dApps) on Ethereum and other web3 networks. It’s an all-in-one platform with user-friendly tools and infrastructure, so you can focus on creating without the need for complex coding.
Advantages of Smart Contracts
Ownership and Control
When you make your own NFT smart contract, you get full control over what you create. This is different from using other websites to make NFTs. With your own smart contract, you decide how NFTs are made, shared, and how much money you earn from them. This control is powerful because it lets artists and creators keep their rights and make choices that match what they believe in.
Flexibility and Customization
Creating your own NFT smart contract lets you make it just how you want. You can choose how the tokens work, what extra information they have, and how much money goes to you when they’re sold. This freedom means you can try out new ideas, create exciting things, and make your NFT collection stand out from the rest.
Branding and Identity
Having your smart contract helps you build a unique brand and identity in the world of NFTs. You can create a special logo, choose a symbol for your tokens, and have a consistent look that people recognize. This branding makes your NFTs more valuable and shows that you’re a trustworthy creator.
Opensea changing from Lazy to Smart
OpenSea, a popular marketplace for NFT trading, recently made a significant change that impacts how creators develop NFT collections. They have removed their “lazy mint” tool, which allowed users to easily upload their artwork directly to the platform. This tool was particularly helpful for newcomers as it simplified the process. However, OpenSea has decided to shift away from this approach. As a result of this change, existing collections created using OpenSea’s platform are now locked, meaning no further uploads can be made to these collections exclusively on OpenSea. This move indicates that OpenSea is encouraging creators to adopt the use of smart contracts instead. To facilitate this transition, OpenSea has introduced a new tool called “Studio” that enables users to create smart contracts directly on their platform. Alternatively, creators can also explore third-party platforms like ThirdWeb. For the purpose of this article, we will focus on ThirdWeb, as our experience with their platform has been positive. We will guide you through the process of creating your own NFT smart contract using ThirdWeb’s tools and resources.
Creating an NFT Smart Contracts through Thirdweb
Step 1: Log into your MetaMask Wallet
Using a test network like Goerli before deploying your smart contract to the main Ethereum network is a crucial step in the development process. It helps you identify and address issues, save costs, and gain confidence in the reliability and security of your smart contract before it interacts with real assets and users on the mainnet. So first select the Goerli network in your MetaMask wallet.
Step 2: Access Thirdweb website
Launch your web browser and navigate to the ThirdWeb website at https://thirdweb.com. Then click on the “Get Started” button circled red below.
Step 3: Create a Thirdweb Account
If you’re visiting the Thirdweb website for the first time, you’ll be prompted to sign up for a free account. Simply use your email to create your Thirdweb account, and then click on “Get Started for Free.
Verify your Account via Email
No need to provide your card information for Thirdweb. You can easily bypass this by selecting the “I’ll do this later” button at the bottom. You’ll only need to make a payment to Thirdweb if you want access to advanced features and support.
Step 4: Deploying a Smart Contract
Select “Contracts,” and you’ll gain access to the contracts section, where you can configure and launch new smart contracts.
Click “Deploy contract” to gain access to the different contract options.
This section displays the commonly used smart contract configurations. If your project is related to NFT art, you will need either the NFT Drop or NFT Collection contract. In this tutorial, we have chosen the NFT Drop contract option. However, let’s take a closer look at the distinctions between these two options.
About NFT Drop Contract
The NFT Drop contract on Thridweb.com is created to release a collection of NFTs that the community can claim. It uses lazy minting, where the information about the NFTs is stored on IPFS, but the NFTs themselves are not made right away. Instead, users can claim them at a later time. The NFT Drop contract allows for setting conditions for claiming, like who is eligible and how much they cost. It also provides a dashboard for users to easily claim the NFTs from the release.
About NFT Collection Contract
The NFT Collection contract is used to make a collection of NFTs without the idea of a release or claiming by the community. Unlike the NFT Drop contract, the NFT Collection contract makes the NFTs right away when they are added to the collection. This means that the NFTs can be moved, sold on a marketplace, or used just like any other NFT. The NFT Collection contract also has advanced features for creating NFTs using signatures, which is useful for more complex purposes.
Once you have selected NFT Dop. Click “Deploy now”
Adding your Contract Details
Input your contract information, and we’ve included guidance for each field below. Once you’ve filled in the required details, simply click “Deploy Now” at the bottom.
Name: Name of your NFT collection or project
Description: Description of your NFT collection or project
Image: Image that represents your NFT collection or project
Symbol: A short word or acronym for your collection. For example, BAYC for Bored Ape Yacht Club
Percentage: Creator royalty for the contract owner, each time an NFT is sold.
Network / Chain: This field is at the bottom. Just make sure you have selected the correct network. This example uses the Goerli Network.
Congratulations! You’ve successfully launched an NFT Drop Contract.
Step 5: Viewing NFTs in your Contract
Click the NFT tab, circled red below
You are now in the NFT viewing section of your smart contract. Within this area there are three different numbers you are presented with named “total supply,” “unclaimed supply,” and “claimed supply.” Here’s what each term refers to:
Total supply: Represents the total number of unique tokens that can be minted or claimed by users. It is the max number of images (or digital assets) that have been added to the contract. Total supply is a combination of clamined and unclaimed supplies.
Claimed supply: The number of NFTs that have already been claimed or minted to the blockchain by users. These are the tokens that have been successfully acquired by users during the NFT drop. The claimed supply increases as users claim or mint NFTs from the collection.
Unclaimed supply: The number of NFTs that have not yet been claimed or minted by users, and currently stored within Thirdweb database only, not the blockchain. These are the tokens that are still available for users to claim during the NFT drop. The unclaimed supply decreases as users claim or mint NFTs from the collection.
Step 6: Uploading NFTs to your Contract
In this tutorial, we’ll focus on the single upload method, so go ahead and click the ‘Single Upload’ button. However, remember that you can also choose ‘Batch Upload’ if you want to add multiple NFTs. Here’s a quick explanation of both options:
Single Upload: Use this if you’re adding one or just a few NFTs. Click ‘Single Upload,’ fill in info like Name, Media, and Description for each NFT, and you can even add more details if you want. Then click ‘Lazy Mint’ to finish, and it’ll create your NFT with a wallet transaction.
Batch Upload: Choose this if you have lots of NFTs to add all at once. You’ll need a .csv or .json file with the details of all your NFTs. Make sure the file follows some rules, like having a ‘name’ for each NFT and a specific naming format for the assets. Then, click ‘Batch Upload,’ upload your file, and it’ll add all those NFTs to the contract for users to mint.
Write Metadata for your Image, which is made up of the following fields
Name: The name of this particular NFT image
Media: You can upload most digital assets, such as images, 3D models and audio
Description: This is the description for this particular NFT image
Properties: These are the traits you typically see on NFT Marketplaces like Opensea and Rarible
External URL: This could be a link to your website, that represents your project.
After you have added the metadata above, you can then click “Lazy Mint NFT”. Congratulations, you have now added an NFT
Step 7: Review your First Upload
Your initial upload is finished. You’ll see that the image now has an owner with the wallet address ‘0.’ That’s because no one, not even you, has claimed ownership of this image yet. That’s why there’s one unclaimed image left. ‘Claiming’ is like making it official on the blockchain. You’ll also see that the total supply and unclaimed supply numbers have changed. Keep in mind, what you’ve made is an image with its details, but it’s not officially on the blockchain until it’s claimed.
Owner = Wallet address of 0: As the image is not yet claimed (minted/created) by anyone.
Total supply = 1: Because there is only 1 digital asset which has been uploaded.
Claimed supply = 0: Which means there are 0 minted/created NFTs from your smart contract
Unclaimed Supply = 1: This is 1 digital asset within your Thridweb dishboard area that can be minted/created from your contract
Step 8: Set up Claim Conditions
To set the rules for claiming the NFTs and determine who is eligible and how many they can claim, click “Claim Conditions” tab.
You have now entered the “Set Claim Conditions” section of the smart contract. This is where you can define the conditions that regulate the process of claiming NFTs, such as eligibility criteria and limits on the number of NFTs that can be claimed. It is essential to establish these claim conditions in order for you or others to mint NFTs from this contract. Additionally, if you have a mint button on your website and want people to connect their wallet to your site to mint NFTs from the contract at a price you determine, you can also set specific dates for the claim conditions. Below are more details about each field. For this example we have only selected “Public” claim conditions. So select the “Public” option. Below is more information about each field input on the Public claim conditions form:
Name: This says the type of claim condition. Public means any wallet address can mint.
When will this phrase start: This defines a date and time when people can start minting from your contract.
How many NFTs will you drop in this phase: You can define a maximum number of NFTs people can claim.
How much do you want to charge to claim each NFT: This is the price people will pay to mint NFTs from your contract.
How many NFTs can be claimed per wallet?: You can limit the amount of NFTs each wallet can mint from your contract.
Keep in mind that you can include different rules, like an ‘Owners’ rule, which allows only the contract owners to create items. You can also run these rules one after another or at the same time. Many large projects use this to have 2 or 3 public stages. In the first stages, a small number of NFTs are available for a low price. Then, the price goes up in the later stages. The settings depend on what you want to achieve with your project.
Well done. You have set your claim conditions.
Step 9: Claim/Mint an NFT
To claim an NFT from the drop, click the “Claim” button. This will transfer one NFT to your wallet based on the claim conditions set. In this tutorial, the claim conditions are set to “public,” allowing anyone, including you, to claim the NFT.
If you want others to claim or create NFTs from your smart contract, you can add a mint button to your website using the provided HTML code from Thirdweb. The mint button performs the process of “claiming” or creating the NFT from your smart contract. Whenever you press the ‘Claim’ button or someone clicks the mint button on a website, it grabs an image from your Thirdweb NFT section, which initially has a ‘0’ address. Then, it places this image on the blockchain, and the address will switch to the wallet of the person who claimed it.
Step 10: View your Contract and NFTs on Opensea
The OpenSea testnet lets developers practice, fix problems, and improve their contracts in a budget-friendly and real-world-like setting before using them on the Ethereum mainnet. Open sea’s official testing website is https://testnets.opensea.io. You will know this is the testnet version because it says “Testnets” under the Opensea logo.
Copy your contract address from Thirdweb. The location of the contract address is circled below.
Paste the contract address into Opensea testnet search. The name of your smart contract should then appear. Click on your collection name.
You should be able to view your NFT collection page now. You’ll observe that the details you added to the smart contract and the NFT are currently visible on the OpenSea testnet platform.
Check the details of the NFT that you previously claimed. Click on the NFT
It is important to understand the information displayed below for your minted NFT.
Contract Address: Is the address of your smart contract
Token ID: It shows 0, which means the first NFT minted from the contract. The next minted NFT will have a token id of 1
Token Standard: ERC-721 is the gold standard when it comes to NFTs.
Chain: Goerli is a popular network used for testing. You will see either Ethereum or Polygon when you setup your real contract.
Creator Earnings: This is what you will earn everytime this NFT is sold on.