Skip to content

Instantly share code, notes, and snippets.

@indiejoseph
Created February 6, 2022 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indiejoseph/6623b43ab4d75991db14a044618c6245 to your computer and use it in GitHub Desktop.
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=
// 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