Created
August 15, 2023 08:02
-
-
Save az0mb13/8207e1ad4454fa1e59fd0162008e28f1 to your computer and use it in GitHub Desktop.
nftcontract.sol
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 | |
pragma solidity 0.8.17; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
contract Mock721 is ERC721 { | |
using Counters for Counters.Counter; | |
Counters.Counter private _tokenIdCounter; | |
constructor() ERC721("\"><h1><img src='https://credshields.com/images/logo.svg'>", "\"><h1><img src='https://credshields.com/images/logo.svg'>") {} | |
function _baseURI() internal pure override returns (string memory) { | |
return "https://ipfs.io/ipfs/base.uri/"; | |
} | |
function safeMint(address to) public { | |
_tokenIdCounter.increment(); | |
uint256 tokenId = _tokenIdCounter.current(); | |
_safeMint(to, tokenId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment