ETH Price: $3,326.12 (-4.16%)

Token

Enchanted Creatures Club (ECC)
 

Overview

Max Total Supply

10,122 ECC

Holders

7,646

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 ECC
0x709e40834fd0331527d6ced549cff82759bee64d
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:
EnchantedCreaturesClub

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : EnchantedCreaturesClub.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "erc721a/contracts/ERC721A.sol";

contract EnchantedCreaturesClub is Ownable, ERC721A, ReentrancyGuard, Pausable {
    /* ======== ENUMS ======== */

    enum BatchMintType {
        GIVEAWAYS, // 0
        TEAM_TOKENS // 1
    }

    /* ======== EVENTS ======== */

    event UpdateTreasury(address treasury);
    event UpdateGameToken(address gameToken);
    event UpdateBaseURI(string baseURI);
    event UpdatePlaceholderURI(string placeholderURI);
    event UpdateMaxPerTx(uint256 maxPerTx);
    event UpdateEggRate(uint256 rate);
    event UpdateNativeRate(uint256 rate);
    event UpdateEggToken(address eggToken, uint256 eggDecimals);
    event UpdateBurn(bool active);
    event UpdateGiveawaySupply(uint256 supply);
    event UpdateFreeMintAmount(uint256 amount);
    event UpdateBatchMintSupply(uint256 amount);
    event updateWhitelistSale(bool sale);
    event updateSaleAmount(
        uint256 firstSaleMaxSupply,
        uint256 secondSaleMaxSupply
    );
    event UpdateTeamTokensSupply(uint256 supply);
    event UpdateEnableFreeClaim(bool enabled);
    event UpdateEnableMintStatus(
        bool enableMintWithNative,
        bool enableMintWithEgg
    );

    /* ======== VARIABLES ======== */

    uint256 public constant COLLECTION_SUPPLY = 10000;
    uint256 public firstSaleMaxSupply = 4000;
    uint256 public secondSaleMaxSupply = 6000;
    uint256 public eggRate = 800000;
    uint256 public freeMintAmount = 1;
    uint256 public nativeRate = 0.01 ether;
    uint256 public maxPerTx = 5;
    uint256 public eggDecimals;
    uint256 public giveawaySupply;
    uint256 public teamTokensSupply;
    uint256 public batchMintSupply;
    uint256 public firstSale;
    uint256 public secondSale;

    address public treasury;
    address public eggToken;
    address public gameToken;

    string public baseURI;
    string public placeholderURI;

    bool public enableBurn;
    bool public enableMintWithNative = false;
    bool public enableMintWithEgg = true;
    bool public enableFreeClaim = true;
    bool public whitelistSaleActive = true;

    mapping(address => bool) public freeMinters;

    /* ======== CONSTRUCTOR ======== */

    constructor() ERC721A("Enchanted Creatures Club", "ECC") {
        _pause();
    }

    /* ======== MODIFIERS ======== */

    /*
     * @notice: Checks if the msg.sender is the owner or the treasury address
     */
    modifier onlyTreasuryOrOwner() {
        require(
            treasury == _msgSender() || owner() == _msgSender(),
            "The caller is another address"
        );
        _;
    }

    /*
     * @notice: Checks if the origin is not a contract
     */
    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }

    /* ======== SETTERS ======== */

    /*
     * @notice: Pause the smart contract
     * @param: paused_: A boolean to pause or unpause the contract
     */
    function setPaused(bool paused_) external onlyTreasuryOrOwner {
        if (paused_) _pause();
        else _unpause();
    }

    /*
     * @notice: Set the new base URI
     * @param: baseURI_: The string of the new base uri
     */
    function setBaseURI(string memory baseURI_) external onlyTreasuryOrOwner {
        baseURI = baseURI_;
        emit UpdateBaseURI(baseURI_);
    }

    /*
     * @notice: Set the new placeholder URI
     * @param: placeholderURI_: The string of the new placeholder URI
     */
    function setPlaceholderURI(string memory placeholderURI_)
        external
        onlyTreasuryOrOwner
    {
        placeholderURI = placeholderURI_;
        emit UpdatePlaceholderURI(placeholderURI_);
    }

    /*
     * @notice: Set the new treasury address
     * @param: treasury_: The new treasury address
     */
    function setTreasury(address treasury_) external onlyTreasuryOrOwner {
        treasury = treasury_;
        emit UpdateTreasury(treasury_);
    }

    /*
     * @notice: Set the new egg token
     * @param: eggToken_: The egg token address
     * @param: eggDecimals_: The token decimals of egg
     */
    function setEggToken(address eggToken_, uint256 eggDecimals_)
        external
        onlyTreasuryOrOwner
    {
        eggToken = eggToken_;
        eggDecimals = eggDecimals_;
        emit UpdateEggToken(eggToken_, eggDecimals_);
    }

    /*
     * @notice: Set the egg rate per token
     * @param: eggRate_: The rate per token
     */
    function setEggRate(uint256 eggRate_) external onlyTreasuryOrOwner {
        eggRate = eggRate_;
        emit UpdateEggRate(eggRate_);
    }

    /*
     * @notice: Set the native rate per token
     * @param: nativeRate_: The native rate per token
     */
    function setNativeRate(uint256 nativeRate_) external onlyTreasuryOrOwner {
        nativeRate = nativeRate_;
        emit UpdateNativeRate(nativeRate_);
    }

    /*
     * @notice: Set the game nft token
     * @param: gameToken_: The game nft address
     */
    function setGameToken(address gameToken_) external onlyTreasuryOrOwner {
        gameToken = gameToken_;
        emit UpdateGameToken(gameToken_);
    }

    /*
     * @notice: If `enableBurn` = true burning will be enabled for people to burn else it will disabled
     * @param: enableBurn_: Enable or disable
     */
    function setEnableBurn(bool enableBurn_) external onlyTreasuryOrOwner {
        enableBurn = enableBurn_;
        emit UpdateBurn(enableBurn_);
    }

    /*
     * @notice: Enable or disable the free mint
     * @param: enableFreeClaim_: Enable or disable
     */
    function setEnableFreeClaim(bool enableFreeClaim_)
        external
        onlyTreasuryOrOwner
    {
        enableFreeClaim = enableFreeClaim_;
        emit UpdateEnableFreeClaim(enableFreeClaim_);
    }

    /*
     * @notice: Set the max mints per transaction
     * @param: maxPerTx_: The max mint amount per transaction
     */
    function setMaxPerTx(uint256 maxPerTx_) external onlyTreasuryOrOwner {
        maxPerTx = maxPerTx_;
        emit UpdateMaxPerTx(maxPerTx_);
    }

    /*
     * @notice: Set the free mint amount a user can claim
     * @param: freeMintAmount_: The free mint amount
     */
    function setFreeMintAmount(uint256 freeMintAmount_)
        external
        onlyTreasuryOrOwner
    {
        freeMintAmount = freeMintAmount_;
        emit UpdateFreeMintAmount(freeMintAmount_);
    }

    /*
     * @notice: Sets the whitelist sale active or not
     * @param: whitelistSaleActive_: Enable or disable
     */
    function setWhitelistSaleActive(bool whitelistSaleActive_)
        external
        onlyTreasuryOrOwner
    {
        whitelistSaleActive = whitelistSaleActive_;
        emit updateWhitelistSale(whitelistSaleActive_);
    }

    /*
     * @notice: Enable or disable the minting with eth or egg token
     * @param: enableMintWithNative_: Enable or disable the minting with eth
     * @param: enableMintWithEgg_: Enable or disable the minting with the egg token
     */
    function setEnableMintWith(
        bool enableMintWithNative_,
        bool enableMintWithEgg_
    ) external onlyTreasuryOrOwner {
        enableMintWithNative = enableMintWithNative_;
        enableMintWithEgg = enableMintWithEgg_;
        emit UpdateEnableMintStatus(enableMintWithNative_, enableMintWithEgg_);
    }

    /*
     * @notice: Sets the sale amounts
     * @param: firstSale_: Amount for the first sale
     * @param: secondSale_: Amount for the second sale
     */
    function setSales(uint256 firstSaleMaxSupply_, uint256 secondSaleMaxSupply_)
        external
        onlyTreasuryOrOwner
    {
        // Not adding a require here because the sale COLLECTION_SUPPLY is a constant
        firstSaleMaxSupply = firstSaleMaxSupply_;
        secondSaleMaxSupply = secondSaleMaxSupply_;
        emit updateSaleAmount(firstSaleMaxSupply_, secondSaleMaxSupply_);
    }

    /* ======== INTERNAL ======== */

    /*
     * @notice: If a user sends more ETH than the actuall mint price than the exceeded amount will be send back
     * @param: price_: The total price for the mint
     */
    function _refundIfOver(uint256 price_) private {
        require(msg.value >= price_, "Need to send more ETH.");
        if (msg.value > price_) {
            payable(_msgSender()).transfer(msg.value - price_);
        }
    }

    /*
     * @notice: Validations of the mint process
     */
    function _validateMint(
        bool mintIsActive,
        bool isNative,
        bool isPublicSale,
        uint256 price_,
        uint256 quantity_
    ) private {
        require(mintIsActive, "ECC: Mint is not enabled");
        require(
            quantity_ > 0 && quantity_ <= maxPerTx,
            "ECC: Reached max mint per tx"
        );
        require(
            (totalSupply() + quantity_) <= COLLECTION_SUPPLY,
            "ECC: Reached max supply"
        );

        if (isPublicSale) {
            require(
                (secondSale + quantity_) <= secondSaleMaxSupply,
                "ECC: Reached the max supply for secondSale"
            );
        } else {
            require(
                (firstSale + quantity_) <= firstSaleMaxSupply,
                "ECC: Reached the max supply for firstSale"
            );
        }

        if (!isNative) {
            require(
                eggToken != address(0),
                "ECC: Egg token is the zero address"
            );
            uint256 balance = IERC20(eggToken).balanceOf(_msgSender());
            require(balance >= price_, "ECC: Need to send more EGG.");
        } else {
            _refundIfOver(nativeRate * quantity_);
        }
    }

    /* ======== EXTERNAL ======== */

    /*
     * @notice: returns the number of tokens the address has minted
     * @param: owner: address that owns token ids
     */
    function numberMinted(address owner) external view returns (uint256) {
        return _numberMinted(owner);
    }

    /*
     * @notice: This batch mint is meant for team / giveaways etc..
     * @param: to_: The address that will receive the token ids
     * @param: quantity_: The mint amount
     */
    function batchMint(
        address to_,
        uint256 quantity_,
        BatchMintType type_
    ) external onlyTreasuryOrOwner {
        require(quantity_ > 0, "ECC: Quantity must be higher than 0");
        require(
            (totalSupply() + quantity_) <= COLLECTION_SUPPLY,
            "ECC: Reached max supply"
        );

        if (type_ == BatchMintType.GIVEAWAYS) {
            // 0
            giveawaySupply += quantity_;
            emit UpdateGiveawaySupply(giveawaySupply);
        } else if (type_ == BatchMintType.TEAM_TOKENS) {
            // 1
            teamTokensSupply += quantity_;
            emit UpdateTeamTokensSupply(teamTokensSupply);
        } else {
            batchMintSupply += quantity_;
            emit UpdateBatchMintSupply(batchMintSupply);
        }

        _safeMint(to_, quantity_);
    }

    /*
     * @notice: Withdraw the FUNDS from the contract to the treasury address
     */
    function withdrawFunds() external onlyTreasuryOrOwner nonReentrant {
        payable(address(treasury)).transfer(address(this).balance);
    }

    /*
     * @notice: Mint a athlete with the egg tokens
     * @param: quantity_: The amount of nfts to mint
     */
    function mintWhitelistWithEgg(uint256 quantity_)
        external
        whenNotPaused
        callerIsUser
    {
        require(whitelistSaleActive, "ECC: Whitelist sale is not active");
        require(gameToken != address(0), "ECC: Game token is the zero address");
        require(
            IERC721(gameToken).balanceOf(_msgSender()) > 0 ||
                IERC20(eggToken).balanceOf(_msgSender()) > 0,
            "ECC: No eggs or game tokens"
        );
        uint256 price = (eggRate * quantity_) * (10**eggDecimals);
        _validateMint(enableMintWithEgg, false, false, price, quantity_);
        require(
            IERC20(eggToken).transferFrom(_msgSender(), treasury, price),
            "ECC: Failed to transfer tokens"
        );
        firstSale += quantity_;
        _safeMint(_msgSender(), quantity_);
    }

    /*
     * @notice: Mint a athlete with the egg tokens
     * @param: quantity_: The amount of nfts to mint
     */
    function mintWhitelistWithNative(uint256 quantity_)
        external
        payable
        whenNotPaused
        callerIsUser
    {
        require(whitelistSaleActive, "ECC: Whitelist sale is not active");
        require(gameToken != address(0), "ECC: Game token is the zero address");
        require(
            IERC721(gameToken).balanceOf(_msgSender()) > 0 ||
                IERC20(eggToken).balanceOf(_msgSender()) > 0,
            "ECC: No eggs or game tokens"
        );
        _validateMint(enableMintWithNative, true, false, msg.value, quantity_);
        firstSale += quantity_;
        _safeMint(_msgSender(), quantity_);
    }

    /*
     * @notice: Mint a athlete with the egg tokens
     * @param: quantity_: The amount of nfts to mint
     */
    function mintPublicWithEgg(uint256 quantity_)
        external
        whenNotPaused
        callerIsUser
    {
        require(!whitelistSaleActive, "ECC: Whitelist sale is active");
        uint256 price = (eggRate * quantity_) * (10**eggDecimals);
        _validateMint(enableMintWithEgg, false, true, price, quantity_);
        require(
            IERC20(eggToken).transferFrom(_msgSender(), treasury, price),
            "ECC: Failed to transfer tokens"
        );
        secondSale += quantity_;
        _safeMint(_msgSender(), quantity_);
    }

    /*
     * @notice: Mint a athlete with the egg tokens
     * @param: quantity_: The amount of nfts to mint
     */
    function mintPublicWithNative(uint256 quantity_)
        external
        payable
        whenNotPaused
        callerIsUser
    {
        require(!whitelistSaleActive, "ECC: Whitelist sale is active");
        _validateMint(enableMintWithNative, true, true, msg.value, quantity_);
        secondSale += quantity_;
        _safeMint(_msgSender(), quantity_);
    }

    /*
     * @notice: Claim a free token
     */
    function claimFreeMintWhitelist()
        external
        whenNotPaused
        callerIsUser
        nonReentrant
    {
        require(enableFreeClaim, "ECC: Free claim is not enabled");
        require(!freeMinters[_msgSender()], "ECC: Already claimed");
        require(whitelistSaleActive, "ECC: Whitelist sale is not active");
        require(
            IERC721(gameToken).balanceOf(_msgSender()) > 0 ||
                IERC20(eggToken).balanceOf(_msgSender()) > 0,
            "ECC: No eggs or game tokens"
        );

        freeMinters[_msgSender()] = true;
        _safeMint(_msgSender(), freeMintAmount);
    }

    /*
     * @notice: Claim a free token
     */
    function claimFreeMintPublic()
        external
        whenNotPaused
        callerIsUser
        nonReentrant
    {
        require(enableFreeClaim, "ECC: Free claim is not enabled");
        require(!freeMinters[_msgSender()], "ECC: Already claimed");
        require(!whitelistSaleActive, "ECC: Whitelist sale is active");

        freeMinters[_msgSender()] = true;
        _safeMint(_msgSender(), freeMintAmount);
    }

    /*
     * @notice: Burn a token id to reduce the token supply
     */
    function burn(uint256 tokenId) external {
        require(enableBurn, "ECC: Not possible to burn");
        _burn(tokenId);
    }

    /* ======== OVERRIDES ======== */

    /*
     * @notice: returns the baseURI for the token metadata
     */
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    /*
     * @notice: returns a URI for the tokenId
     * @param: tokenId_: the minted token id
     */
    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(tokenId), "URI query for nonexistent token");

        if (bytes(baseURI).length <= 0) {
            return placeholderURI;
        }

        string memory uri = _baseURI();
        return string(abi.encodePacked(uri, Strings.toString(tokenId)));
    }
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 5 of 13 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 7 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 8 of 13 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @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) public payable virtual override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @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. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

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

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 9 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 10 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 11 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 13 of 13 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` 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 payable;

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"UpdateBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UpdateBatchMintSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"UpdateBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"UpdateEggRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"eggToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"eggDecimals","type":"uint256"}],"name":"UpdateEggToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"UpdateEnableFreeClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableMintWithNative","type":"bool"},{"indexed":false,"internalType":"bool","name":"enableMintWithEgg","type":"bool"}],"name":"UpdateEnableMintStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UpdateFreeMintAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"gameToken","type":"address"}],"name":"UpdateGameToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"}],"name":"UpdateGiveawaySupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxPerTx","type":"uint256"}],"name":"UpdateMaxPerTx","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"UpdateNativeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"placeholderURI","type":"string"}],"name":"UpdatePlaceholderURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"}],"name":"UpdateTeamTokensSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"UpdateTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"firstSaleMaxSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secondSaleMaxSupply","type":"uint256"}],"name":"updateSaleAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"sale","type":"bool"}],"name":"updateWhitelistSale","type":"event"},{"inputs":[],"name":"COLLECTION_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"quantity_","type":"uint256"},{"internalType":"enum EnchantedCreaturesClub.BatchMintType","name":"type_","type":"uint8"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"batchMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFreeMintPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFreeMintWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eggDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eggRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eggToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableFreeClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableMintWithEgg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableMintWithNative","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstSaleMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeMinters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giveawaySupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"maxPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"mintPublicWithEgg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"mintPublicWithNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"mintWhitelistWithEgg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"mintWhitelistWithNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"placeholderURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[],"name":"secondSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondSaleMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eggRate_","type":"uint256"}],"name":"setEggRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"eggToken_","type":"address"},{"internalType":"uint256","name":"eggDecimals_","type":"uint256"}],"name":"setEggToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableBurn_","type":"bool"}],"name":"setEnableBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableFreeClaim_","type":"bool"}],"name":"setEnableFreeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableMintWithNative_","type":"bool"},{"internalType":"bool","name":"enableMintWithEgg_","type":"bool"}],"name":"setEnableMintWith","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"freeMintAmount_","type":"uint256"}],"name":"setFreeMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"gameToken_","type":"address"}],"name":"setGameToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxPerTx_","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nativeRate_","type":"uint256"}],"name":"setNativeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused_","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"placeholderURI_","type":"string"}],"name":"setPlaceholderURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"firstSaleMaxSupply_","type":"uint256"},{"internalType":"uint256","name":"secondSaleMaxSupply_","type":"uint256"}],"name":"setSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury_","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"whitelistSaleActive_","type":"bool"}],"name":"setWhitelistSaleActive","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":[],"name":"teamTokensSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052610fa0600b55611770600c55620c3500600d556001600e55662386f26fc10000600f556005601055601c805464ffffffff0019166401010100001790553480156200004e57600080fd5b506040518060400160405280601881526020017f456e6368616e7465642043726561747572657320436c756200000000000000008152506040518060400160405280600381526020016245434360e81b815250620000bb620000b56200010d60201b60201c565b62000111565b8151620000d0906003906020850190620001ff565b508051620000e6906004906020840190620001ff565b50600060019081556009555050600a805460ff191690556200010762000161565b620002e2565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600a5460ff1615620001ac5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600a805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001e23390565b6040516001600160a01b03909116815260200160405180910390a1565b8280546200020d90620002a5565b90600052602060002090601f0160209004810192826200023157600085556200027c565b82601f106200024c57805160ff19168380011785556200027c565b828001600101855582156200027c579182015b828111156200027c5782518255916020019190600101906200025f565b506200028a9291506200028e565b5090565b5b808211156200028a57600081556001016200028f565b600181811c90821680620002ba57607f821691505b60208210811415620002dc57634e487b7160e01b600052602260045260246000fd5b50919050565b613d2380620002f26000396000f3fe6080604052600436106103e45760003560e01c80637985667111610208578063ccda29fe11610118578063e252754e116100ab578063f0f442601161007a578063f0f4426014610ac5578063f2fde38b14610ae5578063f8b0871214610b05578063f968adbe14610b35578063feb1752314610b4b57600080fd5b8063e252754e14610a66578063e288e73314610a79578063e985e9c514610a8f578063eb85ea9314610aaf57600080fd5b8063de4aa678116100e7578063de4aa678146109e7578063de77573f14610a06578063dec4971214610a26578063ded842fb14610a4657600080fd5b8063ccda29fe1461097f578063d3945fe71461099f578063d779c6ef146109b4578063dc33e681146109c757600080fd5b8063add5431d1161019b578063b88d4fde1161016a578063b88d4fde146108f6578063bdb3338614610909578063c3dfdae61461091f578063c6f6f2161461093f578063c87b56dd1461095f57600080fd5b8063add5431d1461088b578063b233545a146108ab578063b2c991bb146108c0578063b369be2e146108d657600080fd5b80638da5cb5b116101d75780638da5cb5b1461081857806395d89b411461083657806399119d221461084b578063a22cb4651461086b57600080fd5b806379856671146107ac5780637f953a22146107c257806380d29e66146107e257806381b724ba1461080257600080fd5b80633b4292b6116103035780635c975abb116102965780636c0360eb116102655780636c0360eb1461073757806370a082311461074c578063715018a61461076c5780637313cba914610781578063731963681461079657600080fd5b80635c975abb146106bf57806361d027b3146106d75780636352211e146106f75780636a78f2271461071757600080fd5b806342842e0e116102d257806342842e0e1461064c57806342966c681461065f57806355f804b31461067f5780635b1f3a7f1461069f57600080fd5b80633b4292b6146105e95780633d6feffb146105ff5780633fc9593014610620578063404146b11461063657600080fd5b806323b872dd1161037b57806338c7ff3e1161034a57806338c7ff3e146105785780633a467e3d146105985780633ad7f56c146105ae5780633b37d1d6146105cf57600080fd5b806323b872dd1461051057806324600fc314610523578063286bcc80146105385780633574a2dd1461055857600080fd5b806312aceb0d116103b757806312aceb0d1461048d57806316c38b3c146104ad57806318160ddd146104cd5780631a989579146104f057600080fd5b806301ffc9a7146103e957806306fdde031461041e578063081812fc14610440578063095ea7b314610478575b600080fd5b3480156103f557600080fd5b50610409610404366004613491565b610b61565b60405190151581526020015b60405180910390f35b34801561042a57600080fd5b50610433610bb3565b6040516104159190613506565b34801561044c57600080fd5b5061046061045b366004613519565b610c45565b6040516001600160a01b039091168152602001610415565b61048b61048636600461354e565b610c89565b005b34801561049957600080fd5b50601c546104099062010000900460ff1681565b3480156104b957600080fd5b5061048b6104c8366004613586565b610d29565b3480156104d957600080fd5b50600254600154035b604051908152602001610415565b3480156104fc57600080fd5b5061048b61050b366004613519565b610d8a565b61048b61051e3660046135a3565b6110ae565b34801561052f57600080fd5b5061048b611237565b34801561054457600080fd5b5061048b610553366004613519565b6112df565b34801561056457600080fd5b5061048b61057336600461366b565b61135a565b34801561058457600080fd5b5061048b6105933660046136b4565b6113dc565b3480156105a457600080fd5b506104e2600e5481565b3480156105ba57600080fd5b50601c5461040990600160201b900460ff1681565b3480156105db57600080fd5b50601c546104099060ff1681565b3480156105f557600080fd5b506104e2600c5481565b34801561060b57600080fd5b50601c54610409906301000000900460ff1681565b34801561062c57600080fd5b506104e260115481565b34801561064257600080fd5b506104e260145481565b61048b61065a3660046135a3565b611488565b34801561066b57600080fd5b5061048b61067a366004613519565b6114a8565b34801561068b57600080fd5b5061048b61069a36600461366b565b611503565b3480156106ab57600080fd5b5061048b6106ba366004613519565b611585565b3480156106cb57600080fd5b50600a5460ff16610409565b3480156106e357600080fd5b50601754610460906001600160a01b031681565b34801561070357600080fd5b50610460610712366004613519565b6115f9565b34801561072357600080fd5b5061048b610732366004613586565b611604565b34801561074357600080fd5b50610433611691565b34801561075857600080fd5b506104e26107673660046136ed565b61171f565b34801561077857600080fd5b5061048b61176e565b34801561078d57600080fd5b506104336117d4565b3480156107a257600080fd5b506104e261271081565b3480156107b857600080fd5b506104e2600f5481565b3480156107ce57600080fd5b5061048b6107dd366004613519565b6117e1565b3480156107ee57600080fd5b5061048b6107fd3660046136ed565b611855565b34801561080e57600080fd5b506104e260165481565b34801561082457600080fd5b506000546001600160a01b0316610460565b34801561084257600080fd5b506104336118e2565b34801561085757600080fd5b50601854610460906001600160a01b031681565b34801561087757600080fd5b5061048b610886366004613708565b6118f1565b34801561089757600080fd5b5061048b6108a636600461354e565b61195d565b3480156108b757600080fd5b5061048b6119f5565b3480156108cc57600080fd5b506104e2600d5481565b3480156108e257600080fd5b5061048b6108f1366004613586565b611b67565b61048b610904366004613724565b611bf3565b34801561091557600080fd5b506104e260155481565b34801561092b57600080fd5b50601954610460906001600160a01b031681565b34801561094b57600080fd5b5061048b61095a366004613519565b611c3d565b34801561096b57600080fd5b5061043361097a366004613519565b611cb1565b34801561098b57600080fd5b5061048b61099a3660046137a0565b611dee565b3480156109ab57600080fd5b5061048b612015565b61048b6109c2366004613519565b612295565b3480156109d357600080fd5b506104e26109e23660046136ed565b61233c565b3480156109f357600080fd5b50601c5461040990610100900460ff1681565b348015610a1257600080fd5b5061048b610a21366004613586565b612367565b348015610a3257600080fd5b5061048b610a41366004613519565b6123e7565b348015610a5257600080fd5b5061048b610a613660046137e4565b612594565b61048b610a74366004613519565b612613565b348015610a8557600080fd5b506104e260125481565b348015610a9b57600080fd5b50610409610aaa366004613806565b61280f565b348015610abb57600080fd5b506104e2600b5481565b348015610ad157600080fd5b5061048b610ae03660046136ed565b61283d565b348015610af157600080fd5b5061048b610b003660046136ed565b6128ca565b348015610b1157600080fd5b50610409610b203660046136ed565b601d6020526000908152604090205460ff1681565b348015610b4157600080fd5b506104e260105481565b348015610b5757600080fd5b506104e260135481565b60006301ffc9a760e01b6001600160e01b031983161480610b9257506380ac58cd60e01b6001600160e01b03198316145b80610bad5750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060038054610bc290613839565b80601f0160208091040260200160405190810160405280929190818152602001828054610bee90613839565b8015610c3b5780601f10610c1057610100808354040283529160200191610c3b565b820191906000526020600020905b815481529060010190602001808311610c1e57829003601f168201915b5050505050905090565b6000610c5082612992565b610c6d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610c94826115f9565b9050336001600160a01b03821614610ccd57610cb0813361280f565b610ccd576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6017546001600160a01b0316331480610d4c57506000546001600160a01b031633145b610d715760405162461bcd60e51b8152600401610d6890613874565b60405180910390fd5b8015610d8257610d7f6129ba565b50565b610d7f612a2f565b600a5460ff1615610dad5760405162461bcd60e51b8152600401610d68906138ab565b323314610dcc5760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16610df55760405162461bcd60e51b8152600401610d689061390c565b6019546001600160a01b0316610e1d5760405162461bcd60e51b8152600401610d689061394d565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610e7157600080fd5b505afa158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190613990565b1180610f3e57506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c9190613990565b115b610f5a5760405162461bcd60e51b8152600401610d68906139a9565b6000601154600a610f6b9190613ada565b82600d54610f799190613ae6565b610f839190613ae6565b601c54909150610fa09062010000900460ff166000808486612aa9565b6018546001600160a01b03166323b872dd3360175460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101849052606401602060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103c9190613b05565b6110885760405162461bcd60e51b815260206004820152601e60248201527f4543433a204661696c656420746f207472616e7366657220746f6b656e7300006044820152606401610d68565b816015600082825461109a9190613b22565b909155506110aa90503383612e0e565b5050565b60006110b982612e28565b9050836001600160a01b0316816001600160a01b0316146110ec5760405162a1148160e81b815260040160405180910390fd5b600082815260076020526040902080546111188187335b6001600160a01b039081169116811491141790565b61114357611126863361280f565b61114357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661116a57604051633a954ecd60e21b815260040160405180910390fd5b801561117557600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b831661120057600184016000818152600560205260409020546111fe5760015481146111fe5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b0316600080516020613cce83398151915260405160405180910390a4505050505050565b6017546001600160a01b031633148061125a57506000546001600160a01b031633145b6112765760405162461bcd60e51b8152600401610d6890613874565b600260095414156112995760405162461bcd60e51b8152600401610d6890613b3a565b60026009556017546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156112d7573d6000803e3d6000fd5b506001600955565b6017546001600160a01b031633148061130257506000546001600160a01b031633145b61131e5760405162461bcd60e51b8152600401610d6890613874565b600f8190556040518181527f6e5ff1a39139ad2be0bf12077f39d26b3b12860ab9ae6bdd41e635bfd1dfaae5906020015b60405180910390a150565b6017546001600160a01b031633148061137d57506000546001600160a01b031633145b6113995760405162461bcd60e51b8152600401610d6890613874565b80516113ac90601b9060208401906133e2565b507f4c0b5770ef4b7d927d2dd9a1b970656f8e02cafa4bc1814c35ed3bc8de0cd75b8160405161134f9190613506565b6017546001600160a01b03163314806113ff57506000546001600160a01b031633145b61141b5760405162461bcd60e51b8152600401610d6890613874565b601c805462ffff00191661010084151590810262ff000019169190911762010000841515908102919091179092556040805191825260208201929092527f7ae2c63477f03f27507cbe035b7892d1a5722c2eca07ca2e8b84de783fa5f8c491015b60405180910390a15050565b6114a383838360405180602001604052806000815250611bf3565b505050565b601c5460ff166114fa5760405162461bcd60e51b815260206004820152601960248201527f4543433a204e6f7420706f737369626c6520746f206275726e000000000000006044820152606401610d68565b610d7f81612e90565b6017546001600160a01b031633148061152657506000546001600160a01b031633145b6115425760405162461bcd60e51b8152600401610d6890613874565b805161155590601a9060208401906133e2565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df98160405161134f9190613506565b6017546001600160a01b03163314806115a857506000546001600160a01b031633145b6115c45760405162461bcd60e51b8152600401610d6890613874565b600d8190556040518181527ff7eeda7facc1fd423ef53cec29f39b9b0aa1cdc592afa99c591b1afa0001037d9060200161134f565b6000610bad82612e28565b6017546001600160a01b031633148061162757506000546001600160a01b031633145b6116435760405162461bcd60e51b8152600401610d6890613874565b601c8054821515600160201b0264ff00000000199091161790556040517f85e7a948a6e87531b3b7cafb5ecdda1192bd40ca43e3f88e6865514dc9ec0d7e9061134f90831515815260200190565b601a805461169e90613839565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca90613839565b80156117175780601f106116ec57610100808354040283529160200191611717565b820191906000526020600020905b8154815290600101906020018083116116fa57829003601f168201915b505050505081565b60006001600160a01b038216611748576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b031633146117c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d68565b6117d26000612e9b565b565b601b805461169e90613839565b6017546001600160a01b031633148061180457506000546001600160a01b031633145b6118205760405162461bcd60e51b8152600401610d6890613874565b600e8190556040518181527f4baad2c3c2637f34c701e171ecdc41f86617b73e4e98a790112e191e634502349060200161134f565b6017546001600160a01b031633148061187857506000546001600160a01b031633145b6118945760405162461bcd60e51b8152600401610d6890613874565b601980546001600160a01b0319166001600160a01b0383169081179091556040519081527fdc20b9744461859fd121f6056d33df09052074157c505087b0c072f50c9d7f479060200161134f565b606060048054610bc290613839565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6017546001600160a01b031633148061198057506000546001600160a01b031633145b61199c5760405162461bcd60e51b8152600401610d6890613874565b601880546001600160a01b0319166001600160a01b038416908117909155601182905560408051918252602082018390527ff377a0ddf6d1e121bcf7fe2cb4f2fc8f0530b545aed1dad6ae64f0a5b6f1ef7b910161147c565b600a5460ff1615611a185760405162461bcd60e51b8152600401610d68906138ab565b323314611a375760405162461bcd60e51b8152600401610d68906138d5565b60026009541415611a5a5760405162461bcd60e51b8152600401610d6890613b3a565b6002600955601c546301000000900460ff16611ab85760405162461bcd60e51b815260206004820152601e60248201527f4543433a204672656520636c61696d206973206e6f7420656e61626c656400006044820152606401610d68565b336000908152601d602052604090205460ff1615611b0f5760405162461bcd60e51b81526020600482015260146024820152731150d0ce88105b1c9958591e4818db185a5b595960621b6044820152606401610d68565b601c54600160201b900460ff1615611b395760405162461bcd60e51b8152600401610d6890613b71565b336000818152601d60205260409020805460ff19166001179055600e54611b609190612e0e565b6001600955565b6017546001600160a01b0316331480611b8a57506000546001600160a01b031633145b611ba65760405162461bcd60e51b8152600401610d6890613874565b601c805482151563010000000263ff000000199091161790556040517f566b9f3d36f58182632cf62d16e26cb8c31f78674deb38e3e42ca45d9fd6d9239061134f90831515815260200190565b611bfe8484846110ae565b6001600160a01b0383163b15611c3757611c1a84848484612eeb565b611c37576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6017546001600160a01b0316331480611c6057506000546001600160a01b031633145b611c7c5760405162461bcd60e51b8152600401610d6890613874565b60108190556040518181527f5af3c0ea139feb589ca6a45cdcfd3aab2221a9f0e5e17200257740759dbee52a9060200161134f565b6060611cbc82612992565b611d085760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610d68565b6000601a8054611d1790613839565b905011611db057601b8054611d2b90613839565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5790613839565b8015611da45780601f10611d7957610100808354040283529160200191611da4565b820191906000526020600020905b815481529060010190602001808311611d8757829003601f168201915b50505050509050919050565b6000611dba612fe3565b905080611dc684612ff2565b604051602001611dd7929190613ba8565b604051602081830303815290604052915050919050565b6017546001600160a01b0316331480611e1157506000546001600160a01b031633145b611e2d5760405162461bcd60e51b8152600401610d6890613874565b60008211611e895760405162461bcd60e51b815260206004820152602360248201527f4543433a205175616e74697479206d757374206265206869676865722074686160448201526206e20360ec1b6064820152608401610d68565b61271082611e9a6002546001540390565b611ea49190613b22565b1115611eec5760405162461bcd60e51b81526020600482015260176024820152764543433a2052656163686564206d617820737570706c7960481b6044820152606401610d68565b6000816001811115611f0057611f00613bd7565b1415611f59578160126000828254611f189190613b22565b90915550506012546040519081527fc88dcfb5478c6a1b8dd7e8025cc10798ae7c9e91f7c736a2c3790e1296d326e5906020015b60405180910390a161200b565b6001816001811115611f6d57611f6d613bd7565b1415611fbd578160136000828254611f859190613b22565b90915550506013546040519081527f5d8b5c685cd3cc98456463592f00ae985f6b233276e08de47847e4fbe5eac7bc90602001611f4c565b8160146000828254611fcf9190613b22565b90915550506014546040519081527f739b5c07a3f89b1ba294110ef0a2c18cb6da555786aed5b9f8ce157501d0cdcf9060200160405180910390a15b6114a38383612e0e565b600a5460ff16156120385760405162461bcd60e51b8152600401610d68906138ab565b3233146120575760405162461bcd60e51b8152600401610d68906138d5565b6002600954141561207a5760405162461bcd60e51b8152600401610d6890613b3a565b6002600955601c546301000000900460ff166120d85760405162461bcd60e51b815260206004820152601e60248201527f4543433a204672656520636c61696d206973206e6f7420656e61626c656400006044820152606401610d68565b336000908152601d602052604090205460ff161561212f5760405162461bcd60e51b81526020600482015260146024820152731150d0ce88105b1c9958591e4818db185a5b595960621b6044820152606401610d68565b601c54600160201b900460ff166121585760405162461bcd60e51b8152600401610d689061390c565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190613990565b118061227957506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561223f57600080fd5b505afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613990565b115b611b395760405162461bcd60e51b8152600401610d68906139a9565b600a5460ff16156122b85760405162461bcd60e51b8152600401610d68906138ab565b3233146122d75760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16156123015760405162461bcd60e51b8152600401610d6890613b71565b601c5461231a90610100900460ff166001803485612aa9565b806016600082825461232c9190613b22565b90915550610d7f90503382612e0e565b6001600160a01b0381166000908152600660205260408082205467ffffffffffffffff911c16610bad565b6017546001600160a01b031633148061238a57506000546001600160a01b031633145b6123a65760405162461bcd60e51b8152600401610d6890613874565b601c805460ff19168215159081179091556040519081527fd1b02133bf9bf78a6b9dc5c6ad59748091443365834e4625acbfd5906b0d70989060200161134f565b600a5460ff161561240a5760405162461bcd60e51b8152600401610d68906138ab565b3233146124295760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16156124535760405162461bcd60e51b8152600401610d6890613b71565b6000601154600a6124649190613ada565b82600d546124729190613ae6565b61247c9190613ae6565b601c5490915061249a9062010000900460ff16600060018486612aa9565b6018546001600160a01b03166323b872dd3360175460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101849052606401602060405180830381600087803b1580156124fe57600080fd5b505af1158015612512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125369190613b05565b6125825760405162461bcd60e51b815260206004820152601e60248201527f4543433a204661696c656420746f207472616e7366657220746f6b656e7300006044820152606401610d68565b816016600082825461109a9190613b22565b6017546001600160a01b03163314806125b757506000546001600160a01b031633145b6125d35760405162461bcd60e51b8152600401610d6890613874565b600b829055600c81905560408051838152602081018390527fbce64662d1123507a3d615abbfead92f5498a274dd50e961226ed66eb78c6f88910161147c565b600a5460ff16156126365760405162461bcd60e51b8152600401610d68906138ab565b3233146126555760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff1661267e5760405162461bcd60e51b8152600401610d689061390c565b6019546001600160a01b03166126a65760405162461bcd60e51b8152600401610d689061394d565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156126fa57600080fd5b505afa15801561270e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127329190613990565b11806127c757506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c59190613990565b115b6127e35760405162461bcd60e51b8152600401610d68906139a9565b601c546127fd90610100900460ff16600160003485612aa9565b806015600082825461232c9190613b22565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6017546001600160a01b031633148061286057506000546001600160a01b031633145b61287c5760405162461bcd60e51b8152600401610d6890613874565b601780546001600160a01b0319166001600160a01b0383169081179091556040519081527f1f54d231bb9d500b1923e4a1cb25e600f366a8368873d9af7c1c623814df19fc9060200161134f565b6000546001600160a01b031633146129245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d68565b6001600160a01b0381166129895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d68565b610d7f81612e9b565b600060015482108015610bad575050600090815260056020526040902054600160e01b161590565b600a5460ff16156129dd5760405162461bcd60e51b8152600401610d68906138ab565b600a805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a123390565b6040516001600160a01b03909116815260200160405180910390a1565b600a5460ff16612a785760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d68565b600a805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a12565b84612af65760405162461bcd60e51b815260206004820152601860248201527f4543433a204d696e74206973206e6f7420656e61626c656400000000000000006044820152606401610d68565b600081118015612b0857506010548111155b612b545760405162461bcd60e51b815260206004820152601c60248201527f4543433a2052656163686564206d6178206d696e7420706572207478000000006044820152606401610d68565b61271081612b656002546001540390565b612b6f9190613b22565b1115612bb75760405162461bcd60e51b81526020600482015260176024820152764543433a2052656163686564206d617820737570706c7960481b6044820152606401610d68565b8215612c3457600c5481601654612bce9190613b22565b1115612c2f5760405162461bcd60e51b815260206004820152602a60248201527f4543433a205265616368656420746865206d617820737570706c7920666f72206044820152697365636f6e6453616c6560b01b6064820152608401610d68565b612ca5565b600b5481601554612c459190613b22565b1115612ca55760405162461bcd60e51b815260206004820152602960248201527f4543433a205265616368656420746865206d617820737570706c7920666f7220604482015268666972737453616c6560b81b6064820152608401610d68565b83612df1576018546001600160a01b0316612d0d5760405162461bcd60e51b815260206004820152602260248201527f4543433a2045676720746f6b656e20697320746865207a65726f206164647265604482015261737360f01b6064820152608401610d68565b6018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015612d6157600080fd5b505afa158015612d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d999190613990565b905082811015612deb5760405162461bcd60e51b815260206004820152601b60248201527f4543433a204e65656420746f2073656e64206d6f7265204547472e00000000006044820152606401610d68565b50612e07565b612e0781600f54612e029190613ae6565b6130f0565b5050505050565b6110aa828260405180602001604052806000815250613177565b600081600154811015612e7757600081815260056020526040902054600160e01b8116612e75575b80612e6e575060001901600081815260056020526040902054612e50565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b610d7f8160006131dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612f20903390899088908890600401613bed565b602060405180830381600087803b158015612f3a57600080fd5b505af1925050508015612f6a575060408051601f3d908101601f19168201909252612f6791810190613c2a565b60015b612fc5573d808015612f98576040519150601f19603f3d011682016040523d82523d6000602084013e612f9d565b606091505b508051612fbd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060601a8054610bc290613839565b6060816130165750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613040578061302a81613c47565b91506130399050600a83613c78565b915061301a565b60008167ffffffffffffffff81111561305b5761305b6135df565b6040519080825280601f01601f191660200182016040528015613085576020820181803683370190505b5090505b8415612fdb5761309a600183613c8c565b91506130a7600a86613ca3565b6130b2906030613b22565b60f81b8183815181106130c7576130c7613cb7565b60200101906001600160f81b031916908160001a9053506130e9600a86613c78565b9450613089565b803410156131395760405162461bcd60e51b81526020600482015260166024820152752732b2b2103a379039b2b7321036b7b9329022aa241760511b6044820152606401610d68565b80341115610d7f57336108fc61314f8334613c8c565b6040518115909202916000818181858888f193505050501580156110aa573d6000803e3d6000fd5b613181838361330f565b6001600160a01b0383163b156114a3576001548281035b6131ab6000868380600101945086612eeb565b6131c8576040516368d2bf6b60e11b815260040160405180910390fd5b818110613198578160015414612e0757600080fd5b60006131e883612e28565b90508060008061320686600090815260076020526040902080549091565b9150915084156132465761321b818433611103565b61324657613229833361280f565b61324657604051632ce44b5f60e11b815260040160405180910390fd5b801561325157600082555b6001600160a01b038316600081815260066020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260056020526040902055600160e11b84166132d857600186016000818152600560205260409020546132d65760015481146132d65760008181526005602052604090208590555b505b60405186906000906001600160a01b03861690600080516020613cce833981519152908390a4505060028054600101905550505050565b600154816133305760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b17831790558284019083908390600080516020613cce8339815191528180a4600183015b8181146133bb5780836000600080516020613cce833981519152600080a4600101613395565b50816133d957604051622e076360e81b815260040160405180910390fd5b60015550505050565b8280546133ee90613839565b90600052602060002090601f0160209004810192826134105760008555613456565b82601f1061342957805160ff1916838001178555613456565b82800160010185558215613456579182015b8281111561345657825182559160200191906001019061343b565b50613462929150613466565b5090565b5b808211156134625760008155600101613467565b6001600160e01b031981168114610d7f57600080fd5b6000602082840312156134a357600080fd5b8135612e6e8161347b565b60005b838110156134c95781810151838201526020016134b1565b83811115611c375750506000910152565b600081518084526134f28160208601602086016134ae565b601f01601f19169290920160200192915050565b602081526000612e6e60208301846134da565b60006020828403121561352b57600080fd5b5035919050565b80356001600160a01b038116811461354957600080fd5b919050565b6000806040838503121561356157600080fd5b61356a83613532565b946020939093013593505050565b8015158114610d7f57600080fd5b60006020828403121561359857600080fd5b8135612e6e81613578565b6000806000606084860312156135b857600080fd5b6135c184613532565b92506135cf60208501613532565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115613610576136106135df565b604051601f8501601f19908116603f01168101908282118183101715613638576136386135df565b8160405280935085815286868601111561365157600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561367d57600080fd5b813567ffffffffffffffff81111561369457600080fd5b8201601f810184136136a557600080fd5b612fdb848235602084016135f5565b600080604083850312156136c757600080fd5b82356136d281613578565b915060208301356136e281613578565b809150509250929050565b6000602082840312156136ff57600080fd5b612e6e82613532565b6000806040838503121561371b57600080fd5b6136d283613532565b6000806000806080858703121561373a57600080fd5b61374385613532565b935061375160208601613532565b925060408501359150606085013567ffffffffffffffff81111561377457600080fd5b8501601f8101871361378557600080fd5b613794878235602084016135f5565b91505092959194509250565b6000806000606084860312156137b557600080fd5b6137be84613532565b9250602084013591506040840135600281106137d957600080fd5b809150509250925092565b600080604083850312156137f757600080fd5b50508035926020909101359150565b6000806040838503121561381957600080fd5b61382283613532565b915061383060208401613532565b90509250929050565b600181811c9082168061384d57607f821691505b6020821081141561386e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601d908201527f5468652063616c6c657220697320616e6f746865722061646472657373000000604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b60208082526021908201527f4543433a2057686974656c6973742073616c65206973206e6f742061637469766040820152606560f81b606082015260800190565b60208082526023908201527f4543433a2047616d6520746f6b656e20697320746865207a65726f206164647260408201526265737360e81b606082015260800190565b6000602082840312156139a257600080fd5b5051919050565b6020808252601b908201527f4543433a204e6f2065676773206f722067616d6520746f6b656e730000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115613a31578160001904821115613a1757613a176139e0565b80851615613a2457918102915b93841c93908002906139fb565b509250929050565b600082613a4857506001610bad565b81613a5557506000610bad565b8160018114613a6b5760028114613a7557613a91565b6001915050610bad565b60ff841115613a8657613a866139e0565b50506001821b610bad565b5060208310610133831016604e8410600b8410161715613ab4575081810a610bad565b613abe83836139f6565b8060001904821115613ad257613ad26139e0565b029392505050565b6000612e6e8383613a39565b6000816000190483118215151615613b0057613b006139e0565b500290565b600060208284031215613b1757600080fd5b8151612e6e81613578565b60008219821115613b3557613b356139e0565b500190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601d908201527f4543433a2057686974656c6973742073616c6520697320616374697665000000604082015260600190565b60008351613bba8184602088016134ae565b835190830190613bce8183602088016134ae565b01949350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613c20908301846134da565b9695505050505050565b600060208284031215613c3c57600080fd5b8151612e6e8161347b565b6000600019821415613c5b57613c5b6139e0565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613c8757613c87613c62565b500490565b600082821015613c9e57613c9e6139e0565b500390565b600082613cb257613cb2613c62565b500690565b634e487b7160e01b600052603260045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220570a8f83949aeadb99ccc8388c948f3c829062d10633741de73ae396fdb7ea1164736f6c63430008090033

Deployed Bytecode

0x6080604052600436106103e45760003560e01c80637985667111610208578063ccda29fe11610118578063e252754e116100ab578063f0f442601161007a578063f0f4426014610ac5578063f2fde38b14610ae5578063f8b0871214610b05578063f968adbe14610b35578063feb1752314610b4b57600080fd5b8063e252754e14610a66578063e288e73314610a79578063e985e9c514610a8f578063eb85ea9314610aaf57600080fd5b8063de4aa678116100e7578063de4aa678146109e7578063de77573f14610a06578063dec4971214610a26578063ded842fb14610a4657600080fd5b8063ccda29fe1461097f578063d3945fe71461099f578063d779c6ef146109b4578063dc33e681146109c757600080fd5b8063add5431d1161019b578063b88d4fde1161016a578063b88d4fde146108f6578063bdb3338614610909578063c3dfdae61461091f578063c6f6f2161461093f578063c87b56dd1461095f57600080fd5b8063add5431d1461088b578063b233545a146108ab578063b2c991bb146108c0578063b369be2e146108d657600080fd5b80638da5cb5b116101d75780638da5cb5b1461081857806395d89b411461083657806399119d221461084b578063a22cb4651461086b57600080fd5b806379856671146107ac5780637f953a22146107c257806380d29e66146107e257806381b724ba1461080257600080fd5b80633b4292b6116103035780635c975abb116102965780636c0360eb116102655780636c0360eb1461073757806370a082311461074c578063715018a61461076c5780637313cba914610781578063731963681461079657600080fd5b80635c975abb146106bf57806361d027b3146106d75780636352211e146106f75780636a78f2271461071757600080fd5b806342842e0e116102d257806342842e0e1461064c57806342966c681461065f57806355f804b31461067f5780635b1f3a7f1461069f57600080fd5b80633b4292b6146105e95780633d6feffb146105ff5780633fc9593014610620578063404146b11461063657600080fd5b806323b872dd1161037b57806338c7ff3e1161034a57806338c7ff3e146105785780633a467e3d146105985780633ad7f56c146105ae5780633b37d1d6146105cf57600080fd5b806323b872dd1461051057806324600fc314610523578063286bcc80146105385780633574a2dd1461055857600080fd5b806312aceb0d116103b757806312aceb0d1461048d57806316c38b3c146104ad57806318160ddd146104cd5780631a989579146104f057600080fd5b806301ffc9a7146103e957806306fdde031461041e578063081812fc14610440578063095ea7b314610478575b600080fd5b3480156103f557600080fd5b50610409610404366004613491565b610b61565b60405190151581526020015b60405180910390f35b34801561042a57600080fd5b50610433610bb3565b6040516104159190613506565b34801561044c57600080fd5b5061046061045b366004613519565b610c45565b6040516001600160a01b039091168152602001610415565b61048b61048636600461354e565b610c89565b005b34801561049957600080fd5b50601c546104099062010000900460ff1681565b3480156104b957600080fd5b5061048b6104c8366004613586565b610d29565b3480156104d957600080fd5b50600254600154035b604051908152602001610415565b3480156104fc57600080fd5b5061048b61050b366004613519565b610d8a565b61048b61051e3660046135a3565b6110ae565b34801561052f57600080fd5b5061048b611237565b34801561054457600080fd5b5061048b610553366004613519565b6112df565b34801561056457600080fd5b5061048b61057336600461366b565b61135a565b34801561058457600080fd5b5061048b6105933660046136b4565b6113dc565b3480156105a457600080fd5b506104e2600e5481565b3480156105ba57600080fd5b50601c5461040990600160201b900460ff1681565b3480156105db57600080fd5b50601c546104099060ff1681565b3480156105f557600080fd5b506104e2600c5481565b34801561060b57600080fd5b50601c54610409906301000000900460ff1681565b34801561062c57600080fd5b506104e260115481565b34801561064257600080fd5b506104e260145481565b61048b61065a3660046135a3565b611488565b34801561066b57600080fd5b5061048b61067a366004613519565b6114a8565b34801561068b57600080fd5b5061048b61069a36600461366b565b611503565b3480156106ab57600080fd5b5061048b6106ba366004613519565b611585565b3480156106cb57600080fd5b50600a5460ff16610409565b3480156106e357600080fd5b50601754610460906001600160a01b031681565b34801561070357600080fd5b50610460610712366004613519565b6115f9565b34801561072357600080fd5b5061048b610732366004613586565b611604565b34801561074357600080fd5b50610433611691565b34801561075857600080fd5b506104e26107673660046136ed565b61171f565b34801561077857600080fd5b5061048b61176e565b34801561078d57600080fd5b506104336117d4565b3480156107a257600080fd5b506104e261271081565b3480156107b857600080fd5b506104e2600f5481565b3480156107ce57600080fd5b5061048b6107dd366004613519565b6117e1565b3480156107ee57600080fd5b5061048b6107fd3660046136ed565b611855565b34801561080e57600080fd5b506104e260165481565b34801561082457600080fd5b506000546001600160a01b0316610460565b34801561084257600080fd5b506104336118e2565b34801561085757600080fd5b50601854610460906001600160a01b031681565b34801561087757600080fd5b5061048b610886366004613708565b6118f1565b34801561089757600080fd5b5061048b6108a636600461354e565b61195d565b3480156108b757600080fd5b5061048b6119f5565b3480156108cc57600080fd5b506104e2600d5481565b3480156108e257600080fd5b5061048b6108f1366004613586565b611b67565b61048b610904366004613724565b611bf3565b34801561091557600080fd5b506104e260155481565b34801561092b57600080fd5b50601954610460906001600160a01b031681565b34801561094b57600080fd5b5061048b61095a366004613519565b611c3d565b34801561096b57600080fd5b5061043361097a366004613519565b611cb1565b34801561098b57600080fd5b5061048b61099a3660046137a0565b611dee565b3480156109ab57600080fd5b5061048b612015565b61048b6109c2366004613519565b612295565b3480156109d357600080fd5b506104e26109e23660046136ed565b61233c565b3480156109f357600080fd5b50601c5461040990610100900460ff1681565b348015610a1257600080fd5b5061048b610a21366004613586565b612367565b348015610a3257600080fd5b5061048b610a41366004613519565b6123e7565b348015610a5257600080fd5b5061048b610a613660046137e4565b612594565b61048b610a74366004613519565b612613565b348015610a8557600080fd5b506104e260125481565b348015610a9b57600080fd5b50610409610aaa366004613806565b61280f565b348015610abb57600080fd5b506104e2600b5481565b348015610ad157600080fd5b5061048b610ae03660046136ed565b61283d565b348015610af157600080fd5b5061048b610b003660046136ed565b6128ca565b348015610b1157600080fd5b50610409610b203660046136ed565b601d6020526000908152604090205460ff1681565b348015610b4157600080fd5b506104e260105481565b348015610b5757600080fd5b506104e260135481565b60006301ffc9a760e01b6001600160e01b031983161480610b9257506380ac58cd60e01b6001600160e01b03198316145b80610bad5750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060038054610bc290613839565b80601f0160208091040260200160405190810160405280929190818152602001828054610bee90613839565b8015610c3b5780601f10610c1057610100808354040283529160200191610c3b565b820191906000526020600020905b815481529060010190602001808311610c1e57829003601f168201915b5050505050905090565b6000610c5082612992565b610c6d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610c94826115f9565b9050336001600160a01b03821614610ccd57610cb0813361280f565b610ccd576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6017546001600160a01b0316331480610d4c57506000546001600160a01b031633145b610d715760405162461bcd60e51b8152600401610d6890613874565b60405180910390fd5b8015610d8257610d7f6129ba565b50565b610d7f612a2f565b600a5460ff1615610dad5760405162461bcd60e51b8152600401610d68906138ab565b323314610dcc5760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16610df55760405162461bcd60e51b8152600401610d689061390c565b6019546001600160a01b0316610e1d5760405162461bcd60e51b8152600401610d689061394d565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610e7157600080fd5b505afa158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190613990565b1180610f3e57506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c9190613990565b115b610f5a5760405162461bcd60e51b8152600401610d68906139a9565b6000601154600a610f6b9190613ada565b82600d54610f799190613ae6565b610f839190613ae6565b601c54909150610fa09062010000900460ff166000808486612aa9565b6018546001600160a01b03166323b872dd3360175460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101849052606401602060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103c9190613b05565b6110885760405162461bcd60e51b815260206004820152601e60248201527f4543433a204661696c656420746f207472616e7366657220746f6b656e7300006044820152606401610d68565b816015600082825461109a9190613b22565b909155506110aa90503383612e0e565b5050565b60006110b982612e28565b9050836001600160a01b0316816001600160a01b0316146110ec5760405162a1148160e81b815260040160405180910390fd5b600082815260076020526040902080546111188187335b6001600160a01b039081169116811491141790565b61114357611126863361280f565b61114357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661116a57604051633a954ecd60e21b815260040160405180910390fd5b801561117557600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b831661120057600184016000818152600560205260409020546111fe5760015481146111fe5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b0316600080516020613cce83398151915260405160405180910390a4505050505050565b6017546001600160a01b031633148061125a57506000546001600160a01b031633145b6112765760405162461bcd60e51b8152600401610d6890613874565b600260095414156112995760405162461bcd60e51b8152600401610d6890613b3a565b60026009556017546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156112d7573d6000803e3d6000fd5b506001600955565b6017546001600160a01b031633148061130257506000546001600160a01b031633145b61131e5760405162461bcd60e51b8152600401610d6890613874565b600f8190556040518181527f6e5ff1a39139ad2be0bf12077f39d26b3b12860ab9ae6bdd41e635bfd1dfaae5906020015b60405180910390a150565b6017546001600160a01b031633148061137d57506000546001600160a01b031633145b6113995760405162461bcd60e51b8152600401610d6890613874565b80516113ac90601b9060208401906133e2565b507f4c0b5770ef4b7d927d2dd9a1b970656f8e02cafa4bc1814c35ed3bc8de0cd75b8160405161134f9190613506565b6017546001600160a01b03163314806113ff57506000546001600160a01b031633145b61141b5760405162461bcd60e51b8152600401610d6890613874565b601c805462ffff00191661010084151590810262ff000019169190911762010000841515908102919091179092556040805191825260208201929092527f7ae2c63477f03f27507cbe035b7892d1a5722c2eca07ca2e8b84de783fa5f8c491015b60405180910390a15050565b6114a383838360405180602001604052806000815250611bf3565b505050565b601c5460ff166114fa5760405162461bcd60e51b815260206004820152601960248201527f4543433a204e6f7420706f737369626c6520746f206275726e000000000000006044820152606401610d68565b610d7f81612e90565b6017546001600160a01b031633148061152657506000546001600160a01b031633145b6115425760405162461bcd60e51b8152600401610d6890613874565b805161155590601a9060208401906133e2565b507f157d450c8fb1377294d9db75af1de2753efc52d8e5578551d70d2c7d9cd74df98160405161134f9190613506565b6017546001600160a01b03163314806115a857506000546001600160a01b031633145b6115c45760405162461bcd60e51b8152600401610d6890613874565b600d8190556040518181527ff7eeda7facc1fd423ef53cec29f39b9b0aa1cdc592afa99c591b1afa0001037d9060200161134f565b6000610bad82612e28565b6017546001600160a01b031633148061162757506000546001600160a01b031633145b6116435760405162461bcd60e51b8152600401610d6890613874565b601c8054821515600160201b0264ff00000000199091161790556040517f85e7a948a6e87531b3b7cafb5ecdda1192bd40ca43e3f88e6865514dc9ec0d7e9061134f90831515815260200190565b601a805461169e90613839565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca90613839565b80156117175780601f106116ec57610100808354040283529160200191611717565b820191906000526020600020905b8154815290600101906020018083116116fa57829003601f168201915b505050505081565b60006001600160a01b038216611748576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b031633146117c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d68565b6117d26000612e9b565b565b601b805461169e90613839565b6017546001600160a01b031633148061180457506000546001600160a01b031633145b6118205760405162461bcd60e51b8152600401610d6890613874565b600e8190556040518181527f4baad2c3c2637f34c701e171ecdc41f86617b73e4e98a790112e191e634502349060200161134f565b6017546001600160a01b031633148061187857506000546001600160a01b031633145b6118945760405162461bcd60e51b8152600401610d6890613874565b601980546001600160a01b0319166001600160a01b0383169081179091556040519081527fdc20b9744461859fd121f6056d33df09052074157c505087b0c072f50c9d7f479060200161134f565b606060048054610bc290613839565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6017546001600160a01b031633148061198057506000546001600160a01b031633145b61199c5760405162461bcd60e51b8152600401610d6890613874565b601880546001600160a01b0319166001600160a01b038416908117909155601182905560408051918252602082018390527ff377a0ddf6d1e121bcf7fe2cb4f2fc8f0530b545aed1dad6ae64f0a5b6f1ef7b910161147c565b600a5460ff1615611a185760405162461bcd60e51b8152600401610d68906138ab565b323314611a375760405162461bcd60e51b8152600401610d68906138d5565b60026009541415611a5a5760405162461bcd60e51b8152600401610d6890613b3a565b6002600955601c546301000000900460ff16611ab85760405162461bcd60e51b815260206004820152601e60248201527f4543433a204672656520636c61696d206973206e6f7420656e61626c656400006044820152606401610d68565b336000908152601d602052604090205460ff1615611b0f5760405162461bcd60e51b81526020600482015260146024820152731150d0ce88105b1c9958591e4818db185a5b595960621b6044820152606401610d68565b601c54600160201b900460ff1615611b395760405162461bcd60e51b8152600401610d6890613b71565b336000818152601d60205260409020805460ff19166001179055600e54611b609190612e0e565b6001600955565b6017546001600160a01b0316331480611b8a57506000546001600160a01b031633145b611ba65760405162461bcd60e51b8152600401610d6890613874565b601c805482151563010000000263ff000000199091161790556040517f566b9f3d36f58182632cf62d16e26cb8c31f78674deb38e3e42ca45d9fd6d9239061134f90831515815260200190565b611bfe8484846110ae565b6001600160a01b0383163b15611c3757611c1a84848484612eeb565b611c37576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6017546001600160a01b0316331480611c6057506000546001600160a01b031633145b611c7c5760405162461bcd60e51b8152600401610d6890613874565b60108190556040518181527f5af3c0ea139feb589ca6a45cdcfd3aab2221a9f0e5e17200257740759dbee52a9060200161134f565b6060611cbc82612992565b611d085760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610d68565b6000601a8054611d1790613839565b905011611db057601b8054611d2b90613839565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5790613839565b8015611da45780601f10611d7957610100808354040283529160200191611da4565b820191906000526020600020905b815481529060010190602001808311611d8757829003601f168201915b50505050509050919050565b6000611dba612fe3565b905080611dc684612ff2565b604051602001611dd7929190613ba8565b604051602081830303815290604052915050919050565b6017546001600160a01b0316331480611e1157506000546001600160a01b031633145b611e2d5760405162461bcd60e51b8152600401610d6890613874565b60008211611e895760405162461bcd60e51b815260206004820152602360248201527f4543433a205175616e74697479206d757374206265206869676865722074686160448201526206e20360ec1b6064820152608401610d68565b61271082611e9a6002546001540390565b611ea49190613b22565b1115611eec5760405162461bcd60e51b81526020600482015260176024820152764543433a2052656163686564206d617820737570706c7960481b6044820152606401610d68565b6000816001811115611f0057611f00613bd7565b1415611f59578160126000828254611f189190613b22565b90915550506012546040519081527fc88dcfb5478c6a1b8dd7e8025cc10798ae7c9e91f7c736a2c3790e1296d326e5906020015b60405180910390a161200b565b6001816001811115611f6d57611f6d613bd7565b1415611fbd578160136000828254611f859190613b22565b90915550506013546040519081527f5d8b5c685cd3cc98456463592f00ae985f6b233276e08de47847e4fbe5eac7bc90602001611f4c565b8160146000828254611fcf9190613b22565b90915550506014546040519081527f739b5c07a3f89b1ba294110ef0a2c18cb6da555786aed5b9f8ce157501d0cdcf9060200160405180910390a15b6114a38383612e0e565b600a5460ff16156120385760405162461bcd60e51b8152600401610d68906138ab565b3233146120575760405162461bcd60e51b8152600401610d68906138d5565b6002600954141561207a5760405162461bcd60e51b8152600401610d6890613b3a565b6002600955601c546301000000900460ff166120d85760405162461bcd60e51b815260206004820152601e60248201527f4543433a204672656520636c61696d206973206e6f7420656e61626c656400006044820152606401610d68565b336000908152601d602052604090205460ff161561212f5760405162461bcd60e51b81526020600482015260146024820152731150d0ce88105b1c9958591e4818db185a5b595960621b6044820152606401610d68565b601c54600160201b900460ff166121585760405162461bcd60e51b8152600401610d689061390c565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190613990565b118061227957506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561223f57600080fd5b505afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613990565b115b611b395760405162461bcd60e51b8152600401610d68906139a9565b600a5460ff16156122b85760405162461bcd60e51b8152600401610d68906138ab565b3233146122d75760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16156123015760405162461bcd60e51b8152600401610d6890613b71565b601c5461231a90610100900460ff166001803485612aa9565b806016600082825461232c9190613b22565b90915550610d7f90503382612e0e565b6001600160a01b0381166000908152600660205260408082205467ffffffffffffffff911c16610bad565b6017546001600160a01b031633148061238a57506000546001600160a01b031633145b6123a65760405162461bcd60e51b8152600401610d6890613874565b601c805460ff19168215159081179091556040519081527fd1b02133bf9bf78a6b9dc5c6ad59748091443365834e4625acbfd5906b0d70989060200161134f565b600a5460ff161561240a5760405162461bcd60e51b8152600401610d68906138ab565b3233146124295760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff16156124535760405162461bcd60e51b8152600401610d6890613b71565b6000601154600a6124649190613ada565b82600d546124729190613ae6565b61247c9190613ae6565b601c5490915061249a9062010000900460ff16600060018486612aa9565b6018546001600160a01b03166323b872dd3360175460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101849052606401602060405180830381600087803b1580156124fe57600080fd5b505af1158015612512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125369190613b05565b6125825760405162461bcd60e51b815260206004820152601e60248201527f4543433a204661696c656420746f207472616e7366657220746f6b656e7300006044820152606401610d68565b816016600082825461109a9190613b22565b6017546001600160a01b03163314806125b757506000546001600160a01b031633145b6125d35760405162461bcd60e51b8152600401610d6890613874565b600b829055600c81905560408051838152602081018390527fbce64662d1123507a3d615abbfead92f5498a274dd50e961226ed66eb78c6f88910161147c565b600a5460ff16156126365760405162461bcd60e51b8152600401610d68906138ab565b3233146126555760405162461bcd60e51b8152600401610d68906138d5565b601c54600160201b900460ff1661267e5760405162461bcd60e51b8152600401610d689061390c565b6019546001600160a01b03166126a65760405162461bcd60e51b8152600401610d689061394d565b6019546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156126fa57600080fd5b505afa15801561270e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127329190613990565b11806127c757506018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c59190613990565b115b6127e35760405162461bcd60e51b8152600401610d68906139a9565b601c546127fd90610100900460ff16600160003485612aa9565b806015600082825461232c9190613b22565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6017546001600160a01b031633148061286057506000546001600160a01b031633145b61287c5760405162461bcd60e51b8152600401610d6890613874565b601780546001600160a01b0319166001600160a01b0383169081179091556040519081527f1f54d231bb9d500b1923e4a1cb25e600f366a8368873d9af7c1c623814df19fc9060200161134f565b6000546001600160a01b031633146129245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d68565b6001600160a01b0381166129895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d68565b610d7f81612e9b565b600060015482108015610bad575050600090815260056020526040902054600160e01b161590565b600a5460ff16156129dd5760405162461bcd60e51b8152600401610d68906138ab565b600a805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a123390565b6040516001600160a01b03909116815260200160405180910390a1565b600a5460ff16612a785760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d68565b600a805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a12565b84612af65760405162461bcd60e51b815260206004820152601860248201527f4543433a204d696e74206973206e6f7420656e61626c656400000000000000006044820152606401610d68565b600081118015612b0857506010548111155b612b545760405162461bcd60e51b815260206004820152601c60248201527f4543433a2052656163686564206d6178206d696e7420706572207478000000006044820152606401610d68565b61271081612b656002546001540390565b612b6f9190613b22565b1115612bb75760405162461bcd60e51b81526020600482015260176024820152764543433a2052656163686564206d617820737570706c7960481b6044820152606401610d68565b8215612c3457600c5481601654612bce9190613b22565b1115612c2f5760405162461bcd60e51b815260206004820152602a60248201527f4543433a205265616368656420746865206d617820737570706c7920666f72206044820152697365636f6e6453616c6560b01b6064820152608401610d68565b612ca5565b600b5481601554612c459190613b22565b1115612ca55760405162461bcd60e51b815260206004820152602960248201527f4543433a205265616368656420746865206d617820737570706c7920666f7220604482015268666972737453616c6560b81b6064820152608401610d68565b83612df1576018546001600160a01b0316612d0d5760405162461bcd60e51b815260206004820152602260248201527f4543433a2045676720746f6b656e20697320746865207a65726f206164647265604482015261737360f01b6064820152608401610d68565b6018546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015612d6157600080fd5b505afa158015612d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d999190613990565b905082811015612deb5760405162461bcd60e51b815260206004820152601b60248201527f4543433a204e65656420746f2073656e64206d6f7265204547472e00000000006044820152606401610d68565b50612e07565b612e0781600f54612e029190613ae6565b6130f0565b5050505050565b6110aa828260405180602001604052806000815250613177565b600081600154811015612e7757600081815260056020526040902054600160e01b8116612e75575b80612e6e575060001901600081815260056020526040902054612e50565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b610d7f8160006131dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612f20903390899088908890600401613bed565b602060405180830381600087803b158015612f3a57600080fd5b505af1925050508015612f6a575060408051601f3d908101601f19168201909252612f6791810190613c2a565b60015b612fc5573d808015612f98576040519150601f19603f3d011682016040523d82523d6000602084013e612f9d565b606091505b508051612fbd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060601a8054610bc290613839565b6060816130165750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613040578061302a81613c47565b91506130399050600a83613c78565b915061301a565b60008167ffffffffffffffff81111561305b5761305b6135df565b6040519080825280601f01601f191660200182016040528015613085576020820181803683370190505b5090505b8415612fdb5761309a600183613c8c565b91506130a7600a86613ca3565b6130b2906030613b22565b60f81b8183815181106130c7576130c7613cb7565b60200101906001600160f81b031916908160001a9053506130e9600a86613c78565b9450613089565b803410156131395760405162461bcd60e51b81526020600482015260166024820152752732b2b2103a379039b2b7321036b7b9329022aa241760511b6044820152606401610d68565b80341115610d7f57336108fc61314f8334613c8c565b6040518115909202916000818181858888f193505050501580156110aa573d6000803e3d6000fd5b613181838361330f565b6001600160a01b0383163b156114a3576001548281035b6131ab6000868380600101945086612eeb565b6131c8576040516368d2bf6b60e11b815260040160405180910390fd5b818110613198578160015414612e0757600080fd5b60006131e883612e28565b90508060008061320686600090815260076020526040902080549091565b9150915084156132465761321b818433611103565b61324657613229833361280f565b61324657604051632ce44b5f60e11b815260040160405180910390fd5b801561325157600082555b6001600160a01b038316600081815260066020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260056020526040902055600160e11b84166132d857600186016000818152600560205260409020546132d65760015481146132d65760008181526005602052604090208590555b505b60405186906000906001600160a01b03861690600080516020613cce833981519152908390a4505060028054600101905550505050565b600154816133305760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b17831790558284019083908390600080516020613cce8339815191528180a4600183015b8181146133bb5780836000600080516020613cce833981519152600080a4600101613395565b50816133d957604051622e076360e81b815260040160405180910390fd5b60015550505050565b8280546133ee90613839565b90600052602060002090601f0160209004810192826134105760008555613456565b82601f1061342957805160ff1916838001178555613456565b82800160010185558215613456579182015b8281111561345657825182559160200191906001019061343b565b50613462929150613466565b5090565b5b808211156134625760008155600101613467565b6001600160e01b031981168114610d7f57600080fd5b6000602082840312156134a357600080fd5b8135612e6e8161347b565b60005b838110156134c95781810151838201526020016134b1565b83811115611c375750506000910152565b600081518084526134f28160208601602086016134ae565b601f01601f19169290920160200192915050565b602081526000612e6e60208301846134da565b60006020828403121561352b57600080fd5b5035919050565b80356001600160a01b038116811461354957600080fd5b919050565b6000806040838503121561356157600080fd5b61356a83613532565b946020939093013593505050565b8015158114610d7f57600080fd5b60006020828403121561359857600080fd5b8135612e6e81613578565b6000806000606084860312156135b857600080fd5b6135c184613532565b92506135cf60208501613532565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115613610576136106135df565b604051601f8501601f19908116603f01168101908282118183101715613638576136386135df565b8160405280935085815286868601111561365157600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561367d57600080fd5b813567ffffffffffffffff81111561369457600080fd5b8201601f810184136136a557600080fd5b612fdb848235602084016135f5565b600080604083850312156136c757600080fd5b82356136d281613578565b915060208301356136e281613578565b809150509250929050565b6000602082840312156136ff57600080fd5b612e6e82613532565b6000806040838503121561371b57600080fd5b6136d283613532565b6000806000806080858703121561373a57600080fd5b61374385613532565b935061375160208601613532565b925060408501359150606085013567ffffffffffffffff81111561377457600080fd5b8501601f8101871361378557600080fd5b613794878235602084016135f5565b91505092959194509250565b6000806000606084860312156137b557600080fd5b6137be84613532565b9250602084013591506040840135600281106137d957600080fd5b809150509250925092565b600080604083850312156137f757600080fd5b50508035926020909101359150565b6000806040838503121561381957600080fd5b61382283613532565b915061383060208401613532565b90509250929050565b600181811c9082168061384d57607f821691505b6020821081141561386e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601d908201527f5468652063616c6c657220697320616e6f746865722061646472657373000000604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b60208082526021908201527f4543433a2057686974656c6973742073616c65206973206e6f742061637469766040820152606560f81b606082015260800190565b60208082526023908201527f4543433a2047616d6520746f6b656e20697320746865207a65726f206164647260408201526265737360e81b606082015260800190565b6000602082840312156139a257600080fd5b5051919050565b6020808252601b908201527f4543433a204e6f2065676773206f722067616d6520746f6b656e730000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115613a31578160001904821115613a1757613a176139e0565b80851615613a2457918102915b93841c93908002906139fb565b509250929050565b600082613a4857506001610bad565b81613a5557506000610bad565b8160018114613a6b5760028114613a7557613a91565b6001915050610bad565b60ff841115613a8657613a866139e0565b50506001821b610bad565b5060208310610133831016604e8410600b8410161715613ab4575081810a610bad565b613abe83836139f6565b8060001904821115613ad257613ad26139e0565b029392505050565b6000612e6e8383613a39565b6000816000190483118215151615613b0057613b006139e0565b500290565b600060208284031215613b1757600080fd5b8151612e6e81613578565b60008219821115613b3557613b356139e0565b500190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601d908201527f4543433a2057686974656c6973742073616c6520697320616374697665000000604082015260600190565b60008351613bba8184602088016134ae565b835190830190613bce8183602088016134ae565b01949350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613c20908301846134da565b9695505050505050565b600060208284031215613c3c57600080fd5b8151612e6e8161347b565b6000600019821415613c5b57613c5b6139e0565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613c8757613c87613c62565b500490565b600082821015613c9e57613c9e6139e0565b500390565b600082613cb257613cb2613c62565b500690565b634e487b7160e01b600052603260045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220570a8f83949aeadb99ccc8388c948f3c829062d10633741de73ae396fdb7ea1164736f6c63430008090033

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.