Last active
April 19, 2020 10:38
-
-
Save snaketh4x0r/6968fa193cf7b46e801529478375e737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.17; | |
import "https://github.com/snaketh4x0r/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721Full.sol"; | |
import "https://github.com/snaketh4x0r/openzeppelin-contracts/blob/master/contracts/drafts/Counters.sol"; | |
contract NFTTest is ERC721Full { | |
using Counters for Counters.Counter; | |
Counters.Counter private _tokenIds; | |
constructor() ERC721Full("TestTok", "TOK") public { | |
} | |
function mintToken(address _reciever, string memory tokenURI) public returns (uint256) { | |
_tokenIds.increment(); | |
uint256 newTokId = _tokenIds.current(); | |
_mint(_reciever, newTokId); | |
_setTokenURI(newTokId, tokenURI); | |
return newTokId; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment