Untitled
Anonymous
plain_text
08/18/2023 3:30 PM
632 B
16
Indexable
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MyNFT is ERC721, Ownable {
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function mintNFT(address recipient, uint256 tokenId, string memory tokenURI) public onlyOwner {
_mint(recipient, tokenId);
_setTokenURI(tokenId, tokenURI);
}
}
Editor is loading...