Minting NFT

How to Mint from a Smart Contract?

Most of the time, the mint of an NFT is made through a website interface. But it's also possible to mint an NFT directly from the smart contract.

 1 min

Jump to

If the information from the graphic interface delivered by the developers of a project might be inaccurate, there’s a tool available to check its veracity. Users can go directly to a smart contract page on Etherscan and look for functions that will display the desired information.

Let’s take the example of the Forgotten Runes Wizard’s Cult Smart Contract on Ethereum. The code of this smart contract is public and is therefore open to everyone.

Read the contract section on Etherscan.io
Read the contract section on Etherscan.io

The initial information presented is to understand the price. To find this out, go to the ‘Read Contract’ section and look for the information you want. Here the price is displayed in Wei, equivalent to 0.07 ETH.

NFT smart contract - Total supply
NFT smart contract – Total supply

To find out how many NFTs are available, look for the ‘Supply’ section. Here we see the information that 10,000 Wizards will be available.

Now let’s see how to mint directly from the smart contract, we do this in the ‘Write Contract’ section.

Minting an NFT from the smart contract
Minting an NFT from the smart contract

Here the function is called ‘Summon’ but it could very well be called ‘Mint’. To invoke a Wizard, all you have to do is enter precisely the number of Ether (0.07 ETH for 1 Wizard) that is needed and then press the ‘Write’ button. 

Your wallet will ask you to confirm the transaction. Once the transaction is confirmed on the blockchain, the NFT will be automatically sent to your wallet.

This work is licensed under a Creative Commons Attribution 4.0 International License.

Keep in touch

© 2018 - 2024 NonFungible Corporation

All rights reserved.