ETH Price: $3,253.25 (+4.43%)
Gas: 2 Gwei

Token

Merge Bears (MRGBEARS)
 

Overview

Max Total Supply

1,268 MRGBEARS

Holders

380

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 MRGBEARS
0x7245f40e9d4193be5c15510f6f7677735a9a2b63
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
MergeBears

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : MergeBears.sol
// MergeBears
// Shuffle Labs
// 2022.09.13

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

// External
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

// For easy linking in constructor
import "./lib_env/Mainnet.sol";

// Internal Extensions
import "./extensions/Owner.sol";

// Utilities & Constants
import "./lib_constants/TraitDefs.sol";
import "./lib_utilities/Gene.sol";

// errors
error ExceedsMaxMintQuantity();
error ExceedsMaxSupply();
error EthValueTooLow();
error TeamMintingDisabled();
error InvalidEthereumValue();
error OriginNotSender();
error QuantityExceedsMaxSupply();
error QuantityExceedsMaxPerMint();
error InvalidMerkleProof();
error MintingInProgress();
error MaximumMintedPerWallet();
error ProofModeNotPOS();
error MintModeInactive();
error MintModeBWLSingleOnly();
error MintModeBWLOnly();
error MintModeSaleComplete();
error PurgeModeInactive();
error PurgeModeComplete();
error PurgeModeNotComplete();
error InvalidQuantity();
error NotAPanda();
error UnableToSendValue();
error NotBlackAndWhite();

library GeneOptionsSpecies {
  uint16 constant BLACK = 1;
  uint16 constant POLAR = 2;
  uint16 constant PANDA = 3;
  uint16 constant REVERSE_PANDA = 4;
  uint16 constant GOLD_PANDA = 5;
}

library ProofMode {
  uint8 public constant POW = 0;
  uint8 public constant POS = 1;
}

library MintMode {
  uint8 public constant INACTIVE = 0;
  uint8 public constant SINGLE_BW_LIST = 1;
  uint8 public constant UNLTD_BW_LIST = 2;
  uint8 public constant PUBLIC_SALE = 3;
  uint8 public constant COMPLETE = 4;
}

library PurgeMode {
  uint8 public constant INACTIVE = 0;
  uint8 public constant BW_LIST_FULL = 1;
  uint8 public constant BW_PARTIAL = 2;
  uint8 public constant COMPLETE = 3;
}

library PurgeRebate {
  uint8 public constant BW_LIST_PERCENTAGE = 100;
  uint8 public constant PUBLIC_PERCENTAGE = 75;
}

library Settings {
  uint256 public constant MAX_SUPPLY = 5875;
  uint256 public constant MAX_PRICE = 0.05875 ether;
  uint256 public constant STARTING_PRICE = 0.005875 ether;
  uint256 public constant INCREMENT_PRICE = 0.0005875 ether;
  uint256 public constant BEGIN_INCREMENTS_AT = 875;
  uint256 public constant INCREMENT_STEP = 50;
  uint256 public constant MAX_TEAM_MINT = 250;
  uint256 public constant MAX_MINT_QUANTITY = 5;
}

interface IMetadataUtility {
  function getMetadataFromDNA(uint256 dna, uint256 tokenId)
    external
    view
    returns (string memory);
}

interface IContractURIUtility {
  function getContractURI() external view returns (string memory);
}

contract MergeBears is ERC721A, Owner {
  using Strings for uint256;

  // !!! IMPORTANT STATE MODES !!!
  uint8 public proofMode = ProofMode.POW;
  uint8 public mintMode = MintMode.INACTIVE;
  uint8 public purgeMode = PurgeMode.INACTIVE;

  // !!! IMPORTANT STATE VARIABLES !!!
  uint256 public numMintedByTeam = 0;
  // Mark the last token id that was minted as white/black bear
  uint256 public lastPOWTokenId = Settings.MAX_SUPPLY;

  // Pseudo Randomness
  uint256 public randomNumber =
    112251241738492409971660691241763937113569996400635104450295902338183133602781; // default random

  // DNA container
  mapping(uint256 => uint256) public tokenIdToDNA;
  mapping(uint256 => uint32) public forebears;

  // Metadata Resolver Contract
  address metadataUtility;
  address contractUtility;

  // Merkle / BW List
  bytes32 public merkleRoot;

  constructor() ERC721A("Merge Bears", "MRGBEARS") {
    _owner = msg.sender;

    metadataUtility = Mainnet.Metadata;
  }

  // OWNER ONLY METHODS
  function setMetadataUtility(address metadataContract) external onlyOwner {
    metadataUtility = metadataContract;
  }

  function setContractURI(address contractURIUtility_) external onlyOwner {
    contractUtility = contractURIUtility_;
  }

  function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
    merkleRoot = _merkleRoot;
  }

  function setProofMode(uint8 mode) external onlyOwner {
    if (mode == ProofMode.POW) {
      proofMode = ProofMode.POW;
    } else if (mode == ProofMode.POS) {
      // DISABLE ALL MINTING
      mintMode = MintMode.COMPLETE;
      lastPOWTokenId = totalSupply();
      proofMode = ProofMode.POS;
    }
  }

  function setMintMode(uint8 mode) external onlyOwner {
    if (mode == MintMode.INACTIVE) {
      mintMode = MintMode.INACTIVE;
    } else if (mode == MintMode.SINGLE_BW_LIST) {
      mintMode = MintMode.SINGLE_BW_LIST;
    } else if (mode == MintMode.UNLTD_BW_LIST) {
      mintMode = MintMode.UNLTD_BW_LIST;
    } else if (mode == MintMode.PUBLIC_SALE) {
      mintMode = MintMode.PUBLIC_SALE;
    } else if (mode == MintMode.COMPLETE) {
      mintMode = MintMode.COMPLETE;
    }
  }

  function setPurgeMode(uint8 mode) external onlyOwner {
    if (mode == PurgeMode.INACTIVE) {
      purgeMode = PurgeMode.INACTIVE;
    } else if (mode == PurgeMode.BW_LIST_FULL) {
      purgeMode = PurgeMode.BW_LIST_FULL;
    } else if (mode == PurgeMode.BW_PARTIAL) {
      purgeMode = PurgeMode.BW_PARTIAL;
    } else if (mode == PurgeMode.COMPLETE) {
      purgeMode = PurgeMode.COMPLETE;
    }
  }

  // Price Check Aisle 3!
  function getPriceById(uint256 id) public view returns (uint256) {
    // free mints
    if (id <= numMintedByTeam) {
      return 0;
    }

    // mints after move to POS are not redeemable
    if (id > lastPOWTokenId) {
      return 0;
    }

    // first BEGIN_INCREMENTS_AT are STARTING_PRICe
    if (id < Settings.BEGIN_INCREMENTS_AT) {
      return Settings.STARTING_PRICE;
    }

    uint256 beginIncrementsDifference = id - Settings.BEGIN_INCREMENTS_AT;

    uint256 calculatedPrice = Settings.STARTING_PRICE +
      Settings.INCREMENT_PRICE *
      (beginIncrementsDifference / Settings.INCREMENT_STEP);

    if (calculatedPrice > Settings.MAX_PRICE) {
      return Settings.MAX_PRICE;
    }

    return calculatedPrice;
  }

  // PUBLIC MINT METHODS
  function whitelistMint(uint64 quantity, bytes32[] calldata merkleProof)
    external
    payable
  {
    // VALIDATE SALE HAS STARTED
    if (mintMode == MintMode.INACTIVE) {
      revert MintModeInactive();
    }
    if (mintMode == MintMode.COMPLETE) {
      revert MintModeSaleComplete();
    }
    if (mintMode == MintMode.SINGLE_BW_LIST && quantity > 1) {
      revert MintModeBWLSingleOnly();
    }
    if (mintMode == MintMode.SINGLE_BW_LIST && _numberMinted(msg.sender) > 0) {
      revert MintModeBWLSingleOnly();
    }
    if (quantity > Settings.MAX_MINT_QUANTITY) {
      revert QuantityExceedsMaxPerMint(); // 5
    }

    if (
      !MerkleProof.verify(
        merkleProof,
        merkleRoot,
        keccak256(abi.encodePacked(msg.sender))
      )
    ) {
      revert InvalidMerkleProof();
    }

    // check price of max token given quantity
    uint256 highestId = _nextTokenId() + (quantity - 1);
    uint256 price = getPriceById(highestId);

    if (msg.value < price * quantity) {
      revert EthValueTooLow();
    }

    internalMint(quantity);
  }

  function mint(uint256 quantity) external payable {
    if (mintMode != MintMode.PUBLIC_SALE) {
      revert MintModeInactive();
    }

    if (quantity > Settings.MAX_MINT_QUANTITY) {
      revert QuantityExceedsMaxPerMint(); // 5
    }

    // check price of max token given quantity
    uint256 highestId = _nextTokenId() + (quantity - 1);
    uint256 price = getPriceById(highestId);

    if (msg.value < price * quantity) {
      revert EthValueTooLow();
    }

    internalMint(quantity);
  }

  function teamMint(uint256 quantity) external onlyOwner {
    if (quantity + numMintedByTeam > Settings.MAX_TEAM_MINT) {
      revert TeamMintingDisabled();
    }
    // team can only mint initially
    if (mintMode != MintMode.INACTIVE) {
      revert TeamMintingDisabled();
    }

    numMintedByTeam += quantity;

    internalMint(quantity);
  }

  function rollForDNA(uint256 offset) internal view returns (uint256) {
    return
      uint256(
        keccak256(
          abi.encode(
            msg.sender,
            randomNumber,
            _nextTokenId(),
            offset,
            block.number,
            block.timestamp
          )
        )
      );
  }

  function rollForBlackOrPolar(uint256 offset) internal view returns (uint16) {
    // flip a coin for black or polar, return the correct gene
    uint256 roll = uint256(
      keccak256(
        abi.encode(
          randomNumber,
          totalSupply(),
          offset,
          block.number,
          msg.sender,
          block.timestamp
        )
      )
    );

    if (roll % 2 == 0) {
      return GeneOptionsSpecies.BLACK;
    }

    return GeneOptionsSpecies.POLAR;
  }

  function rollForPandaSpecies() internal view returns (uint16) {
    // run the odds for gold, reverse, or regular panda
    uint256 roll = uint256(
      keccak256(
        abi.encode(
          randomNumber,
          totalSupply(),
          block.number,
          msg.sender,
          block.timestamp
        )
      )
    );

    if (roll % 111 == 0) {
      return GeneOptionsSpecies.GOLD_PANDA;
    } else if (roll % 111 < 11) {
      return GeneOptionsSpecies.REVERSE_PANDA;
    }

    return GeneOptionsSpecies.PANDA;
  }

  function internalMint(uint256 quantity) internal {
    if (quantity == 0) {
      revert InvalidQuantity();
    }
    if (tx.origin != msg.sender) {
      revert OriginNotSender();
    }
    if (_totalMinted() + quantity > Settings.MAX_SUPPLY) {
      revert QuantityExceedsMaxSupply();
    }

    // set DNA for each mint
    for (uint i = 0; i < quantity; i++) {
      uint256 dna = rollForDNA(i);
      uint16 species = rollForBlackOrPolar(i);
      uint256 normalizedDNA = Gene.setSpecies(species, dna);

      tokenIdToDNA[_nextTokenId() + i] = normalizedDNA;
    }

    _mint(msg.sender, quantity);
  }

  function merge(uint256 blackForebear, uint256 polarForebear) external {
    if (tx.origin != msg.sender) {
      revert OriginNotSender();
    }

    if (_totalMinted() + 1 > Settings.MAX_SUPPLY) {
      revert QuantityExceedsMaxSupply();
    }

    if (proofMode != ProofMode.POS) {
      revert ProofModeNotPOS();
    }

    if (mintMode != MintMode.COMPLETE) {
      revert MintingInProgress();
    }

    uint256 blackForebearDNA = tokenIdToDNA[blackForebear];
    uint256 polarForebearDNA = tokenIdToDNA[polarForebear];

    if (
      Gene.getSpeciesGene(blackForebearDNA) != GeneOptionsSpecies.BLACK ||
      Gene.getSpeciesGene(polarForebearDNA) != GeneOptionsSpecies.POLAR
    ) {
      revert NotBlackAndWhite();
    }

    // burn forebearA
    _burn(blackForebear, true);
    // burn forebearB
    _burn(polarForebear, true);

    forebears[_nextTokenId()] = getCompressedForebearIds(
      blackForebear,
      polarForebear
    );

    // _mint a panda
    // set DNA for panda
    uint256 dna = rollForDNA(5785);
    uint16 species = rollForPandaSpecies();
    uint256 normalizedDNA = Gene.setSpecies(species, dna);

    tokenIdToDNA[_nextTokenId()] = normalizedDNA;
    _mint(msg.sender, 1);
  }

  function purge(
    uint256 tokenId,
    bool isBWListMember,
    bytes32[] calldata merkleProof
  ) external {
    uint256 redemptionValue = 0;

    if (tx.origin != msg.sender) {
      revert OriginNotSender();
    }

    if (proofMode != ProofMode.POS) {
      revert ProofModeNotPOS();
    }

    if (purgeMode == PurgeMode.INACTIVE) {
      revert PurgeModeInactive();
    }

    if (purgeMode == PurgeMode.COMPLETE) {
      revert PurgeModeComplete();
    }

    if (forebears[tokenId] == 0) {
      revert NotAPanda(); // no forebears
    }

    (uint256 forebearAId, uint256 forebearBId) = getForebearTokenIds(
      forebears[tokenId]
    );

    // get redemption value
    uint256 valueOfA = getPriceById(forebearAId);
    uint256 valueOfB = getPriceById(forebearBId);
    redemptionValue = valueOfA + valueOfB;

    // redeem 100% if caller is BW_List user
    if (purgeMode == PurgeMode.BW_LIST_FULL && isBWListMember) {
      if (
        !MerkleProof.verify(
          merkleProof,
          merkleRoot,
          keccak256(abi.encodePacked(msg.sender))
        )
      ) {
        revert InvalidMerkleProof();
      }
    } else {
      redemptionValue = (redemptionValue * PurgeRebate.PUBLIC_PERCENTAGE) / 100;
    }

    // burn the panda, make sure its the owner
    _burn(tokenId, true);

    forebears[tokenId] = 0;

    // then send ETH to user
    (bool success, ) = msg.sender.call{value: redemptionValue}("");
    if (!success) {
      revert UnableToSendValue();
    }
  }

  function contractURI() public view returns (string memory) {
    return IContractURIUtility(contractUtility).getContractURI();
  }

  function tokenURI(uint256 tokenId)
    public
    view
    override
    returns (string memory)
  {
    uint256 dna = tokenIdToDNA[tokenId];
    require(dna != 0, "Not found");

    return IMetadataUtility(metadataUtility).getMetadataFromDNA(dna, tokenId);
  }

  function getCompressedForebearIds(uint256 forebearA, uint256 forebearB)
    internal
    pure
    returns (uint32)
  {
    uint32 compressed = 0;
    compressed = compressed | uint32(forebearA);
    compressed = (uint32(forebearB) << 16) | compressed;
    return compressed;
  }

  function getForebearTokenIds(uint32 forebears_)
    internal
    pure
    returns (uint256, uint256)
  {
    uint256 forebearA = uint256((forebears_ << 16) >> 16); // first 16 bits
    uint256 forebearB = uint256(forebears_ >> 16); // second 16 bits

    return (forebearA, forebearB);
  }

  function getForebearsForTokenId(uint256 tokenId)
    external
    view
    returns (uint256, uint256)
  {
    return getForebearTokenIds(forebears[tokenId]);
  }

  // OVERRIDES
  function _startTokenId() internal view virtual override returns (uint256) {
    return 1;
  }

  // WITHDRAW ONLY OWNER
  function withdraw() external onlyOwner {
    if (purgeMode != PurgeMode.COMPLETE) {
      revert PurgeModeNotComplete();
    }

    (bool success, ) = address(msg.sender).call{value: address(this).balance}(
      ""
    );

    if (!success) {
      revert UnableToSendValue();
    }
  }
}

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

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

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

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

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

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

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

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

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

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

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

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

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

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

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

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

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

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

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80.
            str := add(mload(0x40), 0x80)
            // Update the free memory pointer to allocate.
            mstore(0x40, str)

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

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

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

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

File 4 of 10 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 6 of 10 : Mainnet.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

