i will teach you to be rich review

Angie P.

Freedom Fighter

i will teach you to be rich review

Angie P.

Freedom Fighter

How To Mint An NFT From Contract

by | Sep 16, 2021 | Crypto, Investing | 0 comments

If you’d like to maximize your chances of grabbing an NFT mint, you’ll want to mint NFTs directly from the contract. In this post, I’ll show you how to mint an NFT from the contract. You’ll learn:

  • Why you should even use a smart contract to mint NFTs directly
  • How to find the contract to mint from
  • And the simple steps to mint your NFT from the contract

Why Use A Smart Contract To Mint NFTs?

Every project has a different website, and each website can more more unreliable than the next. Websites are buggy and crash a lot. Especially when a ton of people are accessing it at the same time so they can press “mint” button.

Smart contracts are hosted on Etherscan, which is a much more well-established website than any of these NFT projects. Thus, being able to mint on Etherscan is a lot more stable, and you’ll get more consistent results with your NFT drops.

If you want to flip NFTs for consistent profit, one of the most important things is to have a consistent process to mint NFTs. If you have to learn a new website layout every time an NFT drops, your odds of success are lowered. And if the website crashes, you basically will be guaranteed to take an L on the NFT drop since enough of your competitors will be minting from the contract.

Also, if you’ve got the smart contract before the minting starts, you can enter how many NFTs you want to mint and how much you’re paying for the NFT before the minting starts. This saves you a few seconds (AKA an eternity) when compared to entering those values on the website after minting begins.

Find The Contract

You can skip this section if you’ve the link for the contract already.

But if you don’t, below are some ways where you can find the contract on Etherscan so you can get an edge over your fellow NFT minters.

In all my examples below, I’ll be using “Adam Bomb Squad” as an example. But you can do this for most NFTs.

Finding It Via OpenSea

You can only do this if you know where the collection exists on OpenSea. But if there’s been a presale already, or if the Discord’s #official-links channel has the OpenSea information already, you should be able to find it quite easily on OpenSea.

Step 1: Go to the collection’s page on OpenSea. In my case, it’s just https://opensea.io/collection/adam-bomb-squad.

Step 2: Click on any NFT in the collection.

how to mint an nft from a contract by first finding the contract address

Step 3: When viewing the NFT, copy the address in the URL that’s between “assets/” and “/<token_id>”. See the example below.

find contract address from opensea url

Step 4: Then, go to https://www.etherscan.io and then paste the address you’ve just copied. And tap the search button.

use etherscan to find the contract address for the nft

And that’ll take you to the contract.

Finding It Via Etherscan (The Easy Way)

If a collection is popular enough, you can simply just type the collection by its name to find it on Etherscan. In my example below, I just typed in “adam bomb” and the dropdown is already suggesting “Adam Bomb Squad.” Just click on it and you’ll be able to get to the contract.

Sometimes, You Won’t Be Able To Find It

Sometimes, you can’t find the contract at all.

For example, Sipher INU had 2 separate contracts: one contract where you can actually mint and buy NFTs. The other contract is just to list assets on OpenSea. They did this to prevent folks from being able to enter a bunch of info in the contract beforehand.

The Sipher INU team only released the contract for minting at the time of the NFT drop. In their case, minting through the contract after they announced the contract address was still better than minting on their website because their website was super buggy.

Anyway, all this to say that you sometimes won’t be able to find the contract prior to the NFT drop due to developers’ discretion.

How To Mint An NFT From The Smart Contract Directly

Assuming you’ve followed the steps above and that a smart contractor could be located, you’ll follow the steps below to mint your NFT with the contract.

Step 1: On the contract page, go to the contract tab.

Step 2: Click Write Contract

Step 3: Find the “mint” function and click on it to expand it.

  • NOTE: In general, most contract’s mint function is just named “mint” – but a lot of times they try to be cute and name it something else. The NFT project’s discord generally will tell you which function is the mint function. And if they don’t, you generally can figure it out through experience.

Step 4: Fill in details on how many you want to mint, and how much Ether you want to pay them.

  • NOTE: For this particular project, there’s 3 pricing tiers. You can get 1 NFT for 0.1 ETH or 10 NFTs for .75 ETH. When NFT projects have pricing tiers, you can just shove the lump sum into the function.
  • Example: If you wanted 1 NFT token for 0.1 ETH, you’d fill in 0.1 for “payableAmount (ether)” and 1 for “numTokens (uint256)”.
  • Example 2: If you wanted 10 NFT tokens for .75 ETH, you’d fill in 0.75 for “payableAmount (ether)” and 10 for “numTokens (uint256)”. See below for example 2.
  • Caveat: There might be special instructions, on developers’ discretion. For example, there’s another NFT project right now where if you wanted to mint 2 NFT tokens, instead of 1 NFT, they call it “mintTier2”. And if you wanted to mint 6 NFT tokens, it’s “mintTier6”. So there’s some variation in how these package deals work, but generally speaking, most projects just have a simple mint function like the below that’ll handle various pricing tiers.
using etherscan's smart contract to mint an nft

Step 5: Connect your Metamask wallet by pressing Connect to Web3.

connect to your metamask to mint the nft from the contract directly

Step 6: Press “Write” and follow the details on your Metamask to complete the mint.

Step 7: Make sure the gas on Metamask isn’t ridiculous. If it is, it’s because the developers either 1) haven’t opened the contract for minting yet, or 2) the project is closed for minting. In the screenshot below, it’s the latter:

if the gas fees are super high, it means the nft mint has been finished, or it hasn't started yet.

An unreleased (or project closed for minting) has the gas limit set extremely high to prevent transactions from going through. That is, the gas you pay = the gas you set * gas limit.

If all looks good, just confirm the transaction and you’ve minted your first NFT through a smart contract directly! Congrats!

Some Notes / Caveats

This post is meant to provide guidance in the common case. As developers can change a bunch of stuff, including but not limited to:

  • The mint function(s) and how it shows up on the contract
  • Whether or not you can even mint from the contract (i.e. by withholding the contract, making the mints available through a raffle instead, other indirection methods so nobody can directly mint the NFT, etc).

It’s quite hard for me to write an article that’ll cover all cases. But in general, most contracts adhere to the following:

  • You can see the smart contract ahead of time.
  • The mint function is just the mint function, and it handles various pricing schemes.

If you’re able to mint an NFT from a contract following these instructions, be sure to let me know at hello@goodmoneygoodlife.com so I can get FOMO and buy your NFT from you!




MOST POPULAR POSTS


USEFUL BOOKS


LATEST POSTS


0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *