Skip to content

Instantly share code, notes, and snippets.

@Raj6939
Created May 16, 2023 07:21
Show Gist options
  • Save Raj6939/f6f3768b1d18c813490b4bf5e06de42c to your computer and use it in GitHub Desktop.
Save Raj6939/f6f3768b1d18c813490b4bf5e06de42c to your computer and use it in GitHub Desktop.
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract MyNFT is ERC721URIStorage, Ownable {
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function mintNFT(address to, uint tokenId) public
{
_mint(to, tokenId);
}
function transfer(address from,address to, uint256 _tokenId) public{
super._transfer(from, to, _tokenId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment