ETH Price: $3,185.75 (+1.77%)

Token

CyberNerds (CYBERNERDS)

Overview

Max Total Supply

1,975 CYBERNERDS

Holders

1,312

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Filtered by Token Holder
Wormhole: NFT Bridge
Balance
1 CYBERNERDS
0xfE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
CyberNerdsNFT

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 18 : CyberNerdsNFT.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol"; 
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";

interface IERC20 {
  function balanceOf(address account) external view returns (uint256);
  function transfer(address _to, uint256 _amount) external returns (bool);
}

abstract contract Apetimism is Context {
    address private _apetimismAddress;
    uint256 private _apetimismFee = 500;
    uint256 public totalRevenueShared = 0;

    event ApetimismAddressTransferred(address indexed previousAddress, address indexed newAddress);

    /**
     * @dev Initializes the contract setting the initial apetimism address.
     */
    constructor(address apetimismAddress) {
        _transferApetimism(apetimismAddress);
    }

    /**
     * @dev Throws if called by any account other than the apetimism address.
     */
    modifier onlyApetimism() {
        _checkApetimismAddress();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the apetimism address.
     */
    function _checkApetimismAddress() internal view virtual {
        require(apetimismAddress() == _msgSender(), "Apetimism: caller is not the apetimism address");
    }

    /**
     * @dev Leaves the contract without apetimism address. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current apetimism address.
     */
    function renounceApetimism() public virtual onlyApetimism {
        _transferApetimism(address(0));
    }

    /**
     * @dev Transfers apetimism address of the contract to a new address (`newAddress`).
     * Can only be called by the current apetimism address.
     */
    function transferApetimism(address newAddress) public virtual onlyApetimism {
        require(newAddress != address(0), "Apetimism: new address is the zero address");
        _transferApetimism(newAddress);
    }

    /**
     * @dev Transfers apetimism address of the contract to a new address (`newAddress`).
     * Internal function without access restriction.
     */
    function _transferApetimism(address newAddress) internal virtual {
        address oldAddress = _apetimismAddress;
        _apetimismAddress = newAddress;
        emit ApetimismAddressTransferred(oldAddress, newAddress);
    }

    function apetimismFee() public view virtual returns (uint256) {
        return _apetimismFee;
    }

    function setApetimismFee(uint256 newFee) public onlyApetimism {
      _apetimismFee = newFee;
    }
}

contract CyberNerdsNFT is ERC721AQueryable, ERC2981, Ownable, Pausable, ReentrancyGuard, Apetimism {
  event Received(address, uint);
  event RoundChanged(uint8);
  event TotalMintedChanged(uint256);

  //////////////
  // Constants
  //////////////

  uint256 public MAX_SUPPLY = 4444;
  uint256 public TEAM_NFT_COUNT = 400;
  uint256 public START_TOKEN_ID = 0;

  //////////////
  // Internal
  //////////////

  string private _baseURIExtended;
  bool private _isTeamNFTsMinted = false;

  address private _signer;

  mapping(address => uint256) private _addressTokenMinted;
  mapping(address => mapping(uint8 => uint256)) private _addressTokenMintedInRound;

  mapping(uint256 => uint8) private _nonces;

  /////////////////////
  // Public Variables
  /////////////////////

  uint8 public currentRound = 0;
  address public teamAddress;
  bool public metadataFrozen = false;
  uint16 public maxMintPerTx = 5;
  uint16 public maxMintPerAddress = 5;

  mapping(int16 => uint256) mintPriceByRole;

  struct Role {
    string name;
    int16 role_id;
    uint256 max_mint;
    uint256 mint_price;
    bool exists;
  }
  mapping(uint8 => mapping(int16 => Role)) public allowedRolesInRound;
  mapping(uint8 => uint16) public allowedRolesInRoundCount;
  mapping(uint8 => int16[]) public allowedRolesInRoundArr;
  uint8[] public availableRounds;
  mapping(uint8 => uint256) public roundAllocations;
  mapping(uint8 => uint256) public totalMintedInRound;

  ////////////////
  // Actual Code
  ////////////////

  constructor(address apetimismAddress)
    ERC721A("CyberNerds", "CYBERNERDS")
    Apetimism(apetimismAddress) {
  }

  function _startTokenId() internal view virtual override returns (uint256) {
    return START_TOKEN_ID;
  }

  //////////////////////
  // Setters for Owner
  //////////////////////

  function setCurrentRound(uint8 round_) public onlyOwner {
    currentRound = round_;
    emit RoundChanged(round_);
  }

  function setTeamAddress(address addr) public onlyOwner {
    teamAddress = addr;
  }

  function setSignerAddress(address addr) public onlyOwner {
    _signer = addr;
  }

  function setMaxMintPerTx(uint16 count) public onlyOwner {
    maxMintPerTx = count;
  }

  function setMaxMintPerAddress(uint16 count) public onlyOwner {
    maxMintPerAddress = count;
  }

  function setBaseURI(string memory baseURI) external onlyOwner {
    require(!metadataFrozen, "Metadata has already been frozen");
    _baseURIExtended = baseURI;
  }

  function addAllowedRoleInRound(uint8 round, int16 role, string memory roleName, uint256 maxMint, uint256 mintPrice) public onlyOwner {
    bool role_already_existed = allowedRolesInRound[round][role].exists;
    allowedRolesInRound[round][role].name = roleName;
    allowedRolesInRound[round][role].role_id = role;
    allowedRolesInRound[round][role].max_mint = maxMint;
    allowedRolesInRound[round][role].mint_price = mintPrice;
    allowedRolesInRound[round][role].exists = true;
    if (role_already_existed)
      return;
    allowedRolesInRoundCount[round]++;

    allowedRolesInRoundArr[round].push(role);

    bool found = false;
    for (uint8 i = 0; i < availableRounds.length; i++)
      if (availableRounds[i] == round)
        found = true;

    if (!found)
      availableRounds.push(round);
  }

  function removeAllowedRoleInRound(uint8 round, int16 role) public onlyOwner {
    require(allowedRolesInRound[round][role].exists, "Role not existed");
    allowedRolesInRound[round][role].name = "";
    allowedRolesInRound[round][role].role_id = 0;
    allowedRolesInRound[round][role].max_mint = 0;
    allowedRolesInRound[round][role].mint_price = 0;
    allowedRolesInRound[round][role].exists = false;
    allowedRolesInRoundCount[round]--;

    // Remove available role
    for (uint8 i = 0; i < allowedRolesInRoundArr[round].length; i++) {
      if (allowedRolesInRoundArr[round][i] == role) {
        removeArrayAtInt16Index(allowedRolesInRoundArr[round], i);
        break;
      }
    }

    if (allowedRolesInRoundCount[round] == 0) {
      // Remove available round
      for (uint8 i = 0; i < availableRounds.length; i++) {
        if (availableRounds[i] == round) {
          removeArrayAtUint8Index(availableRounds, i);
          break;
        }
      }
    }
  }

  function setRoundAllocation(uint8 round, uint256 allocation) public onlyOwner {
    roundAllocations[round] = allocation;
  }

  function freezeMetadata() public onlyOwner {
    metadataFrozen = true;
  }
  
  ////////////
  // Minting
  ////////////

  function mintTeamNFTs() public onlyOwner {
    require(teamAddress != address(0), "Team wallet is not yet set");
    require(!_isTeamNFTsMinted, "Already minted");

    string memory baseURI = _baseURI();
    require(bytes(baseURI).length != 0, "baseURI is not yet set");

    if (TEAM_NFT_COUNT > 0)
      _safeMint(teamAddress, TEAM_NFT_COUNT);

    _isTeamNFTsMinted = true;
  }

  function mint(uint256 quantity, int16 role, uint256 nonce, uint8 v, bytes32 r, bytes32 s) external payable whenNotPaused nonReentrant {
    require(currentRound != 0, "Mint is not yet started");

    uint256 combined_nonce = nonce;
    if (role >= 0)
      combined_nonce = (nonce << 16) + uint16(role);

    require(_nonces[combined_nonce] == 0, "Duplicated nonce");
    require(_recoverAddress(combined_nonce, v, r, s) == _signer, "Invalid signature");

    bool is_public_round = allowedRolesInRound[currentRound][0].exists;
    int16 selected_role = 0;
    if (role >= 0)
      selected_role = role;

    if (!allowedRolesInRound[currentRound][selected_role].exists) {
      if (!is_public_round)
        require(false, "You are not eligible to mint in this round");
      selected_role = 0;
    }

    require(_isTeamNFTsMinted, "Contract is not ready for public mint yet");
    require(quantity > 0, "Quantity cannot be zero");
    require(totalMinted() + quantity <= MAX_SUPPLY, "Cannot mint more than maximum supply");
    if (role >= 0)
      require(maxMintableForTxForRole(msg.sender, role) >= quantity, "You have reached maximum allowed");
    else
      require(maxMintableForTx(msg.sender) >= quantity, "You have reached maximum allowed");
    require(mintableLeft() >= quantity, "Not enough NFT left to mint.");

    uint256 cost = quantity * allowedRolesInRound[currentRound][selected_role].mint_price;
    _nonces[combined_nonce] = 1;

    require(msg.value == cost, "Unmatched ether balance");

    _safeMint(msg.sender, quantity);

    totalMintedInRound[currentRound] = totalMintedInRound[currentRound] + quantity;

    _addressTokenMinted[msg.sender] = _addressTokenMinted[msg.sender] + quantity;
    _addressTokenMintedInRound[msg.sender][currentRound] = _addressTokenMintedInRound[msg.sender][currentRound] + quantity;

    uint256 to_apetimism = msg.value * apetimismFee() / 10000;
    uint256 to_team = msg.value - to_apetimism;

    payable(apetimismAddress()).transfer(to_apetimism);
    totalRevenueShared = totalRevenueShared + to_apetimism;
  }

  function _recoverAddress(uint256 nonce, uint8 v, bytes32 r, bytes32 s) private pure returns (address) {
    bytes32 msgHash = keccak256(abi.encodePacked(nonce));
    bytes32 messageDigest = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", msgHash));
    return ecrecover(messageDigest, v, r, s);
  }

  ////////////////
  // Transfering
  ////////////////

  function transfersFrom(
    address from,
    address to,
    uint256[] calldata tokenIds
  ) public virtual {
    for (uint i = 0; i < tokenIds.length; i++)
      transferFrom(from, to, tokenIds[i]);
  }

  function safeTransfersFrom(
    address from,
    address to,
    uint256[] calldata tokenIds
  ) public virtual {
    for (uint i = 0; i < tokenIds.length; i++)
      safeTransferFrom(from, to, tokenIds[i]);
  }

  function safeTransfersFrom(
    address from,
    address to,
    uint256[] calldata tokenIds,
    bytes memory _data
  ) public virtual {
    for (uint i = 0; i < tokenIds.length; i++)
      safeTransferFrom(from, to, tokenIds[i], _data);
  }

  //////////////
  // Pausable
  //////////////

  function pause() public onlyOwner {
    _pause();
  }

  function unpause() public onlyOwner {
    _unpause();
  }

  ///////////////////
  // Internal Views
  ///////////////////

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

  /////////////////
  // Public Views
  /////////////////

  function getAllAvailableRounds() public view returns (uint8[] memory) {
    uint256 len = availableRounds.length;
    uint8[] memory ret = new uint8[](len);
    for (uint i = 0; i < len; i++)
      ret[i] = availableRounds[i];
    return ret;
  }

  function getAllowedRolesInRoundArr(uint8 round) public view returns (int16[] memory) {
    uint256 len = allowedRolesInRoundArr[round].length;
    int16[] memory ret = new int16[](len);
    for (uint i = 0; i < len; i++)
      ret[i] = allowedRolesInRoundArr[round][i];
    return ret;
  }

  function mintPriceForCurrentRound(address addr) public view returns (uint256) {
    int16 selected_role = 0;
    return allowedRolesInRound[currentRound][selected_role].mint_price;
  }

  function mintPriceForCurrentRoundForRole(int16 role) public view returns (uint256) {
    return allowedRolesInRound[currentRound][role].mint_price;
  }

  function maxMintable(address addr) public view virtual returns (uint256) {
    int16 selected_role = 0;
    return maxMintableForRole(addr, selected_role);
  }

  function maxMintableForRole(address addr, int16 role) public view virtual returns (uint256) {
    uint256 minted = _addressTokenMinted[addr];
    uint256 max_mint = 0;

    // Not yet started
    if (currentRound == 0)
      return 0;
    // Total minted in this round reach the maximum allocated
    if (totalMintedInRound[currentRound] >= roundAllocations[currentRound])
      return 0;

    bool is_public_round = allowedRolesInRound[currentRound][0].exists;
    if (allowedRolesInRound[currentRound][role].exists)
      max_mint = allowedRolesInRound[currentRound][role].max_mint;
    else if (is_public_round)
      max_mint = allowedRolesInRound[currentRound][0].max_mint;

    // Hit the maximum per wallet
    if (minted >= maxMintPerAddress)
      return 0;
    // Cannot mint more for this round
    if (_addressTokenMintedInRound[addr][currentRound] >= max_mint)
      return 0;

    uint256 wallet_quota_left = maxMintPerAddress - minted;
    uint256 round_quota_left = max_mint - _addressTokenMintedInRound[addr][currentRound];
    uint256 round_allocation_quota_left = roundAllocations[currentRound] - totalMintedInRound[currentRound];

    return min(mintableLeft(), min(min(wallet_quota_left, round_quota_left), round_allocation_quota_left));
  }

  function maxMintableForTx(address addr) public view virtual returns (uint256) {
    uint256 mintable = maxMintable(addr);

    if (mintable > maxMintPerTx)
      return maxMintPerTx;

    return mintable;
  }

  function maxMintableForTxForRole(address addr, int16 role) public view virtual returns (uint256) {
    uint256 mintable = maxMintableForRole(addr, role);

    if (mintable > maxMintPerTx)
      return maxMintPerTx;

    return mintable;
  }

  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token');

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

  function totalMinted() public view returns (uint256) {
    return _totalMinted();
  }

  function mintableLeft() public view returns (uint256) {
    return MAX_SUPPLY - totalMinted();
  }

  ////////////
  // Helpers
  ////////////

  function removeArrayAtInt16Index(int16[] storage array, uint256 index) private {
    for (uint i = index; i < array.length - 1; i++)
      array[i] = array[i + 1];
    delete array[array.length - 1];
    array.pop();
  }

  function removeArrayAtUint8Index(uint8[] storage array, uint256 index) private {
    for (uint i = index; i < array.length - 1; i++)
      array[i] = array[i + 1];
    delete array[array.length - 1];
    array.pop();
  }

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

  ////////////
  // ERC2981
  ////////////

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) {
    return super.supportsInterface(interfaceId) || ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId);
  }

  function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
    _setDefaultRoyalty(receiver, feeNumerator);
  }

  function deleteDefaultRoyalty() public onlyOwner {
    _deleteDefaultRoyalty();
  }

  function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public onlyOwner {
    _setTokenRoyalty(tokenId, receiver, feeNumerator);
  }

  function resetTokenRoyalty(uint256 tokenId) public onlyOwner {
    _resetTokenRoyalty(tokenId);
  }

  ///////////////
  // Withdrawal
  ///////////////

  function withdraw() public onlyOwner {
    uint256 balance = address(this).balance;
    payable(msg.sender).transfer(balance);
  }

  function withdrawToken(address tokenAddress) public onlyOwner {
    IERC20 tokenContract = IERC20(tokenAddress);
    tokenContract.transfer(msg.sender, tokenContract.balanceOf(address(this)));
  }

  /////////////
  // Fallback
  /////////////

  receive() external payable {
    emit Received(msg.sender, msg.value);
  }
}

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

pragma solidity ^0.8.0;

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

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

File 3 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

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

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

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

File 4 of 18 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 5 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 7 of 18 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 8 of 18 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721A Queryable
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _currentIndex) {
            return ownership;
        }
        ownership = _ownerships[tokenId];
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _currentIndex;
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, _currentIndex)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 9 of 18 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 12 of 18 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 13 of 18 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @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 Context, ERC165, IERC721A {
    using Address for address;
    using Strings for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _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 _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

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

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    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();
        }
    }

    /**
     * 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 See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

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

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

    /**
     * Sets the auxillary 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 {
        _addressData[owner].aux = aux;
    }

    /**
     * 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) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // 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.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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, tokenId.toString())) : '';
    }

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

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

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

        _approve(to, tokenId, owner);
    }

    /**
     * @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 == _msgSender()) revert ApproveToCaller();

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

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

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

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.isContract()) 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 && !_ownerships[tokenId].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.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) 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 or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @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.
     */
    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 or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

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

    /**
     * @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 _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // 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 {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        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 {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

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

        // 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 {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        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 Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

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

File 14 of 18 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A is IERC721, IERC721Metadata {
    /**
     * 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();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

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

    // Compiler will pack this into a single 256bit word.
    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;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"apetimismAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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":"previousAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ApetimismAddressTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"","type":"uint8"}],"name":"RoundChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"TotalMintedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"START_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_NFT_COUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"string","name":"roleName","type":"string"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"}],"name":"addAllowedRoleInRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"int16","name":"","type":"int16"}],"name":"allowedRolesInRound","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"int16","name":"role_id","type":"int16"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"uint256","name":"mint_price","type":"uint256"},{"internalType":"bool","name":"exists","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedRolesInRoundArr","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"allowedRolesInRoundCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apetimismAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apetimismFee","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":"uint256","name":"","type":"uint256"}],"name":"availableRounds","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRound","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllAvailableRounds","outputs":[{"internalType":"uint8[]","name":"","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"}],"name":"getAllowedRolesInRoundArr","outputs":[{"internalType":"int16[]","name":"","type":"int16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerAddress","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerTx","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"maxMintable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"int16","name":"role","type":"int16"}],"name":"maxMintableForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"maxMintableForTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"int16","name":"role","type":"int16"}],"name":"maxMintableForTxForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"mintPriceForCurrentRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"role","type":"int16"}],"name":"mintPriceForCurrentRoundForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintTeamNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintableLeft","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"}],"name":"removeAllowedRoleInRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceApetimism","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"roundAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"safeTransfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setApetimismFee","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":"uint8","name":"round_","type":"uint8"}],"name":"setCurrentRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"}],"name":"setMaxMintPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"}],"name":"setMaxMintPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"name":"setRoundAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setTeamAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"totalMintedInRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRevenueShared","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"transferApetimism","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":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"transfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526101f4600d556000600e81905561115c600f556101906010556011556013805460ff191690556017805460ff64ffffffffff60a81b0119166205000560b01b1790553480156200005357600080fd5b50604051620053e7380380620053e783398101604081905262000076916200026e565b806040518060400160405280600a81526020016943796265724e6572647360b01b8152506040518060400160405280600a81526020016943594245524e4552445360b01b8152508160029080519060200190620000d5929190620001c8565b508051620000eb906003906020840190620001c8565b505060115460005550620000ff3362000124565b600a805460ff60a01b191690556001600b556200011c8162000176565b5050620002dd565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b828054620001d690620002a0565b90600052602060002090601f016020900481019282620001fa576000855562000245565b82601f106200021557805160ff191683800117855562000245565b8280016001018555821562000245579182015b828111156200024557825182559160200191906001019062000228565b506200025392915062000257565b5090565b5b8082111562000253576000815560010162000258565b6000602082840312156200028157600080fd5b81516001600160a01b03811681146200029957600080fd5b9392505050565b600181811c90821680620002b557607f821691505b60208210811415620002d757634e487b7160e01b600052602260045260246000fd5b50919050565b6150fa80620002ed6000396000f3fe60806040526004361061044b5760003560e01c806379a2c3f811610234578063ac7dc68d1161012e578063cb0010fa116100b6578063e985e9c51161007a578063e985e9c514610df8578063f2fde38b14610e41578063fb3cc6c214610e61578063fd1b18c714610e82578063fe2e66f414610ea257600080fd5b8063cb0010fa14610d6e578063cf502d0d14610d81578063d0950e7414610da1578063d111515d14610dc1578063de7fcb1d14610dd657600080fd5b8063b6a74121116100fd578063b6a7412114610cb4578063b88d4fde14610cd4578063be56844814610cf4578063c23dc68f14610d21578063c87b56dd14610d4e57600080fd5b8063ac7dc68d14610c4a578063b1ad048c14610c5f578063b1e8dbaa14610c7f578063b649270614610c9f57600080fd5b80638a616bc0116101bc578063a22cb46511610180578063a22cb46514610bbe578063a2309ff814610bde578063a77a8c8514610bf3578063aa1b103f14610c13578063aab16cfc14610c2857600080fd5b80638a616bc014610b1a5780638b98668e14610b3a5780638da5cb5b14610b6b57806395d89b4114610b8957806399a2557a14610b9e57600080fd5b80638462151c116102035780638462151c14610a6b57806387f65c9114610a985780638947606914610aae57806389b5a8c214610ace5780638a19c8bc14610aee57600080fd5b806379a2c3f8146109f657806380a9ebeb14610a1657806383e141e914610a365780638456cb5914610a5657600080fd5b80633e8f18f0116103455780635c975abb116102cd5780636e56431c116102915780636e56431c1461093757806370a082311461094c578063715018a61461096c578063720a05071461098157806377d16df0146109c357600080fd5b80635c975abb1461089a5780635ed88ecf146108b95780636324559b146108d95780636352211e146108f75780636690864e1461091757600080fd5b806351dc26901161031457806351dc2690146107f657806355f804b31461080b578063572849c41461082b5780635944c7531461084d5780635bbb21771461086d57600080fd5b80633e8f18f0146107665780633f4ba83a146107ab57806342842e0e146107c057806346830628146107e057600080fd5b8063183ab264116103d35780632c2d8b4c116103975780632c2d8b4c146106aa57806332ab9bbe146106d757806332cb6b0c146106f757806334f954ab1461070d5780633ccfd60b1461075157600080fd5b8063183ab264146105d95780631c75f085146105f957806323b872dd1461061e57806327854c151461063e5780632a55205a1461066b57600080fd5b806306fdde031161041a57806306fdde0314610526578063081812fc14610548578063095ea7b31461058057806311284a63146105a057806318160ddd146105c457600080fd5b806301ffc9a71461048f57806302452506146104c457806304634d8d146104e6578063046dc1661461050657600080fd5b3661048a57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561049b57600080fd5b506104af6104aa36600461456d565b610ec2565b60405190151581526020015b60405180910390f35b3480156104d057600080fd5b506104e46104df36600461458a565b610ef1565b005b3480156104f257600080fd5b506104e46105013660046145d6565b610efe565b34801561051257600080fd5b506104e4610521366004614609565b610f59565b34801561053257600080fd5b5061053b610fd6565b6040516104bb919061467c565b34801561055457600080fd5b5061056861056336600461458a565b611068565b6040516001600160a01b0390911681526020016104bb565b34801561058c57600080fd5b506104e461059b36600461468f565b6110ac565b3480156105ac57600080fd5b506105b660105481565b6040519081526020016104bb565b3480156105d057600080fd5b506105b6611133565b3480156105e557600080fd5b506104e46105f43660046146ca565b61114b565b34801561060557600080fd5b506017546105689061010090046001600160a01b031681565b34801561062a57600080fd5b506104e46106393660046146e5565b6111db565b34801561064a57600080fd5b506105b66106593660046146ca565b601e6020526000908152604090205481565b34801561067757600080fd5b5061068b610686366004614721565b6111e6565b604080516001600160a01b0390931683526020830191909152016104bb565b3480156106b657600080fd5b506105b66106c53660046146ca565b601d6020526000908152604090205481565b3480156106e357600080fd5b506104e46106f236600461483f565b611294565b34801561070357600080fd5b506105b6600f5481565b34801561071957600080fd5b5061073e6107283660046146ca565b601a6020526000908152604090205461ffff1681565b60405161ffff90911681526020016104bb565b34801561075d57600080fd5b506104e46112dd565b34801561077257600080fd5b506105b66107813660046148dc565b60175460ff16600090815260196020908152604080832060019490940b8352929052206003015490565b3480156107b757600080fd5b506104e4611354565b3480156107cc57600080fd5b506104e46107db3660046146e5565b6113a6565b3480156107ec57600080fd5b506105b6600e5481565b34801561080257600080fd5b506104e46113c1565b34801561081757600080fd5b506104e46108263660046148f7565b6113d3565b34801561083757600080fd5b5060175461073e90600160c01b900461ffff1681565b34801561085957600080fd5b506104e461086836600461492c565b611488565b34801561087957600080fd5b5061088d610888366004614968565b6114db565b6040516104bb9190614a0e565b3480156108a657600080fd5b50600a54600160a01b900460ff166104af565b3480156108c557600080fd5b506105b66108d4366004614609565b6115a2565b3480156108e557600080fd5b50600c546001600160a01b0316610568565b34801561090357600080fd5b5061056861091236600461458a565b6115b6565b34801561092357600080fd5b506104e4610932366004614609565b6115c8565b34801561094357600080fd5b50600d546105b6565b34801561095857600080fd5b506105b6610967366004614609565b611645565b34801561097857600080fd5b506104e4611694565b34801561098d57600080fd5b506105b661099c366004614609565b5060175460ff16600090815260196020908152604080832083805290915290206003015490565b3480156109cf57600080fd5b506109e36109de366004614a79565b6116e6565b60405160019190910b81526020016104bb565b348015610a0257600080fd5b506104e4610a11366004614a95565b61172c565b348015610a2257600080fd5b506104e4610a31366004614ab9565b611796565b348015610a4257600080fd5b506104e4610a51366004614a79565b6119c2565b348015610a6257600080fd5b506104e4611a20565b348015610a7757600080fd5b50610a8b610a86366004614609565b611a70565b6040516104bb9190614b29565b348015610aa457600080fd5b506105b660115481565b348015610aba57600080fd5b506104e4610ac9366004614609565b611bbc565b348015610ada57600080fd5b506104e4610ae9366004614b61565b611d05565b348015610afa57600080fd5b50601754610b089060ff1681565b60405160ff90911681526020016104bb565b348015610b2657600080fd5b506104e4610b3536600461458a565b611d45565b348015610b4657600080fd5b50610b5a610b55366004614bc2565b611da1565b6040516104bb959493929190614bec565b348015610b7757600080fd5b50600a546001600160a01b0316610568565b348015610b9557600080fd5b5061053b611e6b565b348015610baa57600080fd5b50610a8b610bb9366004614c28565b611e7a565b348015610bca57600080fd5b506104e4610bd9366004614c69565b612042565b348015610bea57600080fd5b506105b66120d8565b348015610bff57600080fd5b506104e4610c0e366004614609565b6120e7565b348015610c1f57600080fd5b506104e4612161565b348015610c3457600080fd5b50610c3d6121b3565b6040516104bb9190614ca0565b348015610c5657600080fd5b506105b661227b565b348015610c6b57600080fd5b506105b6610c7a366004614cdb565b612292565b348015610c8b57600080fd5b50610b08610c9a36600461458a565b6122cc565b348015610cab57600080fd5b506104e4612300565b348015610cc057600080fd5b506104e4610ccf366004614a95565b61248c565b348015610ce057600080fd5b506104e4610cef366004614cf7565b6124f6565b348015610d0057600080fd5b50610d14610d0f3660046146ca565b612540565b6040516104bb9190614d5f565b348015610d2d57600080fd5b50610d41610d3c36600461458a565b612626565b6040516104bb9190614d9a565b348015610d5a57600080fd5b5061053b610d6936600461458a565b6126e7565b6104e4610d7c366004614dd0565b6127c0565b348015610d8d57600080fd5b506104e4610d9c366004614b61565b612e9a565b348015610dad57600080fd5b506105b6610dbc366004614cdb565b612eda565b348015610dcd57600080fd5b506104e46130e5565b348015610de257600080fd5b5060175461073e90600160b01b900461ffff1681565b348015610e0457600080fd5b506104af610e13366004614e28565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610e4d57600080fd5b506104e4610e5c366004614609565b613142565b348015610e6d57600080fd5b506017546104af90600160a81b900460ff1681565b348015610e8e57600080fd5b506105b6610e9d366004614609565b6131f8565b348015610eae57600080fd5b506104e4610ebd366004614bc2565b613231565b6000610ecd826134d4565b80610edc5750610edc826134f5565b80610eeb5750610eeb826134d4565b92915050565b610ef9613545565b600d55565b600a546001600160a01b03163314610f4b5760405162461bcd60e51b815260206004820181905260248201526000805160206150a583398151915260448201526064015b60405180910390fd5b610f5582826135c5565b5050565b600a546001600160a01b03163314610fa15760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601380546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b606060028054610fe590614e52565b80601f016020809104026020016040519081016040528092919081815260200182805461101190614e52565b801561105e5780601f106110335761010080835404028352916020019161105e565b820191906000526020600020905b81548152906001019060200180831161104157829003601f168201915b5050505050905090565b6000611073826136c2565b611090576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006110b7826115b6565b9050806001600160a01b0316836001600160a01b031614156110ec5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614611123576111068133610e13565b611123576040516367d9dca160e11b815260040160405180910390fd5b61112e838383613702565b505050565b600061113e60115490565b6001546000540303905090565b600a546001600160a01b031633146111935760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805460ff191660ff83169081179091556040519081527f5d14047d25a400b6364f7b505872a4f0e8437d0dfd6cbdd5eee59f37baee7f459060200160405180910390a150565b61112e83838361375e565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161125b5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061127a906001600160601b031687614ea3565b6112849190614ed8565b91519350909150505b9250929050565b60005b828110156112d5576112c386868686858181106112b6576112b6614eec565b90506020020135856124f6565b806112cd81614f02565b915050611297565b505050505050565b600a546001600160a01b031633146113255760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6040514790339082156108fc029083906000818181858888f19350505050158015610f55573d6000803e3d6000fd5b600a546001600160a01b0316331461139c5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a461394b565b565b61112e838383604051806020016040528060008152506124f6565b6113c9613545565b6113a460006139f1565b600a546001600160a01b0316331461141b5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601754600160a81b900460ff16156114755760405162461bcd60e51b815260206004820181905260248201527f4d657461646174612068617320616c7265616479206265656e2066726f7a656e6044820152606401610f42565b8051610f559060129060208401906144be565b600a546001600160a01b031633146114d05760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b61112e838383613a43565b805160609060008167ffffffffffffffff8111156114fb576114fb614788565b60405190808252806020026020018201604052801561154657816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816115195790505b50905060005b82811461159a5761157585828151811061156857611568614eec565b6020026020010151612626565b82828151811061158757611587614eec565b602090810291909101015260010161154c565b509392505050565b6000806115af8382612eda565b9392505050565b60006115c182613b51565b5192915050565b600a546001600160a01b031633146116105760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601780546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60006001600160a01b03821661166e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b600a546001600160a01b031633146116dc5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a46000613c7c565b601b602052816000526040600020818154811061170257600080fd5b9060005260206000209060109182820401919006600202915091509054906101000a900460010b81565b600a546001600160a01b031633146117745760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b600a546001600160a01b031633146117de5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff8581166000908152601960209081526040808320600189900b8452825290912060048101548651931692611816928701906144be565b5060ff86166000908152601960209081526040808320600189810b85529252909120808201805461ffff191661ffff89161790556002810185905560038101849055600401805460ff19169091179055801561187257506119bb565b60ff86166000908152601a60205260408120805461ffff169161189483614f1d565b825461010092830a61ffff81810219909216928216029190911790925560ff89166000908152601b602090815260408220805460018101825590835290822060108204018054600f90921660020290930a80850219909116938a16029290921790559050805b601c5460ff8216101561195e578760ff16601c8260ff168154811061192157611921614eec565b60009182526020918290209181049091015460ff601f9092166101000a900416141561194c57600191505b8061195681614f3f565b9150506118fa565b50806119b857601c8054600181018255600091909152602081047f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a21101805460ff808b16601f9094166101000a938402930219169190911790555b50505b5050505050565b600a546001600160a01b03163314611a0a5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff9091166000908152601d6020526040902055565b600a546001600160a01b03163314611a685760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a4613cce565b60606000806000611a8085611645565b905060008167ffffffffffffffff811115611a9d57611a9d614788565b604051908082528060200260200182016040528015611ac6578160200160208202803683370190505b506040805160608101825260008082526020820181905291810191909152601154919250905b838614611bb057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529250611b5357611ba8565b81516001600160a01b031615611b6857815194505b876001600160a01b0316856001600160a01b03161415611ba85780838780600101985081518110611b9b57611b9b614eec565b6020026020010181815250505b600101611aec565b50909695505050505050565b600a546001600160a01b03163314611c045760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6040516370a0823160e01b815230600482015281906001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c879190614f5f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611ccd57600080fd5b505af1158015611ce1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112e9190614f78565b60005b818110156119bb57611d338585858585818110611d2757611d27614eec565b905060200201356111db565b80611d3d81614f02565b915050611d08565b600a546001600160a01b03163314611d8d5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b600090815260096020526040812055565b50565b6019602090815260009283526040808420909152908252902080548190611dc790614e52565b80601f0160208091040260200160405190810160405280929190818152602001828054611df390614e52565b8015611e405780601f10611e1557610100808354040283529160200191611e40565b820191906000526020600020905b815481529060010190602001808311611e2357829003601f168201915b5050506001808501546002860154600387015460049097015495969190920b94919350915060ff1685565b606060038054610fe590614e52565b6060818310611e9c57604051631960ccad60e11b815260040160405180910390fd5b60008054601154851015611eb05760115494505b80841115611ebc578093505b6000611ec787611645565b905084861015611ee65785850381811015611ee0578091505b50611eea565b5060005b60008167ffffffffffffffff811115611f0557611f05614788565b604051908082528060200260200182016040528015611f2e578160200160208202803683370190505b50905081611f415793506115af92505050565b6000611f4c88612626565b905060008160400151611f5d575080515b885b888114158015611f6f5750848714155b1561203157600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529350611fd457612029565b82516001600160a01b031615611fe957825191505b8a6001600160a01b0316826001600160a01b03161415612029578084888060010199508151811061201c5761201c614eec565b6020026020010181815250505b600101611f5f565b505050928352509095945050505050565b6001600160a01b03821633141561206c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006120e2613d56565b905090565b6120ef613545565b6001600160a01b0381166121585760405162461bcd60e51b815260206004820152602a60248201527f41706574696d69736d3a206e6577206164647265737320697320746865207a65604482015269726f206164647265737360b01b6064820152608401610f42565b611d9e816139f1565b600a546001600160a01b031633146121a95760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a46000600855565b601c5460609060008167ffffffffffffffff8111156121d4576121d4614788565b6040519080825280602002602001820160405280156121fd578160200160208202803683370190505b50905060005b8281101561227457601c818154811061221e5761221e614eec565b90600052602060002090602091828204019190069054906101000a900460ff1682828151811061225057612250614eec565b60ff909216602092830291909101909101528061226c81614f02565b915050612203565b5092915050565b60006122856120d8565b600f546120e29190614f95565b60008061229f8484612eda565b601754909150600160b01b900461ffff168111156115af575050601754600160b01b900461ffff16610eeb565b601c81815481106122dc57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b600a546001600160a01b031633146123485760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60175461010090046001600160a01b03166123a55760405162461bcd60e51b815260206004820152601a60248201527f5465616d2077616c6c6574206973206e6f7420796574207365740000000000006044820152606401610f42565b60135460ff16156123f85760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610f42565b6000612402613d6a565b90508051600014156124565760405162461bcd60e51b815260206004820152601660248201527f62617365555249206973206e6f742079657420736574000000000000000000006044820152606401610f42565b6010541561247c5760175460105461247c9161010090046001600160a01b031690613d79565b506013805460ff19166001179055565b600a546001600160a01b031633146124d45760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b61250184848461375e565b6001600160a01b0383163b1561253a5761251d84848484613d93565b61253a576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60ff81166000908152601b60205260408120546060918167ffffffffffffffff81111561256f5761256f614788565b604051908082528060200260200182016040528015612598578160200160208202803683370190505b50905060005b8281101561159a5760ff85166000908152601b602052604090208054829081106125ca576125ca614eec565b90600052602060002090601091828204019190066002029054906101000a900460010b8282815181106125ff576125ff614eec565b602002602001019060010b908160010b81525050808061261e90614f02565b91505061259e565b6040805160608101825260008082526020820181905291810191909152604080516060810182526000808252602082018190529181019190915260115483108061267257506000548310155b1561267d5792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906126de5792915050565b6115af83613b51565b60606126f2826136c2565b6127645760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610f42565b600061276e613d6a565b905080516000141561278f57604051806020016040528060008152506115af565b8061279984613e8b565b6040516020016127aa929190614fac565b6040516020818303038152906040529392505050565b600a54600160a01b900460ff161561280d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f42565b6002600b5414156128605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f42565b6002600b5560175460ff166128b75760405162461bcd60e51b815260206004820152601760248201527f4d696e74206973206e6f742079657420737461727465640000000000000000006044820152606401610f42565b836000600187900b126128d9576128d661ffff8716601087901b614feb565b90505b60008181526016602052604090205460ff16156129385760405162461bcd60e51b815260206004820152601060248201527f4475706c696361746564206e6f6e6365000000000000000000000000000000006044820152606401610f42565b60135461010090046001600160a01b031661295582868686613fa1565b6001600160a01b0316146129ab5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610f42565b60175460ff908116600090815260196020908152604080832083805290915281206004015490911690600188900b81136129e25750865b60175460ff9081166000908152601960209081526040808320600186900b845290915290206004015416612a745781612a705760405162461bcd60e51b815260206004820152602a60248201527f596f7520617265206e6f7420656c696769626c6520746f206d696e7420696e206044820152691d1a1a5cc81c9bdd5b9960b21b6064820152608401610f42565b5060005b60135460ff16612ad85760405162461bcd60e51b815260206004820152602960248201527f436f6e7472616374206973206e6f7420726561647920666f72207075626c6963604482015268081b5a5b9d081e595d60ba1b6064820152608401610f42565b60008911612b285760405162461bcd60e51b815260206004820152601760248201527f5175616e746974792063616e6e6f74206265207a65726f0000000000000000006044820152606401610f42565b600f5489612b346120d8565b612b3e9190614feb565b1115612b985760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f74206d696e74206d6f7265207468616e206d6178696d756d20737560448201526370706c7960e01b6064820152608401610f42565b60008860010b12612c015788612bae338a612292565b1015612bfc5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610f42565b612c59565b88612c0b336131f8565b1015612c595760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610f42565b88612c6261227b565b1015612cb05760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e4654206c65667420746f206d696e742e000000006044820152606401610f42565b60175460ff166000908152601960209081526040808320600185900b8452909152812060030154612ce1908b614ea3565b6000858152601660205260409020805460ff191660011790559050348114612d4b5760405162461bcd60e51b815260206004820152601760248201527f556e6d6174636865642065746865722062616c616e63650000000000000000006044820152606401610f42565b612d55338b613d79565b60175460ff166000908152601e6020526040902054612d75908b90614feb565b60175460ff166000908152601e6020908152604080832093909355338252601490522054612da4908b90614feb565b336000908152601460209081526040808320939093556015815282822060175460ff16835290522054612dd8908b90614feb565b33600090815260156020908152604080832060175460ff168452909152812091909155612710612e07600d5490565b612e119034614ea3565b612e1b9190614ed8565b90506000612e298234614f95565b9050612e3d600c546001600160a01b031690565b6001600160a01b03166108fc839081150290604051600060405180830381858888f19350505050158015612e75573d6000803e3d6000fd5b5081600e54612e849190614feb565b600e5550506001600b5550505050505050505050565b60005b818110156119bb57612ec88585858585818110612ebc57612ebc614eec565b905060200201356113a6565b80612ed281614f02565b915050612e9d565b6001600160a01b038216600090815260146020526040812054601754829060ff16612f0a57600092505050610eeb565b60175460ff166000908152601d6020908152604080832054601e9092529091205410612f3b57600092505050610eeb565b60175460ff908116600090815260196020908152604080832083805280835281842060049081015460018b900b86529190935292200154908216911615612faa5760175460ff166000908152601960209081526040808320600189900b84529091529020600201549150612fd6565b8015612fd65760175460ff16600090815260196020908152604080832083805290915290206002015491505b601754600160c01b900461ffff168310612ff65760009350505050610eeb565b6001600160a01b038616600090815260156020908152604080832060175460ff16845290915290205482116130315760009350505050610eeb565b60175460009061304d908590600160c01b900461ffff16614f95565b6001600160a01b038816600090815260156020908152604080832060175460ff168452909152812054919250906130849085614f95565b60175460ff166000908152601e6020908152604080832054601d90925282205492935090916130b39190614f95565b90506130d86130c061227b565b6130d36130cd868661408c565b8461408c565b61408c565b9998505050505050505050565b600a546001600160a01b0316331461312d5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805460ff60a81b1916600160a81b179055565b600a546001600160a01b0316331461318a5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6001600160a01b0381166131ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f42565b611d9e81613c7c565b600080613204836115a2565b601754909150600160b01b900461ffff16811115610eeb575050601754600160b01b900461ffff16919050565b600a546001600160a01b031633146132795760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff8083166000908152601960209081526040808320600186900b8452909152902060040154166132ec5760405162461bcd60e51b815260206004820152601060248201527f526f6c65206e6f742065786973746564000000000000000000000000000000006044820152606401610f42565b604080516020808201808452600080845260ff8716815260198352848120600187900b8252909252929020905161332392906144be565b5060ff82166000818152601960209081526040808320600186810b8552908352818420908101805461ffff191690556002810184905560038101849055600401805460ff19169055928252601a9052908120805461ffff169161338583615003565b91906101000a81548161ffff021916908361ffff1602179055505060005b60ff8084166000908152601b602052604090205490821610156134485760ff8084166000908152601b602052604090208054600185900b9284169081106133ec576133ec614eec565b60009182526020909120601082040154600f9091166002026101000a900460010b14156134365760ff8084166000908152601b602052604090206134319183166140a2565b613448565b8061344081614f3f565b9150506133a3565b5060ff82166000908152601a602052604090205461ffff16610f555760005b601c5460ff8216101561112e578260ff16601c8260ff168154811061348e5761348e614eec565b60009182526020918290209181049091015460ff601f9092166101000a90041614156134c25761112e601c8260ff166141d6565b806134cc81614f3f565b915050613467565b60006001600160e01b0319821663152a902d60e11b1480610eeb5750610eeb825b60006001600160e01b031982166380ac58cd60e01b148061352657506001600160e01b03198216635b5e139f60e01b145b80610eeb57506301ffc9a760e01b6001600160e01b0319831614610eeb565b600c546001600160a01b031633146113a45760405162461bcd60e51b815260206004820152602e60248201527f41706574696d69736d3a2063616c6c6572206973206e6f74207468652061706560448201527f74696d69736d20616464726573730000000000000000000000000000000000006064820152608401610f42565b6127106001600160601b03821611156136335760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f42565b6001600160a01b0382166136895760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f42565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6000816136ce60115490565b111580156136dd575060005482105b8015610eeb575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061376982613b51565b9050836001600160a01b031681600001516001600160a01b0316146137a05760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806137be57506137be8533610e13565b806137d95750336137ce84611068565b6001600160a01b0316145b9050806137f957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661382057604051633a954ecd60e21b815260040160405180910390fd5b61382c60008487613702565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613902576000548214613902578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119bb565b600a54600160a01b900460ff166139a45760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f42565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b6127106001600160601b0382161115613ab15760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f42565b6001600160a01b038216613b075760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f42565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b60408051606081018252600080825260208201819052918101919091528180613b7960115490565b11613c6357600054811015613c6357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290613c615780516001600160a01b031615613bf7579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215613c5c579392505050565b613bf7565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff1615613d1b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f42565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139d43390565b6000613d6160115490565b60005403905090565b606060128054610fe590614e52565b610f558282604051806020016040528060008152506142f9565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613dc8903390899088908890600401615021565b602060405180830381600087803b158015613de257600080fd5b505af1925050508015613e12575060408051601f3d908101601f19168201909252613e0f9181019061505d565b60015b613e6d573d808015613e40576040519150601f19603f3d011682016040523d82523d6000602084013e613e45565b606091505b508051613e65576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081613eaf5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613ed95780613ec381614f02565b9150613ed29050600a83614ed8565b9150613eb3565b60008167ffffffffffffffff811115613ef457613ef4614788565b6040519080825280601f01601f191660200182016040528015613f1e576020820181803683370190505b5090505b8415613e8357613f33600183614f95565b9150613f40600a8661507a565b613f4b906030614feb565b60f81b818381518110613f6057613f60614eec565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613f9a600a86614ed8565b9450613f22565b60008085604051602001613fb791815260200190565b60405160208183030381529060405280519060200120905060008160405160200161400e91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915060019060a0016020604051602081039080840390855afa158015614076573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b600081831061409b57816115af565b5090919050565b805b82546140b290600190614f95565b81101561414f57826140c5826001614feb565b815481106140d5576140d5614eec565b90600052602060002090601091828204019190066002029054906101000a900460010b83828154811061410a5761410a614eec565b90600052602060002090601091828204019190066002026101000a81548161ffff021916908360010b61ffff160217905550808061414790614f02565b9150506140a4565b508154829061416090600190614f95565b8154811061417057614170614eec565b90600052602060002090601091828204019190066002026101000a81549061ffff0219169055818054806141a6576141a661508e565b600082815260209020601060001990920191820401805461ffff6002600f8516026101000a021916905590555050565b805b82546141e690600190614f95565b81101561427857826141f9826001614feb565b8154811061420957614209614eec565b90600052602060002090602091828204019190069054906101000a900460ff1683828154811061423b5761423b614eec565b90600052602060002090602091828204019190066101000a81548160ff021916908360ff160217905550808061427090614f02565b9150506141d8565b508154829061428990600190614f95565b8154811061429957614299614eec565b90600052602060002090602091828204019190066101000a81549060ff0219169055818054806142cb576142cb61508e565b60019003818190600052602060002090602091828204019190066101000a81549060ff021916905590555050565b6000546001600160a01b03841661432257604051622e076360e81b815260040160405180910390fd5b826143405760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15614469575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46144326000878480600101955087613d93565b61444f576040516368d2bf6b60e11b815260040160405180910390fd5b8082106143e757826000541461446457600080fd5b6144ae565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061446a575b50600090815561253a9085838684565b8280546144ca90614e52565b90600052602060002090601f0160209004810192826144ec5760008555614532565b82601f1061450557805160ff1916838001178555614532565b82800160010185558215614532579182015b82811115614532578251825591602001919060010190614517565b5061453e929150614542565b5090565b5b8082111561453e5760008155600101614543565b6001600160e01b031981168114611d9e57600080fd5b60006020828403121561457f57600080fd5b81356115af81614557565b60006020828403121561459c57600080fd5b5035919050565b80356001600160a01b03811681146145ba57600080fd5b919050565b80356001600160601b03811681146145ba57600080fd5b600080604083850312156145e957600080fd5b6145f2836145a3565b9150614600602084016145bf565b90509250929050565b60006020828403121561461b57600080fd5b6115af826145a3565b60005b8381101561463f578181015183820152602001614627565b8381111561253a5750506000910152565b60008151808452614668816020860160208601614624565b601f01601f19169290920160200192915050565b6020815260006115af6020830184614650565b600080604083850312156146a257600080fd5b6146ab836145a3565b946020939093013593505050565b803560ff811681146145ba57600080fd5b6000602082840312156146dc57600080fd5b6115af826146b9565b6000806000606084860312156146fa57600080fd5b614703846145a3565b9250614711602085016145a3565b9150604084013590509250925092565b6000806040838503121561473457600080fd5b50508035926020909101359150565b60008083601f84011261475557600080fd5b50813567ffffffffffffffff81111561476d57600080fd5b6020830191508360208260051b850101111561128d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156147c7576147c7614788565b604052919050565b600082601f8301126147e057600080fd5b813567ffffffffffffffff8111156147fa576147fa614788565b61480d601f8201601f191660200161479e565b81815284602083860101111561482257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060006080868803121561485757600080fd5b614860866145a3565b945061486e602087016145a3565b9350604086013567ffffffffffffffff8082111561488b57600080fd5b61489789838a01614743565b909550935060608801359150808211156148b057600080fd5b506148bd888289016147cf565b9150509295509295909350565b8035600181900b81146145ba57600080fd5b6000602082840312156148ee57600080fd5b6115af826148ca565b60006020828403121561490957600080fd5b813567ffffffffffffffff81111561492057600080fd5b613e83848285016147cf565b60008060006060848603121561494157600080fd5b83359250614951602085016145a3565b915061495f604085016145bf565b90509250925092565b6000602080838503121561497b57600080fd5b823567ffffffffffffffff8082111561499357600080fd5b818501915085601f8301126149a757600080fd5b8135818111156149b9576149b9614788565b8060051b91506149ca84830161479e565b81815291830184019184810190888411156149e457600080fd5b938501935b83851015614a02578435825293850193908501906149e9565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057614a6683855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101614a2a565b60008060408385031215614a8c57600080fd5b6146ab836146b9565b600060208284031215614aa757600080fd5b813561ffff811681146115af57600080fd5b600080600080600060a08688031215614ad157600080fd5b614ada866146b9565b9450614ae8602087016148ca565b9350604086013567ffffffffffffffff811115614b0457600080fd5b614b10888289016147cf565b9598949750949560608101359550608001359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057835183529284019291840191600101614b45565b60008060008060608587031215614b7757600080fd5b614b80856145a3565b9350614b8e602086016145a3565b9250604085013567ffffffffffffffff811115614baa57600080fd5b614bb687828801614743565b95989497509550505050565b60008060408385031215614bd557600080fd5b614bde836146b9565b9150614600602084016148ca565b60a081526000614bff60a0830188614650565b90508560010b602083015284604083015283606083015282151560808301529695505050505050565b600080600060608486031215614c3d57600080fd5b614c46846145a3565b95602085013595506040909401359392505050565b8015158114611d9e57600080fd5b60008060408385031215614c7c57600080fd5b614c85836145a3565b91506020830135614c9581614c5b565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057835160ff1683529284019291840191600101614cbc565b60008060408385031215614cee57600080fd5b614bde836145a3565b60008060008060808587031215614d0d57600080fd5b614d16856145a3565b9350614d24602086016145a3565b925060408501359150606085013567ffffffffffffffff811115614d4757600080fd5b614d53878288016147cf565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015611bb0578351600190810b8452938501939285019201614d7b565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610eeb565b60008060008060008060c08789031215614de957600080fd5b86359550614df9602088016148ca565b945060408701359350614e0e606088016146b9565b92506080870135915060a087013590509295509295509295565b60008060408385031215614e3b57600080fd5b614e44836145a3565b9150614600602084016145a3565b600181811c90821680614e6657607f821691505b60208210811415614e8757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614ebd57614ebd614e8d565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614ee757614ee7614ec2565b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614f1657614f16614e8d565b5060010190565b600061ffff80831681811415614f3557614f35614e8d565b6001019392505050565b600060ff821660ff811415614f5657614f56614e8d565b60010192915050565b600060208284031215614f7157600080fd5b5051919050565b600060208284031215614f8a57600080fd5b81516115af81614c5b565b600082821015614fa757614fa7614e8d565b500390565b60008351614fbe818460208801614624565b835190830190614fd2818360208801614624565b64173539b7b760d91b9101908152600501949350505050565b60008219821115614ffe57614ffe614e8d565b500190565b600061ffff82168061501757615017614e8d565b6000190192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526150536080830184614650565b9695505050505050565b60006020828403121561506f57600080fd5b81516115af81614557565b60008261508957615089614ec2565b500690565b634e487b7160e01b600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f7d17c0b4ccfe4c02de225932adeeb4a4747156c917bb010f33c979a5d83be9664736f6c63430008090033000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f

Deployed Bytecode

0x60806040526004361061044b5760003560e01c806379a2c3f811610234578063ac7dc68d1161012e578063cb0010fa116100b6578063e985e9c51161007a578063e985e9c514610df8578063f2fde38b14610e41578063fb3cc6c214610e61578063fd1b18c714610e82578063fe2e66f414610ea257600080fd5b8063cb0010fa14610d6e578063cf502d0d14610d81578063d0950e7414610da1578063d111515d14610dc1578063de7fcb1d14610dd657600080fd5b8063b6a74121116100fd578063b6a7412114610cb4578063b88d4fde14610cd4578063be56844814610cf4578063c23dc68f14610d21578063c87b56dd14610d4e57600080fd5b8063ac7dc68d14610c4a578063b1ad048c14610c5f578063b1e8dbaa14610c7f578063b649270614610c9f57600080fd5b80638a616bc0116101bc578063a22cb46511610180578063a22cb46514610bbe578063a2309ff814610bde578063a77a8c8514610bf3578063aa1b103f14610c13578063aab16cfc14610c2857600080fd5b80638a616bc014610b1a5780638b98668e14610b3a5780638da5cb5b14610b6b57806395d89b4114610b8957806399a2557a14610b9e57600080fd5b80638462151c116102035780638462151c14610a6b57806387f65c9114610a985780638947606914610aae57806389b5a8c214610ace5780638a19c8bc14610aee57600080fd5b806379a2c3f8146109f657806380a9ebeb14610a1657806383e141e914610a365780638456cb5914610a5657600080fd5b80633e8f18f0116103455780635c975abb116102cd5780636e56431c116102915780636e56431c1461093757806370a082311461094c578063715018a61461096c578063720a05071461098157806377d16df0146109c357600080fd5b80635c975abb1461089a5780635ed88ecf146108b95780636324559b146108d95780636352211e146108f75780636690864e1461091757600080fd5b806351dc26901161031457806351dc2690146107f657806355f804b31461080b578063572849c41461082b5780635944c7531461084d5780635bbb21771461086d57600080fd5b80633e8f18f0146107665780633f4ba83a146107ab57806342842e0e146107c057806346830628146107e057600080fd5b8063183ab264116103d35780632c2d8b4c116103975780632c2d8b4c146106aa57806332ab9bbe146106d757806332cb6b0c146106f757806334f954ab1461070d5780633ccfd60b1461075157600080fd5b8063183ab264146105d95780631c75f085146105f957806323b872dd1461061e57806327854c151461063e5780632a55205a1461066b57600080fd5b806306fdde031161041a57806306fdde0314610526578063081812fc14610548578063095ea7b31461058057806311284a63146105a057806318160ddd146105c457600080fd5b806301ffc9a71461048f57806302452506146104c457806304634d8d146104e6578063046dc1661461050657600080fd5b3661048a57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561049b57600080fd5b506104af6104aa36600461456d565b610ec2565b60405190151581526020015b60405180910390f35b3480156104d057600080fd5b506104e46104df36600461458a565b610ef1565b005b3480156104f257600080fd5b506104e46105013660046145d6565b610efe565b34801561051257600080fd5b506104e4610521366004614609565b610f59565b34801561053257600080fd5b5061053b610fd6565b6040516104bb919061467c565b34801561055457600080fd5b5061056861056336600461458a565b611068565b6040516001600160a01b0390911681526020016104bb565b34801561058c57600080fd5b506104e461059b36600461468f565b6110ac565b3480156105ac57600080fd5b506105b660105481565b6040519081526020016104bb565b3480156105d057600080fd5b506105b6611133565b3480156105e557600080fd5b506104e46105f43660046146ca565b61114b565b34801561060557600080fd5b506017546105689061010090046001600160a01b031681565b34801561062a57600080fd5b506104e46106393660046146e5565b6111db565b34801561064a57600080fd5b506105b66106593660046146ca565b601e6020526000908152604090205481565b34801561067757600080fd5b5061068b610686366004614721565b6111e6565b604080516001600160a01b0390931683526020830191909152016104bb565b3480156106b657600080fd5b506105b66106c53660046146ca565b601d6020526000908152604090205481565b3480156106e357600080fd5b506104e46106f236600461483f565b611294565b34801561070357600080fd5b506105b6600f5481565b34801561071957600080fd5b5061073e6107283660046146ca565b601a6020526000908152604090205461ffff1681565b60405161ffff90911681526020016104bb565b34801561075d57600080fd5b506104e46112dd565b34801561077257600080fd5b506105b66107813660046148dc565b60175460ff16600090815260196020908152604080832060019490940b8352929052206003015490565b3480156107b757600080fd5b506104e4611354565b3480156107cc57600080fd5b506104e46107db3660046146e5565b6113a6565b3480156107ec57600080fd5b506105b6600e5481565b34801561080257600080fd5b506104e46113c1565b34801561081757600080fd5b506104e46108263660046148f7565b6113d3565b34801561083757600080fd5b5060175461073e90600160c01b900461ffff1681565b34801561085957600080fd5b506104e461086836600461492c565b611488565b34801561087957600080fd5b5061088d610888366004614968565b6114db565b6040516104bb9190614a0e565b3480156108a657600080fd5b50600a54600160a01b900460ff166104af565b3480156108c557600080fd5b506105b66108d4366004614609565b6115a2565b3480156108e557600080fd5b50600c546001600160a01b0316610568565b34801561090357600080fd5b5061056861091236600461458a565b6115b6565b34801561092357600080fd5b506104e4610932366004614609565b6115c8565b34801561094357600080fd5b50600d546105b6565b34801561095857600080fd5b506105b6610967366004614609565b611645565b34801561097857600080fd5b506104e4611694565b34801561098d57600080fd5b506105b661099c366004614609565b5060175460ff16600090815260196020908152604080832083805290915290206003015490565b3480156109cf57600080fd5b506109e36109de366004614a79565b6116e6565b60405160019190910b81526020016104bb565b348015610a0257600080fd5b506104e4610a11366004614a95565b61172c565b348015610a2257600080fd5b506104e4610a31366004614ab9565b611796565b348015610a4257600080fd5b506104e4610a51366004614a79565b6119c2565b348015610a6257600080fd5b506104e4611a20565b348015610a7757600080fd5b50610a8b610a86366004614609565b611a70565b6040516104bb9190614b29565b348015610aa457600080fd5b506105b660115481565b348015610aba57600080fd5b506104e4610ac9366004614609565b611bbc565b348015610ada57600080fd5b506104e4610ae9366004614b61565b611d05565b348015610afa57600080fd5b50601754610b089060ff1681565b60405160ff90911681526020016104bb565b348015610b2657600080fd5b506104e4610b3536600461458a565b611d45565b348015610b4657600080fd5b50610b5a610b55366004614bc2565b611da1565b6040516104bb959493929190614bec565b348015610b7757600080fd5b50600a546001600160a01b0316610568565b348015610b9557600080fd5b5061053b611e6b565b348015610baa57600080fd5b50610a8b610bb9366004614c28565b611e7a565b348015610bca57600080fd5b506104e4610bd9366004614c69565b612042565b348015610bea57600080fd5b506105b66120d8565b348015610bff57600080fd5b506104e4610c0e366004614609565b6120e7565b348015610c1f57600080fd5b506104e4612161565b348015610c3457600080fd5b50610c3d6121b3565b6040516104bb9190614ca0565b348015610c5657600080fd5b506105b661227b565b348015610c6b57600080fd5b506105b6610c7a366004614cdb565b612292565b348015610c8b57600080fd5b50610b08610c9a36600461458a565b6122cc565b348015610cab57600080fd5b506104e4612300565b348015610cc057600080fd5b506104e4610ccf366004614a95565b61248c565b348015610ce057600080fd5b506104e4610cef366004614cf7565b6124f6565b348015610d0057600080fd5b50610d14610d0f3660046146ca565b612540565b6040516104bb9190614d5f565b348015610d2d57600080fd5b50610d41610d3c36600461458a565b612626565b6040516104bb9190614d9a565b348015610d5a57600080fd5b5061053b610d6936600461458a565b6126e7565b6104e4610d7c366004614dd0565b6127c0565b348015610d8d57600080fd5b506104e4610d9c366004614b61565b612e9a565b348015610dad57600080fd5b506105b6610dbc366004614cdb565b612eda565b348015610dcd57600080fd5b506104e46130e5565b348015610de257600080fd5b5060175461073e90600160b01b900461ffff1681565b348015610e0457600080fd5b506104af610e13366004614e28565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610e4d57600080fd5b506104e4610e5c366004614609565b613142565b348015610e6d57600080fd5b506017546104af90600160a81b900460ff1681565b348015610e8e57600080fd5b506105b6610e9d366004614609565b6131f8565b348015610eae57600080fd5b506104e4610ebd366004614bc2565b613231565b6000610ecd826134d4565b80610edc5750610edc826134f5565b80610eeb5750610eeb826134d4565b92915050565b610ef9613545565b600d55565b600a546001600160a01b03163314610f4b5760405162461bcd60e51b815260206004820181905260248201526000805160206150a583398151915260448201526064015b60405180910390fd5b610f5582826135c5565b5050565b600a546001600160a01b03163314610fa15760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601380546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b606060028054610fe590614e52565b80601f016020809104026020016040519081016040528092919081815260200182805461101190614e52565b801561105e5780601f106110335761010080835404028352916020019161105e565b820191906000526020600020905b81548152906001019060200180831161104157829003601f168201915b5050505050905090565b6000611073826136c2565b611090576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006110b7826115b6565b9050806001600160a01b0316836001600160a01b031614156110ec5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614611123576111068133610e13565b611123576040516367d9dca160e11b815260040160405180910390fd5b61112e838383613702565b505050565b600061113e60115490565b6001546000540303905090565b600a546001600160a01b031633146111935760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805460ff191660ff83169081179091556040519081527f5d14047d25a400b6364f7b505872a4f0e8437d0dfd6cbdd5eee59f37baee7f459060200160405180910390a150565b61112e83838361375e565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161125b5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061127a906001600160601b031687614ea3565b6112849190614ed8565b91519350909150505b9250929050565b60005b828110156112d5576112c386868686858181106112b6576112b6614eec565b90506020020135856124f6565b806112cd81614f02565b915050611297565b505050505050565b600a546001600160a01b031633146113255760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6040514790339082156108fc029083906000818181858888f19350505050158015610f55573d6000803e3d6000fd5b600a546001600160a01b0316331461139c5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a461394b565b565b61112e838383604051806020016040528060008152506124f6565b6113c9613545565b6113a460006139f1565b600a546001600160a01b0316331461141b5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601754600160a81b900460ff16156114755760405162461bcd60e51b815260206004820181905260248201527f4d657461646174612068617320616c7265616479206265656e2066726f7a656e6044820152606401610f42565b8051610f559060129060208401906144be565b600a546001600160a01b031633146114d05760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b61112e838383613a43565b805160609060008167ffffffffffffffff8111156114fb576114fb614788565b60405190808252806020026020018201604052801561154657816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816115195790505b50905060005b82811461159a5761157585828151811061156857611568614eec565b6020026020010151612626565b82828151811061158757611587614eec565b602090810291909101015260010161154c565b509392505050565b6000806115af8382612eda565b9392505050565b60006115c182613b51565b5192915050565b600a546001600160a01b031633146116105760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b601780546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60006001600160a01b03821661166e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b600a546001600160a01b031633146116dc5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a46000613c7c565b601b602052816000526040600020818154811061170257600080fd5b9060005260206000209060109182820401919006600202915091509054906101000a900460010b81565b600a546001600160a01b031633146117745760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b600a546001600160a01b031633146117de5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff8581166000908152601960209081526040808320600189900b8452825290912060048101548651931692611816928701906144be565b5060ff86166000908152601960209081526040808320600189810b85529252909120808201805461ffff191661ffff89161790556002810185905560038101849055600401805460ff19169091179055801561187257506119bb565b60ff86166000908152601a60205260408120805461ffff169161189483614f1d565b825461010092830a61ffff81810219909216928216029190911790925560ff89166000908152601b602090815260408220805460018101825590835290822060108204018054600f90921660020290930a80850219909116938a16029290921790559050805b601c5460ff8216101561195e578760ff16601c8260ff168154811061192157611921614eec565b60009182526020918290209181049091015460ff601f9092166101000a900416141561194c57600191505b8061195681614f3f565b9150506118fa565b50806119b857601c8054600181018255600091909152602081047f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a21101805460ff808b16601f9094166101000a938402930219169190911790555b50505b5050505050565b600a546001600160a01b03163314611a0a5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff9091166000908152601d6020526040902055565b600a546001600160a01b03163314611a685760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a4613cce565b60606000806000611a8085611645565b905060008167ffffffffffffffff811115611a9d57611a9d614788565b604051908082528060200260200182016040528015611ac6578160200160208202803683370190505b506040805160608101825260008082526020820181905291810191909152601154919250905b838614611bb057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529250611b5357611ba8565b81516001600160a01b031615611b6857815194505b876001600160a01b0316856001600160a01b03161415611ba85780838780600101985081518110611b9b57611b9b614eec565b6020026020010181815250505b600101611aec565b50909695505050505050565b600a546001600160a01b03163314611c045760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6040516370a0823160e01b815230600482015281906001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c879190614f5f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611ccd57600080fd5b505af1158015611ce1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112e9190614f78565b60005b818110156119bb57611d338585858585818110611d2757611d27614eec565b905060200201356111db565b80611d3d81614f02565b915050611d08565b600a546001600160a01b03163314611d8d5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b600090815260096020526040812055565b50565b6019602090815260009283526040808420909152908252902080548190611dc790614e52565b80601f0160208091040260200160405190810160405280929190818152602001828054611df390614e52565b8015611e405780601f10611e1557610100808354040283529160200191611e40565b820191906000526020600020905b815481529060010190602001808311611e2357829003601f168201915b5050506001808501546002860154600387015460049097015495969190920b94919350915060ff1685565b606060038054610fe590614e52565b6060818310611e9c57604051631960ccad60e11b815260040160405180910390fd5b60008054601154851015611eb05760115494505b80841115611ebc578093505b6000611ec787611645565b905084861015611ee65785850381811015611ee0578091505b50611eea565b5060005b60008167ffffffffffffffff811115611f0557611f05614788565b604051908082528060200260200182016040528015611f2e578160200160208202803683370190505b50905081611f415793506115af92505050565b6000611f4c88612626565b905060008160400151611f5d575080515b885b888114158015611f6f5750848714155b1561203157600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529350611fd457612029565b82516001600160a01b031615611fe957825191505b8a6001600160a01b0316826001600160a01b03161415612029578084888060010199508151811061201c5761201c614eec565b6020026020010181815250505b600101611f5f565b505050928352509095945050505050565b6001600160a01b03821633141561206c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006120e2613d56565b905090565b6120ef613545565b6001600160a01b0381166121585760405162461bcd60e51b815260206004820152602a60248201527f41706574696d69736d3a206e6577206164647265737320697320746865207a65604482015269726f206164647265737360b01b6064820152608401610f42565b611d9e816139f1565b600a546001600160a01b031633146121a95760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6113a46000600855565b601c5460609060008167ffffffffffffffff8111156121d4576121d4614788565b6040519080825280602002602001820160405280156121fd578160200160208202803683370190505b50905060005b8281101561227457601c818154811061221e5761221e614eec565b90600052602060002090602091828204019190069054906101000a900460ff1682828151811061225057612250614eec565b60ff909216602092830291909101909101528061226c81614f02565b915050612203565b5092915050565b60006122856120d8565b600f546120e29190614f95565b60008061229f8484612eda565b601754909150600160b01b900461ffff168111156115af575050601754600160b01b900461ffff16610eeb565b601c81815481106122dc57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b600a546001600160a01b031633146123485760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60175461010090046001600160a01b03166123a55760405162461bcd60e51b815260206004820152601a60248201527f5465616d2077616c6c6574206973206e6f7420796574207365740000000000006044820152606401610f42565b60135460ff16156123f85760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610f42565b6000612402613d6a565b90508051600014156124565760405162461bcd60e51b815260206004820152601660248201527f62617365555249206973206e6f742079657420736574000000000000000000006044820152606401610f42565b6010541561247c5760175460105461247c9161010090046001600160a01b031690613d79565b506013805460ff19166001179055565b600a546001600160a01b031633146124d45760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b61250184848461375e565b6001600160a01b0383163b1561253a5761251d84848484613d93565b61253a576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60ff81166000908152601b60205260408120546060918167ffffffffffffffff81111561256f5761256f614788565b604051908082528060200260200182016040528015612598578160200160208202803683370190505b50905060005b8281101561159a5760ff85166000908152601b602052604090208054829081106125ca576125ca614eec565b90600052602060002090601091828204019190066002029054906101000a900460010b8282815181106125ff576125ff614eec565b602002602001019060010b908160010b81525050808061261e90614f02565b91505061259e565b6040805160608101825260008082526020820181905291810191909152604080516060810182526000808252602082018190529181019190915260115483108061267257506000548310155b1561267d5792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906126de5792915050565b6115af83613b51565b60606126f2826136c2565b6127645760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610f42565b600061276e613d6a565b905080516000141561278f57604051806020016040528060008152506115af565b8061279984613e8b565b6040516020016127aa929190614fac565b6040516020818303038152906040529392505050565b600a54600160a01b900460ff161561280d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f42565b6002600b5414156128605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f42565b6002600b5560175460ff166128b75760405162461bcd60e51b815260206004820152601760248201527f4d696e74206973206e6f742079657420737461727465640000000000000000006044820152606401610f42565b836000600187900b126128d9576128d661ffff8716601087901b614feb565b90505b60008181526016602052604090205460ff16156129385760405162461bcd60e51b815260206004820152601060248201527f4475706c696361746564206e6f6e6365000000000000000000000000000000006044820152606401610f42565b60135461010090046001600160a01b031661295582868686613fa1565b6001600160a01b0316146129ab5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610f42565b60175460ff908116600090815260196020908152604080832083805290915281206004015490911690600188900b81136129e25750865b60175460ff9081166000908152601960209081526040808320600186900b845290915290206004015416612a745781612a705760405162461bcd60e51b815260206004820152602a60248201527f596f7520617265206e6f7420656c696769626c6520746f206d696e7420696e206044820152691d1a1a5cc81c9bdd5b9960b21b6064820152608401610f42565b5060005b60135460ff16612ad85760405162461bcd60e51b815260206004820152602960248201527f436f6e7472616374206973206e6f7420726561647920666f72207075626c6963604482015268081b5a5b9d081e595d60ba1b6064820152608401610f42565b60008911612b285760405162461bcd60e51b815260206004820152601760248201527f5175616e746974792063616e6e6f74206265207a65726f0000000000000000006044820152606401610f42565b600f5489612b346120d8565b612b3e9190614feb565b1115612b985760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f74206d696e74206d6f7265207468616e206d6178696d756d20737560448201526370706c7960e01b6064820152608401610f42565b60008860010b12612c015788612bae338a612292565b1015612bfc5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610f42565b612c59565b88612c0b336131f8565b1015612c595760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610f42565b88612c6261227b565b1015612cb05760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e4654206c65667420746f206d696e742e000000006044820152606401610f42565b60175460ff166000908152601960209081526040808320600185900b8452909152812060030154612ce1908b614ea3565b6000858152601660205260409020805460ff191660011790559050348114612d4b5760405162461bcd60e51b815260206004820152601760248201527f556e6d6174636865642065746865722062616c616e63650000000000000000006044820152606401610f42565b612d55338b613d79565b60175460ff166000908152601e6020526040902054612d75908b90614feb565b60175460ff166000908152601e6020908152604080832093909355338252601490522054612da4908b90614feb565b336000908152601460209081526040808320939093556015815282822060175460ff16835290522054612dd8908b90614feb565b33600090815260156020908152604080832060175460ff168452909152812091909155612710612e07600d5490565b612e119034614ea3565b612e1b9190614ed8565b90506000612e298234614f95565b9050612e3d600c546001600160a01b031690565b6001600160a01b03166108fc839081150290604051600060405180830381858888f19350505050158015612e75573d6000803e3d6000fd5b5081600e54612e849190614feb565b600e5550506001600b5550505050505050505050565b60005b818110156119bb57612ec88585858585818110612ebc57612ebc614eec565b905060200201356113a6565b80612ed281614f02565b915050612e9d565b6001600160a01b038216600090815260146020526040812054601754829060ff16612f0a57600092505050610eeb565b60175460ff166000908152601d6020908152604080832054601e9092529091205410612f3b57600092505050610eeb565b60175460ff908116600090815260196020908152604080832083805280835281842060049081015460018b900b86529190935292200154908216911615612faa5760175460ff166000908152601960209081526040808320600189900b84529091529020600201549150612fd6565b8015612fd65760175460ff16600090815260196020908152604080832083805290915290206002015491505b601754600160c01b900461ffff168310612ff65760009350505050610eeb565b6001600160a01b038616600090815260156020908152604080832060175460ff16845290915290205482116130315760009350505050610eeb565b60175460009061304d908590600160c01b900461ffff16614f95565b6001600160a01b038816600090815260156020908152604080832060175460ff168452909152812054919250906130849085614f95565b60175460ff166000908152601e6020908152604080832054601d90925282205492935090916130b39190614f95565b90506130d86130c061227b565b6130d36130cd868661408c565b8461408c565b61408c565b9998505050505050505050565b600a546001600160a01b0316331461312d5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6017805460ff60a81b1916600160a81b179055565b600a546001600160a01b0316331461318a5760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b6001600160a01b0381166131ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f42565b611d9e81613c7c565b600080613204836115a2565b601754909150600160b01b900461ffff16811115610eeb575050601754600160b01b900461ffff16919050565b600a546001600160a01b031633146132795760405162461bcd60e51b815260206004820181905260248201526000805160206150a58339815191526044820152606401610f42565b60ff8083166000908152601960209081526040808320600186900b8452909152902060040154166132ec5760405162461bcd60e51b815260206004820152601060248201527f526f6c65206e6f742065786973746564000000000000000000000000000000006044820152606401610f42565b604080516020808201808452600080845260ff8716815260198352848120600187900b8252909252929020905161332392906144be565b5060ff82166000818152601960209081526040808320600186810b8552908352818420908101805461ffff191690556002810184905560038101849055600401805460ff19169055928252601a9052908120805461ffff169161338583615003565b91906101000a81548161ffff021916908361ffff1602179055505060005b60ff8084166000908152601b602052604090205490821610156134485760ff8084166000908152601b602052604090208054600185900b9284169081106133ec576133ec614eec565b60009182526020909120601082040154600f9091166002026101000a900460010b14156134365760ff8084166000908152601b602052604090206134319183166140a2565b613448565b8061344081614f3f565b9150506133a3565b5060ff82166000908152601a602052604090205461ffff16610f555760005b601c5460ff8216101561112e578260ff16601c8260ff168154811061348e5761348e614eec565b60009182526020918290209181049091015460ff601f9092166101000a90041614156134c25761112e601c8260ff166141d6565b806134cc81614f3f565b915050613467565b60006001600160e01b0319821663152a902d60e11b1480610eeb5750610eeb825b60006001600160e01b031982166380ac58cd60e01b148061352657506001600160e01b03198216635b5e139f60e01b145b80610eeb57506301ffc9a760e01b6001600160e01b0319831614610eeb565b600c546001600160a01b031633146113a45760405162461bcd60e51b815260206004820152602e60248201527f41706574696d69736d3a2063616c6c6572206973206e6f74207468652061706560448201527f74696d69736d20616464726573730000000000000000000000000000000000006064820152608401610f42565b6127106001600160601b03821611156136335760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f42565b6001600160a01b0382166136895760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f42565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6000816136ce60115490565b111580156136dd575060005482105b8015610eeb575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061376982613b51565b9050836001600160a01b031681600001516001600160a01b0316146137a05760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806137be57506137be8533610e13565b806137d95750336137ce84611068565b6001600160a01b0316145b9050806137f957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661382057604051633a954ecd60e21b815260040160405180910390fd5b61382c60008487613702565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613902576000548214613902578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119bb565b600a54600160a01b900460ff166139a45760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f42565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b6127106001600160601b0382161115613ab15760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f42565b6001600160a01b038216613b075760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f42565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b60408051606081018252600080825260208201819052918101919091528180613b7960115490565b11613c6357600054811015613c6357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290613c615780516001600160a01b031615613bf7579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215613c5c579392505050565b613bf7565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff1615613d1b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f42565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139d43390565b6000613d6160115490565b60005403905090565b606060128054610fe590614e52565b610f558282604051806020016040528060008152506142f9565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613dc8903390899088908890600401615021565b602060405180830381600087803b158015613de257600080fd5b505af1925050508015613e12575060408051601f3d908101601f19168201909252613e0f9181019061505d565b60015b613e6d573d808015613e40576040519150601f19603f3d011682016040523d82523d6000602084013e613e45565b606091505b508051613e65576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081613eaf5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613ed95780613ec381614f02565b9150613ed29050600a83614ed8565b9150613eb3565b60008167ffffffffffffffff811115613ef457613ef4614788565b6040519080825280601f01601f191660200182016040528015613f1e576020820181803683370190505b5090505b8415613e8357613f33600183614f95565b9150613f40600a8661507a565b613f4b906030614feb565b60f81b818381518110613f6057613f60614eec565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613f9a600a86614ed8565b9450613f22565b60008085604051602001613fb791815260200190565b60405160208183030381529060405280519060200120905060008160405160200161400e91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915060019060a0016020604051602081039080840390855afa158015614076573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b600081831061409b57816115af565b5090919050565b805b82546140b290600190614f95565b81101561414f57826140c5826001614feb565b815481106140d5576140d5614eec565b90600052602060002090601091828204019190066002029054906101000a900460010b83828154811061410a5761410a614eec565b90600052602060002090601091828204019190066002026101000a81548161ffff021916908360010b61ffff160217905550808061414790614f02565b9150506140a4565b508154829061416090600190614f95565b8154811061417057614170614eec565b90600052602060002090601091828204019190066002026101000a81549061ffff0219169055818054806141a6576141a661508e565b600082815260209020601060001990920191820401805461ffff6002600f8516026101000a021916905590555050565b805b82546141e690600190614f95565b81101561427857826141f9826001614feb565b8154811061420957614209614eec565b90600052602060002090602091828204019190069054906101000a900460ff1683828154811061423b5761423b614eec565b90600052602060002090602091828204019190066101000a81548160ff021916908360ff160217905550808061427090614f02565b9150506141d8565b508154829061428990600190614f95565b8154811061429957614299614eec565b90600052602060002090602091828204019190066101000a81549060ff0219169055818054806142cb576142cb61508e565b60019003818190600052602060002090602091828204019190066101000a81549060ff021916905590555050565b6000546001600160a01b03841661432257604051622e076360e81b815260040160405180910390fd5b826143405760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15614469575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46144326000878480600101955087613d93565b61444f576040516368d2bf6b60e11b815260040160405180910390fd5b8082106143e757826000541461446457600080fd5b6144ae565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061446a575b50600090815561253a9085838684565b8280546144ca90614e52565b90600052602060002090601f0160209004810192826144ec5760008555614532565b82601f1061450557805160ff1916838001178555614532565b82800160010185558215614532579182015b82811115614532578251825591602001919060010190614517565b5061453e929150614542565b5090565b5b8082111561453e5760008155600101614543565b6001600160e01b031981168114611d9e57600080fd5b60006020828403121561457f57600080fd5b81356115af81614557565b60006020828403121561459c57600080fd5b5035919050565b80356001600160a01b03811681146145ba57600080fd5b919050565b80356001600160601b03811681146145ba57600080fd5b600080604083850312156145e957600080fd5b6145f2836145a3565b9150614600602084016145bf565b90509250929050565b60006020828403121561461b57600080fd5b6115af826145a3565b60005b8381101561463f578181015183820152602001614627565b8381111561253a5750506000910152565b60008151808452614668816020860160208601614624565b601f01601f19169290920160200192915050565b6020815260006115af6020830184614650565b600080604083850312156146a257600080fd5b6146ab836145a3565b946020939093013593505050565b803560ff811681146145ba57600080fd5b6000602082840312156146dc57600080fd5b6115af826146b9565b6000806000606084860312156146fa57600080fd5b614703846145a3565b9250614711602085016145a3565b9150604084013590509250925092565b6000806040838503121561473457600080fd5b50508035926020909101359150565b60008083601f84011261475557600080fd5b50813567ffffffffffffffff81111561476d57600080fd5b6020830191508360208260051b850101111561128d57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156147c7576147c7614788565b604052919050565b600082601f8301126147e057600080fd5b813567ffffffffffffffff8111156147fa576147fa614788565b61480d601f8201601f191660200161479e565b81815284602083860101111561482257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060006080868803121561485757600080fd5b614860866145a3565b945061486e602087016145a3565b9350604086013567ffffffffffffffff8082111561488b57600080fd5b61489789838a01614743565b909550935060608801359150808211156148b057600080fd5b506148bd888289016147cf565b9150509295509295909350565b8035600181900b81146145ba57600080fd5b6000602082840312156148ee57600080fd5b6115af826148ca565b60006020828403121561490957600080fd5b813567ffffffffffffffff81111561492057600080fd5b613e83848285016147cf565b60008060006060848603121561494157600080fd5b83359250614951602085016145a3565b915061495f604085016145bf565b90509250925092565b6000602080838503121561497b57600080fd5b823567ffffffffffffffff8082111561499357600080fd5b818501915085601f8301126149a757600080fd5b8135818111156149b9576149b9614788565b8060051b91506149ca84830161479e565b81815291830184019184810190888411156149e457600080fd5b938501935b83851015614a02578435825293850193908501906149e9565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057614a6683855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101614a2a565b60008060408385031215614a8c57600080fd5b6146ab836146b9565b600060208284031215614aa757600080fd5b813561ffff811681146115af57600080fd5b600080600080600060a08688031215614ad157600080fd5b614ada866146b9565b9450614ae8602087016148ca565b9350604086013567ffffffffffffffff811115614b0457600080fd5b614b10888289016147cf565b9598949750949560608101359550608001359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057835183529284019291840191600101614b45565b60008060008060608587031215614b7757600080fd5b614b80856145a3565b9350614b8e602086016145a3565b9250604085013567ffffffffffffffff811115614baa57600080fd5b614bb687828801614743565b95989497509550505050565b60008060408385031215614bd557600080fd5b614bde836146b9565b9150614600602084016148ca565b60a081526000614bff60a0830188614650565b90508560010b602083015284604083015283606083015282151560808301529695505050505050565b600080600060608486031215614c3d57600080fd5b614c46846145a3565b95602085013595506040909401359392505050565b8015158114611d9e57600080fd5b60008060408385031215614c7c57600080fd5b614c85836145a3565b91506020830135614c9581614c5b565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611bb057835160ff1683529284019291840191600101614cbc565b60008060408385031215614cee57600080fd5b614bde836145a3565b60008060008060808587031215614d0d57600080fd5b614d16856145a3565b9350614d24602086016145a3565b925060408501359150606085013567ffffffffffffffff811115614d4757600080fd5b614d53878288016147cf565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015611bb0578351600190810b8452938501939285019201614d7b565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610eeb565b60008060008060008060c08789031215614de957600080fd5b86359550614df9602088016148ca565b945060408701359350614e0e606088016146b9565b92506080870135915060a087013590509295509295509295565b60008060408385031215614e3b57600080fd5b614e44836145a3565b9150614600602084016145a3565b600181811c90821680614e6657607f821691505b60208210811415614e8757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614ebd57614ebd614e8d565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614ee757614ee7614ec2565b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614f1657614f16614e8d565b5060010190565b600061ffff80831681811415614f3557614f35614e8d565b6001019392505050565b600060ff821660ff811415614f5657614f56614e8d565b60010192915050565b600060208284031215614f7157600080fd5b5051919050565b600060208284031215614f8a57600080fd5b81516115af81614c5b565b600082821015614fa757614fa7614e8d565b500390565b60008351614fbe818460208801614624565b835190830190614fd2818360208801614624565b64173539b7b760d91b9101908152600501949350505050565b60008219821115614ffe57614ffe614e8d565b500190565b600061ffff82168061501757615017614e8d565b6000190192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526150536080830184614650565b9695505050505050565b60006020828403121561506f57600080fd5b81516115af81614557565b60008261508957615089614ec2565b500690565b634e487b7160e01b600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f7d17c0b4ccfe4c02de225932adeeb4a4747156c917bb010f33c979a5d83be9664736f6c63430008090033

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

000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f

-----Decoded View---------------
Arg [0] : apetimismAddress (address): 0xE3636c01412c8309A78B89bDB80cac75BC0Ee07F

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f


[ 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.