Skip to content

Commit

Permalink
Add EIP-173 Ownable interface
Browse files Browse the repository at this point in the history
Prevents strangers from using the deployed contract to publish their own
NFTs.

Most NFT platforms today treat a contract as a publisher/collection, and
so by leaving a contract unrestricted, you also allow the
collection/publisher to be diluted. This might also work well as an
option.

Fixes yusefnapora#28
  • Loading branch information
danfinlay committed Aug 18, 2021
1 parent 39545cb commit dac5523
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/Minty.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ pragma solidity ^0.7.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Minty is ERC721 {
contract Minty is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;

Expand All @@ -15,6 +16,7 @@ contract Minty is ERC721 {

function mintToken(address owner, string memory metadataURI)
public
onlyOwner
returns (uint256)
{
_tokenIds.increment();
Expand Down

0 comments on commit dac5523

Please sign in to comment.