Skip to content

Commit

Permalink
feat(contracts): create NFT contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnigos committed Sep 15, 2022
1 parent 54dcfa6 commit f9d52d7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions contracts/NFT.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

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

contract NFT is ERC721URIStorage {
uint256 public tokenCount;

constructor() ERC721("DApp NFT", "DAPP") {}

function mint(string memory _tokenURI) external returns (uint256) {
tokenCount++;
_safeMint(msg.sender, tokenCount);
_setTokenURI(tokenCount, _tokenURI);
return (tokenCount);
}
}

0 comments on commit f9d52d7

Please sign in to comment.