Created
March 15, 2024 15:28
-
-
Save Oluwatobilobaoke/9d2151b518395ee85d7f9a2275eb8e7f to your computer and use it in GitHub Desktop.
my Meta Nft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// Compatible with OpenZeppelin Contracts ^5.0.0 | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
contract MetaNFT is ERC721 { | |
uint256 public mintingFee = 10000000000000000; | |
constructor() | |
ERC721("Meta NFT", "MNFT") | |
{} | |
function _baseURI() internal pure override returns (string memory) { | |
return "https://blue-clear-mole-324.mypinata.cloud/ipfs/Qmcd7BP4Ar7DwCiaFKnhi7kmebVdiLvm4TMcAB6M7dpdHS/"; | |
} | |
function safeMint(address to, uint256 tokenId) public payable { | |
require(msg.value >= mintingFee, "Not enough minting fee"); | |
_safeMint(to, tokenId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment