Set a Mint Price on Your NFT Smart Contract

InstructorRyan Harris

Share this video with your friends

Send Tweet

We want to actually sell our NFT tickets, so let’s set a mint price.

In our smart contract, we can just set the price to an integer variable. We’ll then make our mint function payable. When a function is payable in Solidity it means it can receive ether.

Once our mint function is payable, we can call the require function to check if the initiator of the function is sending enough ether.