Course lesson
Set a Mint Price on Your NFT Smart Contract
We want to actually sell our NFT tickets, so let’s set a mint price.
- Duration
- 2 min
- Access
- Included
- Transcript
- Retained from source evidence
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.