library Mainnet {
  address constant ACCESSORIES = 0x72b7596E59CfB97661D68024b3c5C587fBc3F0D3;
  address constant ARMS = 0x7e10747a91E45F0fD0C97b763BCcB61030806a69;
  address constant BELLY = 0xf398b7504F01c198942D278EAB8715f0A03D55cb;
  address constant CLOTHINGA = 0x324E15FbDaC47DaF13EaB1fD06C4467D4C7008f9;
  address constant CLOTHINGB = 0x927858Ed8FF2F3E9a09CE9Ca5E9B13523e574fa2;
  address constant EYES = 0x12b538733eFc80BD5D25769AF34B2dA63911BEf8;
  address constant FACE = 0xa8cA38F3BBE56001bE7E3F9768C6e4A0fC2D79cF;
  address constant FEET = 0xE6d17Ff2D51c02f49005B5046f499715aE7E6FF3;
  address constant FOOTWEAR = 0x4384ccFf9bf4e1448976310045144e3B7d17e851;
  address constant HAT = 0xB1A63A1a745E49417BB6E3B226C47af7319664cB;
  address constant HEAD = 0x76Bcf1b35632f59693f8E7D348FcC293aE90f888;
  address constant JEWELRY = 0x151E97911b357fF8EF690107Afbcf6ecBd52D982;
  address constant MOUTH = 0x16Ba2C192391A400b6B6Ee5E46901C737d83Df9D;
  address constant NOSE = 0x6f3cdF8dc2D1915aaAE804325d2c550b959E6B47;
  address constant SPECIAL_CLOTHING =
    0x228dc46360537d24139Ee81AFb9235FA2C0CdA07;
  address constant SPECIAL_FACE = 0x7713D096937d98CDA86Fc80EF10dcAb77367068c;

  // Trait Option Labels
  address constant TraitOptionLabelsAccessories =
    0x7db2Ae5Da12b6891ED08944690B3f4468F68AA71;
  address constant TraitOptionLabelsBackground =
    0x1Dea31e5497f80dE9F4802508D98288ffF834cd9;
  address constant TraitOptionLabelsBelly =
    0xDa97bDb87956fE1D370ab279eF5327c7751D0Bd4;
  address constant TraitOptionLabelsClothing =
    0x42C328934037521E1E08ee3c3E0142aB7E9e8534;
  address constant TraitOptionLabelsEyes =
    0x4acDa10ff43430Ae90eF328555927e9FcFd4904A;
  address constant TraitOptionLabelsFaceAccessory =
    0xfAD91b20182Ad3907074E0043c1212EaE1F7dfaE;
  address constant TraitOptionLabelsFootwear =
    0x435B753316d4bfeF7BB755c3f4fAC202aACaA209;
  address constant TraitOptionLabelsHat =
    0x220d2C51332aafd76261E984e4DA1a43C361A62f;
  address constant TraitOptionLabelsJewelry =
    0x8f69858BD253AcedFFd99479C05Aa37305919ec1;
  address constant TraitOptionLabelsLocale =
    0x13c0B8289bEb260145e981c3201CC2A046F1b83D;
  address constant TraitOptionLabelsMouth =
    0xcb03ebEabc285616CF4aEa7de1333D53f0789141;
  address constant TraitOptionLabelsNose =
    0x03774BA2E684D0872dA02a7da98AfcbebF9E61b2;
  address constant TraitOptionLabelsSpecies =
    0x9FAe2ceBDbfDA7EAeEC3647c16FAE2a4e715e5CA;

  address constant OptionSpecies = 0x5438ae4D244C4a8eAc6Cf9e64D211c19B5835a91;
  address constant OptionAccessories =
    0x1097750D85A2132CAf2DE3be2B97fE56C7DB0bCA;
  address constant OptionClothing = 0xF0B8294279a35bE459cfc257776521A5E46Da0d1;
  address constant OptionLocale = 0xa0F6DdB7B3F114F18073867aE4B740D0AF786721;
  address constant OptionHat = 0xf7C17dB875d8C4ccE301E2c6AF07ab7621204223;
  address constant OptionFaceAccessory =
    0x07E0b24A4070bC0e8198154e430dC9B2FB9B4721;
  address constant OptionFootwear = 0x31b2E83d6fb1d7b9d5C4cdb5ec295167d3525eFF;
  address constant OptionJewelry = 0x9ba79b1fa5A19d31E6cCeEA7De6712992080644B;

  address constant OptionBackground =
    0xC3c5a361d09C54C59340a8aB069b0796C962D2AE;
  address constant OptionBelly = 0xEDf3bAdbb0371bb95dedF567E1a947a0841C5Cc5;
  address constant OptionEyes = 0x4aBeBaBb4F4Fb7A9440E05cBebc55E5Cd160A3aA;
  address constant OptionMouth = 0x9801A9da73fBe2D889c4847BCE25C751Ce334332;
  address constant OptionNose = 0x22116E7ff81752f7b61b4c1d3E0966033939b50f;

  // Utility Contracts
  address constant TraitsUtility = 0xc81Ee07619c8ff65f0E19A214e43b1fd55051FE2;
  address constant Animation = 0x30490f71D70da2C4a96fCCe3C0DBf26eA9B257E3;

  address constant Metadata = 0xA75A58a87BC9Bf862291a2788aeccab8b83E2771;
}

File 7 of 10 : Owner.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

contract Owner {
  address _owner;

  constructor() {
    _owner = msg.sender;
  }

  modifier setOwner(address owner_) {
    require(msg.sender == _owner);
    _owner = _owner;
    _;
  }

  modifier onlyOwner() {
    require(msg.sender == _owner);
    _;
  }
}

File 8 of 10 : TraitDefs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

library TraitDefs {
  uint8 constant SPECIES = 0;
  uint8 constant LOCALE = 1;
  uint8 constant BELLY = 2;
  uint8 constant ARMS = 3;
  uint8 constant EYES = 4;
  uint8 constant MOUTH = 5;
  uint8 constant NOSE = 6;
  uint8 constant CLOTHING = 7;
  uint8 constant HAT = 8;
  uint8 constant JEWELRY = 9;
  uint8 constant FOOTWEAR = 10;
  uint8 constant ACCESSORIES = 11;
  uint8 constant FACE_ACCESSORY = 12;
  uint8 constant BACKGROUND = 13;
}

File 9 of 10 : Gene.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "../lib_constants/TraitDefs.sol";

library Gene {
  function getGene(uint8 traitDef, uint256 dna) internal pure returns (uint16) {
    // type(uint16).max
    // right shift traitDef * 16, then bitwise & with the max 16 bit number
    return uint16((dna >> (traitDef * 16)) & uint256(type(uint16).max));
  }

  function getSpeciesGene(uint256 dna) internal pure returns (uint16) {
    return getGene(TraitDefs.SPECIES, dna);
  }

  // returns what dna would look like with gene passed in
  function setSpecies(uint16 gene, uint256 dna)
    internal
    pure
    returns (uint256)
  {
    uint256 snippedDNA = (dna >> 16) << 16; //zero out the gene

    // then bitwise & with uint256(gene);
    return snippedDNA | uint256(gene);
  }
}

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

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"EthValueTooLow","type":"error"},{"inputs":[],"name":"InvalidMerkleProof","type":"error"},{"inputs":[],"name":"InvalidQuantity","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintModeBWLSingleOnly","type":"error"},{"inputs":[],"name":"MintModeInactive","type":"error"},{"inputs":[],"name":"MintModeSaleComplete","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintingInProgress","type":"error"},{"inputs":[],"name":"NotAPanda","type":"error"},{"inputs":[],"name":"NotBlackAndWhite","type":"error"},{"inputs":[],"name":"OriginNotSender","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ProofModeNotPOS","type":"error"},{"inputs":[],"name":"PurgeModeComplete","type":"error"},{"inputs":[],"name":"PurgeModeInactive","type":"error"},{"inputs":[],"name":"PurgeModeNotComplete","type":"error"},{"inputs":[],"name":"QuantityExceedsMaxPerMint","type":"error"},{"inputs":[],"name":"QuantityExceedsMaxSupply","type":"error"},{"inputs":[],"name":"TeamMintingDisabled","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"},{"inputs":[],"name":"UnableToSendValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"forebears","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getForebearsForTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceById","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPOWTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blackForebear","type":"uint256"},{"internalType":"uint256","name":"polarForebear","type":"uint256"}],"name":"merge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintMode","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numMintedByTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"proofMode","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isBWListMember","type":"bool"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"purge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"purgeMode","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractURIUtility_","type":"address"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"metadataContract","type":"address"}],"name":"setMetadataUtility","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"mode","type":"uint8"}],"name":"setMintMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"mode","type":"uint8"}],"name":"setProofMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"mode","type":"uint8"}],"name":"setPurgeMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToDNA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"quantity","type":"uint64"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600860146101000a81548160ff021916908360ff1602179055506000600860156101000a81548160ff021916908360ff1602179055506000600860166101000a81548160ff021916908360ff16021790555060006009556116f3600a557ff82bf38ac983bd36d54613655b1cd621d4dfb230c259bdc3f416243c126f23dd600b553480156200009457600080fd5b506040518060400160405280600b81526020017f4d657267652042656172730000000000000000000000000000000000000000008152506040518060400160405280600881526020017f4d5247424541525300000000000000000000000000000000000000000000000081525081600290805190602001906200011992919062000231565b5080600390805190602001906200013292919062000231565b50620001436200022860201b60201c565b600081905550505033600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073a75a58a87bc9bf862291a2788aeccab8b83e2771600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000346565b60006001905090565b8280546200023f9062000310565b90600052602060002090601f016020900481019282620002635760008555620002af565b82601f106200027e57805160ff1916838001178555620002af565b82800160010185558215620002af579182015b82811115620002ae57825182559160200191906001019062000291565b5b509050620002be9190620002c2565b5090565b5b80821115620002dd576000816000905550600101620002c3565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200032957607f821691505b6020821081141562000340576200033f620002e1565b5b50919050565b61443780620003566000396000f3fe6080604052600436106102255760003560e01c80637cb6475911610123578063c87b56dd116100ab578063e86cd1da1161006f578063e86cd1da1461080e578063e8a3d48514610839578063e985e9c514610864578063ed6c15a1146108a1578063f9b37823146108ca57610225565b8063c87b56dd14610729578063ccbac9f514610766578063d1c2babb14610791578063dddf7417146107ba578063df2aa67e146107e357610225565b8063a0712d68116100f2578063a0712d6814610655578063a22cb46514610671578063aaa991f21461069a578063b88d4fde146106c3578063b9256b1b146106ec57610225565b80637cb64759146105a857806381e1ced3146105d157806393d0a7ef146105ed57806395d89b411461062a57610225565b80632fbba115116101b15780636b40ed8a116101755780636b40ed8a1461049c5780636e5ed979146104da57806370a082311461051757806372131db314610554578063788c59991461057d57610225565b80632fbba115146103cb5780633ccfd60b146103f457806342842e0e1461040b5780636352211e1461043457806365279efe1461047157610225565b806318160ddd116101f857806318160ddd146102f85780631c501de6146103235780632076510b1461034e57806323b872dd146103775780632eb4a7ab146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063081812fc14610292578063095ea7b3146102cf575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190613493565b6108f3565b60405161025e91906134db565b60405180910390f35b34801561027357600080fd5b5061027c610985565b604051610289919061358f565b60405180910390f35b34801561029e57600080fd5b506102b960048036038101906102b491906135e7565b610a17565b6040516102c69190613655565b60405180910390f35b3480156102db57600080fd5b506102f660048036038101906102f1919061369c565b610a96565b005b34801561030457600080fd5b5061030d610bda565b60405161031a91906136eb565b60405180910390f35b34801561032f57600080fd5b50610338610bf1565b6040516103459190613722565b60405180910390f35b34801561035a57600080fd5b506103756004803603810190610370919061373d565b610c04565b005b34801561038357600080fd5b5061039e6004803603810190610399919061376a565b610ca2565b005b3480156103ac57600080fd5b506103b5610fc7565b6040516103c291906137d6565b60405180910390f35b3480156103d757600080fd5b506103f260048036038101906103ed91906135e7565b610fcd565b005b34801561040057600080fd5b506104096110e3565b005b34801561041757600080fd5b50610432600480360381019061042d919061376a565b611232565b005b34801561044057600080fd5b5061045b600480360381019061045691906135e7565b611252565b6040516104689190613655565b60405180910390f35b34801561047d57600080fd5b50610486611264565b60405161049391906136eb565b60405180910390f35b3480156104a857600080fd5b506104c360048036038101906104be91906135e7565b61126a565b6040516104d19291906137f1565b60405180910390f35b3480156104e657600080fd5b5061050160048036038101906104fc91906135e7565b6112a2565b60405161050e91906136eb565b60405180910390f35b34801561052357600080fd5b5061053e6004803603810190610539919061373d565b6112ba565b60405161054b91906136eb565b60405180910390f35b34801561056057600080fd5b5061057b60048036038101906105769190613846565b611373565b005b34801561058957600080fd5b506105926114c0565b60405161059f9190613722565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca919061389f565b6114d3565b005b6105eb60048036038101906105e69190613971565b611537565b005b3480156105f957600080fd5b50610614600480360381019061060f91906135e7565b611833565b60405161062191906139f0565b60405180910390f35b34801561063657600080fd5b5061063f611856565b60405161064c919061358f565b60405180910390f35b61066f600480360381019061066a91906135e7565b6118e8565b005b34801561067d57600080fd5b5061069860048036038101906106939190613a37565b6119f5565b005b3480156106a657600080fd5b506106c160048036038101906106bc9190613a77565b611b6d565b005b3480156106cf57600080fd5b506106ea60048036038101906106e59190613c1b565b611f64565b005b3480156106f857600080fd5b50610713600480360381019061070e91906135e7565b611fd7565b60405161072091906136eb565b60405180910390f35b34801561073557600080fd5b50610750600480360381019061074b91906135e7565b612089565b60405161075d919061358f565b60405180910390f35b34801561077257600080fd5b5061077b612192565b60405161078891906136eb565b60405180910390f35b34801561079d57600080fd5b506107b860048036038101906107b39190613c9e565b612198565b005b3480156107c657600080fd5b506107e160048036038101906107dc919061373d565b612436565b005b3480156107ef57600080fd5b506107f86124d4565b6040516108059190613722565b60405180910390f35b34801561081a57600080fd5b506108236124e7565b60405161083091906136eb565b60405180910390f35b34801561084557600080fd5b5061084e6124ed565b60405161085b919061358f565b60405180910390f35b34801561087057600080fd5b5061088b60048036038101906108869190613cde565b61258a565b60405161089891906134db565b60405180910390f35b3480156108ad57600080fd5b506108c860048036038101906108c39190613846565b61261e565b005b3480156108d657600080fd5b506108f160048036038101906108ec9190613846565b612702565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061094e57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061097e5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461099490613d4d565b80601f01602080910402602001604051908101604052809291908181526020018280546109c090613d4d565b8015610a0d5780601f106109e257610100808354040283529160200191610a0d565b820191906000526020600020905b8154815290600101906020018083116109f057829003601f168201915b5050505050905090565b6000610a228261281e565b610a58576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610aa182611252565b90508073ffffffffffffffffffffffffffffffffffffffff16610ac261287d565b73ffffffffffffffffffffffffffffffffffffffff1614610b2557610aee81610ae961287d565b61258a565b610b24576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610be4612885565b6001546000540303905090565b600860169054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c5e57600080fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610cad8261288e565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d14576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610d208461295c565b91509150610d368187610d3161287d565b612983565b610d8257610d4b86610d4661287d565b61258a565b610d81576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610de9576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610df686868660016129c7565b8015610e0157600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610ecf85610eab8888876129cd565b7c0200000000000000000000000000000000000000000000000000000000176129f5565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610f57576000600185019050600060046000838152602001908152602001600020541415610f55576000548114610f54578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fbf8686866001612a20565b505050505050565b60105481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461102757600080fd5b60fa600954826110379190613dae565b111561106f576040517fc7b4eeea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff16600860159054906101000a900460ff1660ff16146110be576040517fc7b4eeea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600960008282546110d09190613dae565b925050819055506110e081612a26565b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113d57600080fd5b600360ff16600860169054906101000a900460ff1660ff161461118c576040517f887ddd1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff16476040516111b290613e35565b60006040518083038185875af1925050503d80600081146111ef576040519150601f19603f3d011682016040523d82523d6000602084013e6111f4565b606091505b505090508061122f576040517fd8c8dd5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b61124d83838360405180602001604052806000815250611f64565b505050565b600061125d8261288e565b9050919050565b600a5481565b600080611299600d600085815260200190815260200160002060009054906101000a900463ffffffff16612b95565b91509150915091565b600c6020528060005260406000206000915090505481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611322576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113cd57600080fd5b600060ff168160ff1614156113fd576000600860156101000a81548160ff021916908360ff1602179055506114bd565b600160ff168160ff16141561142d576001600860156101000a81548160ff021916908360ff1602179055506114bc565b600260ff168160ff16141561145d576002600860156101000a81548160ff021916908360ff1602179055506114bb565b600360ff168160ff16141561148d576003600860156101000a81548160ff021916908360ff1602179055506114ba565b600460ff168160ff1614156114b9576004600860156101000a81548160ff021916908360ff1602179055505b5b5b5b5b50565b600860159054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461152d57600080fd5b8060108190555050565b600060ff16600860159054906101000a900460ff1660ff161415611587576040517f1cbbad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460ff16600860159054906101000a900460ff1660ff1614156115d7576040517f26633f6d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860159054906101000a900460ff1660ff16148015611606575060018367ffffffffffffffff16115b1561163d576040517fd7c8c43e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860159054906101000a900460ff1660ff1614801561166a5750600061166833612bd8565b115b156116a1576040517fd7c8c43e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058367ffffffffffffffff1611156116e6576040517ff4e311db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61175a828280806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506010543360405160200161173f9190613e92565b60405160208183030381529060405280519060200120612c2f565b611790576040517fb05e92fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018461179f9190613ead565b67ffffffffffffffff166117b1612c46565b6117bb9190613dae565b905060006117c882611fd7565b90508467ffffffffffffffff16816117e09190613ee1565b341015611819576040517f322c943800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61182c8567ffffffffffffffff16612a26565b5050505050565b600d6020528060005260406000206000915054906101000a900463ffffffff1681565b60606003805461186590613d4d565b80601f016020809104026020016040519081016040528092919081815260200182805461189190613d4d565b80156118de5780601f106118b3576101008083540402835291602001916118de565b820191906000526020600020905b8154815290600101906020018083116118c157829003601f168201915b5050505050905090565b600360ff16600860159054906101000a900460ff1660ff1614611937576040517f1cbbad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005811115611972576040517ff4e311db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001826119819190613f3b565b611989612c46565b6119939190613dae565b905060006119a082611fd7565b905082816119ae9190613ee1565b3410156119e7576040517f322c943800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119f083612a26565b505050565b6119fd61287d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a62576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611a6f61287d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611b1c61287d565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b6191906134db565b60405180910390a35050565b60003373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611bd4576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860149054906101000a900460ff1660ff1614611c23576040517f5576ee2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff16600860169054906101000a900460ff1660ff161415611c73576040517ffaaa578800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360ff16600860169054906101000a900460ff1660ff161415611cc3576040517f3b36ff3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d600087815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161415611d27576040517f7cb7c6d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611d56600d600089815260200190815260200160002060009054906101000a900463ffffffff16612b95565b915091506000611d6583611fd7565b90506000611d7283611fd7565b90508082611d809190613dae565b9450600160ff16600860169054906101000a900460ff1660ff16148015611da45750875b15611e5857611e1d878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060105433604051602001611e029190613e92565b60405160208183030381529060405280519060200120612c2f565b611e53576040517fb05e92fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e77565b6064604b60ff1686611e6a9190613ee1565b611e749190613f9e565b94505b611e82896001612c4f565b6000600d60008b815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555060003373ffffffffffffffffffffffffffffffffffffffff1686604051611edb90613e35565b60006040518083038185875af1925050503d8060008114611f18576040519150601f19603f3d011682016040523d82523d6000602084013e611f1d565b606091505b5050905080611f58576040517fd8c8dd5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b611f6f848484610ca2565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611fd157611f9a84848484612ea3565b611fd0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60006009548211611feb5760009050612084565b600a54821115611ffe5760009050612084565b61036b821015612017576614df48080e30009050612084565b600061036b836120279190613f3b565b905060006032826120389190613f9e565b6602165400ce380061204a9190613ee1565b6614df48080e300061205c9190613dae565b905066d0b8d0508de00081111561207e5766d0b8d0508de00092505050612084565b80925050505b919050565b60606000600c600084815260200190815260200160002054905060008114156120e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120de9061401b565b60405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3ac887482856040518363ffffffff1660e01b81526004016121449291906137f1565b600060405180830381865afa158015612161573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061218a91906140dc565b915050919050565b600b5481565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121fd576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116f3600161220a612ff4565b6122149190613dae565b111561224c576040517fca73dbde00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860149054906101000a900460ff1660ff161461229b576040517f5576ee2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460ff16600860159054906101000a900460ff1660ff16146122ea576040517f5067ce2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60008481526020019081526020016000205490506000600c6000848152602001908152602001600020549050600161ffff1661232983613007565b61ffff1614158061234b5750600261ffff1661234482613007565b61ffff1614155b15612382576040517f1ed20f1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61238d846001612c4f565b612398836001612c4f565b6123a2848461301b565b600d60006123ae612c46565b815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555060006123e7611699613040565b905060006123f3613086565b90506000612401828461310d565b905080600c6000612410612c46565b81526020019081526020016000208190555061242d33600161312a565b50505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461249057600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600860149054906101000a900460ff1681565b60095481565b6060600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337929eb46040518163ffffffff1660e01b8152600401600060405180830381865afa15801561255c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061258591906140dc565b905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461267857600080fd5b600060ff168160ff1614156126a8576000600860146101000a81548160ff021916908360ff1602179055506126ff565b600160ff168160ff1614156126fe576004600860156101000a81548160ff021916908360ff1602179055506126db610bda565b600a819055506001600860146101000a81548160ff021916908360ff1602179055505b5b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461275c57600080fd5b600060ff168160ff16141561278c576000600860166101000a81548160ff021916908360ff16021790555061281b565b600160ff168160ff1614156127bc576001600860166101000a81548160ff021916908360ff16021790555061281a565b600260ff168160ff1614156127ec576002600860166101000a81548160ff021916908360ff160217905550612819565b600360ff168160ff161415612818576003600860166101000a81548160ff021916908360ff1602179055505b5b5b5b50565b600081612829612885565b11158015612838575060005482105b8015612876575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b6000808290508061289d612885565b11612925576000548110156129245760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612922575b60008114156129185760046000836001900393508381526020019081526020016000205490506128ed565b8092505050612957565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86129e48686846132e7565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000811415612a61576040517f524f409b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614612ac6576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116f381612ad2612ff4565b612adc9190613dae565b1115612b14576040517fca73dbde00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015612b87576000612b2a82613040565b90506000612b37836132f0565b90506000612b45828461310d565b905080600c600086612b55612c46565b612b5f9190613dae565b8152602001908152602001600020819055505050508080612b7f90614125565b915050612b17565b50612b92338261312a565b50565b60008060006010808563ffffffff16901b63ffffffff16901c63ffffffff169050600060108563ffffffff16901c63ffffffff1690508181935093505050915091565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b600082612c3c858461335c565b1490509392505050565b60008054905090565b6000612c5a8361288e565b90506000819050600080612c6d8661295c565b915091508415612cd657612c898184612c8461287d565b612983565b612cd557612c9e83612c9961287d565b61258a565b612cd4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b612ce48360008860016129c7565b8015612cef57600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612d9783612d54856000886129cd565b7c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000017176129f5565b600460008881526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000085161415612e1f576000600187019050600060046000838152602001908152602001600020541415612e1d576000548114612e1c578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612e89836000886001612a20565b600160008154809291906001019190505550505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ec961287d565b8786866040518563ffffffff1660e01b8152600401612eeb94939291906141c3565b6020604051808303816000875af1925050508015612f2757506040513d601f19601f82011682018060405250810190612f249190614224565b60015b612fa1573d8060008114612f57576040519150601f19603f3d011682016040523d82523d6000602084013e612f5c565b606091505b50600081511415612f99576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6000612ffe612885565b60005403905090565b60006130146000836133b2565b9050919050565b6000806000905083811790508060108463ffffffff16901b1790508091505092915050565b600033600b5461304e612c46565b84434260405160200161306696959493929190614251565b6040516020818303038152906040528051906020012060001c9050919050565b600080600b54613094610bda565b4333426040516020016130ab9594939291906142b2565b6040516020818303038152906040528051906020012060001c90506000606f826130d59190614305565b14156130e557600591505061310a565b600b606f826130f49190614305565b101561310457600491505061310a565b60039150505b90565b60008060108084901c901b90508361ffff16811791505092915050565b600080549050600082141561316b576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61317860008483856129c7565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506131ef836131e060008660006129cd565b6131e9856133d5565b176129f5565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461329057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050613255565b5060008214156132cc576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506132e26000848385612a20565b505050565b60009392505050565b600080600b546132fe610bda565b8443334260405160200161331796959493929190614336565b6040516020818303038152906040528051906020012060001c905060006002826133419190614305565b1415613351576001915050613357565b60029150505b919050565b60008082905060005b84518110156133a7576133928286838151811061338557613384614397565b5b60200260200101516133e5565b9150808061339f90614125565b915050613365565b508091505092915050565b600061ffff80166010846133c691906143c6565b60ff1683901c16905092915050565b60006001821460e11b9050919050565b60008183106133fd576133f88284613410565b613408565b6134078383613410565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6134708161343b565b811461347b57600080fd5b50565b60008135905061348d81613467565b92915050565b6000602082840312156134a9576134a8613431565b5b60006134b78482850161347e565b91505092915050565b60008115159050919050565b6134d5816134c0565b82525050565b60006020820190506134f060008301846134cc565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613530578082015181840152602081019050613515565b8381111561353f576000848401525b50505050565b6000601f19601f8301169050919050565b6000613561826134f6565b61356b8185613501565b935061357b818560208601613512565b61358481613545565b840191505092915050565b600060208201905081810360008301526135a98184613556565b905092915050565b6000819050919050565b6135c4816135b1565b81146135cf57600080fd5b50565b6000813590506135e1816135bb565b92915050565b6000602082840312156135fd576135fc613431565b5b600061360b848285016135d2565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061363f82613614565b9050919050565b61364f81613634565b82525050565b600060208201905061366a6000830184613646565b92915050565b61367981613634565b811461368457600080fd5b50565b60008135905061369681613670565b92915050565b600080604083850312156136b3576136b2613431565b5b60006136c185828601613687565b92505060206136d2858286016135d2565b9150509250929050565b6136e5816135b1565b82525050565b600060208201905061370060008301846136dc565b92915050565b600060ff82169050919050565b61371c81613706565b82525050565b60006020820190506137376000830184613713565b92915050565b60006020828403121561375357613752613431565b5b600061376184828501613687565b91505092915050565b60008060006060848603121561378357613782613431565b5b600061379186828701613687565b93505060206137a286828701613687565b92505060406137b3868287016135d2565b9150509250925092565b6000819050919050565b6137d0816137bd565b82525050565b60006020820190506137eb60008301846137c7565b92915050565b600060408201905061380660008301856136dc565b61381360208301846136dc565b9392505050565b61382381613706565b811461382e57600080fd5b50565b6000813590506138408161381a565b92915050565b60006020828403121561385c5761385b613431565b5b600061386a84828501613831565b91505092915050565b61387c816137bd565b811461388757600080fd5b50565b60008135905061389981613873565b92915050565b6000602082840312156138b5576138b4613431565b5b60006138c38482850161388a565b91505092915050565b600067ffffffffffffffff82169050919050565b6138e9816138cc565b81146138f457600080fd5b50565b600081359050613906816138e0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126139315761393061390c565b5b8235905067ffffffffffffffff81111561394e5761394d613911565b5b60208301915083602082028301111561396a57613969613916565b5b9250929050565b60008060006040848603121561398a57613989613431565b5b6000613998868287016138f7565b935050602084013567ffffffffffffffff8111156139b9576139b8613436565b5b6139c58682870161391b565b92509250509250925092565b600063ffffffff82169050919050565b6139ea816139d1565b82525050565b6000602082019050613a0560008301846139e1565b92915050565b613a14816134c0565b8114613a1f57600080fd5b50565b600081359050613a3181613a0b565b92915050565b60008060408385031215613a4e57613a4d613431565b5b6000613a5c85828601613687565b9250506020613a6d85828601613a22565b9150509250929050565b60008060008060608587031215613a9157613a90613431565b5b6000613a9f878288016135d2565b9450506020613ab087828801613a22565b935050604085013567ffffffffffffffff811115613ad157613ad0613436565b5b613add8782880161391b565b925092505092959194509250565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613b2882613545565b810181811067ffffffffffffffff82111715613b4757613b46613af0565b5b80604052505050565b6000613b5a613427565b9050613b668282613b1f565b919050565b600067ffffffffffffffff821115613b8657613b85613af0565b5b613b8f82613545565b9050602081019050919050565b82818337600083830152505050565b6000613bbe613bb984613b6b565b613b50565b905082815260208101848484011115613bda57613bd9613aeb565b5b613be5848285613b9c565b509392505050565b600082601f830112613c0257613c0161390c565b5b8135613c12848260208601613bab565b91505092915050565b60008060008060808587031215613c3557613c34613431565b5b6000613c4387828801613687565b9450506020613c5487828801613687565b9350506040613c65878288016135d2565b925050606085013567ffffffffffffffff811115613c8657613c85613436565b5b613c9287828801613bed565b91505092959194509250565b60008060408385031215613cb557613cb4613431565b5b6000613cc3858286016135d2565b9250506020613cd4858286016135d2565b9150509250929050565b60008060408385031215613cf557613cf4613431565b5b6000613d0385828601613687565b9250506020613d1485828601613687565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613d6557607f821691505b60208210811415613d7957613d78613d1e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613db9826135b1565b9150613dc4836135b1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613df957613df8613d7f565b5b828201905092915050565b600081905092915050565b50565b6000613e1f600083613e04565b9150613e2a82613e0f565b600082019050919050565b6000613e4082613e12565b9150819050919050565b60008160601b9050919050565b6000613e6282613e4a565b9050919050565b6000613e7482613e57565b9050919050565b613e8c613e8782613634565b613e69565b82525050565b6000613e9e8284613e7b565b60148201915081905092915050565b6000613eb8826138cc565b9150613ec3836138cc565b925082821015613ed657613ed5613d7f565b5b828203905092915050565b6000613eec826135b1565b9150613ef7836135b1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f3057613f2f613d7f565b5b828202905092915050565b6000613f46826135b1565b9150613f51836135b1565b925082821015613f6457613f63613d7f565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613fa9826135b1565b9150613fb4836135b1565b925082613fc457613fc3613f6f565b5b828204905092915050565b7f4e6f7420666f756e640000000000000000000000000000000000000000000000600082015250565b6000614005600983613501565b915061401082613fcf565b602082019050919050565b6000602082019050818103600083015261403481613ff8565b9050919050565b600067ffffffffffffffff82111561405657614055613af0565b5b61405f82613545565b9050602081019050919050565b600061407f61407a8461403b565b613b50565b90508281526020810184848401111561409b5761409a613aeb565b5b6140a6848285613512565b509392505050565b600082601f8301126140c3576140c261390c565b5b81516140d384826020860161406c565b91505092915050565b6000602082840312156140f2576140f1613431565b5b600082015167ffffffffffffffff8111156141105761410f613436565b5b61411c848285016140ae565b91505092915050565b6000614130826135b1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561416357614162613d7f565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b60006141958261416e565b61419f8185614179565b93506141af818560208601613512565b6141b881613545565b840191505092915050565b60006080820190506141d86000830187613646565b6141e56020830186613646565b6141f260408301856136dc565b8181036060830152614204818461418a565b905095945050505050565b60008151905061421e81613467565b92915050565b60006020828403121561423a57614239613431565b5b60006142488482850161420f565b91505092915050565b600060c0820190506142666000830189613646565b61427360208301886136dc565b61428060408301876136dc565b61428d60608301866136dc565b61429a60808301856136dc565b6142a760a08301846136dc565b979650505050505050565b600060a0820190506142c760008301886136dc565b6142d460208301876136dc565b6142e160408301866136dc565b6142ee6060830185613646565b6142fb60808301846136dc565b9695505050505050565b6000614310826135b1565b915061431b836135b1565b92508261432b5761432a613f6f565b5b828206905092915050565b600060c08201905061434b60008301896136dc565b61435860208301886136dc565b61436560408301876136dc565b61437260608301866136dc565b61437f6080830185613646565b61438c60a08301846136dc565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006143d182613706565b91506143dc83613706565b92508160ff04831182151516156143f6576143f5613d7f565b5b82820290509291505056fea26469706673582212205ef801c49aa56e4bb4a0a7494bd0ac3f36b8e90dd8394c73ccdc9e25c7e6b65864736f6c634300080c0033

