ETH Price: $3,352.43 (-1.08%)

Token

Squiggle Game (SG)
 

Overview

Max Total Supply

8,400 SG

Holders

1,342

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
mrbucky.eth
Balance
1 SG
0x7f38a8aa96697f0beb1fd8887b0f68d229e92704
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
SquiggleGame

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 16 : SquiggleGame.sol
// SPDX-License-Identifier: MIT

/**
*   @title Squiggle Game
*   @author Transient Labs
*/

/*                                                                                                  
 _______ _______ _______ _______ _______ _______ _______ _______     _______ _______ _______ _______    
|\     /|\     /|\     /|\     /|\     /|\     /|\     /|\     /|   |\     /|\     /|\     /|\     /|   
| +---+ | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ | +---+ |   
| |   | | |   | | |   | | |   | | |   | | |   | | |   | | |   | |   | |   | | |   | | |   | | |   | |   
| |S  | | |q  | | |u  | | |i  | | |g  | | |g  | | |l  | | |e  | |   | |G  | | |a  | | |m  | | |e  | |   
| +---+ | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ | +---+ |   | +---+ | +---+ | +---+ | +---+ |   
|/_____\|/_____\|/_____\|/_____\|/_____\|/_____\|/_____\|/_____\|   |/_____\|/_____\|/_____\|/_____\|   
                                                                                                        
*/

pragma solidity ^0.8.9;

import "ERC721.sol";
import "Ownable.sol";
import "MerkleProof.sol";
import "Base64.sol";
import "ECDSA.sol";
import "Strings.sol";
import "EIP2981.sol";

contract SquiggleGame is ERC721, EIP2981, Ownable {
    using Strings for uint256;

    struct TokenDetails {
        bool usedAsMintPass;
        bool scoreLocked;
        uint64 score;
        uint256 cooldownTimer;
    }

    bool public preSaleMintOpen;
    bool public publicMintOpen;
    bool public scoreLockingOpen;
    uint256 public counter;
    uint256 public totalSupply;
    uint256 public mintAllowance = 1;
    uint256 public mintPrice;
    bytes32 public merkleRoot;
    address payable public payoutAddr;
    address public scoreValidatorAddr;
    address public mintPassRedeemerAddr;
    string internal gameURI;
    string internal coverURI;
    mapping(address => uint64) internal numMinted;
    mapping(uint256 => TokenDetails) internal tokenDetails;

    event ScoreLocked(address indexed from, uint256 indexed tokenId, uint64 indexed score);

    modifier isRedeemer {
        require(msg.sender == mintPassRedeemerAddr, "Error: caller is not mint pass redeemer");
        _;
    }

    /**
    *   @notice constructor for this contract
    *   @param _supply is the total supply
    *   @param _payout is the payout address
    *   @param _royalty is the royalty payout address
    *   @param _perc is the royalty payout percentage
    */
    constructor(uint256 _supply, address _payout, address _royalty, uint256 _perc) ERC721("Squiggle Game", "SG") EIP2981(_royalty, _perc) Ownable() {
        totalSupply = _supply;
        payoutAddr = payable(_payout);
    }

    /**
    *   @notice function to set the payout address
    *   @dev requires owner
    *   @param _addr is the new payout address
    */
    function setPayoutAddress(address _addr) external onlyOwner {
        payoutAddr = payable(_addr);
    }

    /**
    *   @notice function to set the score validator address
    *   @dev requires owner
    *   @param _addr is the new score validator address
    */
    function setScoreValidatorAddress(address _addr) external onlyOwner {
        scoreValidatorAddr = _addr;
    }

    /**
    *   @notice function to set the mint pass redeemer address
    *   @dev requires owner
    *   @param _addr is the new redeemer address
    */
    function setMintPassRedeemerAddress(address _addr) external onlyOwner {
        mintPassRedeemerAddr = _addr;
    }

    /**
    *   @notice sets the uri for the game
    *   @dev requires owner
    *   @param _uri is the game script uri
    */
    function setGameURI(string memory _uri) external onlyOwner {
        gameURI = _uri;
    }

    /**
    *   @notice sets the base uri for the cover image
    *   @dev requires owner
    *   @param _uri is the base cover uri
    */
    function setCoverURI(string memory _uri) external onlyOwner {
        coverURI = _uri;
    }

    /**
    *   @notice function to set allowlist and mint price
    *   @dev only owner
    *   @param _merkleRoot is the new merkleRoot
    *   @param _price is the new mint price
    */
    function setPresaleData(bytes32 _merkleRoot, uint256 _price) external onlyOwner {
        merkleRoot = _merkleRoot;
        mintPrice = _price;
    }

    /**
    *   @notice function to open the presale
    */
    function openPreSale() external onlyOwner {
        publicMintOpen = false;
        preSaleMintOpen = true;
    }

    /**
    *   @notice function to open the public mint
    */
    function openPublicMint() external onlyOwner {
        preSaleMintOpen = false;
        publicMintOpen = true;
    }

    /**
    *   @notice function to close both mints
    *   @dev requires owner of the contract
    */
    function closeMints() external onlyOwner {
        preSaleMintOpen = false;
        publicMintOpen = false;
    }

    /**
    *   @notice function to update mint allowance
    *   @dev requires only owner
    *   @param _allowance uint256 to set it to
    */
    function setMintAllowance(uint256 _allowance) external onlyOwner {
        mintAllowance = _allowance;
    }

    /**
    *   @notice allowlist mint function
    *   @dev requires mint to be open
    *   @dev requires merkle proof to be valid, if in presale mint
    *   @dev requires mint price to be met
    *   @dev requires that the message sender hasn't already minted more than allowed at the time of the transaction
    *   @param _merkleProof is the proof provided by the minting site
    */
    function mint(bytes32[] calldata _merkleProof) external payable {
        require(counter < totalSupply, "All pieces have been minted");
        require(numMinted[msg.sender] < mintAllowance, "Reached mint limit");
        require(msg.value >= mintPrice, "Not enough ether");
        if (preSaleMintOpen) {
            bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
            require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Not on allowlist");
        }
        else if (!publicMintOpen) {
            revert("Mint not open");
        }

        numMinted[msg.sender]++;
        counter++;
        _safeMint(msg.sender, counter);
    }

    /**
    *   @notice owner mint function
    *   @dev mints to the contract owner wallet
    *   @dev requires ownership of the contract
    *   @param _numToMint is the number to mint
    */
    function ownerMint(uint256 _numToMint) external onlyOwner {
        require(counter + _numToMint <= totalSupply, "All pieces have been minted");
        for (uint256 i; i < _numToMint; i++) {
            counter++;
            _safeMint(payoutAddr, counter);
        }
    }

    /**
    *   @notice function to flip score locking
    *   @dev requires owner
    */
    function flipScoreLocking() external onlyOwner {
        scoreLockingOpen = !scoreLockingOpen;
    }

    /**
    *   @notice function to lock score to the blockchain
    *   @dev caller must be the owner of the token
    *   @param _tokenId is the token id
    *   @param _score is the score
    *   @param _sig is the signed message containing the score
    */
    function lockScore(uint256 _tokenId, uint64 _score, bytes calldata _sig) external {
        require(_exists(_tokenId), "Not a valid token id");
        require(scoreLockingOpen, "Score locking is not open yet");
        require(tokenDetails[_tokenId].scoreLocked == false, "Score already has been locked");
        require(tokenDetails[_tokenId].usedAsMintPass == false, "Token has been used as a mint pass already");
        require(_isApprovedOrOwner(msg.sender, _tokenId), "Message sender is not the owner of the token");
        bytes32 msgHash = generateMessageHash(_tokenId, _score);
        address resolvedAddr = ECDSA.recover(msgHash, _sig);
        require(resolvedAddr == scoreValidatorAddr, "Resolved address not the same as the validator address");

        tokenDetails[_tokenId].score = _score;
        tokenDetails[_tokenId].scoreLocked = true;
        tokenDetails[_tokenId].cooldownTimer = block.timestamp + 5 hours;

        emit ScoreLocked(msg.sender, _tokenId, _score);
    }

    /**
    *   @notice function to use the token as a mint pass
    *   @dev can only be called by the redeemer contract address
    *   @param _tokenId is the token id
    *   @param _addr is the caller from the redeemer contract
    */
    function useAsMintPass(uint256 _tokenId, address _addr) external isRedeemer {
        require(_exists(_tokenId), "Not a valid token id");
        require(tokenDetails[_tokenId].usedAsMintPass == false, "Already used as mint pass");
        require(_isApprovedOrOwner(_addr, _tokenId), "Address is not the owner of the token");

        tokenDetails[_tokenId].usedAsMintPass = true;
        tokenDetails[_tokenId].cooldownTimer = block.timestamp + 5 hours;
    }

    /**
    *   @notice function to withdraw minting ether from the contract
    *   @dev requires owner to call
    */
    function withdrawEther() external onlyOwner {
        payoutAddr.transfer(address(this).balance);
    }

    /**
    *   @notice function to change the royalty recipient
    *   @dev requires owner
    *   @dev this is useful if an account gets compromised or anything like that
    *   @param _newRecipient is the new royalty recipient
    */
    function changeRoyaltyRecipient(address _newRecipient) external onlyOwner {
        require(_newRecipient != address(0), "Error: new recipient is the zero address");
        royaltyAddr = _newRecipient;
    }

    /**
    *   @notice function to change the royalty percentage
    *   @dev requires owner
    *   @dev this is useful if the amount was set improperly at contract creation. This can in fact happen... humans are prone to mistakes :) 
    *   @param _newPerc is the new royalty percentage, in basis points (out of 10,000)
    */
    function changeRoyaltyPercentage(uint256 _newPerc) external onlyOwner {
        require(_newPerc <= 10000, "Error: new percentage is greater than 10,000");
        royaltyPerc = _newPerc;
    }

    /**
    *   @notice function to get remaining supply
    *   @return uint256
    */
    function getRemainingSupply() external view returns(uint256) {
        return totalSupply - counter;
    }

    /**
    *   @notice function to get number minted per address
    */
    function getNumberMinted(address _address) external view returns (uint64) {
        return numMinted[_address];
    }

    /**
    *   @notice function to get whether the token has been used as a mint pass
    *   @dev doesn't throw if token id doesn't exist
    *   @param _tokenId is the token id to look up
    *   @return bool showing if it has
    */
    function getIfUsedAsMintPass(uint256 _tokenId) external view returns (bool) {
        return tokenDetails[_tokenId].usedAsMintPass;
    }

    /**
    *   @notice function to get whether the token has a score locked
    *   @dev doesn't throw if token id doesn't exist
    *   @param _tokenId is the token id to look up
    *   @return bool showing if it has been locked or not
    */
    function getIfScoreLocked(uint256 _tokenId) external view returns (bool) {
        return tokenDetails[_tokenId].scoreLocked;
    }

    /**
    *   @notice function to get the token score
    *   @param _tokenId is the token id to look up
    *   @return uint64 showing the score
    */
    function getScore(uint256 _tokenId) external view returns (uint64) {
        return tokenDetails[_tokenId].score;
    }

    /**
    *   @notice overrides EIP721 and EIP2981 supportsInterface function
    *   @param interfaceId is supplied from anyone/contract calling this function, as defined in ERC 165
    *   @return a boolean saying if this contract supports the interface or not
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, EIP2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
    
    /**
    *   @notice override standard ERC721 tokenURI
    *   @param tokenId is the token id
    *   @return base64 encoded json representing token uri
    */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        string memory state = scoreLockingOpen ? "1" : "0";
        string memory locked = "No";
        string memory used = "No";
        if (tokenDetails[tokenId].scoreLocked) {
            state = "2";
            locked = "Yes";
        }
        if (tokenDetails[tokenId].usedAsMintPass) {
            state = "3";
            used = "Yes";
        }
        string memory cover = string(abi.encodePacked(coverURI, "/", state));
        string memory html = string(abi.encodePacked(
            gameURI, "?tokenId=", tokenId.toString(), "&state=", state));
        string memory traits = string(abi.encodePacked(
            '{"trait_type":"Score Locked","value":"', locked, '"},',
            '{"trait_type":"Score","value":"', uint256(tokenDetails[tokenId].score).toString(), '"},'
            '{"trait_type":"Used As Mint Pass","value":"', used, '"}'
        ));
        return string(
            abi.encodePacked(
                "data:application/json;base64,",
                Base64.encode(bytes(abi.encodePacked(
                    '{"name":"Squiggle Game #',
                    tokenId.toString(), '",',
                    '"description":"LIT Squiggle Game is designed especially for mobile. Right from your Opensea account. You can use your finger on your screen to navigate the Squiggle and master the game. Catch as many flames as you can without hitting the walls or bumping into any black squares. Each flame is worth 10 points. The Rules, FAQ and how to participate in The LIT Squiggle Game Challenge can be found by the Squiggle Game webApp: [https://squigglegame.wtf](https://squigglegame.wtf)",',
                    '"attributes": [', traits, '],',
                    '"image":"', cover, '",',
                    '"animation_url":"', html, '"}'
                )))
            )
        );
    }

    /**
    *   @notice function to create message hash for score writing purposes
    */
    function generateMessageHash(uint256 _tokenId, uint64 _score) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n40", _tokenId, _score));
    }

    /**
    *   @notice function to act as a cooldown timer after a score has been locked or the piece has been used as a mint pass
    */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        require(block.timestamp >= tokenDetails[tokenId].cooldownTimer, "Error: token properties were recently changed");
    }
}

File 2 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "Strings.sol";
import "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 overridden 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 {
        _setApprovalForAll(_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 || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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 {}

    /**
     * @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.
     * - `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 tokenId
    ) internal virtual {}
}

File 3 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "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`.
     *
     * 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;

    /**
     * @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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

File 4 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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);
}

File 5 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 16 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

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 7 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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 8 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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 9 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

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 10 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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 11 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 12 of 16 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 13 of 16 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 14 of 16 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "Strings.sol";

/**
 * @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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @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 15 of 16 : EIP2981.sol
// SPDX-License-Identifier: MIT

/**
*   @title EIP 2981 base contract
*   @author Transient Labs
*   @notice contract implementation of EIP 2981
*/

pragma solidity ^0.8.0;

import "ERC165.sol";
import "IEIP2981.sol";

contract EIP2981 is IEIP2981, ERC165 {

    address internal royaltyAddr;
    uint256 internal royaltyPerc; // percentage in basis (out of 10,000)

    /**
    *   @notice constructor
    *   @dev need inheriting contracts to accept the parameters in their constructor
    *   @param _addr is the royalty payout address
    *   @param _perc is the royalty percentage, multiplied by 10000. Ex: 7.5% => 750
    */
    constructor(address _addr, uint256 _perc) {
        royaltyAddr = _addr;
        royaltyPerc = _perc;
    }

    /**
    *   @notice EIP 2981 royalty support
    *   @dev royalty payout made to the owner of the contract and the owner can't be the 0 address
    *   @dev royalty amount determined when contract is deployed, and then divided by 1000 in this function
    *   @dev royalty amount not dependent on _tokenId
    */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
        require(royaltyAddr != address(0));
        return (royaltyAddr, royaltyPerc * _salePrice / 10000);
    }

    /**
    *   @notice override ERC 165 implementation of this function
    *   @dev if using this contract with another contract that suppports ERC 265, will have to override in the inheriting contract
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {
        return interfaceId == type(IEIP2981).interfaceId || super.supportsInterface(interfaceId);
    }
}

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

pragma solidity ^0.8.0;

///
/// @dev Interface for the NFT Royalty Standard
///
interface IEIP2981 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver,uint256 royaltyAmount);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "SquiggleGame.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"address","name":"_payout","type":"address"},{"internalType":"address","name":"_royalty","type":"address"},{"internalType":"uint256","name":"_perc","type":"uint256"}],"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint64","name":"score","type":"uint64"}],"name":"ScoreLocked","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":[{"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":[{"internalType":"uint256","name":"_newPerc","type":"uint256"}],"name":"changeRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRecipient","type":"address"}],"name":"changeRoyaltyRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipScoreLocking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getIfScoreLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getIfUsedAsMintPass","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getNumberMinted","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemainingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getScore","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint64","name":"_score","type":"uint64"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"lockScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPassRedeemerAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openPreSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openPublicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numToMint","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutAddr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSaleMintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":[],"name":"scoreLockingOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scoreValidatorAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"_uri","type":"string"}],"name":"setCoverURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setGameURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowance","type":"uint256"}],"name":"setMintAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setMintPassRedeemerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setPayoutAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPresaleData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setScoreValidatorAddress","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":"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"useAsMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526001600b553480156200001657600080fd5b5060405162003d1b38038062003d1b83398101604081905262000039916200021d565b604080518082018252600d81526c5371756967676c652047616d6560981b602080830191825283518085019094526002845261534760f01b908401528151859385939290916200008c916000916200015a565b508051620000a29060019060208401906200015a565b5050600680546001600160a01b0319166001600160a01b03949094169390931790925560075550620000db620000d53390565b62000108565b5050600a91909155600e80546001600160a01b0319166001600160a01b03909216919091179055620002a2565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001689062000266565b90600052602060002090601f0160209004810192826200018c5760008555620001d7565b82601f10620001a757805160ff1916838001178555620001d7565b82800160010185558215620001d7579182015b82811115620001d7578251825591602001919060010190620001ba565b50620001e5929150620001e9565b5090565b5b80821115620001e55760008155600101620001ea565b80516001600160a01b03811681146200021857600080fd5b919050565b600080600080608085870312156200023457600080fd5b84519350620002466020860162000200565b9250620002566040860162000200565b6060959095015193969295505050565b600181811c908216806200027b57607f821691505b6020821081036200029c57634e487b7160e01b600052602260045260246000fd5b50919050565b613a6980620002b26000396000f3fe6080604052600436106102e45760003560e01c806370a0823111610190578063b88d4fde116100dc578063e985e9c511610095578063f249b8bb1161006f578063f249b8bb14610932578063f2fde38b14610952578063f998ab2114610972578063fe1ca7fa1461099257600080fd5b8063e985e9c5146108a9578063ecd783c4146108f2578063f19e75d41461091257600080fd5b8063b88d4fde146107fe578063bcc9ca5b1461081e578063c87b56dd1461083f578063cf32dc031461085f578063e4b7fb7314610874578063e5c6c4131461088957600080fd5b806395d89b4111610149578063a6078f9611610123578063a6078f961461078a578063acf080d1146107ab578063b1577893146107cb578063b77a147b146107eb57600080fd5b806395d89b41146107355780639c832cf21461074a578063a22cb4651461076a57600080fd5b806370a082311461066d578063715018a61461068d5780637362377b146106a2578063774b5c23146106b75780638a59a7fd146106d85780638da5cb5b1461071757600080fd5b806333ea51a81161024f57806346666c04116102085780636352211e116101e25780636352211e146105e757806364334fad146106075780636817c76c146106375780636b30137d1461064d57600080fd5b806346666c041461059c5780634bd0d89c146105b157806361bc221a146105d157600080fd5b806333ea51a8146104f157806336c4ff7a14610511578063396876bd146105315780633a45a5d31461054757806342842e0e1461056757806345f7e06e1461058757600080fd5b80630fa590fa116102a15780630fa590fa1461040e57806318160ddd1461044357806323b872dd146104675780632a55205a146104875780632eb4a7ab146104c657806333bffccc146104dc57600080fd5b806301ffc9a7146102e9578063036609691461031e57806306fdde0314610340578063081812fc14610362578063095ea7b31461039a5780630e1af57b146103ba575b600080fd5b3480156102f557600080fd5b50610309610304366004612d64565b6109b2565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e610339366004612e13565b6109c3565b005b34801561034c57600080fd5b50610355610a0d565b6040516103159190612eb3565b34801561036e57600080fd5b5061038261037d366004612ec6565b610a9f565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b5061033e6103b5366004612efb565b610b27565b3480156103c657600080fd5b506103f66103d5366004612ec6565b6000908152601460205260409020546201000090046001600160401b031690565b6040516001600160401b039091168152602001610315565b34801561041a57600080fd5b50610309610429366004612ec6565b600090815260146020526040902054610100900460ff1690565b34801561044f57600080fd5b50610459600a5481565b604051908152602001610315565b34801561047357600080fd5b5061033e610482366004612f25565b610c3c565b34801561049357600080fd5b506104a76104a2366004612f61565b610c6d565b604080516001600160a01b039093168352602083019190915201610315565b3480156104d257600080fd5b50610459600d5481565b3480156104e857600080fd5b5061033e610cbe565b3480156104fd57600080fd5b5061033e61050c366004612f83565b610cfe565b34801561051d57600080fd5b50600e54610382906001600160a01b031681565b34801561053d57600080fd5b50610459600b5481565b34801561055357600080fd5b5061033e610562366004612f83565b610d4a565b34801561057357600080fd5b5061033e610582366004612f25565b610dfd565b34801561059357600080fd5b5061033e610e18565b3480156105a857600080fd5b5061033e610e58565b3480156105bd57600080fd5b5061033e6105cc366004612ec6565b610e92565b3480156105dd57600080fd5b5061045960095481565b3480156105f357600080fd5b50610382610602366004612ec6565b610f28565b34801561061357600080fd5b50610309610622366004612ec6565b60009081526014602052604090205460ff1690565b34801561064357600080fd5b50610459600c5481565b34801561065957600080fd5b50601054610382906001600160a01b031681565b34801561067957600080fd5b50610459610688366004612f83565b610f9f565b34801561069957600080fd5b5061033e611026565b3480156106ae57600080fd5b5061033e61105c565b3480156106c357600080fd5b5060085461030990600160a01b900460ff1681565b3480156106e457600080fd5b506103f66106f3366004612f83565b6001600160a01b03166000908152601360205260409020546001600160401b031690565b34801561072357600080fd5b506008546001600160a01b0316610382565b34801561074157600080fd5b506103556110c2565b34801561075657600080fd5b5061033e610765366004612f83565b6110d1565b34801561077657600080fd5b5061033e610785366004612f9e565b61111d565b34801561079657600080fd5b5060085461030990600160b01b900460ff1681565b3480156107b757600080fd5b5061033e6107c6366004612ec6565b611128565b3480156107d757600080fd5b5061033e6107e6366004612f83565b611157565b61033e6107f9366004612fda565b6111a3565b34801561080a57600080fd5b5061033e61081936600461304e565b611420565b34801561082a57600080fd5b5060085461030990600160a81b900460ff1681565b34801561084b57600080fd5b5061035561085a366004612ec6565b611458565b34801561086b57600080fd5b5061033e6116f8565b34801561088057600080fd5b50610459611743565b34801561089557600080fd5b5061033e6108a43660046130c9565b61175a565b3480156108b557600080fd5b506103096108c4366004613158565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108fe57600080fd5b5061033e61090d366004612e13565b611af9565b34801561091e57600080fd5b5061033e61092d366004612ec6565b611b36565b34801561093e57600080fd5b5061033e61094d366004612f61565b611c0a565b34801561095e57600080fd5b5061033e61096d366004612f83565b611c3f565b34801561097e57600080fd5b5061033e61098d36600461318b565b611cd7565b34801561099e57600080fd5b50600f54610382906001600160a01b031681565b60006109bd82611e8e565b92915050565b6008546001600160a01b031633146109f65760405162461bcd60e51b81526004016109ed906131ae565b60405180910390fd5b8051610a09906011906020840190612cb5565b5050565b606060008054610a1c906131e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a48906131e3565b8015610a955780601f10610a6a57610100808354040283529160200191610a95565b820191906000526020600020905b815481529060010190602001808311610a7857829003601f168201915b5050505050905090565b6000610aaa82611eb3565b610b0b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109ed565b506000908152600460205260409020546001600160a01b031690565b6000610b3282610f28565b9050806001600160a01b0316836001600160a01b031603610b9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109ed565b336001600160a01b0382161480610bbb5750610bbb81336108c4565b610c2d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109ed565b610c378383611ed0565b505050565b610c463382611f3e565b610c625760405162461bcd60e51b81526004016109ed9061321d565b610c37838383612028565b60065460009081906001600160a01b0316610c8757600080fd5b6006546007546001600160a01b039091169061271090610ca8908690613284565b610cb291906132b9565b915091505b9250929050565b6008546001600160a01b03163314610ce85760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b1916600160a01b179055565b6008546001600160a01b03163314610d285760405162461bcd60e51b81526004016109ed906131ae565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610d745760405162461bcd60e51b81526004016109ed906131ae565b6001600160a01b038116610ddb5760405162461bcd60e51b815260206004820152602860248201527f4572726f723a206e657720726563697069656e7420697320746865207a65726f604482015267206164647265737360c01b60648201526084016109ed565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b610c3783838360405180602001604052806000815250611420565b6008546001600160a01b03163314610e425760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b1916600160a81b179055565b6008546001600160a01b03163314610e825760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b19169055565b6008546001600160a01b03163314610ebc5760405162461bcd60e51b81526004016109ed906131ae565b612710811115610f235760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a206e65772070657263656e74616765206973206772656174657260448201526b0207468616e2031302c3030360a41b60648201526084016109ed565b600755565b6000818152600260205260408120546001600160a01b0316806109bd5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109ed565b60006001600160a01b03821661100a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109ed565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146110505760405162461bcd60e51b81526004016109ed906131ae565b61105a60006121cf565b565b6008546001600160a01b031633146110865760405162461bcd60e51b81526004016109ed906131ae565b600e546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156110bf573d6000803e3d6000fd5b50565b606060018054610a1c906131e3565b6008546001600160a01b031633146110fb5760405162461bcd60e51b81526004016109ed906131ae565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b610a09338383612221565b6008546001600160a01b031633146111525760405162461bcd60e51b81526004016109ed906131ae565b600b55565b6008546001600160a01b031633146111815760405162461bcd60e51b81526004016109ed906131ae565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600954106111f65760405162461bcd60e51b815260206004820152601b60248201527f416c6c207069656365732068617665206265656e206d696e746564000000000060448201526064016109ed565b600b54336000908152601360205260409020546001600160401b0316106112545760405162461bcd60e51b815260206004820152601260248201527114995858da1959081b5a5b9d081b1a5b5a5d60721b60448201526064016109ed565b600c543410156112995760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41032ba3432b960811b60448201526064016109ed565b600854600160a01b900460ff161561136a576040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061132583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d5491508490506122ef565b6113645760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdb88185b1b1bdddb1a5cdd60821b60448201526064016109ed565b506113b3565b600854600160a81b900460ff166113b35760405162461bcd60e51b815260206004820152600d60248201526c26b4b73a103737ba1037b832b760991b60448201526064016109ed565b33600090815260136020526040812080546001600160401b0316916113d7836132cd565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506009600081548092919061140f906132f3565b9190505550610a0933600954612305565b61142a3383611f3e565b6114465760405162461bcd60e51b81526004016109ed9061321d565b6114528484848461231f565b50505050565b606061146382611eb3565b6114c75760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109ed565b600854600090600160b01b900460ff166114fa57604051806040016040528060018152602001600360fc1b815250611515565b604051806040016040528060018152602001603160f81b8152505b6040805180820182526002808252614e6f60f01b6020808401829052845180860186529283528281019190915260008881526014909152929092205492935091610100900460ff161561159d57604051806040016040528060018152602001601960f91b81525092506040518060400160405280600381526020016259657360e81b81525091505b60008581526014602052604090205460ff16156115ef57604051806040016040528060018152602001603360f81b81525092506040518060400160405280600381526020016259657360e81b81525090505b60006012846040516020016116059291906133c1565b60405160208183030381529060405290506000601161162388612352565b86604051602001611636939291906133f3565b60408051808303601f190181529181526000898152601460205290812054919250908590611672906201000090046001600160401b0316612352565b8560405160200161168593929190613456565b60405160208183030381529060405290506116cc6116a289612352565b8285856040516020016116b89493929190613557565b604051602081830303815290604052612452565b6040516020016116dc9190613893565b6040516020818303038152906040529650505050505050919050565b6008546001600160a01b031633146117225760405162461bcd60e51b81526004016109ed906131ae565b6008805460ff60b01b198116600160b01b9182900460ff1615909102179055565b6000600954600a5461175591906138d8565b905090565b61176384611eb3565b6117a65760405162461bcd60e51b8152602060048201526014602482015273139bdd0818481d985b1a59081d1bdad95b881a5960621b60448201526064016109ed565b600854600160b01b900460ff166117ff5760405162461bcd60e51b815260206004820152601d60248201527f53636f7265206c6f636b696e67206973206e6f74206f70656e2079657400000060448201526064016109ed565b600084815260146020526040902054610100900460ff16156118635760405162461bcd60e51b815260206004820152601d60248201527f53636f726520616c726561647920686173206265656e206c6f636b656400000060448201526064016109ed565b60008481526014602052604090205460ff16156118d55760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e20686173206265656e20757365642061732061206d696e74207061604482015269737320616c726561647960b01b60648201526084016109ed565b6118df3385611f3e565b6119405760405162461bcd60e51b815260206004820152602c60248201527f4d6573736167652073656e646572206973206e6f7420746865206f776e65722060448201526b37b3103a3432903a37b5b2b760a11b60648201526084016109ed565b604080517f19457468657265756d205369676e6564204d6573736167653a0a343000000000602080830191909152603c820187905260c086901b6001600160c01b031916605c830152825160448184030181526064909201909252805191012060006119e28285858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125a492505050565b600f549091506001600160a01b03808316911614611a615760405162461bcd60e51b815260206004820152603660248201527f5265736f6c7665642061646472657373206e6f74207468652073616d65206173604482015275207468652076616c696461746f72206164647265737360501b60648201526084016109ed565b6000868152601460205260409020805461ff00196001600160401b03881662010000021669ffffffffffffffffff001990911617610100179055611aa7426146506138ef565b6000878152601460205260408082206001019290925590516001600160401b03871691889133917f6861a94e4af1d252df2aa551521f2c4fd8c33433549d291f9579ba1cf0777f9c91a4505050505050565b6008546001600160a01b03163314611b235760405162461bcd60e51b81526004016109ed906131ae565b8051610a09906012906020840190612cb5565b6008546001600160a01b03163314611b605760405162461bcd60e51b81526004016109ed906131ae565b600a5481600954611b7191906138ef565b1115611bbf5760405162461bcd60e51b815260206004820152601b60248201527f416c6c207069656365732068617665206265656e206d696e746564000000000060448201526064016109ed565b60005b81811015610a095760098054906000611bda836132f3565b9091555050600e54600954611bf8916001600160a01b031690612305565b80611c02816132f3565b915050611bc2565b6008546001600160a01b03163314611c345760405162461bcd60e51b81526004016109ed906131ae565b600d91909155600c55565b6008546001600160a01b03163314611c695760405162461bcd60e51b81526004016109ed906131ae565b6001600160a01b038116611cce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ed565b6110bf816121cf565b6010546001600160a01b03163314611d415760405162461bcd60e51b815260206004820152602760248201527f4572726f723a2063616c6c6572206973206e6f74206d696e742070617373207260448201526632b232b2b6b2b960c91b60648201526084016109ed565b611d4a82611eb3565b611d8d5760405162461bcd60e51b8152602060048201526014602482015273139bdd0818481d985b1a59081d1bdad95b881a5960621b60448201526064016109ed565b60008281526014602052604090205460ff1615611dec5760405162461bcd60e51b815260206004820152601960248201527f416c72656164792075736564206173206d696e7420706173730000000000000060448201526064016109ed565b611df68183611f3e565b611e505760405162461bcd60e51b815260206004820152602560248201527f41646472657373206973206e6f7420746865206f776e6572206f6620746865206044820152643a37b5b2b760d91b60648201526084016109ed565b6000828152601460205260409020805460ff19166001179055611e75426146506138ef565b6000928352601460205260409092206001019190915550565b60006001600160e01b0319821663152a902d60e11b14806109bd57506109bd826125c8565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f0582610f28565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f4982611eb3565b611faa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109ed565b6000611fb583610f28565b9050806001600160a01b0316846001600160a01b03161480611ffc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120205750836001600160a01b031661201584610a9f565b6001600160a01b0316145b949350505050565b826001600160a01b031661203b82610f28565b6001600160a01b03161461209f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109ed565b6001600160a01b0382166121015760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109ed565b61210c838383612618565b612117600082611ed0565b6001600160a01b03831660009081526003602052604081208054600192906121409084906138d8565b90915550506001600160a01b038216600090815260036020526040812080546001929061216e9084906138ef565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036122825760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109ed565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000826122fc858461268f565b14949350505050565b610a098282604051806020016040528060008152506126fb565b61232a848484612028565b6123368484848461272e565b6114525760405162461bcd60e51b81526004016109ed90613907565b6060816000036123795750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123a3578061238d816132f3565b915061239c9050600a836132b9565b915061237d565b6000816001600160401b038111156123bd576123bd612d88565b6040519080825280601f01601f1916602001820160405280156123e7576020820181803683370190505b5090505b8415612020576123fc6001836138d8565b9150612409600a86613959565b6124149060306138ef565b60f81b8183815181106124295761242961396d565b60200101906001600160f81b031916908160001a90535061244b600a866132b9565b94506123eb565b6060815160000361247157505060408051602081019091526000815290565b60006040518060600160405280604081526020016139f460409139905060006003845160026124a091906138ef565b6124aa91906132b9565b6124b5906004613284565b6001600160401b038111156124cc576124cc612d88565b6040519080825280601f01601f1916602001820160405280156124f6576020820181803683370190505b509050600182016020820185865187015b80821015612562576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612507565b505060038651066001811461257e576002811461259157612599565b603d6001830353603d6002830353612599565b603d60018303535b509195945050505050565b60008060006125b3858561282f565b915091506125c08161289a565b509392505050565b60006001600160e01b031982166380ac58cd60e01b14806125f957506001600160e01b03198216635b5e139f60e01b145b806109bd57506301ffc9a760e01b6001600160e01b03198316146109bd565b600081815260146020526040902060010154421015610c375760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20746f6b656e2070726f7065727469657320776572652072656360448201526c195b9d1b1e4818da185b99d959609a1b60648201526084016109ed565b600081815b84518110156125c05760008582815181106126b1576126b161396d565b602002602001015190508083116126d757600083815260208290526040902092506126e8565b600081815260208490526040902092505b50806126f3816132f3565b915050612694565b6127058383612a50565b612712600084848461272e565b610c375760405162461bcd60e51b81526004016109ed90613907565b60006001600160a01b0384163b1561282457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612772903390899088908890600401613983565b6020604051808303816000875af19250505080156127ad575060408051601f3d908101601f191682019092526127aa918101906139c0565b60015b61280a573d8080156127db576040519150601f19603f3d011682016040523d82523d6000602084013e6127e0565b606091505b5080516000036128025760405162461bcd60e51b81526004016109ed90613907565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612020565b506001949350505050565b60008082516041036128655760208301516040840151606085015160001a61285987828585612b8f565b94509450505050610cb7565b825160400361288e5760208301516040840151612883868383612c7c565b935093505050610cb7565b50600090506002610cb7565b60008160048111156128ae576128ae6139dd565b036128b65750565b60018160048111156128ca576128ca6139dd565b036129175760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109ed565b600281600481111561292b5761292b6139dd565b036129785760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109ed565b600381600481111561298c5761298c6139dd565b036129e45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109ed565b60048160048111156129f8576129f86139dd565b036110bf5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109ed565b6001600160a01b038216612aa65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109ed565b612aaf81611eb3565b15612afc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109ed565b612b0860008383612618565b6001600160a01b0382166000908152600360205260408120805460019290612b319084906138ef565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612bc65750600090506003612c73565b8460ff16601b14158015612bde57508460ff16601c14155b15612bef5750600090506004612c73565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c43573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c6c57600060019250925050612c73565b9150600090505b94509492505050565b6000806001600160ff1b03831681612c9960ff86901c601b6138ef565b9050612ca787828885612b8f565b935093505050935093915050565b828054612cc1906131e3565b90600052602060002090601f016020900481019282612ce35760008555612d29565b82601f10612cfc57805160ff1916838001178555612d29565b82800160010185558215612d29579182015b82811115612d29578251825591602001919060010190612d0e565b50612d35929150612d39565b5090565b5b80821115612d355760008155600101612d3a565b6001600160e01b0319811681146110bf57600080fd5b600060208284031215612d7657600080fd5b8135612d8181612d4e565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612db857612db8612d88565b604051601f8501601f19908116603f01168101908282118183101715612de057612de0612d88565b81604052809350858152868686011115612df957600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e2557600080fd5b81356001600160401b03811115612e3b57600080fd5b8201601f81018413612e4c57600080fd5b61202084823560208401612d9e565b60005b83811015612e76578181015183820152602001612e5e565b838111156114525750506000910152565b60008151808452612e9f816020860160208601612e5b565b601f01601f19169290920160200192915050565b602081526000612d816020830184612e87565b600060208284031215612ed857600080fd5b5035919050565b80356001600160a01b0381168114612ef657600080fd5b919050565b60008060408385031215612f0e57600080fd5b612f1783612edf565b946020939093013593505050565b600080600060608486031215612f3a57600080fd5b612f4384612edf565b9250612f5160208501612edf565b9150604084013590509250925092565b60008060408385031215612f7457600080fd5b50508035926020909101359150565b600060208284031215612f9557600080fd5b612d8182612edf565b60008060408385031215612fb157600080fd5b612fba83612edf565b915060208301358015158114612fcf57600080fd5b809150509250929050565b60008060208385031215612fed57600080fd5b82356001600160401b038082111561300457600080fd5b818501915085601f83011261301857600080fd5b81358181111561302757600080fd5b8660208260051b850101111561303c57600080fd5b60209290920196919550909350505050565b6000806000806080858703121561306457600080fd5b61306d85612edf565b935061307b60208601612edf565b92506040850135915060608501356001600160401b0381111561309d57600080fd5b8501601f810187136130ae57600080fd5b6130bd87823560208401612d9e565b91505092959194509250565b600080600080606085870312156130df57600080fd5b8435935060208501356001600160401b0380821682146130fe57600080fd5b9093506040860135908082111561311457600080fd5b818701915087601f83011261312857600080fd5b81358181111561313757600080fd5b88602082850101111561314957600080fd5b95989497505060200194505050565b6000806040838503121561316b57600080fd5b61317483612edf565b915061318260208401612edf565b90509250929050565b6000806040838503121561319e57600080fd5b8235915061318260208401612edf565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806131f757607f821691505b60208210810361321757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561329e5761329e61326e565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826132c8576132c86132a3565b500490565b60006001600160401b038083168181036132e9576132e961326e565b6001019392505050565b6000600182016133055761330561326e565b5060010190565b8054600090600181811c908083168061332657607f831692505b6020808410820361334757634e487b7160e01b600052602260045260246000fd5b81801561335b576001811461336c57613399565b60ff19861689528489019650613399565b60008881526020902060005b868110156133915781548b820152908501908301613378565b505084890196505b50505050505092915050565b600081516133b7818560208601612e5b565b9290920192915050565b60006133cd828561330c565b602f60f81b815283516133e7816001840160208801612e5b565b01600101949350505050565b60006133ff828661330c565b683f746f6b656e49643d60b81b81528451613421816009840160208901612e5b565b662673746174653d60c81b600992909101918201528351613449816010840160208801612e5b565b0160100195945050505050565b7f7b2274726169745f74797065223a2253636f7265204c6f636b6564222c227661815265363ab2911d1160d11b60208201526000845161349d816026850160208901612e5b565b62089f4b60ea1b6026918401918201527f7b2274726169745f74797065223a2253636f7265222c2276616c7565223a2200602982015284516134e6816048840160208901612e5b565b7f227d2c7b2274726169745f74797065223a2255736564204173204d696e742050604892909101918201526d30b9b99116113b30b63ab2911d1160911b6068820152835161353b816076840160208801612e5b565b61227d60f01b6076929091019182015260780195945050505050565b7f7b226e616d65223a225371756967676c652047616d652023000000000000000081526000855161358f816018850160208a01612e5b565b61088b60f21b6018918401918201527f226465736372697074696f6e223a224c4954205371756967676c652047616d65601a8201527f2069732064657369676e656420657370656369616c6c7920666f72206d6f6269603a8201527f6c652e2052696768742066726f6d20796f7572204f70656e736561206163636f605a8201527f756e742e20596f752063616e2075736520796f75722066696e676572206f6e20607a8201527f796f75722073637265656e20746f206e61766967617465207468652053717569609a8201527f67676c6520616e64206d6173746572207468652067616d652e2043617463682060ba8201527f6173206d616e7920666c616d657320617320796f752063616e20776974686f7560da8201527f742068697474696e67207468652077616c6c73206f722062756d70696e67206960fa8201527f6e746f20616e7920626c61636b20737175617265732e204561636820666c616d61011a8201527f6520697320776f72746820313020706f696e74732e205468652052756c65732c61013a8201527f2046415120616e6420686f7720746f20706172746963697061746520696e205461015a8201527f6865204c4954205371756967676c652047616d65204368616c6c656e6765206361017a8201527f616e20626520666f756e6420627920746865205371756967676c652047616d6561019a8201527f207765624170703a205b68747470733a2f2f7371756967676c6567616d652e776101ba8201527f74665d2868747470733a2f2f7371756967676c6567616d652e77746629222c006101da82015261388861387a61387461385761384961384361382e61382061381a6101f98a016e2261747472696275746573223a205b60881b8152600f0190565b8e6133a5565b61174b60f21b815260020190565b681134b6b0b3b2911d1160b91b815260090190565b8a6133a5565b61088b60f21b815260020190565b701130b734b6b0ba34b7b72fbab936111d1160791b815260110190565b866133a5565b61227d60f01b815260020190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516138cb81601d850160208701612e5b565b91909101601d0192915050565b6000828210156138ea576138ea61326e565b500390565b600082198211156139025761390261326e565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613968576139686132a3565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139b690830184612e87565b9695505050505050565b6000602082840312156139d257600080fd5b8151612d8181612d4e565b634e487b7160e01b600052602160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212204d021a397e34476699d1a0668ed3dba0ea500a159154bc12c0c06d8c3e451ac464736f6c634300080e003300000000000000000000000000000000000000000000000000000000000020d000000000000000000000000018e52b4f4beab720ff60a827b3f2e7bc9aec22430000000000000000000000003d42213a79a8454ab53a29eebe62beb2955b519000000000000000000000000000000000000000000000000000000000000002ee

Deployed Bytecode

0x6080604052600436106102e45760003560e01c806370a0823111610190578063b88d4fde116100dc578063e985e9c511610095578063f249b8bb1161006f578063f249b8bb14610932578063f2fde38b14610952578063f998ab2114610972578063fe1ca7fa1461099257600080fd5b8063e985e9c5146108a9578063ecd783c4146108f2578063f19e75d41461091257600080fd5b8063b88d4fde146107fe578063bcc9ca5b1461081e578063c87b56dd1461083f578063cf32dc031461085f578063e4b7fb7314610874578063e5c6c4131461088957600080fd5b806395d89b4111610149578063a6078f9611610123578063a6078f961461078a578063acf080d1146107ab578063b1577893146107cb578063b77a147b146107eb57600080fd5b806395d89b41146107355780639c832cf21461074a578063a22cb4651461076a57600080fd5b806370a082311461066d578063715018a61461068d5780637362377b146106a2578063774b5c23146106b75780638a59a7fd146106d85780638da5cb5b1461071757600080fd5b806333ea51a81161024f57806346666c04116102085780636352211e116101e25780636352211e146105e757806364334fad146106075780636817c76c146106375780636b30137d1461064d57600080fd5b806346666c041461059c5780634bd0d89c146105b157806361bc221a146105d157600080fd5b806333ea51a8146104f157806336c4ff7a14610511578063396876bd146105315780633a45a5d31461054757806342842e0e1461056757806345f7e06e1461058757600080fd5b80630fa590fa116102a15780630fa590fa1461040e57806318160ddd1461044357806323b872dd146104675780632a55205a146104875780632eb4a7ab146104c657806333bffccc146104dc57600080fd5b806301ffc9a7146102e9578063036609691461031e57806306fdde0314610340578063081812fc14610362578063095ea7b31461039a5780630e1af57b146103ba575b600080fd5b3480156102f557600080fd5b50610309610304366004612d64565b6109b2565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e610339366004612e13565b6109c3565b005b34801561034c57600080fd5b50610355610a0d565b6040516103159190612eb3565b34801561036e57600080fd5b5061038261037d366004612ec6565b610a9f565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b5061033e6103b5366004612efb565b610b27565b3480156103c657600080fd5b506103f66103d5366004612ec6565b6000908152601460205260409020546201000090046001600160401b031690565b6040516001600160401b039091168152602001610315565b34801561041a57600080fd5b50610309610429366004612ec6565b600090815260146020526040902054610100900460ff1690565b34801561044f57600080fd5b50610459600a5481565b604051908152602001610315565b34801561047357600080fd5b5061033e610482366004612f25565b610c3c565b34801561049357600080fd5b506104a76104a2366004612f61565b610c6d565b604080516001600160a01b039093168352602083019190915201610315565b3480156104d257600080fd5b50610459600d5481565b3480156104e857600080fd5b5061033e610cbe565b3480156104fd57600080fd5b5061033e61050c366004612f83565b610cfe565b34801561051d57600080fd5b50600e54610382906001600160a01b031681565b34801561053d57600080fd5b50610459600b5481565b34801561055357600080fd5b5061033e610562366004612f83565b610d4a565b34801561057357600080fd5b5061033e610582366004612f25565b610dfd565b34801561059357600080fd5b5061033e610e18565b3480156105a857600080fd5b5061033e610e58565b3480156105bd57600080fd5b5061033e6105cc366004612ec6565b610e92565b3480156105dd57600080fd5b5061045960095481565b3480156105f357600080fd5b50610382610602366004612ec6565b610f28565b34801561061357600080fd5b50610309610622366004612ec6565b60009081526014602052604090205460ff1690565b34801561064357600080fd5b50610459600c5481565b34801561065957600080fd5b50601054610382906001600160a01b031681565b34801561067957600080fd5b50610459610688366004612f83565b610f9f565b34801561069957600080fd5b5061033e611026565b3480156106ae57600080fd5b5061033e61105c565b3480156106c357600080fd5b5060085461030990600160a01b900460ff1681565b3480156106e457600080fd5b506103f66106f3366004612f83565b6001600160a01b03166000908152601360205260409020546001600160401b031690565b34801561072357600080fd5b506008546001600160a01b0316610382565b34801561074157600080fd5b506103556110c2565b34801561075657600080fd5b5061033e610765366004612f83565b6110d1565b34801561077657600080fd5b5061033e610785366004612f9e565b61111d565b34801561079657600080fd5b5060085461030990600160b01b900460ff1681565b3480156107b757600080fd5b5061033e6107c6366004612ec6565b611128565b3480156107d757600080fd5b5061033e6107e6366004612f83565b611157565b61033e6107f9366004612fda565b6111a3565b34801561080a57600080fd5b5061033e61081936600461304e565b611420565b34801561082a57600080fd5b5060085461030990600160a81b900460ff1681565b34801561084b57600080fd5b5061035561085a366004612ec6565b611458565b34801561086b57600080fd5b5061033e6116f8565b34801561088057600080fd5b50610459611743565b34801561089557600080fd5b5061033e6108a43660046130c9565b61175a565b3480156108b557600080fd5b506103096108c4366004613158565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108fe57600080fd5b5061033e61090d366004612e13565b611af9565b34801561091e57600080fd5b5061033e61092d366004612ec6565b611b36565b34801561093e57600080fd5b5061033e61094d366004612f61565b611c0a565b34801561095e57600080fd5b5061033e61096d366004612f83565b611c3f565b34801561097e57600080fd5b5061033e61098d36600461318b565b611cd7565b34801561099e57600080fd5b50600f54610382906001600160a01b031681565b60006109bd82611e8e565b92915050565b6008546001600160a01b031633146109f65760405162461bcd60e51b81526004016109ed906131ae565b60405180910390fd5b8051610a09906011906020840190612cb5565b5050565b606060008054610a1c906131e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a48906131e3565b8015610a955780601f10610a6a57610100808354040283529160200191610a95565b820191906000526020600020905b815481529060010190602001808311610a7857829003601f168201915b5050505050905090565b6000610aaa82611eb3565b610b0b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109ed565b506000908152600460205260409020546001600160a01b031690565b6000610b3282610f28565b9050806001600160a01b0316836001600160a01b031603610b9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109ed565b336001600160a01b0382161480610bbb5750610bbb81336108c4565b610c2d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109ed565b610c378383611ed0565b505050565b610c463382611f3e565b610c625760405162461bcd60e51b81526004016109ed9061321d565b610c37838383612028565b60065460009081906001600160a01b0316610c8757600080fd5b6006546007546001600160a01b039091169061271090610ca8908690613284565b610cb291906132b9565b915091505b9250929050565b6008546001600160a01b03163314610ce85760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b1916600160a01b179055565b6008546001600160a01b03163314610d285760405162461bcd60e51b81526004016109ed906131ae565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610d745760405162461bcd60e51b81526004016109ed906131ae565b6001600160a01b038116610ddb5760405162461bcd60e51b815260206004820152602860248201527f4572726f723a206e657720726563697069656e7420697320746865207a65726f604482015267206164647265737360c01b60648201526084016109ed565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b610c3783838360405180602001604052806000815250611420565b6008546001600160a01b03163314610e425760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b1916600160a81b179055565b6008546001600160a01b03163314610e825760405162461bcd60e51b81526004016109ed906131ae565b6008805461ffff60a01b19169055565b6008546001600160a01b03163314610ebc5760405162461bcd60e51b81526004016109ed906131ae565b612710811115610f235760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a206e65772070657263656e74616765206973206772656174657260448201526b0207468616e2031302c3030360a41b60648201526084016109ed565b600755565b6000818152600260205260408120546001600160a01b0316806109bd5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109ed565b60006001600160a01b03821661100a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109ed565b506001600160a01b031660009081526003602052604090205490565b6008546001600160a01b031633146110505760405162461bcd60e51b81526004016109ed906131ae565b61105a60006121cf565b565b6008546001600160a01b031633146110865760405162461bcd60e51b81526004016109ed906131ae565b600e546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156110bf573d6000803e3d6000fd5b50565b606060018054610a1c906131e3565b6008546001600160a01b031633146110fb5760405162461bcd60e51b81526004016109ed906131ae565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b610a09338383612221565b6008546001600160a01b031633146111525760405162461bcd60e51b81526004016109ed906131ae565b600b55565b6008546001600160a01b031633146111815760405162461bcd60e51b81526004016109ed906131ae565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600954106111f65760405162461bcd60e51b815260206004820152601b60248201527f416c6c207069656365732068617665206265656e206d696e746564000000000060448201526064016109ed565b600b54336000908152601360205260409020546001600160401b0316106112545760405162461bcd60e51b815260206004820152601260248201527114995858da1959081b5a5b9d081b1a5b5a5d60721b60448201526064016109ed565b600c543410156112995760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41032ba3432b960811b60448201526064016109ed565b600854600160a01b900460ff161561136a576040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905061132583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d5491508490506122ef565b6113645760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdb88185b1b1bdddb1a5cdd60821b60448201526064016109ed565b506113b3565b600854600160a81b900460ff166113b35760405162461bcd60e51b815260206004820152600d60248201526c26b4b73a103737ba1037b832b760991b60448201526064016109ed565b33600090815260136020526040812080546001600160401b0316916113d7836132cd565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506009600081548092919061140f906132f3565b9190505550610a0933600954612305565b61142a3383611f3e565b6114465760405162461bcd60e51b81526004016109ed9061321d565b6114528484848461231f565b50505050565b606061146382611eb3565b6114c75760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109ed565b600854600090600160b01b900460ff166114fa57604051806040016040528060018152602001600360fc1b815250611515565b604051806040016040528060018152602001603160f81b8152505b6040805180820182526002808252614e6f60f01b6020808401829052845180860186529283528281019190915260008881526014909152929092205492935091610100900460ff161561159d57604051806040016040528060018152602001601960f91b81525092506040518060400160405280600381526020016259657360e81b81525091505b60008581526014602052604090205460ff16156115ef57604051806040016040528060018152602001603360f81b81525092506040518060400160405280600381526020016259657360e81b81525090505b60006012846040516020016116059291906133c1565b60405160208183030381529060405290506000601161162388612352565b86604051602001611636939291906133f3565b60408051808303601f190181529181526000898152601460205290812054919250908590611672906201000090046001600160401b0316612352565b8560405160200161168593929190613456565b60405160208183030381529060405290506116cc6116a289612352565b8285856040516020016116b89493929190613557565b604051602081830303815290604052612452565b6040516020016116dc9190613893565b6040516020818303038152906040529650505050505050919050565b6008546001600160a01b031633146117225760405162461bcd60e51b81526004016109ed906131ae565b6008805460ff60b01b198116600160b01b9182900460ff1615909102179055565b6000600954600a5461175591906138d8565b905090565b61176384611eb3565b6117a65760405162461bcd60e51b8152602060048201526014602482015273139bdd0818481d985b1a59081d1bdad95b881a5960621b60448201526064016109ed565b600854600160b01b900460ff166117ff5760405162461bcd60e51b815260206004820152601d60248201527f53636f7265206c6f636b696e67206973206e6f74206f70656e2079657400000060448201526064016109ed565b600084815260146020526040902054610100900460ff16156118635760405162461bcd60e51b815260206004820152601d60248201527f53636f726520616c726561647920686173206265656e206c6f636b656400000060448201526064016109ed565b60008481526014602052604090205460ff16156118d55760405162461bcd60e51b815260206004820152602a60248201527f546f6b656e20686173206265656e20757365642061732061206d696e74207061604482015269737320616c726561647960b01b60648201526084016109ed565b6118df3385611f3e565b6119405760405162461bcd60e51b815260206004820152602c60248201527f4d6573736167652073656e646572206973206e6f7420746865206f776e65722060448201526b37b3103a3432903a37b5b2b760a11b60648201526084016109ed565b604080517f19457468657265756d205369676e6564204d6573736167653a0a343000000000602080830191909152603c820187905260c086901b6001600160c01b031916605c830152825160448184030181526064909201909252805191012060006119e28285858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125a492505050565b600f549091506001600160a01b03808316911614611a615760405162461bcd60e51b815260206004820152603660248201527f5265736f6c7665642061646472657373206e6f74207468652073616d65206173604482015275207468652076616c696461746f72206164647265737360501b60648201526084016109ed565b6000868152601460205260409020805461ff00196001600160401b03881662010000021669ffffffffffffffffff001990911617610100179055611aa7426146506138ef565b6000878152601460205260408082206001019290925590516001600160401b03871691889133917f6861a94e4af1d252df2aa551521f2c4fd8c33433549d291f9579ba1cf0777f9c91a4505050505050565b6008546001600160a01b03163314611b235760405162461bcd60e51b81526004016109ed906131ae565b8051610a09906012906020840190612cb5565b6008546001600160a01b03163314611b605760405162461bcd60e51b81526004016109ed906131ae565b600a5481600954611b7191906138ef565b1115611bbf5760405162461bcd60e51b815260206004820152601b60248201527f416c6c207069656365732068617665206265656e206d696e746564000000000060448201526064016109ed565b60005b81811015610a095760098054906000611bda836132f3565b9091555050600e54600954611bf8916001600160a01b031690612305565b80611c02816132f3565b915050611bc2565b6008546001600160a01b03163314611c345760405162461bcd60e51b81526004016109ed906131ae565b600d91909155600c55565b6008546001600160a01b03163314611c695760405162461bcd60e51b81526004016109ed906131ae565b6001600160a01b038116611cce5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ed565b6110bf816121cf565b6010546001600160a01b03163314611d415760405162461bcd60e51b815260206004820152602760248201527f4572726f723a2063616c6c6572206973206e6f74206d696e742070617373207260448201526632b232b2b6b2b960c91b60648201526084016109ed565b611d4a82611eb3565b611d8d5760405162461bcd60e51b8152602060048201526014602482015273139bdd0818481d985b1a59081d1bdad95b881a5960621b60448201526064016109ed565b60008281526014602052604090205460ff1615611dec5760405162461bcd60e51b815260206004820152601960248201527f416c72656164792075736564206173206d696e7420706173730000000000000060448201526064016109ed565b611df68183611f3e565b611e505760405162461bcd60e51b815260206004820152602560248201527f41646472657373206973206e6f7420746865206f776e6572206f6620746865206044820152643a37b5b2b760d91b60648201526084016109ed565b6000828152601460205260409020805460ff19166001179055611e75426146506138ef565b6000928352601460205260409092206001019190915550565b60006001600160e01b0319821663152a902d60e11b14806109bd57506109bd826125c8565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f0582610f28565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f4982611eb3565b611faa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109ed565b6000611fb583610f28565b9050806001600160a01b0316846001600160a01b03161480611ffc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120205750836001600160a01b031661201584610a9f565b6001600160a01b0316145b949350505050565b826001600160a01b031661203b82610f28565b6001600160a01b03161461209f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109ed565b6001600160a01b0382166121015760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109ed565b61210c838383612618565b612117600082611ed0565b6001600160a01b03831660009081526003602052604081208054600192906121409084906138d8565b90915550506001600160a01b038216600090815260036020526040812080546001929061216e9084906138ef565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036122825760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109ed565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000826122fc858461268f565b14949350505050565b610a098282604051806020016040528060008152506126fb565b61232a848484612028565b6123368484848461272e565b6114525760405162461bcd60e51b81526004016109ed90613907565b6060816000036123795750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123a3578061238d816132f3565b915061239c9050600a836132b9565b915061237d565b6000816001600160401b038111156123bd576123bd612d88565b6040519080825280601f01601f1916602001820160405280156123e7576020820181803683370190505b5090505b8415612020576123fc6001836138d8565b9150612409600a86613959565b6124149060306138ef565b60f81b8183815181106124295761242961396d565b60200101906001600160f81b031916908160001a90535061244b600a866132b9565b94506123eb565b6060815160000361247157505060408051602081019091526000815290565b60006040518060600160405280604081526020016139f460409139905060006003845160026124a091906138ef565b6124aa91906132b9565b6124b5906004613284565b6001600160401b038111156124cc576124cc612d88565b6040519080825280601f01601f1916602001820160405280156124f6576020820181803683370190505b509050600182016020820185865187015b80821015612562576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612507565b505060038651066001811461257e576002811461259157612599565b603d6001830353603d6002830353612599565b603d60018303535b509195945050505050565b60008060006125b3858561282f565b915091506125c08161289a565b509392505050565b60006001600160e01b031982166380ac58cd60e01b14806125f957506001600160e01b03198216635b5e139f60e01b145b806109bd57506301ffc9a760e01b6001600160e01b03198316146109bd565b600081815260146020526040902060010154421015610c375760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a20746f6b656e2070726f7065727469657320776572652072656360448201526c195b9d1b1e4818da185b99d959609a1b60648201526084016109ed565b600081815b84518110156125c05760008582815181106126b1576126b161396d565b602002602001015190508083116126d757600083815260208290526040902092506126e8565b600081815260208490526040902092505b50806126f3816132f3565b915050612694565b6127058383612a50565b612712600084848461272e565b610c375760405162461bcd60e51b81526004016109ed90613907565b60006001600160a01b0384163b1561282457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612772903390899088908890600401613983565b6020604051808303816000875af19250505080156127ad575060408051601f3d908101601f191682019092526127aa918101906139c0565b60015b61280a573d8080156127db576040519150601f19603f3d011682016040523d82523d6000602084013e6127e0565b606091505b5080516000036128025760405162461bcd60e51b81526004016109ed90613907565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612020565b506001949350505050565b60008082516041036128655760208301516040840151606085015160001a61285987828585612b8f565b94509450505050610cb7565b825160400361288e5760208301516040840151612883868383612c7c565b935093505050610cb7565b50600090506002610cb7565b60008160048111156128ae576128ae6139dd565b036128b65750565b60018160048111156128ca576128ca6139dd565b036129175760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109ed565b600281600481111561292b5761292b6139dd565b036129785760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109ed565b600381600481111561298c5761298c6139dd565b036129e45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109ed565b60048160048111156129f8576129f86139dd565b036110bf5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109ed565b6001600160a01b038216612aa65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109ed565b612aaf81611eb3565b15612afc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109ed565b612b0860008383612618565b6001600160a01b0382166000908152600360205260408120805460019290612b319084906138ef565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612bc65750600090506003612c73565b8460ff16601b14158015612bde57508460ff16601c14155b15612bef5750600090506004612c73565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c43573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c6c57600060019250925050612c73565b9150600090505b94509492505050565b6000806001600160ff1b03831681612c9960ff86901c601b6138ef565b9050612ca787828885612b8f565b935093505050935093915050565b828054612cc1906131e3565b90600052602060002090601f016020900481019282612ce35760008555612d29565b82601f10612cfc57805160ff1916838001178555612d29565b82800160010185558215612d29579182015b82811115612d29578251825591602001919060010190612d0e565b50612d35929150612d39565b5090565b5b80821115612d355760008155600101612d3a565b6001600160e01b0319811681146110bf57600080fd5b600060208284031215612d7657600080fd5b8135612d8181612d4e565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612db857612db8612d88565b604051601f8501601f19908116603f01168101908282118183101715612de057612de0612d88565b81604052809350858152868686011115612df957600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e2557600080fd5b81356001600160401b03811115612e3b57600080fd5b8201601f81018413612e4c57600080fd5b61202084823560208401612d9e565b60005b83811015612e76578181015183820152602001612e5e565b838111156114525750506000910152565b60008151808452612e9f816020860160208601612e5b565b601f01601f19169290920160200192915050565b602081526000612d816020830184612e87565b600060208284031215612ed857600080fd5b5035919050565b80356001600160a01b0381168114612ef657600080fd5b919050565b60008060408385031215612f0e57600080fd5b612f1783612edf565b946020939093013593505050565b600080600060608486031215612f3a57600080fd5b612f4384612edf565b9250612f5160208501612edf565b9150604084013590509250925092565b60008060408385031215612f7457600080fd5b50508035926020909101359150565b600060208284031215612f9557600080fd5b612d8182612edf565b60008060408385031215612fb157600080fd5b612fba83612edf565b915060208301358015158114612fcf57600080fd5b809150509250929050565b60008060208385031215612fed57600080fd5b82356001600160401b038082111561300457600080fd5b818501915085601f83011261301857600080fd5b81358181111561302757600080fd5b8660208260051b850101111561303c57600080fd5b60209290920196919550909350505050565b6000806000806080858703121561306457600080fd5b61306d85612edf565b935061307b60208601612edf565b92506040850135915060608501356001600160401b0381111561309d57600080fd5b8501601f810187136130ae57600080fd5b6130bd87823560208401612d9e565b91505092959194509250565b600080600080606085870312156130df57600080fd5b8435935060208501356001600160401b0380821682146130fe57600080fd5b9093506040860135908082111561311457600080fd5b818701915087601f83011261312857600080fd5b81358181111561313757600080fd5b88602082850101111561314957600080fd5b95989497505060200194505050565b6000806040838503121561316b57600080fd5b61317483612edf565b915061318260208401612edf565b90509250929050565b6000806040838503121561319e57600080fd5b8235915061318260208401612edf565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c908216806131f757607f821691505b60208210810361321757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561329e5761329e61326e565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826132c8576132c86132a3565b500490565b60006001600160401b038083168181036132e9576132e961326e565b6001019392505050565b6000600182016133055761330561326e565b5060010190565b8054600090600181811c908083168061332657607f831692505b6020808410820361334757634e487b7160e01b600052602260045260246000fd5b81801561335b576001811461336c57613399565b60ff19861689528489019650613399565b60008881526020902060005b868110156133915781548b820152908501908301613378565b505084890196505b50505050505092915050565b600081516133b7818560208601612e5b565b9290920192915050565b60006133cd828561330c565b602f60f81b815283516133e7816001840160208801612e5b565b01600101949350505050565b60006133ff828661330c565b683f746f6b656e49643d60b81b81528451613421816009840160208901612e5b565b662673746174653d60c81b600992909101918201528351613449816010840160208801612e5b565b0160100195945050505050565b7f7b2274726169745f74797065223a2253636f7265204c6f636b6564222c227661815265363ab2911d1160d11b60208201526000845161349d816026850160208901612e5b565b62089f4b60ea1b6026918401918201527f7b2274726169745f74797065223a2253636f7265222c2276616c7565223a2200602982015284516134e6816048840160208901612e5b565b7f227d2c7b2274726169745f74797065223a2255736564204173204d696e742050604892909101918201526d30b9b99116113b30b63ab2911d1160911b6068820152835161353b816076840160208801612e5b565b61227d60f01b6076929091019182015260780195945050505050565b7f7b226e616d65223a225371756967676c652047616d652023000000000000000081526000855161358f816018850160208a01612e5b565b61088b60f21b6018918401918201527f226465736372697074696f6e223a224c4954205371756967676c652047616d65601a8201527f2069732064657369676e656420657370656369616c6c7920666f72206d6f6269603a8201527f6c652e2052696768742066726f6d20796f7572204f70656e736561206163636f605a8201527f756e742e20596f752063616e2075736520796f75722066696e676572206f6e20607a8201527f796f75722073637265656e20746f206e61766967617465207468652053717569609a8201527f67676c6520616e64206d6173746572207468652067616d652e2043617463682060ba8201527f6173206d616e7920666c616d657320617320796f752063616e20776974686f7560da8201527f742068697474696e67207468652077616c6c73206f722062756d70696e67206960fa8201527f6e746f20616e7920626c61636b20737175617265732e204561636820666c616d61011a8201527f6520697320776f72746820313020706f696e74732e205468652052756c65732c61013a8201527f2046415120616e6420686f7720746f20706172746963697061746520696e205461015a8201527f6865204c4954205371756967676c652047616d65204368616c6c656e6765206361017a8201527f616e20626520666f756e6420627920746865205371756967676c652047616d6561019a8201527f207765624170703a205b68747470733a2f2f7371756967676c6567616d652e776101ba8201527f74665d2868747470733a2f2f7371756967676c6567616d652e77746629222c006101da82015261388861387a61387461385761384961384361382e61382061381a6101f98a016e2261747472696275746573223a205b60881b8152600f0190565b8e6133a5565b61174b60f21b815260020190565b681134b6b0b3b2911d1160b91b815260090190565b8a6133a5565b61088b60f21b815260020190565b701130b734b6b0ba34b7b72fbab936111d1160791b815260110190565b866133a5565b61227d60f01b815260020190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516138cb81601d850160208701612e5b565b91909101601d0192915050565b6000828210156138ea576138ea61326e565b500390565b600082198211156139025761390261326e565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613968576139686132a3565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139b690830184612e87565b9695505050505050565b6000602082840312156139d257600080fd5b8151612d8181612d4e565b634e487b7160e01b600052602160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212204d021a397e34476699d1a0668ed3dba0ea500a159154bc12c0c06d8c3e451ac464736f6c634300080e0033

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

00000000000000000000000000000000000000000000000000000000000020d000000000000000000000000018e52b4f4beab720ff60a827b3f2e7bc9aec22430000000000000000000000003d42213a79a8454ab53a29eebe62beb2955b519000000000000000000000000000000000000000000000000000000000000002ee

-----Decoded View---------------
Arg [0] : _supply (uint256): 8400
Arg [1] : _payout (address): 0x18e52b4f4BEAB720FF60a827b3f2e7bC9AeC2243
Arg [2] : _royalty (address): 0x3D42213a79A8454aB53a29eEBE62bEB2955B5190
Arg [3] : _perc (uint256): 750

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000020d0
Arg [1] : 00000000000000000000000018e52b4f4beab720ff60a827b3f2e7bc9aec2243
Arg [2] : 0000000000000000000000003d42213a79a8454ab53a29eebe62beb2955b5190
Arg [3] : 00000000000000000000000000000000000000000000000000000000000002ee


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.