Skip to content

Instantly share code, notes, and snippets.

@DubovinaDj
Created October 26, 2021 20:39
Show Gist options
  • Save DubovinaDj/befa081a6d2c4b50c41815060230b170 to your computer and use it in GitHub Desktop.
Save DubovinaDj/befa081a6d2c4b50c41815060230b170 to your computer and use it in GitHub Desktop.
// 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