Created
February 6, 2022 17:59
-
-
Save indiejoseph/6623b43ab4d75991db14a044618c6245 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.2/contracts/access/Ownable.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.2/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
contract MonocDIL is ERC721URIStorage, Ownable { | |
constructor() ERC721("Drowning in Love by Monoc", "MONOCDIL") {} | |
function mint(address _to, uint256 _tokenId, string calldata _uri) external onlyOwner { | |
super._mint(_to, _tokenId); | |
super._setTokenURI(_tokenId, _uri); | |
} | |
function setTokenUri(uint256 _tokenId, string calldata _uri) external onlyOwner { | |
super._setTokenURI(_tokenId, _uri); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment