|
|
|
|
|
|
|
pragma solidity 0.8.6;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
abstract contract Context {
|
|
function _msgSender() internal view virtual returns (address) {
|
|
return msg.sender;
|
|
}
|
|
|
|
function _msgData() internal view virtual returns (bytes calldata) {
|
|
return msg.data;
|
|
}
|
|
}
|
|
|
|
abstract contract Ownable is Context {
|
|
address private _owner;
|
|
|
|
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
_setOwner(_msgSender());
|
|
}
|
|
|
|
|
|
|
|
|
|
function owner() public view virtual returns (address) {
|
|
return _owner;
|
|
}
|
|
|
|
|
|
|
|
|
|
modifier onlyOwner() {
|
|
require(owner() == _msgSender(), "Ownable: caller is not the owner");
|
|
_;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function renounceOwnership() public virtual onlyOwner {
|
|
_setOwner(address(0));
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function transferOwnership(address newOwner) public virtual onlyOwner {
|
|
require(newOwner != address(0), "Ownable: new owner is the zero address");
|
|
_setOwner(newOwner);
|
|
}
|
|
|
|
function _setOwner(address newOwner) private {
|
|
address oldOwner = _owner;
|
|
_owner = newOwner;
|
|
emit OwnershipTransferred(oldOwner, newOwner);
|
|
}
|
|
}
|
|
|
|
interface ICollectionNFTMintFeePredicate {
|
|
function getTokenMintFee(uint256 _tokenId, uint256 _hashesTokenId) external view returns (uint256);
|
|
}
|
|
|
|
interface ICollectionNFTEligibilityPredicate {
|
|
function isTokenEligibleToMint(uint256 _tokenId, uint256 _hashesTokenId) external view returns (bool);
|
|
}
|
|
|
|
interface ICollectionNFTTokenURIPredicate {
|
|
function getTokenURI(uint256 _tokenId, uint256 _hashesTokenId, bytes32 _hashesHash) external view returns (string memory);
|
|
}
|
|
|
|
contract CookiPredicates is Ownable, ICollectionNFTEligibilityPredicate, ICollectionNFTMintFeePredicate, ICollectionNFTTokenURIPredicate {
|
|
|
|
string currentPFP = "";
|
|
|
|
function getTokenMintFee(uint256 _tokenId, uint256 _hashesTokenId) external view override returns (uint256) {
|
|
return 0;
|
|
}
|
|
|
|
function isTokenEligibleToMint(uint256 _tokenId, uint256 _hashesTokenId) external view override returns (bool) {
|
|
return true;
|
|
}
|
|
|
|
function getTokenURI(uint256 _tokenId, uint256 _hashesTokenId, bytes32 _hashesHash) external view override returns (string memory) {
|
|
return currentPFP;
|
|
}
|
|
|
|
function UpdateTokenURI(string memory _TokenURI) public onlyOwner returns (string memory) {
|
|
currentPFP = _TokenURI;
|
|
}
|
|
} |