ETH Price: $3,441.36 (-1.23%)

9Cat (9CAT)
 

Overview

TokenID

669

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The 9Cat Saga is a play to earn gaming metaverse by a group of seasoned game developers based out of Hong Kong.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
NineCat

Compiler Version
v0.8.8+commit.dddeac2f

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 24 : NineCat.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ERC721Namable.sol";
import "./NineMilkToken.sol";

/* 
Error message:
e1: Presale has not started
e2: Public sale has not started
e3: !eligible
e4: All tokens have been minted
e5: > PRESALE_MAX_MINT
e6: Minting would exceed max supply
e7: Purchase exceeds max allowed
e8: Must mint at least one 9Cat
e9: != ETH
e10: > MAX_PER_MINT
e11: must > 0
e12: Invalid Hash
*/

contract NineCat is ERC721Namable, Ownable {
	using Strings for uint256;

	uint256 public constant MAX_9CAT = 9999;
	uint256 public constant PUBLIC_SALE_PRICE = 0.07 ether;
	uint256 public constant PRESALE_PRICE = 0.06 ether;
	uint256 public constant MAX_PER_MINT = 9;
	uint256 public constant PRESALE_MAX_MINT = 3;
	uint256 public constant MAX_9CAT_MINT = 9;

	uint256 public nameChangePrice = 297 ether;
	uint256 public bioChangePrice = 99 ether;

	string public baseTokenURI;

	bool public publicSaleStarted;
	bool public presaleStarted;

	address private signer;

	mapping(address => uint256) private _totalClaimed;

	event BaseURIChanged(string baseURI);
	event PresaleMint(address minter, uint256 amountOf9Cat);
	event PublicSaleMint(address minter, uint256 amountOf9Cat);
	event GiveawayMint(address receiver, uint256 amountOf9Cat);

	modifier whenPresaleStarted() {
		require(presaleStarted, "e1");
		_;
	}

	modifier whenPublicSaleStarted() {
		require(publicSaleStarted, "e2");
		_;
	}

	constructor(address _signer, string memory baseURI) ERC721Namable("9Cat", "9CAT") {
		baseTokenURI = baseURI;
		signer = _signer;
	}

	function giveaway(address receiver, uint256 amountOf9Cat) external onlyOwner {
		uint256 _nextTokenId = totalSupply() + 1;
		for (uint256 i = 0; i < amountOf9Cat; i++) {
			_safeMint(receiver, _nextTokenId);
			_nextTokenId++;
		}
		yieldToken.updateRewardOnMint(receiver, amountOf9Cat);
		emit GiveawayMint(receiver, amountOf9Cat);
	}

	function checkPresaleEligibility(bytes32 hash, bytes memory signature)
		public
		view
		returns (bool)
	{
		require(ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender))) == hash, "e12");
		return ECDSA.recover(hash, signature) == signer;
	}

	function amountClaimedBy(address owner) external view returns (uint256) {
		require(owner != address(0));
		return _totalClaimed[owner];
	}

	function mintPresale(
		uint256 amountOf9Cat,
		bytes32 hash,
		bytes memory signature
	) external payable whenPresaleStarted {
		require(checkPresaleEligibility(hash, signature), "e3");
		require(totalSupply() < MAX_9CAT, "e4");
		require(amountOf9Cat <= PRESALE_MAX_MINT, "e5");
		require(totalSupply() + amountOf9Cat <= MAX_9CAT, "e6");
		require(_totalClaimed[msg.sender] + amountOf9Cat <= PRESALE_MAX_MINT, "e7");
		require(amountOf9Cat > 0, "e8");
		require(PRESALE_PRICE * amountOf9Cat == msg.value, "e9");
		uint256 _nextTokenId = totalSupply() + 1;
		for (uint256 i = 0; i < amountOf9Cat; i++) {
			_safeMint(msg.sender, _nextTokenId);
			_nextTokenId++;
		}
		_totalClaimed[msg.sender] += amountOf9Cat;
		yieldToken.updateRewardOnMint(msg.sender, amountOf9Cat);
		emit PresaleMint(msg.sender, amountOf9Cat);
	}

	function mint(uint256 amountOf9Cat) external payable whenPublicSaleStarted {
		require(totalSupply() < MAX_9CAT, "e4");
		require(amountOf9Cat <= MAX_PER_MINT, "e10");
		require(totalSupply() + amountOf9Cat <= MAX_9CAT, "e6");
		require(_totalClaimed[msg.sender] + amountOf9Cat <= MAX_9CAT_MINT, "e7");
		require(amountOf9Cat > 0, "e11");
		require(PUBLIC_SALE_PRICE * amountOf9Cat == msg.value, "e9");
		uint256 _nextTokenId = totalSupply() + 1;
		for (uint256 i = 0; i < amountOf9Cat; i++) {
			_safeMint(msg.sender, _nextTokenId);
			_nextTokenId++;
		}
		_totalClaimed[msg.sender] += amountOf9Cat;
		yieldToken.updateRewardOnMint(msg.sender, amountOf9Cat);
		emit PublicSaleMint(msg.sender, amountOf9Cat);
	}

	function setSigner(address addr) external onlyOwner {
		signer = addr;
	}

	function togglePresaleStarted() external onlyOwner {
		presaleStarted = !presaleStarted;
	}

	function togglePublicSaleStarted() external onlyOwner {
		publicSaleStarted = !publicSaleStarted;
	}

	function _baseURI() internal view virtual override returns (string memory) {
		return baseTokenURI;
	}

	function setBaseURI(string memory baseURI) public onlyOwner {
		baseTokenURI = baseURI;
		emit BaseURIChanged(baseURI);
	}

	function withdrawAll() public onlyOwner {
		_widthdraw(0x7BcBa9cE8e52f999f5c8B175269abD4d70209407, address(this).balance);
	}

	function _widthdraw(address _address, uint256 _amount) private {
		(bool success, ) = _address.call{value: _amount}("");
		require(success);
	}

	NineMilkToken public yieldToken;

	function setYieldToken(address _yield) external onlyOwner {
		yieldToken = NineMilkToken(_yield);
	}

	function changeNamePrice(uint256 _price) external onlyOwner {
		nameChangePrice = _price;
	}

	function changeBioPrice(uint256 _price) external onlyOwner {
		bioChangePrice = _price;
	}

	function transferFrom(
		address from,
		address to,
		uint256 tokenId
	) public override {
		yieldToken.updateReward(from, to, 1);
		super.transferFrom(from, to, tokenId);
	}

	function safeTransferFrom(
		address from,
		address to,
		uint256 tokenId,
		bytes memory _data
	) public override {
		yieldToken.updateReward(from, to, 1);
		super.safeTransferFrom(from, to, tokenId, _data);
	}

	function changeName(uint256 tokenId, string memory newName) public override {
		yieldToken.consume(msg.sender, nameChangePrice);
		super.changeName(tokenId, newName);
	}

	function changeBio(uint256 tokenId, string memory _bio) public override {
		yieldToken.consume(msg.sender, bioChangePrice);
		super.changeBio(tokenId, _bio);
	}
}

File 2 of 24 : NineMilkToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";

contract NineMilkToken is ERC20("9MILK", "9MILK"), Ownable, AccessControl {
	using SafeMath for uint256;

	uint256 public constant BASE_RATE = 9 ether;
	uint256 public constant INITIAL_ISSUANCE = 99 ether;

	mapping(address => uint256) public rewards;
	mapping(address => uint256) public lastUpdate;
	mapping(address => uint256) public stackableBalance;

	uint256 public END = 0;
	uint256 public START = 0;

	bytes32 public constant REWARD_ROLE = keccak256("REWARD_ROLE");

	event RewardPaid(address indexed user, uint256 reward);

	function min(uint256 a, uint256 b) internal pure returns (uint256) {
		return a < b ? a : b;
	}

	function max(uint256 a, uint256 b) internal pure returns (uint256) {
		return a < b ? b : a;
	}

	modifier onlyRewarder() {
		_checkRole(REWARD_ROLE, _msgSender());
		_;
	}

	modifier onlyStarted() {
		require(START > 0, "Not Started");
		_;
	}

	function addRewardRole(address addr) external {
		grantRole(REWARD_ROLE, addr);
	}

	constructor() {
		_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
	}

	function startReward() external onlyOwner {
		START = block.timestamp;
		END = START + 283824000;
	}

	// called when minting many NFTs
	function updateRewardOnMint(address _user, uint256 _amount) external onlyRewarder {
		stackableBalance[_user] += _amount;
		uint256 time = min(block.timestamp, END);
		uint256 timerUser = max(START, lastUpdate[_user]);
		if (timerUser > 0 && START > 0) {
			rewards[_user] = rewards[_user].add(
				stackableBalance[_user].mul(BASE_RATE.mul((time.sub(timerUser)))).div(86400).add(
					_amount.mul(INITIAL_ISSUANCE)
				)
			);
		} else {
			rewards[_user] = rewards[_user].add(_amount.mul(INITIAL_ISSUANCE));
		}
		lastUpdate[_user] = time;
	}

	// called on transfers
	function updateReward(
		address _from,
		address _to,
		uint256 balanceChange
	) external onlyRewarder {
		stackableBalance[_from] -= balanceChange;
		if (_to != address(0)) {
			stackableBalance[_to] += balanceChange;
		}
		uint256 time = min(block.timestamp, END);
		uint256 timerFrom = max(lastUpdate[_from], START);
		if (timerFrom > 0)
			rewards[_from] += stackableBalance[_from].mul(BASE_RATE.mul((time.sub(timerFrom)))).div(
				86400
			);
		if (timerFrom != END) lastUpdate[_from] = time;
		if (_to != address(0)) {
			uint256 timerTo = max(lastUpdate[_to], START);
			if (timerTo > 0)
				rewards[_to] += stackableBalance[_to].mul(BASE_RATE.mul((time.sub(timerTo)))).div(86400);
			if (timerTo != END) lastUpdate[_to] = time;
		}
	}

	function getTotalClaimable(address _user) public view onlyStarted returns (uint256) {
		uint256 time = min(block.timestamp, END);
		uint256 u = max(lastUpdate[_user], START);
		uint256 pending = stackableBalance[_user].mul(BASE_RATE.mul((time.sub(u)))).div(86400);
		return rewards[_user] + pending;
	}

	function getReward() external onlyStarted {
		uint256 pending = getTotalClaimable(msg.sender);
		uint256 reward = rewards[msg.sender] + pending;
		if (reward > 0) {
			lastUpdate[msg.sender] = min(block.timestamp, END);
			rewards[msg.sender] = 0;
			_mint(msg.sender, reward);
			emit RewardPaid(msg.sender, reward);
		}
	}

	function consume(address _from, uint256 _amount) external onlyRewarder {
		_transfer(_from, owner(), _amount);
	}

	function burn(address _from, uint256 _amount) external onlyRewarder {
		_burn(_from, _amount);
	}
}

File 3 of 24 : ERC721Namable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

abstract contract ERC721Namable is ERC721Enumerable {
	mapping(uint256 => string) private bio;

	// Mapping from token ID to name
	mapping(uint256 => string) private _tokenName;

	// Mapping if certain name string has already been reserved
	mapping(string => bool) private _nameReserved;

	event NameChange(uint256 indexed tokenId, string newName);
	event BioChange(uint256 indexed tokenId, string bio);

	constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {}

	function changeName(uint256 tokenId, string memory newName) public virtual {
		address owner = ownerOf(tokenId);

		require(_msgSender() == owner, "ERC721: caller is not the owner");
		require(validateName(newName) == true, "invalid");
		require(sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "x same");
		require(isNameReserved(newName) == false, "reserved");

		// If already named, dereserve old name
		if (bytes(_tokenName[tokenId]).length > 0) {
			toggleReserveName(_tokenName[tokenId], false);
		}
		toggleReserveName(newName, true);
		_tokenName[tokenId] = newName;
		emit NameChange(tokenId, newName);
	}

	function changeBio(uint256 _tokenId, string memory _bio) public virtual {
		address owner = ownerOf(_tokenId);
		require(_msgSender() == owner, "ERC721: caller is not the owner");
		bio[_tokenId] = _bio;
		emit BioChange(_tokenId, _bio);
	}

	/**
	 * @dev Reserves the name if isReserve is set to true, de-reserves if set to false
	 */
	function toggleReserveName(string memory str, bool isReserve) internal {
		_nameReserved[toLower(str)] = isReserve;
	}

	/**
	 * @dev Returns name of the NFT at index.
	 */
	function tokenNameByIndex(uint256 index) public view returns (string memory) {
		return _tokenName[index];
	}

	/**
	 * @dev Returns bio of the NFT at index.
	 */
	function tokenBioByIndex(uint256 index) public view returns (string memory) {
		return bio[index];
	}

	/**
	 * @dev Returns if the name has been reserved.
	 */
	function isNameReserved(string memory nameString) public view returns (bool) {
		return _nameReserved[toLower(nameString)];
	}

	function validateName(string memory str) public pure returns (bool) {
		bytes memory b = bytes(str);
		if (b.length < 1) return false;
		if (b.length > 25) return false; // Cannot be longer than 25 characters
		if (b[0] == 0x20) return false; // Leading space
		if (b[b.length - 1] == 0x20) return false; // Trailing space

		bytes1 lastChar = b[0];

		for (uint256 i; i < b.length; i++) {
			bytes1 char = b[i];

			if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces

			if (
				!(char >= 0x30 && char <= 0x39) && //9-0
				!(char >= 0x41 && char <= 0x5A) && //A-Z
				!(char >= 0x61 && char <= 0x7A) && //a-z
				!(char == 0x20) //space
			) return false;

			lastChar = char;
		}

		return true;
	}

	/**
	 * @dev Converts the string to lowercase
	 */
	function toLower(string memory str) public pure returns (string memory) {
		bytes memory bStr = bytes(str);
		bytes memory bLower = new bytes(bStr.length);
		for (uint256 i = 0; i < bStr.length; i++) {
			// Uppercase character
			if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) {
				bLower[i] = bytes1(uint8(bStr[i]) + 32);
			} else {
				bLower[i] = bStr[i];
			}
		}
		return string(bLower);
	}
}

File 4 of 24 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 5 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    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);
    }
}

File 6 of 24 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 7 of 24 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 8 of 24 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 9 of 24 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 10 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

File 11 of 24 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 12 of 24 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 13 of 24 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 14 of 24 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 15 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 16 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 17 of 24 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 18 of 24 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 19 of 24 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 20 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 21 of 24 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 22 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 23 of 24 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 24 of 24 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"string","name":"baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"bio","type":"string"}],"name":"BioChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOf9Cat","type":"uint256"}],"name":"GiveawayMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOf9Cat","type":"uint256"}],"name":"PresaleMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOf9Cat","type":"uint256"}],"name":"PublicSaleMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_9CAT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_9CAT_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"amountClaimedBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bioChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_bio","type":"string"}],"name":"changeBio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changeBioPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changeNamePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"checkPresaleEligibility","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amountOf9Cat","type":"uint256"}],"name":"giveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOf9Cat","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOf9Cat","type":"uint256"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_yield","type":"address"}],"name":"setYieldToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"toLower","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"togglePresaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePublicSaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenBioByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenNameByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldToken","outputs":[{"internalType":"contract NineMilkToken","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052681019b3f66d33040000600e5568055de6a779bbac0000600f553480156200002b57600080fd5b5060405162003da438038062003da48339810160408190526200004e916200022e565b604051806040016040528060048152602001630e50d85d60e21b815250604051806040016040528060048152602001630e50d05560e21b81525081818160009080519060200190620000a292919062000172565b508051620000b890600190602084019062000172565b5050505050620000d7620000d16200011c60201b60201c565b62000120565b8051620000ec90601090602084019062000172565b5050601180546001600160a01b03909216620100000262010000600160b01b03199092169190911790556200036b565b3390565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000180906200032e565b90600052602060002090601f016020900481019282620001a45760008555620001ef565b82601f10620001bf57805160ff1916838001178555620001ef565b82800160010185558215620001ef579182015b82811115620001ef578251825591602001919060010190620001d2565b50620001fd92915062000201565b5090565b5b80821115620001fd576000815560010162000202565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200024257600080fd5b82516001600160a01b03811681146200025a57600080fd5b602084810151919350906001600160401b03808211156200027a57600080fd5b818601915086601f8301126200028f57600080fd5b815181811115620002a457620002a462000218565b604051601f8201601f19908116603f01168101908382118183101715620002cf57620002cf62000218565b816040528281528986848701011115620002e857600080fd5b600093505b828410156200030c5784840186015181850187015292850192620002ed565b828411156200031e5760008684830101525b8096505050505050509250929050565b600181811c908216806200034357607f821691505b602082108114156200036557634e487b7160e01b600052602260045260246000fd5b50919050565b613a29806200037b6000396000f3fe6080604052600436106102445760003560e01c806301ffc9a71461024957806304549d6f1461027e578063045f7daf1461029d578063050225ea146102c057806306fdde03146102e257806307e89ec014610304578063081812fc1461031f578063095ea7b31461035757806309d42b301461029d5780630ebe88471461037757806315b56d101461038d57806318160ddd146103ad5780631978f469146103c257806323b872dd146103e257806323ffce85146104025780632f745c59146104225780632f8145751461044257806340488e951461045757806342842e0e1461047757806342f04f341461049757806345ca7738146104aa5780634d426528146104c05780634edc3f2a146104e05780634f6ccce7146104f6578063549527c31461051657806355f804b31461052b57806359f2f8971461054b57806362dc6e211461056b5780636352211e146105865780636c19e783146105a65780636d522418146105c657806370a08231146105e6578063715018a61461060657806376d5de851461061b578063853828b61461063b5780638d02d86c146106505780638da5cb5b146106705780639416b4231461068557806395d89b41146106a55780639ffdb65a146106ba578063a0712d68146106da578063a22cb465146106ed578063a2e914771461070d578063b88d4fde14610727578063c39cbef114610747578063c87b56dd14610767578063cc371bf314610787578063d547cfb7146107a7578063e985e9c5146107bc578063ed1fc2a2146107dc578063f2fde38b146107f1575b600080fd5b34801561025557600080fd5b506102696102643660046131df565b610811565b60405190151581526020015b60405180910390f35b34801561028a57600080fd5b5060115461026990610100900460ff1681565b3480156102a957600080fd5b506102b2600981565b604051908152602001610275565b3480156102cc57600080fd5b506102e06102db366004613218565b61083c565b005b3480156102ee57600080fd5b506102f7610964565b604051610275919061329a565b34801561031057600080fd5b506102b266f8b0a10e47000081565b34801561032b57600080fd5b5061033f61033a3660046132ad565b6109f6565b6040516001600160a01b039091168152602001610275565b34801561036357600080fd5b506102e0610372366004613218565b610a7e565b34801561038357600080fd5b506102b2600f5481565b34801561039957600080fd5b506102696103a8366004613368565b610b8f565b3480156103b957600080fd5b506008546102b2565b3480156103ce57600080fd5b506102b26103dd36600461339c565b610bc2565b3480156103ee57600080fd5b506102e06103fd3660046133b7565b610bf3565b34801561040e57600080fd5b506102e061041d36600461339c565b610c65565b34801561042e57600080fd5b506102b261043d366004613218565b610cb6565b34801561044e57600080fd5b506102e0610d4c565b34801561046357600080fd5b506102696104723660046133f3565b610d8f565b34801561048357600080fd5b506102e06104923660046133b7565b610e69565b6102e06104a5366004613439565b610e84565b3480156104b657600080fd5b506102b2600e5481565b3480156104cc57600080fd5b506102e06104db3660046133f3565b611144565b3480156104ec57600080fd5b506102b261270f81565b34801561050257600080fd5b506102b26105113660046132ad565b6111b8565b34801561052257600080fd5b506102b2600381565b34801561053757600080fd5b506102e0610546366004613368565b61124b565b34801561055757600080fd5b506102f76105663660046132ad565b6112c8565b34801561057757600080fd5b506102b266d529ae9e86000081565b34801561059257600080fd5b5061033f6105a13660046132ad565b61136a565b3480156105b257600080fd5b506102e06105c136600461339c565b6113e1565b3480156105d257600080fd5b506102f76105e13660046132ad565b61143a565b3480156105f257600080fd5b506102b261060136600461339c565b611457565b34801561061257600080fd5b506102e06114de565b34801561062757600080fd5b5060135461033f906001600160a01b031681565b34801561064757600080fd5b506102e0611519565b34801561065c57600080fd5b506102e061066b3660046132ad565b611566565b34801561067c57600080fd5b5061033f61159a565b34801561069157600080fd5b506102f76106a0366004613368565b6115a9565b3480156106b157600080fd5b506102f761170b565b3480156106c657600080fd5b506102696106d5366004613368565b61171a565b6102e06106e83660046132ad565b611929565b3480156106f957600080fd5b506102e0610708366004613488565b611ba9565b34801561071957600080fd5b506011546102699060ff1681565b34801561073357600080fd5b506102e06107423660046134c4565b611c6a565b34801561075357600080fd5b506102e06107623660046133f3565b611ce3565b34801561077357600080fd5b506102f76107823660046132ad565b611d53565b34801561079357600080fd5b506102e06107a23660046132ad565b611e1e565b3480156107b357600080fd5b506102f7611e52565b3480156107c857600080fd5b506102696107d736600461352b565b611ee0565b3480156107e857600080fd5b506102e0611f0e565b3480156107fd57600080fd5b506102e061080c36600461339c565b611f5a565b60006001600160e01b0319821663780e9d6360e01b1480610836575061083682611ffa565b92915050565b3361084561159a565b6001600160a01b0316146108745760405162461bcd60e51b815260040161086b9061355e565b60405180910390fd5b600061087f60085490565b61088a9060016135a9565b905060005b828110156108c1576108a1848361204a565b816108ab816135c1565b92505080806108b9906135c1565b91505061088f565b5060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c01906108f490869086906004016135dc565b600060405180830381600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050507f0829a37ec18cafa0a2bd813813fba4b2abf78cf1559a680aaf4a2f05db94e41a83836040516109579291906135dc565b60405180910390a1505050565b606060008054610973906135f5565b80601f016020809104026020016040519081016040528092919081815260200182805461099f906135f5565b80156109ec5780601f106109c1576101008083540402835291602001916109ec565b820191906000526020600020905b8154815290600101906020018083116109cf57829003601f168201915b5050505050905090565b6000610a0182612064565b610a625760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086b565b506000908152600460205260409020546001600160a01b031690565b6000610a898261136a565b9050806001600160a01b0316836001600160a01b03161415610af75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161086b565b336001600160a01b0382161480610b135750610b138133611ee0565b610b805760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161086b565b610b8a8383612081565b505050565b6000600c610b9c836115a9565b604051610ba99190613630565b9081526040519081900360200190205460ff1692915050565b60006001600160a01b038216610bd757600080fd5b506001600160a01b031660009081526012602052604090205490565b60135460405163164746fd60e11b81526001600160a01b0390911690632c8e8dfa90610c28908690869060019060040161364c565b600060405180830381600087803b158015610c4257600080fd5b505af1158015610c56573d6000803e3d6000fd5b50505050610b8a8383836120ef565b33610c6e61159a565b6001600160a01b031614610c945760405162461bcd60e51b815260040161086b9061355e565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610cc183611457565b8210610d235760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161086b565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b33610d5561159a565b6001600160a01b031614610d7b5760405162461bcd60e51b815260040161086b9061355e565b6011805460ff19811660ff90911615179055565b604080513360601b6001600160601b031916602080830191909152825160148184030181526034830184528051908201207b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b605484015260708084019190915283518084039091018152609090920190925280519101206000908314610e3c5760405162461bcd60e51b815260206004820152600360248201526232989960e91b604482015260640161086b565b6011546201000090046001600160a01b0316610e588484612120565b6001600160a01b0316149392505050565b610b8a83838360405180602001604052806000815250611c6a565b601154610100900460ff16610ec05760405162461bcd60e51b8152602060048201526002602482015261653160f01b604482015260640161086b565b610eca8282610d8f565b610efb5760405162461bcd60e51b8152602060048201526002602482015261653360f01b604482015260640161086b565b61270f610f0760085490565b10610f245760405162461bcd60e51b815260040161086b90613670565b6003831115610f5a5760405162461bcd60e51b8152602060048201526002602482015261653560f01b604482015260640161086b565b61270f83610f6760085490565b610f7191906135a9565b1115610f8f5760405162461bcd60e51b815260040161086b9061368c565b33600090815260126020526040902054600390610fad9085906135a9565b1115610fcb5760405162461bcd60e51b815260040161086b906136a8565b600083116110005760405162461bcd60e51b81526020600482015260026024820152610ca760f31b604482015260640161086b565b346110128466d529ae9e8600006136c4565b1461102f5760405162461bcd60e51b815260040161086b906136e3565b600061103a60085490565b6110459060016135a9565b905060005b8481101561107c5761105c338361204a565b81611066816135c1565b9250508080611074906135c1565b91505061104a565b50336000908152601260205260408120805486929061109c9084906135a9565b909155505060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c01906110d390339088906004016135dc565b600060405180830381600087803b1580156110ed57600080fd5b505af1158015611101573d6000803e3d6000fd5b505050507ff5df7d07fef0d8ac7581015ebd1a3b7b7760da84b12f0c8174ae0dcd639cb6a333856040516111369291906135dc565b60405180910390a150505050565b601354600f54604051631125ae3960e11b81526001600160a01b039092169163224b5c7291611178913391906004016135dc565b600060405180830381600087803b15801561119257600080fd5b505af11580156111a6573d6000803e3d6000fd5b505050506111b4828261213c565b5050565b60006111c360085490565b82106112265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161086b565b60088281548110611239576112396136ff565b90600052602060002001549050919050565b3361125461159a565b6001600160a01b03161461127a5760405162461bcd60e51b815260040161086b9061355e565b805161128d906010906020840190613130565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf6816040516112bd919061329a565b60405180910390a150565b6000818152600a602052604090208054606091906112e5906135f5565b80601f0160208091040260200160405190810160405280929190818152602001828054611311906135f5565b801561135e5780601f106113335761010080835404028352916020019161135e565b820191906000526020600020905b81548152906001019060200180831161134157829003601f168201915b50505050509050919050565b6000818152600260205260408120546001600160a01b0316806108365760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161086b565b336113ea61159a565b6001600160a01b0316146114105760405162461bcd60e51b815260040161086b9061355e565b601180546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6000818152600b602052604090208054606091906112e5906135f5565b60006001600160a01b0382166114c25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161086b565b506001600160a01b031660009081526003602052604090205490565b336114e761159a565b6001600160a01b03161461150d5760405162461bcd60e51b815260040161086b9061355e565b61151760006121ce565b565b3361152261159a565b6001600160a01b0316146115485760405162461bcd60e51b815260040161086b9061355e565b611517737bcba9ce8e52f999f5c8b175269abd4d7020940747612220565b3361156f61159a565b6001600160a01b0316146115955760405162461bcd60e51b815260040161086b9061355e565b600f55565b600d546001600160a01b031690565b60606000829050600081516001600160401b038111156115cb576115cb6132c6565b6040519080825280601f01601f1916602001820160405280156115f5576020820181803683370190505b50905060005b8251811015611703576041838281518110611618576116186136ff565b016020015160f81c108015906116485750605a83828151811061163d5761163d6136ff565b016020015160f81c11155b156116aa5782818151811061165f5761165f6136ff565b602001015160f81c60f81b60f81c60206116799190613715565b60f81b82828151811061168e5761168e6136ff565b60200101906001600160f81b031916908160001a9053506116f1565b8281815181106116bc576116bc6136ff565b602001015160f81c60f81b8282815181106116d9576116d96136ff565b60200101906001600160f81b031916908160001a9053505b806116fb816135c1565b9150506115fb565b509392505050565b606060018054610973906135f5565b6000808290506001815110156117335750600092915050565b6019815111156117465750600092915050565b80600081518110611759576117596136ff565b6020910101516001600160f81b031916600160fd1b141561177d5750600092915050565b806001825161178c919061373a565b8151811061179c5761179c6136ff565b6020910101516001600160f81b031916600160fd1b14156117c05750600092915050565b6000816000815181106117d5576117d56136ff565b01602001516001600160f81b031916905060005b825181101561191e576000838281518110611806576118066136ff565b01602001516001600160f81b0319169050600160fd1b811480156118375750600160fd1b6001600160f81b03198416145b156118485750600095945050505050565b600360fc1b6001600160f81b03198216108015906118745750603960f81b6001600160f81b0319821611155b1580156118aa5750604160f81b6001600160f81b03198216108015906118a85750602d60f91b6001600160f81b0319821611155b155b80156118df5750606160f81b6001600160f81b03198216108015906118dd5750603d60f91b6001600160f81b0319821611155b155b80156118f95750600160fd1b6001600160f81b0319821614155b1561190a5750600095945050505050565b915080611916816135c1565b9150506117e9565b506001949350505050565b60115460ff166119605760405162461bcd60e51b8152602060048201526002602482015261329960f11b604482015260640161086b565b61270f61196c60085490565b106119895760405162461bcd60e51b815260040161086b90613670565b60098111156119c05760405162461bcd60e51b815260206004820152600360248201526206531360ec1b604482015260640161086b565b61270f816119cd60085490565b6119d791906135a9565b11156119f55760405162461bcd60e51b815260040161086b9061368c565b33600090815260126020526040902054600990611a139083906135a9565b1115611a315760405162461bcd60e51b815260040161086b906136a8565b60008111611a675760405162461bcd60e51b815260206004820152600360248201526265313160e81b604482015260640161086b565b34611a798266f8b0a10e4700006136c4565b14611a965760405162461bcd60e51b815260040161086b906136e3565b6000611aa160085490565b611aac9060016135a9565b905060005b82811015611ae357611ac3338361204a565b81611acd816135c1565b9250508080611adb906135c1565b915050611ab1565b503360009081526012602052604081208054849290611b039084906135a9565b909155505060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c0190611b3a90339086906004016135dc565b600060405180830381600087803b158015611b5457600080fd5b505af1158015611b68573d6000803e3d6000fd5b505050507f239739eec2dbaccb604ff1de6462a5eccd5f3148924696dd88f04d636ff582b53383604051611b9d9291906135dc565b60405180910390a15050565b6001600160a01b038216331415611bfe5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161086b565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60135460405163164746fd60e11b81526001600160a01b0390911690632c8e8dfa90611c9f908790879060019060040161364c565b600060405180830381600087803b158015611cb957600080fd5b505af1158015611ccd573d6000803e3d6000fd5b50505050611cdd84848484612280565b50505050565b601354600e54604051631125ae3960e11b81526001600160a01b039092169163224b5c7291611d17913391906004016135dc565b600060405180830381600087803b158015611d3157600080fd5b505af1158015611d45573d6000803e3d6000fd5b505050506111b482826122b2565b6060611d5e82612064565b611dc25760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161086b565b6000611dcc612570565b90506000815111611dec5760405180602001604052806000815250611e17565b80611df68461257f565b604051602001611e07929190613751565b6040516020818303038152906040525b9392505050565b33611e2761159a565b6001600160a01b031614611e4d5760405162461bcd60e51b815260040161086b9061355e565b600e55565b60108054611e5f906135f5565b80601f0160208091040260200160405190810160405280929190818152602001828054611e8b906135f5565b8015611ed85780601f10611ead57610100808354040283529160200191611ed8565b820191906000526020600020905b815481529060010190602001808311611ebb57829003601f168201915b505050505081565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b33611f1761159a565b6001600160a01b031614611f3d5760405162461bcd60e51b815260040161086b9061355e565b6011805461ff001981166101009182900460ff1615909102179055565b33611f6361159a565b6001600160a01b031614611f895760405162461bcd60e51b815260040161086b9061355e565b6001600160a01b038116611fee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161086b565b611ff7816121ce565b50565b60006001600160e01b031982166380ac58cd60e01b148061202b57506001600160e01b03198216635b5e139f60e01b145b8061083657506301ffc9a760e01b6001600160e01b0319831614610836565b6111b4828260405180602001604052806000815250612684565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120b68261136a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6120f933826126b7565b6121155760405162461bcd60e51b815260040161086b90613780565b610b8a838383612779565b600080600061212f8585612912565b9150915061170381612982565b60006121478361136a565b9050336001600160a01b038216146121715760405162461bcd60e51b815260040161086b906137d1565b6000838152600a60209081526040909120835161219092850190613130565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d836040516121c1919061329a565b60405180910390a2505050565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461226d576040519150601f19603f3d011682016040523d82523d6000602084013e612272565b606091505b5050905080610b8a57600080fd5b61228a33836126b7565b6122a65760405162461bcd60e51b815260040161086b90613780565b611cdd84848484612b38565b60006122bd8361136a565b9050336001600160a01b038216146122e75760405162461bcd60e51b815260040161086b906137d1565b6122f08261171a565b151560011461232b5760405162461bcd60e51b81526020600482015260076024820152661a5b9d985b1a5960ca1b604482015260640161086b565b6000838152600b602052604090819020905160029161234991613808565b602060405180830381855afa158015612366573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061238991906138a4565b6002836040516123999190613630565b602060405180830381855afa1580156123b6573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906123d991906138a4565b14156124105760405162461bcd60e51b8152602060048201526006602482015265782073616d6560d01b604482015260640161086b565b61241982610b8f565b156124515760405162461bcd60e51b81526020600482015260086024820152671c995cd95c9d995960c21b604482015260640161086b565b6000838152600b60205260408120805461246a906135f5565b90501115612515576000838152600b6020526040902080546125159190612490906135f5565b80601f01602080910402602001604051908101604052809291908181526020018280546124bc906135f5565b80156125095780601f106124de57610100808354040283529160200191612509565b820191906000526020600020905b8154815290600101906020018083116124ec57829003601f168201915b50505050506000612b6b565b612520826001612b6b565b6000838152600b60209081526040909120835161253f92850190613130565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b836040516121c1919061329a565b606060108054610973906135f5565b6060816125a35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156125cd57806125b7816135c1565b91506125c69050600a836138d3565b91506125a7565b6000816001600160401b038111156125e7576125e76132c6565b6040519080825280601f01601f191660200182016040528015612611576020820181803683370190505b5090505b841561267c5761262660018361373a565b9150612633600a866138e7565b61263e9060306135a9565b60f81b818381518110612653576126536136ff565b60200101906001600160f81b031916908160001a905350612675600a866138d3565b9450612615565b949350505050565b61268e8383612ba8565b61269b6000848484612cd4565b610b8a5760405162461bcd60e51b815260040161086b906138fb565b60006126c282612064565b6127235760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086b565b600061272e8361136a565b9050806001600160a01b0316846001600160a01b031614806127695750836001600160a01b031661275e846109f6565b6001600160a01b0316145b8061267c575061267c8185611ee0565b826001600160a01b031661278c8261136a565b6001600160a01b0316146127f45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161086b565b6001600160a01b0382166128565760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161086b565b612861838383612dd6565b61286c600082612081565b6001600160a01b038316600090815260036020526040812080546001929061289590849061373a565b90915550506001600160a01b03821660009081526003602052604081208054600192906128c39084906135a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716916000805160206139d483398151915291a4505050565b6000808251604114156129495760208301516040840151606085015160001a61293d87828585612e8e565b9450945050505061297b565b8251604014156129735760208301516040840151612968868383612f71565b93509350505061297b565b506000905060025b9250929050565b60008160048111156129965761299661394d565b141561299f5750565b60018160048111156129b3576129b361394d565b14156129fc5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161086b565b6002816004811115612a1057612a1061394d565b1415612a5e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161086b565b6003816004811115612a7257612a7261394d565b1415612acb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161086b565b6004816004811115612adf57612adf61394d565b1415611ff75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161086b565b612b43848484612779565b612b4f84848484612cd4565b611cdd5760405162461bcd60e51b815260040161086b906138fb565b80600c612b77846115a9565b604051612b849190613630565b908152604051908190036020019020805491151560ff199092169190911790555050565b6001600160a01b038216612bfe5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161086b565b612c0781612064565b15612c535760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604482015260640161086b565b612c5f60008383612dd6565b6001600160a01b0382166000908152600360205260408120805460019290612c889084906135a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392906000805160206139d4833981519152908290a45050565b60006001600160a01b0384163b1561191e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d18903390899088908890600401613963565b602060405180830381600087803b158015612d3257600080fd5b505af1925050508015612d62575060408051601f3d908101601f19168201909252612d5f918101906139a0565b60015b612dbc573d808015612d90576040519150601f19603f3d011682016040523d82523d6000602084013e612d95565b606091505b508051612db45760405162461bcd60e51b815260040161086b906138fb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061267c565b6001600160a01b038316612e3157612e2c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612e54565b816001600160a01b0316836001600160a01b031614612e5457612e548382612fa0565b6001600160a01b038216612e6b57610b8a8161303d565b826001600160a01b0316826001600160a01b031614610b8a57610b8a82826130ec565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612ebb5750600090506003612f68565b8460ff16601b14158015612ed357508460ff16601c14155b15612ee45750600090506004612f68565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f38573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f6157600060019250925050612f68565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612f9287828885612e8e565b935093505050935093915050565b60006001612fad84611457565b612fb7919061373a565b60008381526007602052604090205490915080821461300a576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061304f9060019061373a565b60008381526009602052604081205460088054939450909284908110613077576130776136ff565b906000526020600020015490508060088381548110613098576130986136ff565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130d0576130d06139bd565b6001900381819060005260206000200160009055905550505050565b60006130f783611457565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461313c906135f5565b90600052602060002090601f01602090048101928261315e57600085556131a4565b82601f1061317757805160ff19168380011785556131a4565b828001600101855582156131a4579182015b828111156131a4578251825591602001919060010190613189565b506131b09291506131b4565b5090565b5b808211156131b057600081556001016131b5565b6001600160e01b031981168114611ff757600080fd5b6000602082840312156131f157600080fd5b8135611e17816131c9565b80356001600160a01b038116811461321357600080fd5b919050565b6000806040838503121561322b57600080fd5b613234836131fc565b946020939093013593505050565b60005b8381101561325d578181015183820152602001613245565b83811115611cdd5750506000910152565b60008151808452613286816020860160208601613242565b601f01601f19169290920160200192915050565b602081526000611e17602083018461326e565b6000602082840312156132bf57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126132ed57600080fd5b81356001600160401b0380821115613307576133076132c6565b604051601f8301601f19908116603f0116810190828211818310171561332f5761332f6132c6565b8160405283815286602085880101111561334857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561337a57600080fd5b81356001600160401b0381111561339057600080fd5b61267c848285016132dc565b6000602082840312156133ae57600080fd5b611e17826131fc565b6000806000606084860312156133cc57600080fd5b6133d5846131fc565b92506133e3602085016131fc565b9150604084013590509250925092565b6000806040838503121561340657600080fd5b8235915060208301356001600160401b0381111561342357600080fd5b61342f858286016132dc565b9150509250929050565b60008060006060848603121561344e57600080fd5b833592506020840135915060408401356001600160401b0381111561347257600080fd5b61347e868287016132dc565b9150509250925092565b6000806040838503121561349b57600080fd5b6134a4836131fc565b9150602083013580151581146134b957600080fd5b809150509250929050565b600080600080608085870312156134da57600080fd5b6134e3856131fc565b93506134f1602086016131fc565b92506040850135915060608501356001600160401b0381111561351357600080fd5b61351f878288016132dc565b91505092959194509250565b6000806040838503121561353e57600080fd5b613547836131fc565b9150613555602084016131fc565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156135bc576135bc613593565b500190565b60006000198214156135d5576135d5613593565b5060010190565b6001600160a01b03929092168252602082015260400190565b600181811c9082168061360957607f821691505b6020821081141561362a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251613642818460208701613242565b9190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825260029082015261194d60f21b604082015260600190565b602080825260029082015261329b60f11b604082015260600190565b602080825260029082015261653760f01b604082015260600190565b60008160001904831182151516156136de576136de613593565b500290565b602080825260029082015261653960f01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff84168060ff0382111561373257613732613593565b019392505050565b60008282101561374c5761374c613593565b500390565b60008351613763818460208801613242565b835190830190613777818360208801613242565b01949350505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604082015260600190565b600080835481600182811c91508083168061382457607f831692505b602080841082141561384457634e487b7160e01b86526022600452602486fd5b818015613858576001811461386957613896565b60ff19861689528489019650613896565b60008a81526020902060005b8681101561388e5781548b820152908501908301613875565b505084890196505b509498975050505050505050565b6000602082840312156138b657600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826138e2576138e26138bd565b500490565b6000826138f6576138f66138bd565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139969083018461326e565b9695505050505050565b6000602082840312156139b257600080fd5b8151611e17816131c9565b634e487b7160e01b600052603160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220100fcec1b1e11f168e493aa2803f8951f78603716402aeb7f00ea6a0ac15381564736f6c634300080800330000000000000000000000003daddaad4effe13fb5a99886b6477e8be615078f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001968747470733a2f2f6170692e396361742e696f2f396361742f00000000000000

Deployed Bytecode

0x6080604052600436106102445760003560e01c806301ffc9a71461024957806304549d6f1461027e578063045f7daf1461029d578063050225ea146102c057806306fdde03146102e257806307e89ec014610304578063081812fc1461031f578063095ea7b31461035757806309d42b301461029d5780630ebe88471461037757806315b56d101461038d57806318160ddd146103ad5780631978f469146103c257806323b872dd146103e257806323ffce85146104025780632f745c59146104225780632f8145751461044257806340488e951461045757806342842e0e1461047757806342f04f341461049757806345ca7738146104aa5780634d426528146104c05780634edc3f2a146104e05780634f6ccce7146104f6578063549527c31461051657806355f804b31461052b57806359f2f8971461054b57806362dc6e211461056b5780636352211e146105865780636c19e783146105a65780636d522418146105c657806370a08231146105e6578063715018a61461060657806376d5de851461061b578063853828b61461063b5780638d02d86c146106505780638da5cb5b146106705780639416b4231461068557806395d89b41146106a55780639ffdb65a146106ba578063a0712d68146106da578063a22cb465146106ed578063a2e914771461070d578063b88d4fde14610727578063c39cbef114610747578063c87b56dd14610767578063cc371bf314610787578063d547cfb7146107a7578063e985e9c5146107bc578063ed1fc2a2146107dc578063f2fde38b146107f1575b600080fd5b34801561025557600080fd5b506102696102643660046131df565b610811565b60405190151581526020015b60405180910390f35b34801561028a57600080fd5b5060115461026990610100900460ff1681565b3480156102a957600080fd5b506102b2600981565b604051908152602001610275565b3480156102cc57600080fd5b506102e06102db366004613218565b61083c565b005b3480156102ee57600080fd5b506102f7610964565b604051610275919061329a565b34801561031057600080fd5b506102b266f8b0a10e47000081565b34801561032b57600080fd5b5061033f61033a3660046132ad565b6109f6565b6040516001600160a01b039091168152602001610275565b34801561036357600080fd5b506102e0610372366004613218565b610a7e565b34801561038357600080fd5b506102b2600f5481565b34801561039957600080fd5b506102696103a8366004613368565b610b8f565b3480156103b957600080fd5b506008546102b2565b3480156103ce57600080fd5b506102b26103dd36600461339c565b610bc2565b3480156103ee57600080fd5b506102e06103fd3660046133b7565b610bf3565b34801561040e57600080fd5b506102e061041d36600461339c565b610c65565b34801561042e57600080fd5b506102b261043d366004613218565b610cb6565b34801561044e57600080fd5b506102e0610d4c565b34801561046357600080fd5b506102696104723660046133f3565b610d8f565b34801561048357600080fd5b506102e06104923660046133b7565b610e69565b6102e06104a5366004613439565b610e84565b3480156104b657600080fd5b506102b2600e5481565b3480156104cc57600080fd5b506102e06104db3660046133f3565b611144565b3480156104ec57600080fd5b506102b261270f81565b34801561050257600080fd5b506102b26105113660046132ad565b6111b8565b34801561052257600080fd5b506102b2600381565b34801561053757600080fd5b506102e0610546366004613368565b61124b565b34801561055757600080fd5b506102f76105663660046132ad565b6112c8565b34801561057757600080fd5b506102b266d529ae9e86000081565b34801561059257600080fd5b5061033f6105a13660046132ad565b61136a565b3480156105b257600080fd5b506102e06105c136600461339c565b6113e1565b3480156105d257600080fd5b506102f76105e13660046132ad565b61143a565b3480156105f257600080fd5b506102b261060136600461339c565b611457565b34801561061257600080fd5b506102e06114de565b34801561062757600080fd5b5060135461033f906001600160a01b031681565b34801561064757600080fd5b506102e0611519565b34801561065c57600080fd5b506102e061066b3660046132ad565b611566565b34801561067c57600080fd5b5061033f61159a565b34801561069157600080fd5b506102f76106a0366004613368565b6115a9565b3480156106b157600080fd5b506102f761170b565b3480156106c657600080fd5b506102696106d5366004613368565b61171a565b6102e06106e83660046132ad565b611929565b3480156106f957600080fd5b506102e0610708366004613488565b611ba9565b34801561071957600080fd5b506011546102699060ff1681565b34801561073357600080fd5b506102e06107423660046134c4565b611c6a565b34801561075357600080fd5b506102e06107623660046133f3565b611ce3565b34801561077357600080fd5b506102f76107823660046132ad565b611d53565b34801561079357600080fd5b506102e06107a23660046132ad565b611e1e565b3480156107b357600080fd5b506102f7611e52565b3480156107c857600080fd5b506102696107d736600461352b565b611ee0565b3480156107e857600080fd5b506102e0611f0e565b3480156107fd57600080fd5b506102e061080c36600461339c565b611f5a565b60006001600160e01b0319821663780e9d6360e01b1480610836575061083682611ffa565b92915050565b3361084561159a565b6001600160a01b0316146108745760405162461bcd60e51b815260040161086b9061355e565b60405180910390fd5b600061087f60085490565b61088a9060016135a9565b905060005b828110156108c1576108a1848361204a565b816108ab816135c1565b92505080806108b9906135c1565b91505061088f565b5060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c01906108f490869086906004016135dc565b600060405180830381600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050507f0829a37ec18cafa0a2bd813813fba4b2abf78cf1559a680aaf4a2f05db94e41a83836040516109579291906135dc565b60405180910390a1505050565b606060008054610973906135f5565b80601f016020809104026020016040519081016040528092919081815260200182805461099f906135f5565b80156109ec5780601f106109c1576101008083540402835291602001916109ec565b820191906000526020600020905b8154815290600101906020018083116109cf57829003601f168201915b5050505050905090565b6000610a0182612064565b610a625760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086b565b506000908152600460205260409020546001600160a01b031690565b6000610a898261136a565b9050806001600160a01b0316836001600160a01b03161415610af75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161086b565b336001600160a01b0382161480610b135750610b138133611ee0565b610b805760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161086b565b610b8a8383612081565b505050565b6000600c610b9c836115a9565b604051610ba99190613630565b9081526040519081900360200190205460ff1692915050565b60006001600160a01b038216610bd757600080fd5b506001600160a01b031660009081526012602052604090205490565b60135460405163164746fd60e11b81526001600160a01b0390911690632c8e8dfa90610c28908690869060019060040161364c565b600060405180830381600087803b158015610c4257600080fd5b505af1158015610c56573d6000803e3d6000fd5b50505050610b8a8383836120ef565b33610c6e61159a565b6001600160a01b031614610c945760405162461bcd60e51b815260040161086b9061355e565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610cc183611457565b8210610d235760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161086b565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b33610d5561159a565b6001600160a01b031614610d7b5760405162461bcd60e51b815260040161086b9061355e565b6011805460ff19811660ff90911615179055565b604080513360601b6001600160601b031916602080830191909152825160148184030181526034830184528051908201207b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b605484015260708084019190915283518084039091018152609090920190925280519101206000908314610e3c5760405162461bcd60e51b815260206004820152600360248201526232989960e91b604482015260640161086b565b6011546201000090046001600160a01b0316610e588484612120565b6001600160a01b0316149392505050565b610b8a83838360405180602001604052806000815250611c6a565b601154610100900460ff16610ec05760405162461bcd60e51b8152602060048201526002602482015261653160f01b604482015260640161086b565b610eca8282610d8f565b610efb5760405162461bcd60e51b8152602060048201526002602482015261653360f01b604482015260640161086b565b61270f610f0760085490565b10610f245760405162461bcd60e51b815260040161086b90613670565b6003831115610f5a5760405162461bcd60e51b8152602060048201526002602482015261653560f01b604482015260640161086b565b61270f83610f6760085490565b610f7191906135a9565b1115610f8f5760405162461bcd60e51b815260040161086b9061368c565b33600090815260126020526040902054600390610fad9085906135a9565b1115610fcb5760405162461bcd60e51b815260040161086b906136a8565b600083116110005760405162461bcd60e51b81526020600482015260026024820152610ca760f31b604482015260640161086b565b346110128466d529ae9e8600006136c4565b1461102f5760405162461bcd60e51b815260040161086b906136e3565b600061103a60085490565b6110459060016135a9565b905060005b8481101561107c5761105c338361204a565b81611066816135c1565b9250508080611074906135c1565b91505061104a565b50336000908152601260205260408120805486929061109c9084906135a9565b909155505060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c01906110d390339088906004016135dc565b600060405180830381600087803b1580156110ed57600080fd5b505af1158015611101573d6000803e3d6000fd5b505050507ff5df7d07fef0d8ac7581015ebd1a3b7b7760da84b12f0c8174ae0dcd639cb6a333856040516111369291906135dc565b60405180910390a150505050565b601354600f54604051631125ae3960e11b81526001600160a01b039092169163224b5c7291611178913391906004016135dc565b600060405180830381600087803b15801561119257600080fd5b505af11580156111a6573d6000803e3d6000fd5b505050506111b4828261213c565b5050565b60006111c360085490565b82106112265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161086b565b60088281548110611239576112396136ff565b90600052602060002001549050919050565b3361125461159a565b6001600160a01b03161461127a5760405162461bcd60e51b815260040161086b9061355e565b805161128d906010906020840190613130565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf6816040516112bd919061329a565b60405180910390a150565b6000818152600a602052604090208054606091906112e5906135f5565b80601f0160208091040260200160405190810160405280929190818152602001828054611311906135f5565b801561135e5780601f106113335761010080835404028352916020019161135e565b820191906000526020600020905b81548152906001019060200180831161134157829003601f168201915b50505050509050919050565b6000818152600260205260408120546001600160a01b0316806108365760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161086b565b336113ea61159a565b6001600160a01b0316146114105760405162461bcd60e51b815260040161086b9061355e565b601180546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6000818152600b602052604090208054606091906112e5906135f5565b60006001600160a01b0382166114c25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161086b565b506001600160a01b031660009081526003602052604090205490565b336114e761159a565b6001600160a01b03161461150d5760405162461bcd60e51b815260040161086b9061355e565b61151760006121ce565b565b3361152261159a565b6001600160a01b0316146115485760405162461bcd60e51b815260040161086b9061355e565b611517737bcba9ce8e52f999f5c8b175269abd4d7020940747612220565b3361156f61159a565b6001600160a01b0316146115955760405162461bcd60e51b815260040161086b9061355e565b600f55565b600d546001600160a01b031690565b60606000829050600081516001600160401b038111156115cb576115cb6132c6565b6040519080825280601f01601f1916602001820160405280156115f5576020820181803683370190505b50905060005b8251811015611703576041838281518110611618576116186136ff565b016020015160f81c108015906116485750605a83828151811061163d5761163d6136ff565b016020015160f81c11155b156116aa5782818151811061165f5761165f6136ff565b602001015160f81c60f81b60f81c60206116799190613715565b60f81b82828151811061168e5761168e6136ff565b60200101906001600160f81b031916908160001a9053506116f1565b8281815181106116bc576116bc6136ff565b602001015160f81c60f81b8282815181106116d9576116d96136ff565b60200101906001600160f81b031916908160001a9053505b806116fb816135c1565b9150506115fb565b509392505050565b606060018054610973906135f5565b6000808290506001815110156117335750600092915050565b6019815111156117465750600092915050565b80600081518110611759576117596136ff565b6020910101516001600160f81b031916600160fd1b141561177d5750600092915050565b806001825161178c919061373a565b8151811061179c5761179c6136ff565b6020910101516001600160f81b031916600160fd1b14156117c05750600092915050565b6000816000815181106117d5576117d56136ff565b01602001516001600160f81b031916905060005b825181101561191e576000838281518110611806576118066136ff565b01602001516001600160f81b0319169050600160fd1b811480156118375750600160fd1b6001600160f81b03198416145b156118485750600095945050505050565b600360fc1b6001600160f81b03198216108015906118745750603960f81b6001600160f81b0319821611155b1580156118aa5750604160f81b6001600160f81b03198216108015906118a85750602d60f91b6001600160f81b0319821611155b155b80156118df5750606160f81b6001600160f81b03198216108015906118dd5750603d60f91b6001600160f81b0319821611155b155b80156118f95750600160fd1b6001600160f81b0319821614155b1561190a5750600095945050505050565b915080611916816135c1565b9150506117e9565b506001949350505050565b60115460ff166119605760405162461bcd60e51b8152602060048201526002602482015261329960f11b604482015260640161086b565b61270f61196c60085490565b106119895760405162461bcd60e51b815260040161086b90613670565b60098111156119c05760405162461bcd60e51b815260206004820152600360248201526206531360ec1b604482015260640161086b565b61270f816119cd60085490565b6119d791906135a9565b11156119f55760405162461bcd60e51b815260040161086b9061368c565b33600090815260126020526040902054600990611a139083906135a9565b1115611a315760405162461bcd60e51b815260040161086b906136a8565b60008111611a675760405162461bcd60e51b815260206004820152600360248201526265313160e81b604482015260640161086b565b34611a798266f8b0a10e4700006136c4565b14611a965760405162461bcd60e51b815260040161086b906136e3565b6000611aa160085490565b611aac9060016135a9565b905060005b82811015611ae357611ac3338361204a565b81611acd816135c1565b9250508080611adb906135c1565b915050611ab1565b503360009081526012602052604081208054849290611b039084906135a9565b909155505060135460405163cc240c0160e01b81526001600160a01b039091169063cc240c0190611b3a90339086906004016135dc565b600060405180830381600087803b158015611b5457600080fd5b505af1158015611b68573d6000803e3d6000fd5b505050507f239739eec2dbaccb604ff1de6462a5eccd5f3148924696dd88f04d636ff582b53383604051611b9d9291906135dc565b60405180910390a15050565b6001600160a01b038216331415611bfe5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161086b565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60135460405163164746fd60e11b81526001600160a01b0390911690632c8e8dfa90611c9f908790879060019060040161364c565b600060405180830381600087803b158015611cb957600080fd5b505af1158015611ccd573d6000803e3d6000fd5b50505050611cdd84848484612280565b50505050565b601354600e54604051631125ae3960e11b81526001600160a01b039092169163224b5c7291611d17913391906004016135dc565b600060405180830381600087803b158015611d3157600080fd5b505af1158015611d45573d6000803e3d6000fd5b505050506111b482826122b2565b6060611d5e82612064565b611dc25760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161086b565b6000611dcc612570565b90506000815111611dec5760405180602001604052806000815250611e17565b80611df68461257f565b604051602001611e07929190613751565b6040516020818303038152906040525b9392505050565b33611e2761159a565b6001600160a01b031614611e4d5760405162461bcd60e51b815260040161086b9061355e565b600e55565b60108054611e5f906135f5565b80601f0160208091040260200160405190810160405280929190818152602001828054611e8b906135f5565b8015611ed85780601f10611ead57610100808354040283529160200191611ed8565b820191906000526020600020905b815481529060010190602001808311611ebb57829003601f168201915b505050505081565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b33611f1761159a565b6001600160a01b031614611f3d5760405162461bcd60e51b815260040161086b9061355e565b6011805461ff001981166101009182900460ff1615909102179055565b33611f6361159a565b6001600160a01b031614611f895760405162461bcd60e51b815260040161086b9061355e565b6001600160a01b038116611fee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161086b565b611ff7816121ce565b50565b60006001600160e01b031982166380ac58cd60e01b148061202b57506001600160e01b03198216635b5e139f60e01b145b8061083657506301ffc9a760e01b6001600160e01b0319831614610836565b6111b4828260405180602001604052806000815250612684565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120b68261136a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6120f933826126b7565b6121155760405162461bcd60e51b815260040161086b90613780565b610b8a838383612779565b600080600061212f8585612912565b9150915061170381612982565b60006121478361136a565b9050336001600160a01b038216146121715760405162461bcd60e51b815260040161086b906137d1565b6000838152600a60209081526040909120835161219092850190613130565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d836040516121c1919061329a565b60405180910390a2505050565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461226d576040519150601f19603f3d011682016040523d82523d6000602084013e612272565b606091505b5050905080610b8a57600080fd5b61228a33836126b7565b6122a65760405162461bcd60e51b815260040161086b90613780565b611cdd84848484612b38565b60006122bd8361136a565b9050336001600160a01b038216146122e75760405162461bcd60e51b815260040161086b906137d1565b6122f08261171a565b151560011461232b5760405162461bcd60e51b81526020600482015260076024820152661a5b9d985b1a5960ca1b604482015260640161086b565b6000838152600b602052604090819020905160029161234991613808565b602060405180830381855afa158015612366573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061238991906138a4565b6002836040516123999190613630565b602060405180830381855afa1580156123b6573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906123d991906138a4565b14156124105760405162461bcd60e51b8152602060048201526006602482015265782073616d6560d01b604482015260640161086b565b61241982610b8f565b156124515760405162461bcd60e51b81526020600482015260086024820152671c995cd95c9d995960c21b604482015260640161086b565b6000838152600b60205260408120805461246a906135f5565b90501115612515576000838152600b6020526040902080546125159190612490906135f5565b80601f01602080910402602001604051908101604052809291908181526020018280546124bc906135f5565b80156125095780601f106124de57610100808354040283529160200191612509565b820191906000526020600020905b8154815290600101906020018083116124ec57829003601f168201915b50505050506000612b6b565b612520826001612b6b565b6000838152600b60209081526040909120835161253f92850190613130565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b836040516121c1919061329a565b606060108054610973906135f5565b6060816125a35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156125cd57806125b7816135c1565b91506125c69050600a836138d3565b91506125a7565b6000816001600160401b038111156125e7576125e76132c6565b6040519080825280601f01601f191660200182016040528015612611576020820181803683370190505b5090505b841561267c5761262660018361373a565b9150612633600a866138e7565b61263e9060306135a9565b60f81b818381518110612653576126536136ff565b60200101906001600160f81b031916908160001a905350612675600a866138d3565b9450612615565b949350505050565b61268e8383612ba8565b61269b6000848484612cd4565b610b8a5760405162461bcd60e51b815260040161086b906138fb565b60006126c282612064565b6127235760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086b565b600061272e8361136a565b9050806001600160a01b0316846001600160a01b031614806127695750836001600160a01b031661275e846109f6565b6001600160a01b0316145b8061267c575061267c8185611ee0565b826001600160a01b031661278c8261136a565b6001600160a01b0316146127f45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161086b565b6001600160a01b0382166128565760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161086b565b612861838383612dd6565b61286c600082612081565b6001600160a01b038316600090815260036020526040812080546001929061289590849061373a565b90915550506001600160a01b03821660009081526003602052604081208054600192906128c39084906135a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716916000805160206139d483398151915291a4505050565b6000808251604114156129495760208301516040840151606085015160001a61293d87828585612e8e565b9450945050505061297b565b8251604014156129735760208301516040840151612968868383612f71565b93509350505061297b565b506000905060025b9250929050565b60008160048111156129965761299661394d565b141561299f5750565b60018160048111156129b3576129b361394d565b14156129fc5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161086b565b6002816004811115612a1057612a1061394d565b1415612a5e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161086b565b6003816004811115612a7257612a7261394d565b1415612acb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161086b565b6004816004811115612adf57612adf61394d565b1415611ff75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161086b565b612b43848484612779565b612b4f84848484612cd4565b611cdd5760405162461bcd60e51b815260040161086b906138fb565b80600c612b77846115a9565b604051612b849190613630565b908152604051908190036020019020805491151560ff199092169190911790555050565b6001600160a01b038216612bfe5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161086b565b612c0781612064565b15612c535760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604482015260640161086b565b612c5f60008383612dd6565b6001600160a01b0382166000908152600360205260408120805460019290612c889084906135a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392906000805160206139d4833981519152908290a45050565b60006001600160a01b0384163b1561191e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d18903390899088908890600401613963565b602060405180830381600087803b158015612d3257600080fd5b505af1925050508015612d62575060408051601f3d908101601f19168201909252612d5f918101906139a0565b60015b612dbc573d808015612d90576040519150601f19603f3d011682016040523d82523d6000602084013e612d95565b606091505b508051612db45760405162461bcd60e51b815260040161086b906138fb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061267c565b6001600160a01b038316612e3157612e2c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612e54565b816001600160a01b0316836001600160a01b031614612e5457612e548382612fa0565b6001600160a01b038216612e6b57610b8a8161303d565b826001600160a01b0316826001600160a01b031614610b8a57610b8a82826130ec565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612ebb5750600090506003612f68565b8460ff16601b14158015612ed357508460ff16601c14155b15612ee45750600090506004612f68565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f38573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f6157600060019250925050612f68565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612f9287828885612e8e565b935093505050935093915050565b60006001612fad84611457565b612fb7919061373a565b60008381526007602052604090205490915080821461300a576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061304f9060019061373a565b60008381526009602052604081205460088054939450909284908110613077576130776136ff565b906000526020600020015490508060088381548110613098576130986136ff565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130d0576130d06139bd565b6001900381819060005260206000200160009055905550505050565b60006130f783611457565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461313c906135f5565b90600052602060002090601f01602090048101928261315e57600085556131a4565b82601f1061317757805160ff19168380011785556131a4565b828001600101855582156131a4579182015b828111156131a4578251825591602001919060010190613189565b506131b09291506131b4565b5090565b5b808211156131b057600081556001016131b5565b6001600160e01b031981168114611ff757600080fd5b6000602082840312156131f157600080fd5b8135611e17816131c9565b80356001600160a01b038116811461321357600080fd5b919050565b6000806040838503121561322b57600080fd5b613234836131fc565b946020939093013593505050565b60005b8381101561325d578181015183820152602001613245565b83811115611cdd5750506000910152565b60008151808452613286816020860160208601613242565b601f01601f19169290920160200192915050565b602081526000611e17602083018461326e565b6000602082840312156132bf57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126132ed57600080fd5b81356001600160401b0380821115613307576133076132c6565b604051601f8301601f19908116603f0116810190828211818310171561332f5761332f6132c6565b8160405283815286602085880101111561334857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561337a57600080fd5b81356001600160401b0381111561339057600080fd5b61267c848285016132dc565b6000602082840312156133ae57600080fd5b611e17826131fc565b6000806000606084860312156133cc57600080fd5b6133d5846131fc565b92506133e3602085016131fc565b9150604084013590509250925092565b6000806040838503121561340657600080fd5b8235915060208301356001600160401b0381111561342357600080fd5b61342f858286016132dc565b9150509250929050565b60008060006060848603121561344e57600080fd5b833592506020840135915060408401356001600160401b0381111561347257600080fd5b61347e868287016132dc565b9150509250925092565b6000806040838503121561349b57600080fd5b6134a4836131fc565b9150602083013580151581146134b957600080fd5b809150509250929050565b600080600080608085870312156134da57600080fd5b6134e3856131fc565b93506134f1602086016131fc565b92506040850135915060608501356001600160401b0381111561351357600080fd5b61351f878288016132dc565b91505092959194509250565b6000806040838503121561353e57600080fd5b613547836131fc565b9150613555602084016131fc565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156135bc576135bc613593565b500190565b60006000198214156135d5576135d5613593565b5060010190565b6001600160a01b03929092168252602082015260400190565b600181811c9082168061360957607f821691505b6020821081141561362a57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251613642818460208701613242565b9190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825260029082015261194d60f21b604082015260600190565b602080825260029082015261329b60f11b604082015260600190565b602080825260029082015261653760f01b604082015260600190565b60008160001904831182151516156136de576136de613593565b500290565b602080825260029082015261653960f01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff84168060ff0382111561373257613732613593565b019392505050565b60008282101561374c5761374c613593565b500390565b60008351613763818460208801613242565b835190830190613777818360208801613242565b01949350505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604082015260600190565b600080835481600182811c91508083168061382457607f831692505b602080841082141561384457634e487b7160e01b86526022600452602486fd5b818015613858576001811461386957613896565b60ff19861689528489019650613896565b60008a81526020902060005b8681101561388e5781548b820152908501908301613875565b505084890196505b509498975050505050505050565b6000602082840312156138b657600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826138e2576138e26138bd565b500490565b6000826138f6576138f66138bd565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139969083018461326e565b9695505050505050565b6000602082840312156139b257600080fd5b8151611e17816131c9565b634e487b7160e01b600052603160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220100fcec1b1e11f168e493aa2803f8951f78603716402aeb7f00ea6a0ac15381564736f6c63430008080033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003daddaad4effe13fb5a99886b6477e8be615078f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001968747470733a2f2f6170692e396361742e696f2f396361742f00000000000000

-----Decoded View---------------
Arg [0] : _signer (address): 0x3DaDdAaD4EffE13Fb5A99886b6477e8be615078F
Arg [1] : baseURI (string): https://api.9cat.io/9cat/

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000003daddaad4effe13fb5a99886b6477e8be615078f
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [3] : 68747470733a2f2f6170692e396361742e696f2f396361742f00000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.