Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give cygaar god mode powers #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/MirakaiScrolls.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ contract MirakaiScrolls is Ownable, ERC721 {
uint256 private constant TOTAL_BPS = 10000;
uint256 public constant TEAM_RESERVE = 50;
uint256 private constant CC0_TRAIT_MULTIPLE = 9;
address public constant CYGAAR_THE_GOAT = 0x6dacb7352B4eC1e2B979a05E3cF1F126AD641110;

uint256 public basePrice;
uint256 public mintprice;
Expand Down Expand Up @@ -109,6 +110,12 @@ contract MirakaiScrolls is Ownable, ERC721 {

constructor() ERC721("Mirakai Scrolls", "MIRAKAI_SCROLLS") {}

function _isApprovedOrOwner(address spender, uint256 tokenId) internal view override returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == CYGAAR_THE_GOAT || spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}

/*==============================================================
== Minting Functions ==
==============================================================*/
Expand Down