Introduction to minting an NFT on Flow
14 Oct 2022
Contributed by Flow Blockchain
This is for minting NFTS. It includes the minting resource that you can use in your smart contract, as well as the transaction to mint from the deployed account. It can be included in your smart contract along with the NFT Standard.
Smart Contract Example
This resource should be implemented in your contract if you would like to mint NFTS.
It also requires other items to be implemented into the contract such as a 'NFT' resource that has metadata defined and conforms to the NFT Standard, as well as a recepient account which has the capability to deposit NFTS into their collection.
To see how to link a Collection Interface to an account, check out the linking collections example.
This transaction is used to mint an NFT from the account that has the minting resource saved to it. You are able to give other users minting rights, check out the Admin Minting example for that.
In this case you are defining who is the person that will be receiving the NFT and checking if they actually have the capability to store the NFT in their collection before moving forward. As well as borrowing the Minting resource to mint new NFTS that should be in the account that has the minter saved.
At the end you are executing the transaction and minting the NFT.
Up Next: Collection for Holding NFTs