Deployed Bytecode

0x6080604052600436106102255760003560e01c80637cb6475911610123578063c87b56dd116100ab578063e86cd1da1161006f578063e86cd1da1461080e578063e8a3d48514610839578063e985e9c514610864578063ed6c15a1146108a1578063f9b37823146108ca57610225565b8063c87b56dd14610729578063ccbac9f514610766578063d1c2babb14610791578063dddf7417146107ba578063df2aa67e146107e357610225565b8063a0712d68116100f2578063a0712d6814610655578063a22cb46514610671578063aaa991f21461069a578063b88d4fde146106c3578063b9256b1b146106ec57610225565b80637cb64759146105a857806381e1ced3146105d157806393d0a7ef146105ed57806395d89b411461062a57610225565b80632fbba115116101b15780636b40ed8a116101755780636b40ed8a1461049c5780636e5ed979146104da57806370a082311461051757806372131db314610554578063788c59991461057d57610225565b80632fbba115146103cb5780633ccfd60b146103f457806342842e0e1461040b5780636352211e1461043457806365279efe1461047157610225565b806318160ddd116101f857806318160ddd146102f85780631c501de6146103235780632076510b1461034e57806323b872dd146103775780632eb4a7ab146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063081812fc14610292578063095ea7b3146102cf575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190613493565b6108f3565b60405161025e91906134db565b60405180910390f35b34801561027357600080fd5b5061027c610985565b604051610289919061358f565b60405180910390f35b34801561029e57600080fd5b506102b960048036038101906102b491906135e7565b610a17565b6040516102c69190613655565b60405180910390f35b3480156102db57600080fd5b506102f660048036038101906102f1919061369c565b610a96565b005b34801561030457600080fd5b5061030d610bda565b60405161031a91906136eb565b60405180910390f35b34801561032f57600080fd5b50610338610bf1565b6040516103459190613722565b60405180910390f35b34801561035a57600080fd5b506103756004803603810190610370919061373d565b610c04565b005b34801561038357600080fd5b5061039e6004803603810190610399919061376a565b610ca2565b005b3480156103ac57600080fd5b506103b5610fc7565b6040516103c291906137d6565b60405180910390f35b3480156103d757600080fd5b506103f260048036038101906103ed91906135e7565b610fcd565b005b34801561040057600080fd5b506104096110e3565b005b34801561041757600080fd5b50610432600480360381019061042d919061376a565b611232565b005b34801561044057600080fd5b5061045b600480360381019061045691906135e7565b611252565b6040516104689190613655565b60405180910390f35b34801561047d57600080fd5b50610486611264565b60405161049391906136eb565b60405180910390f35b3480156104a857600080fd5b506104c360048036038101906104be91906135e7565b61126a565b6040516104d19291906137f1565b60405180910390f35b3480156104e657600080fd5b5061050160048036038101906104fc91906135e7565b6112a2565b60405161050e91906136eb565b60405180910390f35b34801561052357600080fd5b5061053e6004803603810190610539919061373d565b6112ba565b60405161054b91906136eb565b60405180910390f35b34801561056057600080fd5b5061057b60048036038101906105769190613846565b611373565b005b34801561058957600080fd5b506105926114c0565b60405161059f9190613722565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca919061389f565b6114d3565b005b6105eb60048036038101906105e69190613971565b611537565b005b3480156105f957600080fd5b50610614600480360381019061060f91906135e7565b611833565b60405161062191906139f0565b60405180910390f35b34801561063657600080fd5b5061063f611856565b60405161064c919061358f565b60405180910390f35b61066f600480360381019061066a91906135e7565b6118e8565b005b34801561067d57600080fd5b5061069860048036038101906106939190613a37565b6119f5565b005b3480156106a657600080fd5b506106c160048036038101906106bc9190613a77565b611b6d565b005b3480156106cf57600080fd5b506106ea60048036038101906106e59190613c1b565b611f64565b005b3480156106f857600080fd5b50610713600480360381019061070e91906135e7565b611fd7565b60405161072091906136eb565b60405180910390f35b34801561073557600080fd5b50610750600480360381019061074b91906135e7565b612089565b60405161075d919061358f565b60405180910390f35b34801561077257600080fd5b5061077b612192565b60405161078891906136eb565b60405180910390f35b34801561079d57600080fd5b506107b860048036038101906107b39190613c9e565b612198565b005b3480156107c657600080fd5b506107e160048036038101906107dc919061373d565b612436565b005b3480156107ef57600080fd5b506107f86124d4565b6040516108059190613722565b60405180910390f35b34801561081a57600080fd5b506108236124e7565b60405161083091906136eb565b60405180910390f35b34801561084557600080fd5b5061084e6124ed565b60405161085b919061358f565b60405180910390f35b34801561087057600080fd5b5061088b60048036038101906108869190613cde565b61258a565b60405161089891906134db565b60405180910390f35b3480156108ad57600080fd5b506108c860048036038101906108c39190613846565b61261e565b005b3480156108d657600080fd5b506108f160048036038101906108ec9190613846565b612702565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061094e57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061097e5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461099490613d4d565b80601f01602080910402602001604051908101604052809291908181526020018280546109c090613d4d565b8015610a0d5780601f106109e257610100808354040283529160200191610a0d565b820191906000526020600020905b8154815290600101906020018083116109f057829003601f168201915b5050505050905090565b6000610a228261281e565b610a58576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610aa182611252565b90508073ffffffffffffffffffffffffffffffffffffffff16610ac261287d565b73ffffffffffffffffffffffffffffffffffffffff1614610b2557610aee81610ae961287d565b61258a565b610b24576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610be4612885565b6001546000540303905090565b600860169054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c5e57600080fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610cad8261288e565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d14576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610d208461295c565b91509150610d368187610d3161287d565b612983565b610d8257610d4b86610d4661287d565b61258a565b610d81576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610de9576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610df686868660016129c7565b8015610e0157600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610ecf85610eab8888876129cd565b7c0200000000000000000000000000000000000000000000000000000000176129f5565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610f57576000600185019050600060046000838152602001908152602001600020541415610f55576000548114610f54578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fbf8686866001612a20565b505050505050565b60105481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461102757600080fd5b60fa600954826110379190613dae565b111561106f576040517fc7b4eeea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff16600860159054906101000a900460ff1660ff16146110be576040517fc7b4eeea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600960008282546110d09190613dae565b925050819055506110e081612a26565b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461113d57600080fd5b600360ff16600860169054906101000a900460ff1660ff161461118c576040517f887ddd1300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff16476040516111b290613e35565b60006040518083038185875af1925050503d80600081146111ef576040519150601f19603f3d011682016040523d82523d6000602084013e6111f4565b606091505b505090508061122f576040517fd8c8dd5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b61124d83838360405180602001604052806000815250611f64565b505050565b600061125d8261288e565b9050919050565b600a5481565b600080611299600d600085815260200190815260200160002060009054906101000a900463ffffffff16612b95565b91509150915091565b600c6020528060005260406000206000915090505481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611322576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113cd57600080fd5b600060ff168160ff1614156113fd576000600860156101000a81548160ff021916908360ff1602179055506114bd565b600160ff168160ff16141561142d576001600860156101000a81548160ff021916908360ff1602179055506114bc565b600260ff168160ff16141561145d576002600860156101000a81548160ff021916908360ff1602179055506114bb565b600360ff168160ff16141561148d576003600860156101000a81548160ff021916908360ff1602179055506114ba565b600460ff168160ff1614156114b9576004600860156101000a81548160ff021916908360ff1602179055505b5b5b5b5b50565b600860159054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461152d57600080fd5b8060108190555050565b600060ff16600860159054906101000a900460ff1660ff161415611587576040517f1cbbad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460ff16600860159054906101000a900460ff1660ff1614156115d7576040517f26633f6d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860159054906101000a900460ff1660ff16148015611606575060018367ffffffffffffffff16115b1561163d576040517fd7c8c43e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860159054906101000a900460ff1660ff1614801561166a5750600061166833612bd8565b115b156116a1576040517fd7c8c43e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058367ffffffffffffffff1611156116e6576040517ff4e311db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61175a828280806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506010543360405160200161173f9190613e92565b60405160208183030381529060405280519060200120612c2f565b611790576040517fb05e92fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018461179f9190613ead565b67ffffffffffffffff166117b1612c46565b6117bb9190613dae565b905060006117c882611fd7565b90508467ffffffffffffffff16816117e09190613ee1565b341015611819576040517f322c943800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61182c8567ffffffffffffffff16612a26565b5050505050565b600d6020528060005260406000206000915054906101000a900463ffffffff1681565b60606003805461186590613d4d565b80601f016020809104026020016040519081016040528092919081815260200182805461189190613d4d565b80156118de5780601f106118b3576101008083540402835291602001916118de565b820191906000526020600020905b8154815290600101906020018083116118c157829003601f168201915b5050505050905090565b600360ff16600860159054906101000a900460ff1660ff1614611937576040517f1cbbad3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005811115611972576040517ff4e311db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001826119819190613f3b565b611989612c46565b6119939190613dae565b905060006119a082611fd7565b905082816119ae9190613ee1565b3410156119e7576040517f322c943800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119f083612a26565b505050565b6119fd61287d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a62576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611a6f61287d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611b1c61287d565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b6191906134db565b60405180910390a35050565b60003373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611bd4576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860149054906101000a900460ff1660ff1614611c23576040517f5576ee2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff16600860169054906101000a900460ff1660ff161415611c73576040517ffaaa578800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360ff16600860169054906101000a900460ff1660ff161415611cc3576040517f3b36ff3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d600087815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161415611d27576040517f7cb7c6d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611d56600d600089815260200190815260200160002060009054906101000a900463ffffffff16612b95565b915091506000611d6583611fd7565b90506000611d7283611fd7565b90508082611d809190613dae565b9450600160ff16600860169054906101000a900460ff1660ff16148015611da45750875b15611e5857611e1d878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060105433604051602001611e029190613e92565b60405160208183030381529060405280519060200120612c2f565b611e53576040517fb05e92fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e77565b6064604b60ff1686611e6a9190613ee1565b611e749190613f9e565b94505b611e82896001612c4f565b6000600d60008b815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555060003373ffffffffffffffffffffffffffffffffffffffff1686604051611edb90613e35565b60006040518083038185875af1925050503d8060008114611f18576040519150601f19603f3d011682016040523d82523d6000602084013e611f1d565b606091505b5050905080611f58576040517fd8c8dd5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b611f6f848484610ca2565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611fd157611f9a84848484612ea3565b611fd0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60006009548211611feb5760009050612084565b600a54821115611ffe5760009050612084565b61036b821015612017576614df48080e30009050612084565b600061036b836120279190613f3b565b905060006032826120389190613f9e565b6602165400ce380061204a9190613ee1565b6614df48080e300061205c9190613dae565b905066d0b8d0508de00081111561207e5766d0b8d0508de00092505050612084565b80925050505b919050565b60606000600c600084815260200190815260200160002054905060008114156120e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120de9061401b565b60405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3ac887482856040518363ffffffff1660e01b81526004016121449291906137f1565b600060405180830381865afa158015612161573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061218a91906140dc565b915050919050565b600b5481565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121fd576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116f3600161220a612ff4565b6122149190613dae565b111561224c576040517fca73dbde00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160ff16600860149054906101000a900460ff1660ff161461229b576040517f5576ee2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600460ff16600860159054906101000a900460ff1660ff16146122ea576040517f5067ce2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60008481526020019081526020016000205490506000600c6000848152602001908152602001600020549050600161ffff1661232983613007565b61ffff1614158061234b5750600261ffff1661234482613007565b61ffff1614155b15612382576040517f1ed20f1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61238d846001612c4f565b612398836001612c4f565b6123a2848461301b565b600d60006123ae612c46565b815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555060006123e7611699613040565b905060006123f3613086565b90506000612401828461310d565b905080600c6000612410612c46565b81526020019081526020016000208190555061242d33600161312a565b50505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461249057600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600860149054906101000a900460ff1681565b60095481565b6060600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337929eb46040518163ffffffff1660e01b8152600401600060405180830381865afa15801561255c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061258591906140dc565b905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461267857600080fd5b600060ff168160ff1614156126a8576000600860146101000a81548160ff021916908360ff1602179055506126ff565b600160ff168160ff1614156126fe576004600860156101000a81548160ff021916908360ff1602179055506126db610bda565b600a819055506001600860146101000a81548160ff021916908360ff1602179055505b5b50565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461275c57600080fd5b600060ff168160ff16141561278c576000600860166101000a81548160ff021916908360ff16021790555061281b565b600160ff168160ff1614156127bc576001600860166101000a81548160ff021916908360ff16021790555061281a565b600260ff168160ff1614156127ec576002600860166101000a81548160ff021916908360ff160217905550612819565b600360ff168160ff161415612818576003600860166101000a81548160ff021916908360ff1602179055505b5b5b5b50565b600081612829612885565b11158015612838575060005482105b8015612876575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b6000808290508061289d612885565b11612925576000548110156129245760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612922575b60008114156129185760046000836001900393508381526020019081526020016000205490506128ed565b8092505050612957565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86129e48686846132e7565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000811415612a61576040517f524f409b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614612ac6576040517f7da46b1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116f381612ad2612ff4565b612adc9190613dae565b1115612b14576040517fca73dbde00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015612b87576000612b2a82613040565b90506000612b37836132f0565b90506000612b45828461310d565b905080600c600086612b55612c46565b612b5f9190613dae565b8152602001908152602001600020819055505050508080612b7f90614125565b915050612b17565b50612b92338261312a565b50565b60008060006010808563ffffffff16901b63ffffffff16901c63ffffffff169050600060108563ffffffff16901c63ffffffff1690508181935093505050915091565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b600082612c3c858461335c565b1490509392505050565b60008054905090565b6000612c5a8361288e565b90506000819050600080612c6d8661295c565b915091508415612cd657612c898184612c8461287d565b612983565b612cd557612c9e83612c9961287d565b61258a565b612cd4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b612ce48360008860016129c7565b8015612cef57600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612d9783612d54856000886129cd565b7c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000017176129f5565b600460008881526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000085161415612e1f576000600187019050600060046000838152602001908152602001600020541415612e1d576000548114612e1c578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612e89836000886001612a20565b600160008154809291906001019190505550505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ec961287d565b8786866040518563ffffffff1660e01b8152600401612eeb94939291906141c3565b6020604051808303816000875af1925050508015612f2757506040513d601f19601f82011682018060405250810190612f249190614224565b60015b612fa1573d8060008114612f57576040519150601f19603f3d011682016040523d82523d6000602084013e612f5c565b606091505b50600081511415612f99576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6000612ffe612885565b60005403905090565b60006130146000836133b2565b9050919050565b6000806000905083811790508060108463ffffffff16901b1790508091505092915050565b600033600b5461304e612c46565b84434260405160200161306696959493929190614251565b6040516020818303038152906040528051906020012060001c9050919050565b600080600b54613094610bda565b4333426040516020016130ab9594939291906142b2565b6040516020818303038152906040528051906020012060001c90506000606f826130d59190614305565b14156130e557600591505061310a565b600b606f826130f49190614305565b101561310457600491505061310a565b60039150505b90565b60008060108084901c901b90508361ffff16811791505092915050565b600080549050600082141561316b576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61317860008483856129c7565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506131ef836131e060008660006129cd565b6131e9856133d5565b176129f5565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461329057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050613255565b5060008214156132cc576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506132e26000848385612a20565b505050565b60009392505050565b600080600b546132fe610bda565b8443334260405160200161331796959493929190614336565b6040516020818303038152906040528051906020012060001c905060006002826133419190614305565b1415613351576001915050613357565b60029150505b919050565b60008082905060005b84518110156133a7576133928286838151811061338557613384614397565b5b60200260200101516133e5565b9150808061339f90614125565b915050613365565b508091505092915050565b600061ffff80166010846133c691906143c6565b60ff1683901c16905092915050565b60006001821460e11b9050919050565b60008183106133fd576133f88284613410565b613408565b6134078383613410565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6134708161343b565b811461347b57600080fd5b50565b60008135905061348d81613467565b92915050565b6000602082840312156134a9576134a8613431565b5b60006134b78482850161347e565b91505092915050565b60008115159050919050565b6134d5816134c0565b82525050565b60006020820190506134f060008301846134cc565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613530578082015181840152602081019050613515565b8381111561353f576000848401525b50505050565b6000601f19601f8301169050919050565b6000613561826134f6565b61356b8185613501565b935061357b818560208601613512565b61358481613545565b840191505092915050565b600060208201905081810360008301526135a98184613556565b905092915050565b6000819050919050565b6135c4816135b1565b81146135cf57600080fd5b50565b6000813590506135e1816135bb565b92915050565b6000602082840312156135fd576135fc613431565b5b600061360b848285016135d2565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061363f82613614565b9050919050565b61364f81613634565b82525050565b600060208201905061366a6000830184613646565b92915050565b61367981613634565b811461368457600080fd5b50565b60008135905061369681613670565b92915050565b600080604083850312156136b3576136b2613431565b5b60006136c185828601613687565b92505060206136d2858286016135d2565b9150509250929050565b6136e5816135b1565b82525050565b600060208201905061370060008301846136dc565b92915050565b600060ff82169050919050565b61371c81613706565b82525050565b60006020820190506137376000830184613713565b92915050565b60006020828403121561375357613752613431565b5b600061376184828501613687565b91505092915050565b60008060006060848603121561378357613782613431565b5b600061379186828701613687565b93505060206137a286828701613687565b92505060406137b3868287016135d2565b9150509250925092565b6000819050919050565b6137d0816137bd565b82525050565b60006020820190506137eb60008301846137c7565b92915050565b600060408201905061380660008301856136dc565b61381360208301846136dc565b9392505050565b61382381613706565b811461382e57600080fd5b50565b6000813590506138408161381a565b92915050565b60006020828403121561385c5761385b613431565b5b600061386a84828501613831565b91505092915050565b61387c816137bd565b811461388757600080fd5b50565b60008135905061389981613873565b92915050565b6000602082840312156138b5576138b4613431565b5b60006138c38482850161388a565b91505092915050565b600067ffffffffffffffff82169050919050565b6138e9816138cc565b81146138f457600080fd5b50565b600081359050613906816138e0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126139315761393061390c565b5b8235905067ffffffffffffffff81111561394e5761394d613911565b5b60208301915083602082028301111561396a57613969613916565b5b9250929050565b60008060006040848603121561398a57613989613431565b5b6000613998868287016138f7565b935050602084013567ffffffffffffffff8111156139b9576139b8613436565b5b6139c58682870161391b565b92509250509250925092565b600063ffffffff82169050919050565b6139ea816139d1565b82525050565b6000602082019050613a0560008301846139e1565b92915050565b613a14816134c0565b8114613a1f57600080fd5b50565b600081359050613a3181613a0b565b92915050565b60008060408385031215613a4e57613a4d613431565b5b6000613a5c85828601613687565b9250506020613a6d85828601613a22565b9150509250929050565b60008060008060608587031215613a9157613a90613431565b5b6000613a9f878288016135d2565b9450506020613ab087828801613a22565b935050604085013567ffffffffffffffff811115613ad157613ad0613436565b5b613add8782880161391b565b925092505092959194509250565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613b2882613545565b810181811067ffffffffffffffff82111715613b4757613b46613af0565b5b80604052505050565b6000613b5a613427565b9050613b668282613b1f565b919050565b600067ffffffffffffffff821115613b8657613b85613af0565b5b613b8f82613545565b9050602081019050919050565b82818337600083830152505050565b6000613bbe613bb984613b6b565b613b50565b905082815260208101848484011115613bda57613bd9613aeb565b5b613be5848285613b9c565b509392505050565b600082601f830112613c0257613c0161390c565b5b8135613c12848260208601613bab565b91505092915050565b60008060008060808587031215613c3557613c34613431565b5b6000613c4387828801613687565b9450506020613c5487828801613687565b9350506040613c65878288016135d2565b925050606085013567ffffffffffffffff811115613c8657613c85613436565b5b613c9287828801613bed565b91505092959194509250565b60008060408385031215613cb557613cb4613431565b5b6000613cc3858286016135d2565b9250506020613cd4858286016135d2565b9150509250929050565b60008060408385031215613cf557613cf4613431565b5b6000613d0385828601613687565b9250506020613d1485828601613687565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613d6557607f821691505b60208210811415613d7957613d78613d1e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613db9826135b1565b9150613dc4836135b1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613df957613df8613d7f565b5b828201905092915050565b600081905092915050565b50565b6000613e1f600083613e04565b9150613e2a82613e0f565b600082019050919050565b6000613e4082613e12565b9150819050919050565b60008160601b9050919050565b6000613e6282613e4a565b9050919050565b6000613e7482613e57565b9050919050565b613e8c613e8782613634565b613e69565b82525050565b6000613e9e8284613e7b565b60148201915081905092915050565b6000613eb8826138cc565b9150613ec3836138cc565b925082821015613ed657613ed5613d7f565b5b828203905092915050565b6000613eec826135b1565b9150613ef7836135b1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f3057613f2f613d7f565b5b828202905092915050565b6000613f46826135b1565b9150613f51836135b1565b925082821015613f6457613f63613d7f565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613fa9826135b1565b9150613fb4836135b1565b925082613fc457613fc3613f6f565b5b828204905092915050565b7f4e6f7420666f756e640000000000000000000000000000000000000000000000600082015250565b6000614005600983613501565b915061401082613fcf565b602082019050919050565b6000602082019050818103600083015261403481613ff8565b9050919050565b600067ffffffffffffffff82111561405657614055613af0565b5b61405f82613545565b9050602081019050919050565b600061407f61407a8461403b565b613b50565b90508281526020810184848401111561409b5761409a613aeb565b5b6140a6848285613512565b509392505050565b600082601f8301126140c3576140c261390c565b5b81516140d384826020860161406c565b91505092915050565b6000602082840312156140f2576140f1613431565b5b600082015167ffffffffffffffff8111156141105761410f613436565b5b61411c848285016140ae565b91505092915050565b6000614130826135b1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561416357614162613d7f565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b60006141958261416e565b61419f8185614179565b93506141af818560208601613512565b6141b881613545565b840191505092915050565b60006080820190506141d86000830187613646565b6141e56020830186613646565b6141f260408301856136dc565b8181036060830152614204818461418a565b905095945050505050565b60008151905061421e81613467565b92915050565b60006020828403121561423a57614239613431565b5b60006142488482850161420f565b91505092915050565b600060c0820190506142666000830189613646565b61427360208301886136dc565b61428060408301876136dc565b61428d60608301866136dc565b61429a60808301856136dc565b6142a760a08301846136dc565b979650505050505050565b600060a0820190506142c760008301886136dc565b6142d460208301876136dc565b6142e160408301866136dc565b6142ee6060830185613646565b6142fb60808301846136dc565b9695505050505050565b6000614310826135b1565b915061431b836135b1565b92508261432b5761432a613f6f565b5b828206905092915050565b600060c08201905061434b60008301896136dc565b61435860208301886136dc565b61436560408301876136dc565b61437260608301866136dc565b61437f6080830185613646565b61438c60a08301846136dc565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006143d182613706565b91506143dc83613706565b92508160ff04831182151516156143f6576143f5613d7f565b5b82820290509291505056fea26469706673582212205ef801c49aa56e4bb4a0a7494bd0ac3f36b8e90dd8394c73ccdc9e25c7e6b65864736f6c634300080c0033

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

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