Last active
October 27, 2021 09:39
-
-
Save DubovinaDj/51f6d47f161deb1b63aaa5f6dce059f4 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/access/Ownable.sol"; | |
contract DonateAndTakeNFT is ERC721, Ownable { | |
uint256 public tokenCounter; | |
constructor() ERC721("Gift NTF", "DNTF") {} | |
function mint(address to) | |
public returns (uint256) | |
{ | |
uint256 newItemId = tokenCounter; | |
tokenCounter = tokenCounter + 1; | |
_mint(to, newItemId); | |
return newItemId; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment