Discover more from Julien’s Newsletter
How to mint an NFT from a Smart Contract?
A step-by-step guide on minting NFTs from a Smart Contract.
Minting from an NFT project’s own website may be unpleasant at times, especially if the website is slow or badly designed. But then you see others minting and you ask yourself, “How do I mint the NFT if other people are minting but the website is down?” It’s because these people are minting NFTs straight from the Etherscan Smart Contract rather than through the website. In this Medium post, I’ll show exactly you how to accomplish this too.
Step 1 - Find the contract Address
The first thing you’ll need to do is search for the Contract Address. Most NFT projects will have this available on their Discord server. Of course, if they don’t, you can always ask them for it. If a project has already minted NFTs (for example, through a pre-sale), you can go to the official collection page on OpenSea and click on any NFT in the collection, then go to “Details” and check for the “Contract Address”. You can click this to be taken to an Etherscan page.
Step 2 - Write to Contract and Connect to Web3
After you’ve found the Contract Address, you’ll need to look for the ‘’Contract’’ button with a green checkmark. Let’s take the Contract Address from The Wicked Craniums as an example. Keep in mind that if a project hasn’t launched yet or it’s sold out, the minting doesn’t work and your transaction will be rejected.
You click this button, three options will appear which are: ‘’Code’’, ‘’Read Contract’’, and ‘’Write Contract’’. Click on ‘’Write Contract’’
Click on ‘’Write Contract’’ and ‘’Connect to Web3'’. Your MetaMask will appear and prompt you to sign in. Make sure that you sign this correctly. After you log in, the color of this button will change from red to green. Then, look for anything that says ‘’mint’’ or sometimes it’s called ‘’purchase’’. The mint function is sometimes different, so it may be called something else for you.
Step 3 - Minting the NFT from the Contract
It’s time to mint your NFT! Before you begin minting, make sure you understand how much one NFT will cost. You may find the NFT price on the project’s website or by contacting the team on their Discord server.
If you wish to mint more than one NFT, you can use the following formula: priceOfOneNFT x numberOfTokens = payableAmount.
MetaMask will prompt you to sign the transaction. Make sure to verify the current Gas Price, which you can get on Etherscan.
That’s it! You have just initiated a transaction to mint your NFTs!