mirror of
https://github.com/autistic-symposium/mev-toolkit.git
synced 2025-04-28 11:46:13 -04:00
28 lines
722 B
Solidity
28 lines
722 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity >=0.7.3 <0.9.0;
|
|
|
|
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
|
|
import "@openzeppelin/contracts/utils/Counters.sol";
|
|
import "@openzeppelin/contracts/access/Ownable.sol";
|
|
|
|
|
|
contract MiaNFT is ERC721, Ownable {
|
|
|
|
using Counters for Counters.Counter;
|
|
Counters.Counter private _tokenIds;
|
|
|
|
constructor() public ERC721("Mia's NFT, "NFT") {}
|
|
|
|
function mintNFT(address recipient, string memory tokenURI)
|
|
public onlyOwner
|
|
returns (uint256)
|
|
{
|
|
_tokenIds.increment();
|
|
|
|
uint256 newItemId = _tokenIds.current();
|
|
_mint(recipient, newItemId);
|
|
_setTokenURI(newItemId, tokenURI);
|
|
|
|
return newItemId;
|
|
}
|
|
} |