Skip to content

Commit

Permalink
create the actual NFT minter on destination
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginowine committed Dec 3, 2023
1 parent 8d2bdac commit 259580b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions contracts/MyNFT.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract MyNFT is ERC721URIStorage, Ownable {
string constant TOKEN_URI =
"https://ipfs.io/ipfs/QmYuKY45Aq87LeL1R5dhb1hqHLp6ZFbJaCP8jxqKM1MX6y/babe_ruth_1.json";
uint256 internal tokenId;

constructor(address initialOwner) ERC721("MyNFT", "MNFT") Ownable(initialOwner){}

function mint(address to) public onlyOwner {
_safeMint(to, tokenId);
_setTokenURI(tokenId, TOKEN_URI);
unchecked {
tokenId++;
}
}
}

0 comments on commit 259580b

Please sign in to comment.