Created
October 26, 2021 20:39
-
-
Save DubovinaDj/befa081a6d2c4b50c41815060230b170 to your computer and use it in GitHub Desktop.
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.4; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract DonateAndTakeNFT is ERC721, Ownable { | |
using Counters for Counters.Counter; | |
Counters.Counter private _tokenIdCounter; | |
constructor() ERC721("NTF Gift", "DNTF") {} | |
function mint(address to) | |
public returns (uint256) | |
{ | |
_tokenIdCounter.increment(); | |
_safeMint(to, _tokenIdCounter.current()); | |
return _tokenIdCounter.current(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment