How to Mint an NFT From The Contract Using Etherscan

September 10, 2021 - 11 min read

In this article, I walk through minting an NFT project directly from the contract in Etherscan. using an example. Each contract is different, but after reading you will feel more informed about what it means to mint from a contract and the steps needed to do this. Minting directly from a contract carries more risk, so it's important to keep this in mind before minting any project using the contract on Etherscan.io

How to Mint an NFT From The Contract Using Etherscan

Updated 3/15/2022

Thumbnail How To Mint An NFT Through The Contract Using Etherscan

Click here to watch video

Introduction 

After buying an asset from The n project, I’ve found myself minting a lot of new NFTs directly from a project’s contract in Etherscan. It’s becoming a bit more common practice to allow people to mint using a contract as a way to both offer a “treasure hunting” element to a project and mitigate gas wars (with stealth launches). 

Every single Ethereum blockchain transaction requires a user to pay a gas fee to offset the cost of computing power required to prove the transaction. In some cases, when a popular project mints (offers a pre-sale), gas can spike into a pretty significant fee (sometimes hundreds of dollars and higher). 

Minting through a contract doesn’t fully eliminate competition transactions resulting in a higher gas fee, but it does seem to help slow down a rush of buyers as people take their time to properly mint from a contract. 

As I’ve seen more and more questions pop up about minting NFTs from a contract on Etherscan, I decided it was time to do a detailed breakdown on how it’s done using an example from derivative art using my asset from The n Project. 

Please keep in mind, minting from a contract has risks and it’s important that you carefully follow instructions. I’ve lost money on gas fees for failed transactions and I’m not alone in that. Each contract is different, so the exact advice in the below article won’t necessarily apply to every project. This is meant to highlight some examples to get you familiar with the process. 

Also, you'll need some ETH to mint an NFT from the contract using Etherscan. We personally use and recommend Coinbase as it's user-friendly and You can check out our full how-to guide to buying and selling an NFT here if you are having trouble, but we personally use Coinbase and trust the platform.

Disclosure: The above link to Coinbase is an affiliate link and we receive a small commission if you sign up for their product at no cost to you. We only recommend products that we've personally used and well . . . we have used Coinbase a lot. You can read my full affiliate disclosure here.

We also strongly encourage our readers to consider purchasing a hardware wallet, which starts at $59. I've been using the Ledger Nano X since last July and it helps me sleep better at night.

Hardware wallets like the Ledger S or Nano X are the most effective ways to protect your NFT assets from scams. The links to the Ledger product suite are affiliate links and we may receive a small commission if you choose to make a purchase. You can read my full affiliate disclaimer disclosure here.

If you want to protect yourself and your NFTs from scams and hacks, you can shop for Ledger Hardware wallets by clicking here

Walking Through How to Mint an NFT From The Contract Using Etherscan

To mint an NFT from the contract, navigate to the contract page in Etherscan.io, click "Contract", click "Write Contract", connect Metamask to Etherscan, put in the correct payable amount and asset ID then click "write".

We'll walk through these steps in detail below.

This is your final reminder — minting from a contract is risky and can cause you to lose gas money if not done properly. If you mint from a contract, follow all instructions carefully. You are 100% responsible for what happens when you try to mint from a contract. 

The n Project launched a few days ago and provided users with NFT assets that contained a string of 8 numbers. Those numbers are now being used to generate art, and the creators are allowing The n Project holders to mint for free or at low cost. 

However, most projects require users to mint from a contract: 

Camosplinters Contract Mint

Source: Twitter 

I’ll walk you through step-by-step how to mint from a contract using this specific example. Other project contracts may be different, but after reading you’ll have a better understanding of this process. 

Step 1: Click on the link to the project contract, which takes you to Etherscan: 

Project Contract

Source: Etherscan.io 

Step 2: Scroll down and click on Contract: 

Contract

Source: Etherscan.io

Step 3: Click on Write Contract: 

Write Contract in Etherscan

Source: Etherscan.io 

Step 4: Connect Your Web3 Wallet to Etherscan: 

Connect Wallet to Etherscan

Source: Etherscan.io 

These 4 steps are required to mint an NFT from a contract and won’t change from project to project. You’ll always need to do these steps first before you can interact with the contract and mint your NFT. 

The next steps are specific to this NFT project

As you can see below, this contract has 14 options to write to it: 

Contract Options

Source: Etherscan.io 

By following the instructions given by the project creators, and because I own an n asset, I need to select option 6 “mintWithN”: 

Step 5: Select the correct Write function, in this case, mintWithN, and click on it: 

Select write function

Source: Etherscan.io

There are two fields here that require the proper information to successfully mint: 

(1) The cost to mint: payableAmount (ether) 

(2) The token number of the n asset you are minting from: nid 

For this specific project, the mint price is .015 and my token id (found in Opensea) is 2328: 

Opensea token

Source: Opensea.io 

In order to successfully mint, I need to enter .015 in the first field and 2328 in the second field: 

Enter contract data

Source: Etherscan.io 

Each asset in an NFT project has a token ID. It’s typically somewhere between 1 and 10,000 (as the common practice for projects is to launch 10,000 assets). 

You can find this token ID by navigating to Opensea.io, clicking on “My Profile” and clicking on your asset. On that page, scroll down under the image of the asset and click on “Details”. The second row will show the unique token ID for that particular asset. 

Step 6: Click “Write” and Review the Transaction 

It is critical that you review the transaction and make sure you entered the right amount of Ethereum for the payment and that you selected the proper token ID. 

Because I already minted the asset using my token, I’m seeing an exorbitantly high gas fee: 

High gas fee when minting

Source: Personal Metamask Account

Whenever you mint from a contract and see high gas, it means that token ID has already been minted or the project is no longer minting. 

For new project releases (or discoveries of old projects) you sometimes need to guess the token ID in order to get the mint.

If I hadn’t minted my asset already, clicking “Write” would have prompted me to Confirm the transaction in Metamask. 

Step 7: Check Gas Prices Before Confirming in Metamask: 

Check Ethereum Gas Prices

Source: etherscan.io/gastracker 

Head over to the Etherscan.io gas tracker by clicking here

This will show you the price of gas in gwei, which is translated into ETH. The higher the number, the more expensive gas will be. 

If you aren’t in a rush to mint the project, I suggest waiting for gas to drop below 90 gwei, but if there’s a lot of competition to mint, you may even want to increase your gas to make sure the transaction goes through faster. You can use the ETH Gas Station app to help you determine what to set your gas at: 

Using Ether Gas Station

Source: Ether Gas Station 

After you confirm the transaction, the Ethereum in your Metamask should drop (based on price paid + gas) and your transaction will enter “pending” until complete. 

Risks of Minting an NFT Directly from the Contract

Over the past 2 days, I’ve been minting directly from contracts quite a bit. Both for The n Project and for re-discovered NFT projects from 2017. In the first case, I ended up with stuck transactions that sat pending for more than 20 minutes. In the second case, I minted something but my gas was too low and someone else go it first. I lost .03 ETH because of this. 

I’ll cover both scenarios below and offer some solutions that worked for me in those specific situations. 

How to Handle Pending and Stuck Transactions

When a transaction gets stuck in pending, it can be frustrating. In my specific use case, I minted an asset using my n token, but Ledger Live (the app for my hardware wallet) was not being prompted to open.

Something was going wrong but I couldn’t figure it out. 

I tried canceling the transactions (which costs gas) but even those failed. 

If you are having trouble with pending transactions, try using a different browser. At the time, I was using Chrome, but when I switched to Brave, the mint process worked flawlessly. 

In order to clear the transactions from my MetaMask queue, I disconnected from Ethereum Mainnet, switched to “Local Host” then switched back: 

Switch from Ethereum Mainnet

Source: Personal Metamask Account 

This worked for me in a specific situation. It is not professional advice for trouble-shooting Metamask or Ledger, so I recommend reaching out to them first if you need support. 

What to Do When You See High Gas Fees When Minting Directly from the Contract

As you saw above, the suggested gas price when I tried to mint a token that was already taken exceeded $12,000. For a project I minted recently, any gas over $200 was a sign to cancel the transaction.

If this happens, go back and double-check the steps to mint in the contract and ensure you properly entered the information needed to perform the action in the contract. 

Key Takeaways 

Minting directly from a contract is typically an outlier event, but it’s good to get the experience and education to help further your understanding of NFTs. If you’re here and have made it this far, you want to learn more to build your expertise.  

Etherscan.io offers a lot of great functionality to troubleshoot issues, track transactions, and view activity from various accounts. Minting from contracts is just one of many features. 

Two months ago, I didn’t know anything about Etherscan.io, but now, it’s a tool I use almost every day. 

Be very cautious when minting from a contract. I followed all the instructions and lost money due to a failed transaction. This is why I always encourage you never to spend money you can’t afford to lose. 

If this feels too technical for you, or you don’t want to risk losing gas money or making a mistake, that’s okay. Most projects will not require you to mint from a contract and if there are ones that do, move on to the next one. There will be plenty of other projects for you to mint in the future. 

PS - we built a tool to solve our own problem: not being able to keep up with Discord or Twitter 24/7 to find new NFT projects. WenAlphaText lets you track up to 3 NFT wallets and receive real-time text alerts when they purchase an NFT.

PPS - if you have extra money that you can afford to lose, consider signing up for Coinbase and purchasing some Ethereum so that you can buy NFTs. You can check out our full how-to guide to buying and selling an NFT here if you are having trouble, but we personally use Coinbase and trust the platform.

Disclosure: The above link to Coinbase is an affiliate link and we receive a small commission if you sign up for their product at no cost to you. We only recommend products that we've personally used and well . . . we have used Coinbase a lot. You can read my full affiliate disclosure here.

We also strongly encourage our readers to consider purchasing a hardware wallet, which starts at $59. I've been using the Ledger Nano X since last July and it helps me sleep better at night.

Hardware wallets like the Ledger S or Nano X are the most effective ways to protect your NFT assets from scams. The links to the Ledger product suite are affiliate links and we may receive a small commission if you choose to make a purchase. You can read my full affiliate disclaimer disclosure here.

If you want to protect yourself and your NFTs from scams and hacks, you can shop for Ledger Hardware wallets by clicking here

Jon Torrey

written by

Jon Torrey

NFT Enthusiast

Newsletter

Enter your email address below to subscribe to my newsletter

ads

Support The Blog