ETH Price: $2,450.94 (-1.16%)

Token

EnigmaMiningFactionsOne (EnigmaMiningFactionsOne)
 

Overview

Max Total Supply

8,444 EnigmaMiningFactionsOne

Holders

352

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
15 EnigmaMiningFactionsOne
0x21faaa682db20f4f08e979dd73e241f16888e34e
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:
EnigmaMiningFactionsOne

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : EnigmaV5.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

// import "hardhat/console.sol";

contract EnigmaMiningFactionsOne is Ownable, ERC721A {
    // Interface imports
    AggregatorV3Interface internal priceFeed; // Chainlink Aggregator for USD-ETH conversion

    // Variable Declaration
    uint256 public MAX_NFTS = 10000;

    uint256 public MAX_MINT = 25;

    uint256 public presaleReserveCounter = 0;
    uint256 public presaleRedeemCounter = 0;
    uint256 public presaleMintedCounter = 0;
    uint256 public publicMintedCounter = 0;

    uint256 public acceptedChangePercentage = 2;
    uint256 public mintPrice = 125; // 125 USD for each NFT
    uint256 public presaleMintPrice = 112; // 112 USD for each NFT purchased under pre-sale
    uint256 public presaleReservePercent = 20;

    bool public presaleReserveActive = true;
    bool public presaleRedeemActive = true;
    bool public presaleMintActive = true;
    bool public publicMintActive = false;

    uint256 public startTime = 1677981600;

    enum TokenType {
        ETH,
        USDC
    }

    struct PresaleReservation {
        uint256 tokensReserved;
        TokenType currencyType;
    }

    string private _baseTokenURI = "";

    modifier noContracts() {
        require(msg.sender == tx.origin);
        _;
    }
    IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);

    mapping(address => PresaleReservation) public presaleReservations;

    // constructor
    constructor() ERC721A("EnigmaMiningFactionsOne", "EnigmaMiningFactionsOne") {
        priceFeed = AggregatorV3Interface(
            0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
        );
    }

    // Public Functions

    /**
     * Returns the latest price based on inputted USD amount.
     */
    function getPriceRate(uint256 _amount) public view returns (uint256) {
        // prettier-ignore
        (, int256 price, , , ) = priceFeed.latestRoundData();
        uint256 adjust_price = uint256(price) * 1e10;
        uint256 usd = _amount * 1e18;
        uint256 rate = (usd * 1e18) / adjust_price;
        return rate;
    }

    /*
     * Returns the reservation amount left for each wallet
     */
    function getReservationCount(address _reservationAddress)
        public
        view
        returns (uint256)
    {
        return presaleReservations[_reservationAddress].tokensReserved;
    }

    /*
     * Returns the reservation currency for given wallet
     */
    function getReservationCurrency(address _reservationAddress)
        public
        view
        returns (TokenType)
    {
        return presaleReservations[_reservationAddress].currencyType;
    }

    /**
     * Presale full Mint function
     * tokenType = 0 (Ethereum), 1 (USDC)
     */
    function presaleMint(uint256 _mints, TokenType _tokenType)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        require(
            presaleMintActive == true,
            "Error: Presale mint isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            _mints + presaleReserveCounter + totalSupply() <= MAX_NFTS,
            "Error: Exceeds Max Allocation"
        );
        uint256 _mintPrice = _mints * presaleMintPrice;
        if (_tokenType == TokenType.ETH) {
            uint256 transactionPrice = getPriceRate(_mintPrice);
            uint256 priceFloor = (transactionPrice *
                (100 - acceptedChangePercentage)) / 100;
            uint256 priceCeil = (transactionPrice *
                (100 + acceptedChangePercentage)) / 100;
            require(
                msg.value >= priceFloor && msg.value <= priceCeil,
                "FD: Insufficient funds"
            );
            _mint(msg.sender, _mints);
            presaleMintedCounter += _mints;
        } else {
            IERC20 token;
            if (_tokenType == TokenType.USDC) {
                token = USDC;

                // Would need to provide allowance before the transfer happens. Frontend will have to chain the two calls.
                require(
                    token.allowance(msg.sender, address(this)) >= _mintPrice,
                    "Error: Not enough allowance"
                );
                token.transferFrom(
                    msg.sender,
                    address(this),
                    _mintPrice * (10**6)
                );
                _mint(msg.sender, _mints);
                presaleMintedCounter += _mints;
            }
        }
    }

    /**
     * Public Mint function
     * tokenType = 0 (Ethereum), 1 (USDC)
     */
    function publicMint(uint256 _mints, TokenType _tokenType)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        require(
            publicMintActive == true,
            "Error: Public mint isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            totalSupply() + _mints <= MAX_NFTS,
            "Error: Exceeds Max Allocation"
        );
        require(
            _mints + presaleReserveCounter + totalSupply() <= MAX_NFTS,
            "Error: Exceeds Max Public Sale Allocation"
        );
        uint256 _mintPrice = _mints * mintPrice;
        if (_tokenType == TokenType.ETH) {
            uint256 transactionPrice = getPriceRate(_mintPrice);
            uint256 priceFloor = (transactionPrice *
                (100 - acceptedChangePercentage)) / 100;
            uint256 priceCeil = (transactionPrice *
                (100 + acceptedChangePercentage)) / 100;
            require(
                msg.value >= priceFloor && msg.value <= priceCeil,
                "FD: Insufficient funds"
            );
            _mint(msg.sender, _mints);
            publicMintedCounter += _mints;
        } else {
            IERC20 token;
            if (_tokenType == TokenType.USDC) {
                token = USDC;

                // Would need to provide allowance before the transfer happens. Frontend will have to chain the two calls.
                require(
                    token.allowance(msg.sender, address(this)) >= _mintPrice,
                    "Error: Not enough allowance"
                );
                token.transferFrom(
                    msg.sender,
                    address(this),
                    _mintPrice * (10**6)
                );
                _mint(msg.sender, _mints);
                publicMintedCounter += _mints;
            }
        }
    }

    /**
     * Presale reservation function
     */
    function presaleReserve(uint256 _mints, TokenType _tokenType)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        require(
            presaleReserveActive == true,
            "Error: Presale Reservation isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            _mints + presaleReserveCounter + totalSupply() <= MAX_NFTS,
            "Error: Exceeds Max Presale Allocation"
        );
        // require(
        //     presaleReservations[msg.sender].tokensReserved + _mints <= MAX_MINT,
        //     "Error: Exceeds maximum mint amount"
        // );
        if (presaleReservations[msg.sender].tokensReserved > 0) {
            if (_tokenType != presaleReservations[msg.sender].currencyType) {
                revert();
            }
        }
        uint256 _mintPrice = (_mints *
            presaleMintPrice *
            presaleReservePercent) / 100;
        if (_tokenType == TokenType.ETH) {
            uint256 transactionPrice = getPriceRate(_mintPrice);
            uint256 priceFloor = (transactionPrice *
                (100 - acceptedChangePercentage)) / 100;
            uint256 priceCeil = (transactionPrice *
                (100 + acceptedChangePercentage)) / 100;
            require(
                msg.value >= priceFloor && msg.value <= priceCeil,
                "FD: Insufficient funds"
            );
            presaleReservations[msg.sender].tokensReserved += _mints;
            presaleReservations[msg.sender].currencyType = _tokenType;
            presaleReserveCounter += _mints;
        } else {
            IERC20 token;
            if (_tokenType == TokenType.USDC) {
                token = USDC;

                // Would need to provide allowance before the transfer happens. Frontend will have to chain the two calls.
                require(
                    token.allowance(msg.sender, address(this)) >= _mintPrice,
                    "Error: Not enough allowance"
                );
                token.transferFrom(
                    msg.sender,
                    address(this),
                    _mintPrice * (10**6)
                );
                presaleReservations[msg.sender].tokensReserved += _mints;
                presaleReservations[msg.sender].currencyType = _tokenType;
                presaleReserveCounter += _mints;
            }
        }
    }

    /**
     * Presale redeem function to pay 80%
     */
    function presaleRedeem(uint256 _mints, TokenType _tokenType)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        uint256 availableMints = presaleReservations[msg.sender].tokensReserved;
        require(availableMints > 0, "Error: No reservations found");
        require(availableMints >= _mints, "Error: Not enough reservations");
        require(_mints > 0, "Error: Invalid value");
        require(
            presaleRedeemActive == true,
            "Error: Presale Disbursion isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            totalSupply() + _mints <= MAX_NFTS,
            "Error: Exceeds Max Allocation"
        );
        if (presaleReservations[msg.sender].tokensReserved > 0) {
            if (_tokenType != presaleReservations[msg.sender].currencyType) {
                revert();
            }
        }
        uint256 _mintPrice = (
            (_mints * presaleMintPrice * (100 - presaleReservePercent))
        ) / 100;
        if (_tokenType == TokenType.ETH) {
            uint256 transactionPrice = getPriceRate(_mintPrice);
            uint256 priceFloor = (transactionPrice *
                (100 - acceptedChangePercentage)) / 100;
            uint256 priceCeil = (transactionPrice *
                (100 + acceptedChangePercentage)) / 100;
            require(
                msg.value >= priceFloor && msg.value <= priceCeil,
                "FD: Insufficient funds"
            );
            presaleReservations[msg.sender].tokensReserved -= _mints;
            _mint(msg.sender, _mints);
            presaleRedeemCounter += _mints;
        } else {
            IERC20 token;
            if (_tokenType == TokenType.USDC) {
                token = USDC;
                // Would need to provide allowance before the transfer happens. Frontend will have to chain the two calls.
                require(
                    token.allowance(msg.sender, address(this)) >= _mintPrice,
                    "Error: Not enough allowance"
                );
                token.transferFrom(
                    msg.sender,
                    address(this),
                    _mintPrice * (10**6)
                );
                presaleReservations[msg.sender].tokensReserved -= _mints;
                _mint(msg.sender, _mints);
                presaleRedeemCounter += _mints;
            }
        }
    }

    // Owner/Internal Functions

    /**
     * Presale rollover function
     * Will be used when presale reservations are not minted within a given time frame
     */
    function premintReservationRollover() external onlyOwner {
        require(presaleMintActive != true, "Error: Presale mint still active");
        require(
            presaleRedeemActive != true,
            "Error: Presale redeem still active"
        );
        presaleReserveCounter = 0;
    }

    /**
     * Set base URI
     */
    function setBaseURI(string calldata baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    /**
     * Treasury mint
     */
    function treasuryMint(uint256 _quantity, address _address)
        external
        onlyOwner
    {
        require(
            totalSupply() + _quantity <= MAX_NFTS,
            "Error: Cannot mint more than total supply"
        );
        _mint(_address, _quantity);
        publicMintedCounter += _quantity;
    }

    /**
     * Change mint price
     */
    function setSalePrice(uint256 _newMintPrice) external onlyOwner {
        mintPrice = _newMintPrice;
    }

    /**
     * Change pre-salemint price
     */
    function setPresalePrice(uint256 _newMintPrice) external onlyOwner {
        presaleMintPrice = _newMintPrice;
    }

    /**
     * Withdraw contract balances
     */
    function withdrawAll(address _wallet) external onlyOwner {
        uint256 balance = address(this).balance;
        payable(_wallet).transfer(balance);
        if (USDC.balanceOf(address(this)) > 0) {
            USDC.transfer(_wallet, USDC.balanceOf(address(this)));
        }
    }

    /**
     * Change USD-ETH conversion acceptance %
     */
    function setAcceptedChangePercentage(uint256 _newPercentage)
        external
        onlyOwner
    {
        require(_newPercentage > 0, "Error: Can't be 0");
        require(
            _newPercentage != acceptedChangePercentage,
            "Error: Same value as before"
        );
        acceptedChangePercentage = _newPercentage;
    }

    /**
     * Change presale Reservation Percent
     */
    function setPresaleReservationPercent(uint256 _presaleReservePercent)
        external
        onlyOwner
    {
        require(_presaleReservePercent > 0, "Error: Can't be 0");
        require(
            _presaleReservePercent != presaleReservePercent,
            "Error: Same value as before"
        );
        presaleReservePercent = _presaleReservePercent;
    }

    function setPresaleReserveStatus(bool _newStatus) external onlyOwner {
        presaleReserveActive = _newStatus;
    }

    function setPresaleRedeemStatus(bool _newStatus) external onlyOwner {
        presaleRedeemActive = _newStatus;
    }

    function setPresaleMintStatus(bool _newStatus) external onlyOwner {
        presaleMintActive = _newStatus;
    }

    function setPublicMintStatus(bool _newStatus) external onlyOwner {
        publicMintActive = _newStatus;
    }

    function setMaxNfts(uint256 maxNfts) external onlyOwner {
        MAX_NFTS = maxNfts;
    }

    function setMaxMints(uint256 maxMints) external onlyOwner {
        MAX_MINT = maxMints;
    }

    function setStartTime(uint256 _startTime) external onlyOwner {
        startTime = _startTime;
    }

    function setPresaleReserveCounter(uint256 _presaleReserveCounter)
        external
        onlyOwner
    {
        presaleReserveCounter = _presaleReserveCounter;
    }

    function setPresaleRedeemCounter(uint256 _presaleReedemCounter)
        external
        onlyOwner
    {
        presaleRedeemCounter = _presaleReedemCounter;
    }

    function setPresaleMintedCounter(uint256 _presaleMintedCounter)
        external
        onlyOwner
    {
        presaleMintedCounter = _presaleMintedCounter;
    }

    function setPublicMintedCounter(uint256 _publicMintedCounter)
        external
        onlyOwner
    {
        publicMintedCounter = _publicMintedCounter;
    }

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

File 2 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 4 of 10 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 5 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 6 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 7 of 10 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard,
 * including the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at `_startTokenId()`
 * (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // 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 tokenId of the next token 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 => address) private _tokenApprovals;

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

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

    /**
     * @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 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 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 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 returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    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: 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.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view 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 {
        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;
    }

    /**
     * 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 ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

    /**
     * @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 See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        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 '';
    }

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ownerOf(tokenId);

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

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

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

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

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, 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 {
        _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 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 {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        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 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

            _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 {
        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 Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isOwnerOrApproved(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 `_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) = _getApprovedAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isOwnerOrApproved(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++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _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))
                }
            }
        }
    }

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        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 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;
    }

    /**
     * @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 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 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 returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for {
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp {
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } {
                // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }

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

File 8 of 10 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

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

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of 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 through `_extraData`.
        uint24 extraData;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

    // ==============================
    //            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);

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

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

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

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

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

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

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

    // ==============================
    //        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 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(
        uint256 indexed fromTokenId,
        uint256 toTokenId,
        address indexed from,
        address indexed to
    );
}

File 9 of 10 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NFTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptedChangePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getPriceRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reservationAddress","type":"address"}],"name":"getReservationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reservationAddress","type":"address"}],"name":"getReservationCurrency","outputs":[{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"","type":"uint8"}],"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":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"premintReservationRollover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mints","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"_tokenType","type":"uint8"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mints","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"_tokenType","type":"uint8"}],"name":"presaleRedeem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleRedeemActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleRedeemCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleReservations","outputs":[{"internalType":"uint256","name":"tokensReserved","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"currencyType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mints","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"_tokenType","type":"uint8"}],"name":"presaleReserve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleReserveActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleReserveCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleReservePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mints","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsOne.TokenType","name":"_tokenType","type":"uint8"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPercentage","type":"uint256"}],"name":"setAcceptedChangePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxMints","type":"uint256"}],"name":"setMaxMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxNfts","type":"uint256"}],"name":"setMaxNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPresaleMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleMintedCounter","type":"uint256"}],"name":"setPresaleMintedCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMintPrice","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleReedemCounter","type":"uint256"}],"name":"setPresaleRedeemCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPresaleRedeemStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleReservePercent","type":"uint256"}],"name":"setPresaleReservationPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleReserveCounter","type":"uint256"}],"name":"setPresaleReserveCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPresaleReserveStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPublicMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicMintedCounter","type":"uint256"}],"name":"setPublicMintedCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMintPrice","type":"uint256"}],"name":"setSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"treasuryMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

612710600a556019600b556000600c819055600d819055600e819055600f8190556002601055607d601155607060125560146013819055805463ffffffff191662010101179055636403f7a060155560a060408190526080829052620000699160169190620001d7565b50601780546001600160a01b03191673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790553480156200009d57600080fd5b506040518060400160405280601781526020017f456e69676d614d696e696e6746616374696f6e734f6e650000000000000000008152506040518060400160405280601781526020017f456e69676d614d696e696e6746616374696f6e734f6e65000000000000000000815250620001246200011e6200018360201b60201c565b62000187565b815162000139906003906020850190620001d7565b5080516200014f906004906020840190620001d7565b5060006001555050600980546001600160a01b031916735f4ec3df9cbd43714fe2740f5e3616155c5b8419179055620002ba565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001e5906200027d565b90600052602060002090601f01602090048101928262000209576000855562000254565b82601f106200022457805160ff191683800117855562000254565b8280016001018555821562000254579182015b828111156200025457825182559160200191906001019062000237565b506200026292915062000266565b5090565b5b8082111562000262576000815560010162000267565b600181811c908216806200029257607f821691505b60208210811415620002b457634e487b7160e01b600052602260045260246000fd5b50919050565b6133b680620002ca6000396000f3fe6080604052600436106103975760003560e01c80636be27779116101dc578063b67c25a311610102578063e531b230116100a0578063f2a3013e1161006f578063f2a3013e14610a57578063f2fde38b14610a77578063fa09e63014610a97578063fc5eb69314610ab757600080fd5b8063e531b230146109f1578063e985e9c514610a07578063f0292a0314610a27578063f04eef3814610a3d57600080fd5b8063c87b56dd116100dc578063c87b56dd1461097b578063cee1b1e81461099b578063d68be904146109bb578063dfa449bc146109d157600080fd5b8063b67c25a31461091b578063b88d4fde1461093c578063be6807c11461095c57600080fd5b80638238482b1161017a578063a22cb46511610149578063a22cb4651461089b578063a7b4058c146108bb578063ab57a6a0146108db578063b61ff93c146108fb57600080fd5b80638238482b1461082857806389a30271146108485780638da5cb5b1461086857806395d89b411461088657600080fd5b806375467c3d116101b657806375467c3d146107b257806378e97925146107d257806379c9cb7b146107e85780637eed5dc51461080857600080fd5b80636be277791461073457806370a082311461077d578063715018a61461079d57600080fd5b806328c95527116102c157806342842e0e1161025f5780635b67b1cf1161022e5780635b67b1cf146106d25780635be50521146106e85780636352211e146106fe5780636817c76c1461071e57600080fd5b806342842e0e146106385780634ef5f3171461065857806355f804b31461066d578063564c2c591461068d57600080fd5b80633a329d951161029b5780633a329d95146105d25780633c8eb6f7146105f25780633e0a322d14610605578063415dba051461062557600080fd5b806328c955271461057c5780633549345e14610592578063375f9a70146105b257600080fd5b806309ec7ba9116103395780631f73d8d4116103085780631f73d8d41461051657806323756e951461053657806323b872dd1461054957806327ad29751461056957600080fd5b806309ec7ba9146104a75780630e60fd3a146104c757806318160ddd146104dd5780631919fed7146104f657600080fd5b8063081812fc11610375578063081812fc14610415578063093d8c641461044d5780630951465314610471578063095ea7b31461048757600080fd5b8063014670ad1461039c57806301ffc9a7146103be57806306fdde03146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004612c8a565b610aed565b005b3480156103ca57600080fd5b506103de6103d9366004612cb9565b610afa565b60405190151581526020015b60405180910390f35b3480156103ff57600080fd5b50610408610b4c565b6040516103ea9190612d2e565b34801561042157600080fd5b50610435610430366004612c8a565b610bde565b6040516001600160a01b0390911681526020016103ea565b34801561045957600080fd5b50610463600a5481565b6040519081526020016103ea565b34801561047d57600080fd5b50610463600e5481565b34801561049357600080fd5b506103bc6104a2366004612d5d565b610c22565b3480156104b357600080fd5b506014546103de9062010000900460ff1681565b3480156104d357600080fd5b50610463600f5481565b3480156104e957600080fd5b5060025460015403610463565b34801561050257600080fd5b506103bc610511366004612c8a565b610cc2565b34801561052257600080fd5b50610463610531366004612c8a565b610ccf565b6103bc610544366004612d87565b610db2565b34801561055557600080fd5b506103bc610564366004612dbb565b611123565b6103bc610577366004612d87565b6112ce565b34801561058857600080fd5b5061046360135481565b34801561059e57600080fd5b506103bc6105ad366004612c8a565b6117f1565b3480156105be57600080fd5b506103bc6105cd366004612e05565b6117fe565b3480156105de57600080fd5b506103bc6105ed366004612c8a565b611819565b6103bc610600366004612d87565b611826565b34801561061157600080fd5b506103bc610620366004612c8a565b611bee565b6103bc610633366004612d87565b611bfb565b34801561064457600080fd5b506103bc610653366004612dbb565b612097565b34801561066457600080fd5b506103bc6120b2565b34801561067957600080fd5b506103bc610688366004612e22565b612188565b34801561069957600080fd5b506106c46106a8366004612e94565b6018602052600090815260409020805460019091015460ff1682565b6040516103ea929190612ee7565b3480156106de57600080fd5b50610463600d5481565b3480156106f457600080fd5b5061046360125481565b34801561070a57600080fd5b50610435610719366004612c8a565b61219c565b34801561072a57600080fd5b5061046360115481565b34801561074057600080fd5b5061077061074f366004612e94565b6001600160a01b031660009081526018602052604090206001015460ff1690565b6040516103ea9190612efb565b34801561078957600080fd5b50610463610798366004612e94565b6121a7565b3480156107a957600080fd5b506103bc6121f6565b3480156107be57600080fd5b506103bc6107cd366004612c8a565b61220a565b3480156107de57600080fd5b5061046360155481565b3480156107f457600080fd5b506103bc610803366004612c8a565b612217565b34801561081457600080fd5b506103bc610823366004612c8a565b612224565b34801561083457600080fd5b506103bc610843366004612c8a565b6122c7565b34801561085457600080fd5b50601754610435906001600160a01b031681565b34801561087457600080fd5b506000546001600160a01b0316610435565b34801561089257600080fd5b506104086122d4565b3480156108a757600080fd5b506103bc6108b6366004612f09565b6122e3565b3480156108c757600080fd5b506103bc6108d6366004612e05565b612379565b3480156108e757600080fd5b506103bc6108f6366004612e05565b61239d565b34801561090757600080fd5b506103bc610916366004612e05565b6123bf565b34801561092757600080fd5b506014546103de906301000000900460ff1681565b34801561094857600080fd5b506103bc610957366004612f4b565b6123e5565b34801561096857600080fd5b506014546103de90610100900460ff1681565b34801561098757600080fd5b50610408610996366004612c8a565b612429565b3480156109a757600080fd5b506103bc6109b6366004612c8a565b6124ae565b3480156109c757600080fd5b50610463600c5481565b3480156109dd57600080fd5b506103bc6109ec366004612c8a565b612551565b3480156109fd57600080fd5b5061046360105481565b348015610a1357600080fd5b506103de610a22366004613027565b61255e565b348015610a3357600080fd5b50610463600b5481565b348015610a4957600080fd5b506014546103de9060ff1681565b348015610a6357600080fd5b506103bc610a7236600461305a565b61258c565b348015610a8357600080fd5b506103bc610a92366004612e94565b612634565b348015610aa357600080fd5b506103bc610ab2366004612e94565b6126ad565b348015610ac357600080fd5b50610463610ad2366004612e94565b6001600160a01b031660009081526018602052604090205490565b610af5612877565b600e55565b60006301ffc9a760e01b6001600160e01b031983161480610b2b57506380ac58cd60e01b6001600160e01b03198316145b80610b465750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060038054610b5b9061307d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b879061307d565b8015610bd45780601f10610ba957610100808354040283529160200191610bd4565b820191906000526020600020905b815481529060010190602001808311610bb757829003601f168201915b5050505050905090565b6000610be9826128d1565b610c06576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610c2d8261219c565b9050336001600160a01b03821614610c6657610c49813361255e565b610c66576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cca612877565b601155565b600080600960009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015610d2057600080fd5b505afa158015610d34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5891906130d2565b5050509150506000816402540be400610d719190613138565b90506000610d8785670de0b6b3a7640000613138565b9050600082610d9e83670de0b6b3a7640000613138565b610da89190613157565b9695505050505050565b333214610dbe57600080fd5b60155415801590610dd157504260155411155b610df65760405162461bcd60e51b8152600401610ded90613179565b60405180910390fd5b60145462010000900460ff161515600114610e695760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a2050726573616c65206d696e742069736e27742061637469766560448201526c081bdc881a185cc8195b991959609a1b6064820152608401610ded565b600b54821115610e8b5760405162461bcd60e51b8152600401610ded906131a3565b600a5460025460015403600c54610ea290856131da565b610eac91906131da565b1115610eca5760405162461bcd60e51b8152600401610ded906131f2565b600060125483610eda9190613138565b90506000826001811115610ef057610ef0612eaf565b1415610fab576000610f0182610ccf565b9050600060646010546064610f169190613229565b610f209084613138565b610f2a9190613157565b9050600060646010546064610f3f91906131da565b610f499085613138565b610f539190613157565b9050813410158015610f655750803411155b610f815760405162461bcd60e51b8152600401610ded90613240565b610f8b33876128f9565b85600e6000828254610f9d91906131da565b9091555061111e9350505050565b60006001836001811115610fc157610fc1612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b15801561101557600080fd5b505afa158015611029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104d9190613270565b101561106b5760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd333061108986620f4240613138565b6040518463ffffffff1660e01b81526004016110a7939291906132c0565b602060405180830381600087803b1580156110c157600080fd5b505af11580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f991906132e4565b5061110433856128f9565b83600e600082825461111691906131da565b90915550505b505b505050565b600061112e826129eb565b9050836001600160a01b0316816001600160a01b0316146111615760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b038816909114176111ae57611191863361255e565b6111ae57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166111d557604051633a954ecd60e21b815260040160405180910390fd5b6111e2868686600161111c565b80156111ed57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b831661127857600184016000818152600560205260409020546112765760015481146112765760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112c6868686600161111c565b505050505050565b3332146112da57600080fd5b601554158015906112ed57504260155411155b6113095760405162461bcd60e51b8152600401610ded90613179565b33600090815260186020526040902054806113665760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a204e6f207265736572766174696f6e7320666f756e64000000006044820152606401610ded565b828110156113b65760405162461bcd60e51b815260206004820152601e60248201527f4572726f723a204e6f7420656e6f756768207265736572766174696f6e7300006044820152606401610ded565b600083116113fd5760405162461bcd60e51b81526020600482015260146024820152734572726f723a20496e76616c69642076616c756560601b6044820152606401610ded565b60145460ff6101009091041615156001146114765760405162461bcd60e51b815260206004820152603360248201527f4572726f723a2050726573616c652044697362757273696f6e2069736e2774206044820152721858dd1a5d99481bdc881a185cc8195b991959606a1b6064820152608401610ded565b600b548311156114985760405162461bcd60e51b8152600401610ded906131a3565b600a54836114a96002546001540390565b6114b391906131da565b11156114d15760405162461bcd60e51b8152600401610ded906131f2565b336000908152601860205260409020541561152a5733600090815260186020526040902060019081015460ff169081111561150e5761150e612eaf565b82600181111561152057611520612eaf565b1461152a57600080fd5b60006064601354606461153d9190613229565b60125461154a9087613138565b6115549190613138565b61155e9190613157565b9050600083600181111561157457611574612eaf565b141561165457600061158582610ccf565b905060006064601054606461159a9190613229565b6115a49084613138565b6115ae9190613157565b90506000606460105460646115c391906131da565b6115cd9085613138565b6115d79190613157565b90508134101580156115e95750803411155b6116055760405162461bcd60e51b8152600401610ded90613240565b3360009081526018602052604081208054899290611624908490613229565b90915550611634905033886128f9565b86600d600082825461164691906131da565b9091555061111c9350505050565b6000600184600181111561166a5761166a612eaf565b14156117ea5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b1580156116be57600080fd5b505afa1580156116d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f69190613270565b10156117145760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd333061173286620f4240613138565b6040518463ffffffff1660e01b8152600401611750939291906132c0565b602060405180830381600087803b15801561176a57600080fd5b505af115801561177e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a291906132e4565b5033600090815260186020526040812080548792906117c2908490613229565b909155506117d2905033866128f9565b84600d60008282546117e491906131da565b90915550505b5050505050565b6117f9612877565b601255565b611806612877565b6014805460ff1916911515919091179055565b611821612877565b600a55565b33321461183257600080fd5b6015541580159061184557504260155411155b6118615760405162461bcd60e51b8152600401610ded90613179565b6014546301000000900460ff1615156001146118d45760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205075626c6963206d696e742069736e2774206163746976652060448201526b1bdc881a185cc8195b99195960a21b6064820152608401610ded565b600b548211156118f65760405162461bcd60e51b8152600401610ded906131a3565b600a54826119076002546001540390565b61191191906131da565b111561192f5760405162461bcd60e51b8152600401610ded906131f2565b600a5460025460015403600c5461194690856131da565b61195091906131da565b11156119b05760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2045786365656473204d6178205075626c69632053616c652041604482015268363637b1b0ba34b7b760b91b6064820152608401610ded565b6000601154836119c09190613138565b905060008260018111156119d6576119d6612eaf565b1415611a835760006119e782610ccf565b90506000606460105460646119fc9190613229565b611a069084613138565b611a109190613157565b9050600060646010546064611a2591906131da565b611a2f9085613138565b611a399190613157565b9050813410158015611a4b5750803411155b611a675760405162461bcd60e51b8152600401610ded90613240565b611a7133876128f9565b85600f6000828254610f9d91906131da565b60006001836001811115611a9957611a99612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b259190613270565b1015611b435760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd3330611b6186620f4240613138565b6040518463ffffffff1660e01b8152600401611b7f939291906132c0565b602060405180830381600087803b158015611b9957600080fd5b505af1158015611bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd191906132e4565b50611bdc33856128f9565b83600f600082825461111691906131da565b611bf6612877565b601555565b333214611c0757600080fd5b60155415801590611c1a57504260155411155b611c365760405162461bcd60e51b8152600401610ded90613179565b60145460ff161515600114611caa5760405162461bcd60e51b815260206004820152603460248201527f4572726f723a2050726573616c65205265736572766174696f6e2069736e2774604482015273081858dd1a5d99481bdc881a185cc8195b99195960621b6064820152608401610ded565b600b54821115611ccc5760405162461bcd60e51b8152600401610ded906131a3565b600a5460025460015403600c54611ce390856131da565b611ced91906131da565b1115611d495760405162461bcd60e51b815260206004820152602560248201527f4572726f723a2045786365656473204d61782050726573616c6520416c6c6f6360448201526430ba34b7b760d91b6064820152608401610ded565b3360009081526018602052604090205415611da25733600090815260186020526040902060019081015460ff1690811115611d8657611d86612eaf565b816001811115611d9857611d98612eaf565b14611da257600080fd5b6000606460135460125485611db79190613138565b611dc19190613138565b611dcb9190613157565b90506000826001811115611de157611de1612eaf565b1415611edd576000611df282610ccf565b9050600060646010546064611e079190613229565b611e119084613138565b611e1b9190613157565b9050600060646010546064611e3091906131da565b611e3a9085613138565b611e449190613157565b9050813410158015611e565750803411155b611e725760405162461bcd60e51b8152600401610ded90613240565b3360009081526018602052604081208054889290611e919084906131da565b909155505033600090815260186020526040902060019081018054879260ff19909116908381811115611ec657611ec6612eaf565b021790555085600c6000828254610f9d91906131da565b60006001836001811115611ef357611ef3612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7f9190613270565b1015611f9d5760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd3330611fbb86620f4240613138565b6040518463ffffffff1660e01b8152600401611fd9939291906132c0565b602060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202b91906132e4565b50336000908152601860205260408120805486929061204b9084906131da565b909155505033600090815260186020526040902060019081018054859260ff1990911690838181111561208057612080612eaf565b021790555083600c600082825461111691906131da565b61111e838383604051806020016040528060008152506123e5565b6120ba612877565b60145462010000900460ff161515600114156121185760405162461bcd60e51b815260206004820181905260248201527f4572726f723a2050726573616c65206d696e74207374696c6c206163746976656044820152606401610ded565b60145460ff610100909104161515600114156121815760405162461bcd60e51b815260206004820152602260248201527f4572726f723a2050726573616c652072656465656d207374696c6c2061637469604482015261766560f01b6064820152608401610ded565b6000600c55565b612190612877565b61111e60168383612bf1565b6000610b46826129eb565b60006001600160a01b0382166121d0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6121fe612877565b6122086000612a4c565b565b612212612877565b600f55565b61221f612877565b600b55565b61222c612877565b600081116122705760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610ded565b6010548114156122c25760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610ded565b601055565b6122cf612877565b600d55565b606060048054610b5b9061307d565b6001600160a01b03821633141561230d5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612381612877565b60148054911515620100000262ff000019909216919091179055565b6123a5612877565b601480549115156101000261ff0019909216919091179055565b6123c7612877565b6014805491151563010000000263ff00000019909216919091179055565b6123f0848484611123565b6001600160a01b0383163b1561111c5761240c84848484612a9c565b61111c576040516368d2bf6b60e11b815260040160405180910390fd5b6060612434826128d1565b61245157604051630a14c4b560e41b815260040160405180910390fd5b600061245b612b93565b905080516000141561247c57604051806020016040528060008152506124a7565b8061248684612ba2565b604051602001612497929190613301565b6040516020818303038152906040525b9392505050565b6124b6612877565b600081116124fa5760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610ded565b60135481141561254c5760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610ded565b601355565b612559612877565b600c55565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b612594612877565b600a54826125a56002546001540390565b6125af91906131da565b111561260f5760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2043616e6e6f74206d696e74206d6f7265207468616e20746f74604482015268616c20737570706c7960b81b6064820152608401610ded565b61261981836128f9565b81600f600082825461262b91906131da565b90915550505050565b61263c612877565b6001600160a01b0381166126a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ded565b6126aa81612a4c565b50565b6126b5612877565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156126ed573d6000803e3d6000fd5b506017546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561273257600080fd5b505afa158015612746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276a9190613270565b1115612873576017546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90849083906370a082319060240160206040518083038186803b1580156127bd57600080fd5b505afa1580156127d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f59190613270565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561283b57600080fd5b505af115801561284f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e91906132e4565b5050565b6000546001600160a01b031633146122085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ded565b600060015482108015610b46575050600090815260056020526040902054600160e01b161590565b6001546001600160a01b03831661292257604051622e076360e81b815260040160405180910390fd5b816129405760405163b562e8dd60e01b815260040160405180910390fd5b61294d600084838561111c565b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612997576001555061111e600084838561111c565b600081600154811015612a3357600081815260056020526040902054600160e01b8116612a31575b806124a7575060001901600081815260056020526040902054612a13565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ad1903390899088908890600401613330565b602060405180830381600087803b158015612aeb57600080fd5b505af1925050508015612b1b575060408051601f3d908101601f19168201909252612b1891810190613363565b60015b612b76573d808015612b49576040519150601f19603f3d011682016040523d82523d6000602084013e612b4e565b606091505b508051612b6e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060168054610b5b9061307d565b604080516080810191829052607f0190826030600a8206018353600a90045b8015612bdf57600183039250600a81066030018353600a9004612bc1565b50819003601f19909101908152919050565b828054612bfd9061307d565b90600052602060002090601f016020900481019282612c1f5760008555612c65565b82601f10612c385782800160ff19823516178555612c65565b82800160010185558215612c65579182015b82811115612c65578235825591602001919060010190612c4a565b50612c71929150612c75565b5090565b5b80821115612c715760008155600101612c76565b600060208284031215612c9c57600080fd5b5035919050565b6001600160e01b0319811681146126aa57600080fd5b600060208284031215612ccb57600080fd5b81356124a781612ca3565b60005b83811015612cf1578181015183820152602001612cd9565b8381111561111c5750506000910152565b60008151808452612d1a816020860160208601612cd6565b601f01601f19169290920160200192915050565b6020815260006124a76020830184612d02565b80356001600160a01b0381168114612d5857600080fd5b919050565b60008060408385031215612d7057600080fd5b612d7983612d41565b946020939093013593505050565b60008060408385031215612d9a57600080fd5b82359150602083013560028110612db057600080fd5b809150509250929050565b600080600060608486031215612dd057600080fd5b612dd984612d41565b9250612de760208501612d41565b9150604084013590509250925092565b80151581146126aa57600080fd5b600060208284031215612e1757600080fd5b81356124a781612df7565b60008060208385031215612e3557600080fd5b823567ffffffffffffffff80821115612e4d57600080fd5b818501915085601f830112612e6157600080fd5b813581811115612e7057600080fd5b866020828501011115612e8257600080fd5b60209290920196919550909350505050565b600060208284031215612ea657600080fd5b6124a782612d41565b634e487b7160e01b600052602160045260246000fd5b60028110612ee357634e487b7160e01b600052602160045260246000fd5b9052565b828152604081016124a76020830184612ec5565b60208101610b468284612ec5565b60008060408385031215612f1c57600080fd5b612f2583612d41565b91506020830135612db081612df7565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612f6157600080fd5b612f6a85612d41565b9350612f7860208601612d41565b925060408501359150606085013567ffffffffffffffff80821115612f9c57600080fd5b818701915087601f830112612fb057600080fd5b813581811115612fc257612fc2612f35565b604051601f8201601f19908116603f01168101908382118183101715612fea57612fea612f35565b816040528281528a602084870101111561300357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561303a57600080fd5b61304383612d41565b915061305160208401612d41565b90509250929050565b6000806040838503121561306d57600080fd5b8235915061305160208401612d41565b600181811c9082168061309157607f821691505b602082108114156130b257634e487b7160e01b600052602260045260246000fd5b50919050565b805169ffffffffffffffffffff81168114612d5857600080fd5b600080600080600060a086880312156130ea57600080fd5b6130f3866130b8565b9450602086015193506040860151925060608601519150613116608087016130b8565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561315257613152613122565b500290565b60008261317457634e487b7160e01b600052601260045260246000fd5b500490565b60208082526010908201526f29b0b6329034b9903737ba1037b832b760811b604082015260600190565b6020808252601a908201527f4572726f723a2045786365656473204d6178207065722054584e000000000000604082015260600190565b600082198211156131ed576131ed613122565b500190565b6020808252601d908201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e000000604082015260600190565b60008282101561323b5761323b613122565b500390565b60208082526016908201527546443a20496e73756666696369656e742066756e647360501b604082015260600190565b60006020828403121561328257600080fd5b5051919050565b6020808252601b908201527f4572726f723a204e6f7420656e6f75676820616c6c6f77616e63650000000000604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602082840312156132f657600080fd5b81516124a781612df7565b60008351613313818460208801612cd6565b835190830190613327818360208801612cd6565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610da890830184612d02565b60006020828403121561337557600080fd5b81516124a781612ca356fea2646970667358221220f7cccaa802a84797ed74757b5aad13f69e182956ff888a42fb62f9d97e66242a64736f6c63430008090033

Deployed Bytecode

0x6080604052600436106103975760003560e01c80636be27779116101dc578063b67c25a311610102578063e531b230116100a0578063f2a3013e1161006f578063f2a3013e14610a57578063f2fde38b14610a77578063fa09e63014610a97578063fc5eb69314610ab757600080fd5b8063e531b230146109f1578063e985e9c514610a07578063f0292a0314610a27578063f04eef3814610a3d57600080fd5b8063c87b56dd116100dc578063c87b56dd1461097b578063cee1b1e81461099b578063d68be904146109bb578063dfa449bc146109d157600080fd5b8063b67c25a31461091b578063b88d4fde1461093c578063be6807c11461095c57600080fd5b80638238482b1161017a578063a22cb46511610149578063a22cb4651461089b578063a7b4058c146108bb578063ab57a6a0146108db578063b61ff93c146108fb57600080fd5b80638238482b1461082857806389a30271146108485780638da5cb5b1461086857806395d89b411461088657600080fd5b806375467c3d116101b657806375467c3d146107b257806378e97925146107d257806379c9cb7b146107e85780637eed5dc51461080857600080fd5b80636be277791461073457806370a082311461077d578063715018a61461079d57600080fd5b806328c95527116102c157806342842e0e1161025f5780635b67b1cf1161022e5780635b67b1cf146106d25780635be50521146106e85780636352211e146106fe5780636817c76c1461071e57600080fd5b806342842e0e146106385780634ef5f3171461065857806355f804b31461066d578063564c2c591461068d57600080fd5b80633a329d951161029b5780633a329d95146105d25780633c8eb6f7146105f25780633e0a322d14610605578063415dba051461062557600080fd5b806328c955271461057c5780633549345e14610592578063375f9a70146105b257600080fd5b806309ec7ba9116103395780631f73d8d4116103085780631f73d8d41461051657806323756e951461053657806323b872dd1461054957806327ad29751461056957600080fd5b806309ec7ba9146104a75780630e60fd3a146104c757806318160ddd146104dd5780631919fed7146104f657600080fd5b8063081812fc11610375578063081812fc14610415578063093d8c641461044d5780630951465314610471578063095ea7b31461048757600080fd5b8063014670ad1461039c57806301ffc9a7146103be57806306fdde03146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004612c8a565b610aed565b005b3480156103ca57600080fd5b506103de6103d9366004612cb9565b610afa565b60405190151581526020015b60405180910390f35b3480156103ff57600080fd5b50610408610b4c565b6040516103ea9190612d2e565b34801561042157600080fd5b50610435610430366004612c8a565b610bde565b6040516001600160a01b0390911681526020016103ea565b34801561045957600080fd5b50610463600a5481565b6040519081526020016103ea565b34801561047d57600080fd5b50610463600e5481565b34801561049357600080fd5b506103bc6104a2366004612d5d565b610c22565b3480156104b357600080fd5b506014546103de9062010000900460ff1681565b3480156104d357600080fd5b50610463600f5481565b3480156104e957600080fd5b5060025460015403610463565b34801561050257600080fd5b506103bc610511366004612c8a565b610cc2565b34801561052257600080fd5b50610463610531366004612c8a565b610ccf565b6103bc610544366004612d87565b610db2565b34801561055557600080fd5b506103bc610564366004612dbb565b611123565b6103bc610577366004612d87565b6112ce565b34801561058857600080fd5b5061046360135481565b34801561059e57600080fd5b506103bc6105ad366004612c8a565b6117f1565b3480156105be57600080fd5b506103bc6105cd366004612e05565b6117fe565b3480156105de57600080fd5b506103bc6105ed366004612c8a565b611819565b6103bc610600366004612d87565b611826565b34801561061157600080fd5b506103bc610620366004612c8a565b611bee565b6103bc610633366004612d87565b611bfb565b34801561064457600080fd5b506103bc610653366004612dbb565b612097565b34801561066457600080fd5b506103bc6120b2565b34801561067957600080fd5b506103bc610688366004612e22565b612188565b34801561069957600080fd5b506106c46106a8366004612e94565b6018602052600090815260409020805460019091015460ff1682565b6040516103ea929190612ee7565b3480156106de57600080fd5b50610463600d5481565b3480156106f457600080fd5b5061046360125481565b34801561070a57600080fd5b50610435610719366004612c8a565b61219c565b34801561072a57600080fd5b5061046360115481565b34801561074057600080fd5b5061077061074f366004612e94565b6001600160a01b031660009081526018602052604090206001015460ff1690565b6040516103ea9190612efb565b34801561078957600080fd5b50610463610798366004612e94565b6121a7565b3480156107a957600080fd5b506103bc6121f6565b3480156107be57600080fd5b506103bc6107cd366004612c8a565b61220a565b3480156107de57600080fd5b5061046360155481565b3480156107f457600080fd5b506103bc610803366004612c8a565b612217565b34801561081457600080fd5b506103bc610823366004612c8a565b612224565b34801561083457600080fd5b506103bc610843366004612c8a565b6122c7565b34801561085457600080fd5b50601754610435906001600160a01b031681565b34801561087457600080fd5b506000546001600160a01b0316610435565b34801561089257600080fd5b506104086122d4565b3480156108a757600080fd5b506103bc6108b6366004612f09565b6122e3565b3480156108c757600080fd5b506103bc6108d6366004612e05565b612379565b3480156108e757600080fd5b506103bc6108f6366004612e05565b61239d565b34801561090757600080fd5b506103bc610916366004612e05565b6123bf565b34801561092757600080fd5b506014546103de906301000000900460ff1681565b34801561094857600080fd5b506103bc610957366004612f4b565b6123e5565b34801561096857600080fd5b506014546103de90610100900460ff1681565b34801561098757600080fd5b50610408610996366004612c8a565b612429565b3480156109a757600080fd5b506103bc6109b6366004612c8a565b6124ae565b3480156109c757600080fd5b50610463600c5481565b3480156109dd57600080fd5b506103bc6109ec366004612c8a565b612551565b3480156109fd57600080fd5b5061046360105481565b348015610a1357600080fd5b506103de610a22366004613027565b61255e565b348015610a3357600080fd5b50610463600b5481565b348015610a4957600080fd5b506014546103de9060ff1681565b348015610a6357600080fd5b506103bc610a7236600461305a565b61258c565b348015610a8357600080fd5b506103bc610a92366004612e94565b612634565b348015610aa357600080fd5b506103bc610ab2366004612e94565b6126ad565b348015610ac357600080fd5b50610463610ad2366004612e94565b6001600160a01b031660009081526018602052604090205490565b610af5612877565b600e55565b60006301ffc9a760e01b6001600160e01b031983161480610b2b57506380ac58cd60e01b6001600160e01b03198316145b80610b465750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060038054610b5b9061307d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b879061307d565b8015610bd45780601f10610ba957610100808354040283529160200191610bd4565b820191906000526020600020905b815481529060010190602001808311610bb757829003601f168201915b5050505050905090565b6000610be9826128d1565b610c06576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610c2d8261219c565b9050336001600160a01b03821614610c6657610c49813361255e565b610c66576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cca612877565b601155565b600080600960009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015610d2057600080fd5b505afa158015610d34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5891906130d2565b5050509150506000816402540be400610d719190613138565b90506000610d8785670de0b6b3a7640000613138565b9050600082610d9e83670de0b6b3a7640000613138565b610da89190613157565b9695505050505050565b333214610dbe57600080fd5b60155415801590610dd157504260155411155b610df65760405162461bcd60e51b8152600401610ded90613179565b60405180910390fd5b60145462010000900460ff161515600114610e695760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a2050726573616c65206d696e742069736e27742061637469766560448201526c081bdc881a185cc8195b991959609a1b6064820152608401610ded565b600b54821115610e8b5760405162461bcd60e51b8152600401610ded906131a3565b600a5460025460015403600c54610ea290856131da565b610eac91906131da565b1115610eca5760405162461bcd60e51b8152600401610ded906131f2565b600060125483610eda9190613138565b90506000826001811115610ef057610ef0612eaf565b1415610fab576000610f0182610ccf565b9050600060646010546064610f169190613229565b610f209084613138565b610f2a9190613157565b9050600060646010546064610f3f91906131da565b610f499085613138565b610f539190613157565b9050813410158015610f655750803411155b610f815760405162461bcd60e51b8152600401610ded90613240565b610f8b33876128f9565b85600e6000828254610f9d91906131da565b9091555061111e9350505050565b60006001836001811115610fc157610fc1612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b15801561101557600080fd5b505afa158015611029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104d9190613270565b101561106b5760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd333061108986620f4240613138565b6040518463ffffffff1660e01b81526004016110a7939291906132c0565b602060405180830381600087803b1580156110c157600080fd5b505af11580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f991906132e4565b5061110433856128f9565b83600e600082825461111691906131da565b90915550505b505b505050565b600061112e826129eb565b9050836001600160a01b0316816001600160a01b0316146111615760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b038816909114176111ae57611191863361255e565b6111ae57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166111d557604051633a954ecd60e21b815260040160405180910390fd5b6111e2868686600161111c565b80156111ed57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b831661127857600184016000818152600560205260409020546112765760015481146112765760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112c6868686600161111c565b505050505050565b3332146112da57600080fd5b601554158015906112ed57504260155411155b6113095760405162461bcd60e51b8152600401610ded90613179565b33600090815260186020526040902054806113665760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a204e6f207265736572766174696f6e7320666f756e64000000006044820152606401610ded565b828110156113b65760405162461bcd60e51b815260206004820152601e60248201527f4572726f723a204e6f7420656e6f756768207265736572766174696f6e7300006044820152606401610ded565b600083116113fd5760405162461bcd60e51b81526020600482015260146024820152734572726f723a20496e76616c69642076616c756560601b6044820152606401610ded565b60145460ff6101009091041615156001146114765760405162461bcd60e51b815260206004820152603360248201527f4572726f723a2050726573616c652044697362757273696f6e2069736e2774206044820152721858dd1a5d99481bdc881a185cc8195b991959606a1b6064820152608401610ded565b600b548311156114985760405162461bcd60e51b8152600401610ded906131a3565b600a54836114a96002546001540390565b6114b391906131da565b11156114d15760405162461bcd60e51b8152600401610ded906131f2565b336000908152601860205260409020541561152a5733600090815260186020526040902060019081015460ff169081111561150e5761150e612eaf565b82600181111561152057611520612eaf565b1461152a57600080fd5b60006064601354606461153d9190613229565b60125461154a9087613138565b6115549190613138565b61155e9190613157565b9050600083600181111561157457611574612eaf565b141561165457600061158582610ccf565b905060006064601054606461159a9190613229565b6115a49084613138565b6115ae9190613157565b90506000606460105460646115c391906131da565b6115cd9085613138565b6115d79190613157565b90508134101580156115e95750803411155b6116055760405162461bcd60e51b8152600401610ded90613240565b3360009081526018602052604081208054899290611624908490613229565b90915550611634905033886128f9565b86600d600082825461164691906131da565b9091555061111c9350505050565b6000600184600181111561166a5761166a612eaf565b14156117ea5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b1580156116be57600080fd5b505afa1580156116d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f69190613270565b10156117145760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd333061173286620f4240613138565b6040518463ffffffff1660e01b8152600401611750939291906132c0565b602060405180830381600087803b15801561176a57600080fd5b505af115801561177e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a291906132e4565b5033600090815260186020526040812080548792906117c2908490613229565b909155506117d2905033866128f9565b84600d60008282546117e491906131da565b90915550505b5050505050565b6117f9612877565b601255565b611806612877565b6014805460ff1916911515919091179055565b611821612877565b600a55565b33321461183257600080fd5b6015541580159061184557504260155411155b6118615760405162461bcd60e51b8152600401610ded90613179565b6014546301000000900460ff1615156001146118d45760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205075626c6963206d696e742069736e2774206163746976652060448201526b1bdc881a185cc8195b99195960a21b6064820152608401610ded565b600b548211156118f65760405162461bcd60e51b8152600401610ded906131a3565b600a54826119076002546001540390565b61191191906131da565b111561192f5760405162461bcd60e51b8152600401610ded906131f2565b600a5460025460015403600c5461194690856131da565b61195091906131da565b11156119b05760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2045786365656473204d6178205075626c69632053616c652041604482015268363637b1b0ba34b7b760b91b6064820152608401610ded565b6000601154836119c09190613138565b905060008260018111156119d6576119d6612eaf565b1415611a835760006119e782610ccf565b90506000606460105460646119fc9190613229565b611a069084613138565b611a109190613157565b9050600060646010546064611a2591906131da565b611a2f9085613138565b611a399190613157565b9050813410158015611a4b5750803411155b611a675760405162461bcd60e51b8152600401610ded90613240565b611a7133876128f9565b85600f6000828254610f9d91906131da565b60006001836001811115611a9957611a99612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b259190613270565b1015611b435760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd3330611b6186620f4240613138565b6040518463ffffffff1660e01b8152600401611b7f939291906132c0565b602060405180830381600087803b158015611b9957600080fd5b505af1158015611bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd191906132e4565b50611bdc33856128f9565b83600f600082825461111691906131da565b611bf6612877565b601555565b333214611c0757600080fd5b60155415801590611c1a57504260155411155b611c365760405162461bcd60e51b8152600401610ded90613179565b60145460ff161515600114611caa5760405162461bcd60e51b815260206004820152603460248201527f4572726f723a2050726573616c65205265736572766174696f6e2069736e2774604482015273081858dd1a5d99481bdc881a185cc8195b99195960621b6064820152608401610ded565b600b54821115611ccc5760405162461bcd60e51b8152600401610ded906131a3565b600a5460025460015403600c54611ce390856131da565b611ced91906131da565b1115611d495760405162461bcd60e51b815260206004820152602560248201527f4572726f723a2045786365656473204d61782050726573616c6520416c6c6f6360448201526430ba34b7b760d91b6064820152608401610ded565b3360009081526018602052604090205415611da25733600090815260186020526040902060019081015460ff1690811115611d8657611d86612eaf565b816001811115611d9857611d98612eaf565b14611da257600080fd5b6000606460135460125485611db79190613138565b611dc19190613138565b611dcb9190613157565b90506000826001811115611de157611de1612eaf565b1415611edd576000611df282610ccf565b9050600060646010546064611e079190613229565b611e119084613138565b611e1b9190613157565b9050600060646010546064611e3091906131da565b611e3a9085613138565b611e449190613157565b9050813410158015611e565750803411155b611e725760405162461bcd60e51b8152600401610ded90613240565b3360009081526018602052604081208054889290611e919084906131da565b909155505033600090815260186020526040902060019081018054879260ff19909116908381811115611ec657611ec6612eaf565b021790555085600c6000828254610f9d91906131da565b60006001836001811115611ef357611ef3612eaf565b141561111c5750601754604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e9060440160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7f9190613270565b1015611f9d5760405162461bcd60e51b8152600401610ded90613289565b6001600160a01b0381166323b872dd3330611fbb86620f4240613138565b6040518463ffffffff1660e01b8152600401611fd9939291906132c0565b602060405180830381600087803b158015611ff357600080fd5b505af1158015612007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202b91906132e4565b50336000908152601860205260408120805486929061204b9084906131da565b909155505033600090815260186020526040902060019081018054859260ff1990911690838181111561208057612080612eaf565b021790555083600c600082825461111691906131da565b61111e838383604051806020016040528060008152506123e5565b6120ba612877565b60145462010000900460ff161515600114156121185760405162461bcd60e51b815260206004820181905260248201527f4572726f723a2050726573616c65206d696e74207374696c6c206163746976656044820152606401610ded565b60145460ff610100909104161515600114156121815760405162461bcd60e51b815260206004820152602260248201527f4572726f723a2050726573616c652072656465656d207374696c6c2061637469604482015261766560f01b6064820152608401610ded565b6000600c55565b612190612877565b61111e60168383612bf1565b6000610b46826129eb565b60006001600160a01b0382166121d0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6121fe612877565b6122086000612a4c565b565b612212612877565b600f55565b61221f612877565b600b55565b61222c612877565b600081116122705760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610ded565b6010548114156122c25760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610ded565b601055565b6122cf612877565b600d55565b606060048054610b5b9061307d565b6001600160a01b03821633141561230d5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612381612877565b60148054911515620100000262ff000019909216919091179055565b6123a5612877565b601480549115156101000261ff0019909216919091179055565b6123c7612877565b6014805491151563010000000263ff00000019909216919091179055565b6123f0848484611123565b6001600160a01b0383163b1561111c5761240c84848484612a9c565b61111c576040516368d2bf6b60e11b815260040160405180910390fd5b6060612434826128d1565b61245157604051630a14c4b560e41b815260040160405180910390fd5b600061245b612b93565b905080516000141561247c57604051806020016040528060008152506124a7565b8061248684612ba2565b604051602001612497929190613301565b6040516020818303038152906040525b9392505050565b6124b6612877565b600081116124fa5760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610ded565b60135481141561254c5760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610ded565b601355565b612559612877565b600c55565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b612594612877565b600a54826125a56002546001540390565b6125af91906131da565b111561260f5760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2043616e6e6f74206d696e74206d6f7265207468616e20746f74604482015268616c20737570706c7960b81b6064820152608401610ded565b61261981836128f9565b81600f600082825461262b91906131da565b90915550505050565b61263c612877565b6001600160a01b0381166126a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ded565b6126aa81612a4c565b50565b6126b5612877565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156126ed573d6000803e3d6000fd5b506017546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561273257600080fd5b505afa158015612746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276a9190613270565b1115612873576017546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90849083906370a082319060240160206040518083038186803b1580156127bd57600080fd5b505afa1580156127d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f59190613270565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561283b57600080fd5b505af115801561284f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e91906132e4565b5050565b6000546001600160a01b031633146122085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ded565b600060015482108015610b46575050600090815260056020526040902054600160e01b161590565b6001546001600160a01b03831661292257604051622e076360e81b815260040160405180910390fd5b816129405760405163b562e8dd60e01b815260040160405180910390fd5b61294d600084838561111c565b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612997576001555061111e600084838561111c565b600081600154811015612a3357600081815260056020526040902054600160e01b8116612a31575b806124a7575060001901600081815260056020526040902054612a13565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ad1903390899088908890600401613330565b602060405180830381600087803b158015612aeb57600080fd5b505af1925050508015612b1b575060408051601f3d908101601f19168201909252612b1891810190613363565b60015b612b76573d808015612b49576040519150601f19603f3d011682016040523d82523d6000602084013e612b4e565b606091505b508051612b6e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060168054610b5b9061307d565b604080516080810191829052607f0190826030600a8206018353600a90045b8015612bdf57600183039250600a81066030018353600a9004612bc1565b50819003601f19909101908152919050565b828054612bfd9061307d565b90600052602060002090601f016020900481019282612c1f5760008555612c65565b82601f10612c385782800160ff19823516178555612c65565b82800160010185558215612c65579182015b82811115612c65578235825591602001919060010190612c4a565b50612c71929150612c75565b5090565b5b80821115612c715760008155600101612c76565b600060208284031215612c9c57600080fd5b5035919050565b6001600160e01b0319811681146126aa57600080fd5b600060208284031215612ccb57600080fd5b81356124a781612ca3565b60005b83811015612cf1578181015183820152602001612cd9565b8381111561111c5750506000910152565b60008151808452612d1a816020860160208601612cd6565b601f01601f19169290920160200192915050565b6020815260006124a76020830184612d02565b80356001600160a01b0381168114612d5857600080fd5b919050565b60008060408385031215612d7057600080fd5b612d7983612d41565b946020939093013593505050565b60008060408385031215612d9a57600080fd5b82359150602083013560028110612db057600080fd5b809150509250929050565b600080600060608486031215612dd057600080fd5b612dd984612d41565b9250612de760208501612d41565b9150604084013590509250925092565b80151581146126aa57600080fd5b600060208284031215612e1757600080fd5b81356124a781612df7565b60008060208385031215612e3557600080fd5b823567ffffffffffffffff80821115612e4d57600080fd5b818501915085601f830112612e6157600080fd5b813581811115612e7057600080fd5b866020828501011115612e8257600080fd5b60209290920196919550909350505050565b600060208284031215612ea657600080fd5b6124a782612d41565b634e487b7160e01b600052602160045260246000fd5b60028110612ee357634e487b7160e01b600052602160045260246000fd5b9052565b828152604081016124a76020830184612ec5565b60208101610b468284612ec5565b60008060408385031215612f1c57600080fd5b612f2583612d41565b91506020830135612db081612df7565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612f6157600080fd5b612f6a85612d41565b9350612f7860208601612d41565b925060408501359150606085013567ffffffffffffffff80821115612f9c57600080fd5b818701915087601f830112612fb057600080fd5b813581811115612fc257612fc2612f35565b604051601f8201601f19908116603f01168101908382118183101715612fea57612fea612f35565b816040528281528a602084870101111561300357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561303a57600080fd5b61304383612d41565b915061305160208401612d41565b90509250929050565b6000806040838503121561306d57600080fd5b8235915061305160208401612d41565b600181811c9082168061309157607f821691505b602082108114156130b257634e487b7160e01b600052602260045260246000fd5b50919050565b805169ffffffffffffffffffff81168114612d5857600080fd5b600080600080600060a086880312156130ea57600080fd5b6130f3866130b8565b9450602086015193506040860151925060608601519150613116608087016130b8565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561315257613152613122565b500290565b60008261317457634e487b7160e01b600052601260045260246000fd5b500490565b60208082526010908201526f29b0b6329034b9903737ba1037b832b760811b604082015260600190565b6020808252601a908201527f4572726f723a2045786365656473204d6178207065722054584e000000000000604082015260600190565b600082198211156131ed576131ed613122565b500190565b6020808252601d908201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e000000604082015260600190565b60008282101561323b5761323b613122565b500390565b60208082526016908201527546443a20496e73756666696369656e742066756e647360501b604082015260600190565b60006020828403121561328257600080fd5b5051919050565b6020808252601b908201527f4572726f723a204e6f7420656e6f75676820616c6c6f77616e63650000000000604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602082840312156132f657600080fd5b81516124a781612df7565b60008351613313818460208801612cd6565b835190830190613327818360208801612cd6565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610da890830184612d02565b60006020828403121561337557600080fd5b81516124a781612ca356fea2646970667358221220f7cccaa802a84797ed74757b5aad13f69e182956ff888a42fb62f9d97e66242a64736f6c63430008090033

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.