ETH Price: $3,837.21 (+5.69%)

Token

Freaks N Guilds (FnG)
 

Overview

Max Total Supply

10,000 FnG

Holders

892

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
0 FnG
0xeeddfb62cf9cd86aae74784a5ef33b18678179d4
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:
FreaksNGuilds

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 512 runs

Other Settings:
default evmVersion
File 1 of 19 : FreaksNGuilds.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "./interfaces/Interfaces.sol";
import "./interfaces/Structs.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "erc721a/contracts/ERC721A.sol";
import "../base/controllable.sol";

contract FreaksNGuilds is Controllable, Pausable, Ownable, ERC721A("Freaks N Guilds", "FnG") {
  using MerkleProof for bytes32[];

  /*///////////////////////////////////////////////////////////////
                    Global STATE
    //////////////////////////////////////////////////////////////*/

  bytes32 internal entropySauce;
  bytes32 public whitelistRoot;

  uint256 public constant FNG_PRICE_ETH_PUBLIC = 0.099 ether;
  uint256 public constant FNG_PRICE_ETH_WHITELIST = 0.09 ether;
  uint256 public constant FNG_PRICE_ETH_HOLDERS = 0.07 ether;
  uint256 public constant FNG_PRICE_FBX = 1000 ether;

  IFBX public fbx;
  ICKEY public ckey;
  IVAULT public vault;

  uint256 public maxSupply;
  uint256 public maxCelestialSupply;
  uint256 public celestialSupply;
  uint256 public freakSupply;
  uint256 public saleState;
  uint256 public maxWlMints;
  uint256 public maxPubMints;

  uint8 internal cBody = 1;
  uint8 internal cLevel = 1;
  uint8 internal cPP = 1;
  uint8 internal offHand = 0;

  mapping(uint256 => Freak) public freaks;
  mapping(uint256 => Celestial) public celestials;

  /// mapping of token ids to bool indicating whether the key has been used to mint
  mapping(uint256 => bool) public redeemedCKEYs;
  /// mapping of whitelisted addresses indicating quantity minted through whitelist mint
  mapping(address => uint256) public whitelistMinted;
  /// mapping of public addresses indicating quantity minted through public mint
  mapping(address => uint256) public publicMinted;

  MetadataHandlerLike public metadaHandler;

  /*///////////////////////////////////////////////////////////////
                    MODIFIERS 
    //////////////////////////////////////////////////////////////*/

  modifier noCheaters() {
    uint256 size = 0;
    address acc = msg.sender;
    assembly {
      size := extcodesize(acc)
    }

    require(msg.sender == tx.origin, "you're trying to cheat!");
    require(size == 0, "you're trying to cheat!");
    _;

    // We'll use the last caller hash to add entropy to next caller
    entropySauce = keccak256(abi.encodePacked(acc, block.coinbase));
  }



  /*///////////////////////////////////////////////////////////////
                    Constructor
    //////////////////////////////////////////////////////////////*/
  constructor(
    uint256 _maxSupply,
    uint256 _maxCelestialSupply,
    address _fbx,
    address _ckey,
    address _metadataHandler,
    address _vault,
    bytes32 _whitelistRoot
  ) {
    maxSupply = _maxSupply;
    maxCelestialSupply = _maxCelestialSupply;
    fbx = IFBX(_fbx);
    ckey = ICKEY(_ckey);
    vault = IVAULT(_vault);
    metadaHandler = MetadataHandlerLike(_metadataHandler);
    whitelistRoot = _whitelistRoot;
    maxWlMints = 2;
    maxPubMints = 4;
    _pause();
  }

  /*///////////////////////////////////////////////////////////////
                    PUBLIC FUNCTIONS
    //////////////////////////////////////////////////////////////*/

  /// @dev Call the `metadaHandler` to retrieve the tokenURI for each character.
  function tokenURI(uint256 id) public view override returns (string memory) {
    require(_exists(id), "token does not exist");
    if (!isFreak(id)) {
      // Celestial
      Celestial memory celestial = celestials[id];
      return metadaHandler.getCelestialTokenURI(id, celestial);
    } else if (isFreak(id)) {
      // Freak
      Freak memory freak = freaks[id];
      return metadaHandler.getFreakTokenURI(id, freak);
    } else {
      return ""; // placeholder for compile
    }
  }

  /*///////////////////////////////////////////////////////////////
                   MINT FUNCTIONS
    //////////////////////////////////////////////////////////////*/

  /// @notice Buy one or more tokens with ETH.
  function mintWithETH(uint256 amount) external payable noCheaters whenNotPaused {
    uint256 supply = _currentIndex;
    require(supply + amount <= maxSupply + 1, "maximum supply reached");
    if (msg.sender != owner()) {
      require(amount > 0 && amount + publicMinted[msg.sender] <= maxPubMints, "Invalid quantity");
      require(saleState == 2, "Mint stage not live");
      require(msg.value >= amount * FNG_PRICE_ETH_PUBLIC, "invalid ether amount");
    }
    uint256 rand = _rand();
    for (uint256 i = 0; i < amount; i++) {
      uint256 rNum = rand % 100;
      if (rNum < 15 && celestialSupply < 1500) {
        _revealCelestial(rNum, supply);
        rand = _randomize(rand, supply);
      } else {
        _revealFreak(rNum, supply);
        rand = _randomize(rand, supply);
      }
      supply += 1;
    }
    _mint(msg.sender, amount, "", false);
    publicMinted[msg.sender] += amount;
  }

  /// @notice Buy one or more tokens with ETH while holding celestial key.
  function mintWithETHHoldersOnly(uint256[] memory ckeyIds) external payable noCheaters whenNotPaused {
    require(saleState != 2, "Mint stage not live");
    uint256 supply = _currentIndex;
    uint256 amount = ckeyIds.length;
    require(amount > 0, "invalid token ID");
    require(supply + amount <= maxSupply + 1, "maximum supply reached");
    if (msg.sender != owner()) {
      require(msg.value >= amount * FNG_PRICE_ETH_HOLDERS, "invalid ether amount");
    }
    uint256 rand = _rand();
    for (uint256 i = 0; i < amount; i++) {
      require(msg.sender == ckey.ownerOf(ckeyIds[i]) || vault._depositedBlocks(msg.sender, ckeyIds[i]) != 0, "invalid token ID");
      require(!redeemedCKEYs[ckeyIds[i]], "token already used to mint");
      redeemedCKEYs[ckeyIds[i]] = true;
      uint256 rNum = rand % 100;
      if (rNum < 15 && celestialSupply < 1500) {
        _revealCelestial(rNum, supply);
        rand = _randomize(rand, supply);
      } else {
        _revealFreak(rNum, supply);
        rand = _randomize(rand, supply);
      }
      supply += 1;
    }
    _mint(msg.sender, amount, "", false);
  }

  /// @notice Buy one or more tokens with ETH with whitelisted address
  function mintWithETHWhitelist(uint256 amount, bytes32[] memory proof) external payable whenNotPaused {
    require(saleState == 1, "Mint stage not live");
    uint256 supply = _currentIndex;
    require(supply + amount <= maxSupply + 1, "maximum supply reached");
    require(amount > 0 && amount + whitelistMinted[msg.sender] <= maxWlMints, "Invalid quantity for whitelist mint");
    require(msg.value >= amount * FNG_PRICE_ETH_WHITELIST, "invalid ether amount");
    bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
    require(proof.verify(whitelistRoot, leaf), "Invalid proof");
    uint256 rand = _rand();
    for (uint256 i = 0; i < amount; i++) {
      uint256 rNum = rand % 100;
      if (rNum < 15 && celestialSupply < 1500) {
        _revealCelestial(rNum, supply);
        rand = _randomize(rand, supply);
      } else {
        _revealFreak(rNum, supply);
        rand = _randomize(rand, supply);
      }
      supply += 1;
    }
    _mint(msg.sender, amount, "", false);
    whitelistMinted[msg.sender] += amount;
  }

  /// @notice Buy one or more tokens with FBX.
  function mintWithFBX(uint256 amount) external noCheaters whenNotPaused {
    require(saleState != 2, "Mint stage not live");
    uint256 supply = _currentIndex;
    require(supply + amount <= maxSupply + 1, "maximum supply reached");
    uint256 rand = _rand();
    for (uint256 i = 0; i < amount; i++) {
      uint256 rNum = rand % 100;
      if (rNum < 15 && celestialSupply < 1500) {
        _revealCelestial(rNum, supply);
        rand = _randomize(rand, supply);
      } else {
        _revealFreak(rNum, supply);
        rand = _randomize(rand, supply);
      }
      supply++;
    }
    fbx.burn(msg.sender, FNG_PRICE_FBX * amount);
    _mint(msg.sender, amount, "", false);
  }

  function burn(uint256 tokenId) external onlyOwner {
    if(isFreak(tokenId)){
      delete freaks[tokenId];
      freakSupply -= 1;
    }else{
      delete celestials[tokenId];
      celestialSupply -= 1;
    }
    _burn(tokenId);
  }

  function _revealCelestial(uint256 rNum, uint256 id) internal {
    uint256 _rNum = _randomize(rNum, id);
    uint8 healthMod = _calcMod(_rNum);
    _rNum = _randomize(_rNum, id);
    uint8 powMod = _calcMod(_rNum);
    Celestial memory celestial = Celestial(healthMod, powMod, cPP, cLevel);
    celestials[id] = celestial;
    celestialSupply += 1;
  }

  function _revealFreak(uint256 rNum, uint256 id) internal {
    uint256 _rNum = _randomize(rNum, id);
    uint8 species = uint8((_rNum % 3) + 1);
    _rNum = _randomize(_rNum, id);
    uint8 mainHand = uint8((_rNum % 3) + 1);
    _rNum = _randomize(_rNum, id);
    uint8 body = uint8((_rNum % 3) + 1);
    _rNum = _randomize(_rNum, id);
    uint8 power = _calcPow(species, _rNum);
    _rNum = _randomize(_rNum, id);
    uint8 health = _calcHealth(species, _rNum);
    _rNum = _randomize(_rNum, id);
    uint8 armor = uint8((_rNum % 3) + 1); 
    uint8 criticalStrikeMod = 0;
    Freak memory freak = Freak(species, body, armor, mainHand, offHand, power, health, criticalStrikeMod);
    freaks[id] = freak;
    freakSupply += 1;
  }

  /*///////////////////////////////////////////////////////////////
                    VIEWERS
    //////////////////////////////////////////////////////////////*/

  function getFreakAttributes(uint256 tokenId) external view returns (Freak memory) {
    require(_exists(tokenId), "token does not exist");
    return (freaks[tokenId]);
  }

  function getCelestialAttributes(uint256 tokenId) external view returns (Celestial memory) {
    require(_exists(tokenId), "token does not exist");
    return (celestials[tokenId]);
  }

  function isFreak(uint256 tokenId) public view returns (bool) {
    require(_exists(tokenId), "token does not exist");
    return freaks[tokenId].species != 0 ? true : false;
  }

  function getSpecies(uint256 tokenId) external view returns (uint8) {
    require(isFreak(tokenId) == true);
    return freaks[tokenId].species;
  }

  function getTokens(address addr) external view returns (uint256[] memory tokens) {
    uint256 balanceLength = balanceOf(addr);
    tokens = new uint256[](balanceLength);
    uint256 index = 0;
    for (uint256 j =  1; j < _currentIndex; j++) {
      if (ownerOf(j) == addr) {
        tokens[index] = j;
        index += 1;
      }
    }
    return tokens;
  }

  /*///////////////////////////////////////////////////////////////
                    INTERNAL  HELPERS
    //////////////////////////////////////////////////////////////*/

  /// @dev Overriden to start mints at id #1.
  function _startTokenId() internal pure override returns (uint256) {
    return 1;
  }

  /// @dev Create a bit more of randomness
  function _randomize(uint256 rand, uint256 spicy) internal pure returns (uint256) {
    return uint256(keccak256(abi.encode(rand, spicy)));
  }

  function _rand() internal view returns (uint256) {
    return
      uint256(keccak256(abi.encodePacked(msg.sender, block.timestamp, block.basefee, block.timestamp, entropySauce)));
  }

  function _calcMod(uint256 rNum) internal pure returns (uint8) {
    return uint8((rNum % 4) + 5);
  }

  function _calcHealth(uint8 species, uint256 rNum) internal pure returns (uint8) {
    uint8 baseHealth = 90; // ogre
    if (species == 1) {
      baseHealth = 50; // troll
    } else if (species == 2) {
      baseHealth = 70; // fairy
    }
    // might need to cast? we will see...
    return uint8((rNum % 21) + baseHealth);
  }

  function _calcPow(uint8 species, uint256 rNum) internal pure returns (uint8) {
    uint8 basePow = 90; //ogre
    if (species == 1) {
      basePow = 115; // troll
    } else if (species == 2) {
      basePow = 65; //fairy
    }
    // might need to cast? we will see...
    return uint8((rNum % 21) + basePow);
  }

  /*///////////////////////////////////////////////////////////////
                    ADMIN
  //////////////////////////////////////////////////////////////*/

  function setSaleState(uint256 newSaleState) external onlyOwner {
    saleState = newSaleState;
  }

  /// @notice See {ERC721-isApprovedForAll}.
  function isApprovedForAll(address owner, address operator) public view override returns (bool) {
    // if (!marketplacesApproved) return auth[operator] || super.isApprovedForAll(owner, operator);
    return
      isController(operator) ||
      // operator == address(ProxyRegistry(opensea).proxies(owner)) ||
      // operator == looksrare ||
      super.isApprovedForAll(owner, operator);
  }

  function setMaxMints(uint256 _maxWlMints, uint256 _maxPubMints) external onlyOwner {
    maxWlMints = _maxWlMints;
    maxPubMints = _maxPubMints;
  }

  function setPause(bool _pauseToggle) external onlyOwner {
    if (_pauseToggle == true) {
      _pause();
    } else {
      _unpause();
    }
  }

  function setWhitelistRoot(bytes32 root) external onlyOwner {
    whitelistRoot = root;
  }

  function setContracts(address _fbx, address _ckey, address _vault, address _metadataHandler) external onlyOwner {
    fbx = IFBX(_fbx);
    ckey = ICKEY(_ckey);
    vault = IVAULT(_vault);
    metadaHandler = MetadataHandlerLike(_metadataHandler);
  }

    /// @notice Withdraw `amount` of ether to msg.sender.
  function withdraw(uint256 amount) external onlyOwner {
    payable(msg.sender).transfer(amount);
  }

  /// @notice Withdraw `amount` of `token` to the sender.
  function withdrawERC20(IERC20 token, uint256 amount) external onlyOwner {
    token.transfer(msg.sender, amount);
  }

  /// @notice Withdraw `tokenId` of `token` to the sender.
  function withdrawERC721(IERC721 token, uint256 tokenId) external onlyOwner {
    token.safeTransferFrom(address(this), msg.sender, tokenId);
  }

  /// @notice Withdraw `tokenId` with amount of `value` from `token` to the sender.
  function withdrawERC1155(
    IERC1155 token,
    uint256 tokenId,
    uint256 value
  ) external onlyOwner {
    token.safeTransferFrom(address(this), msg.sender, tokenId, value, "");
  }

  /// @notice Add or edit contract controllers.
  /// @param addrs Array of addresses to be added/edited.
  /// @param state New controller state of addresses.
  function setControllers(address[] calldata addrs, bool state) external onlyOwner {
    for (uint256 i = 0; i < addrs.length; i++) super._setController(addrs[i], state);
  }
}

File 2 of 19 : Interfaces.sol
// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.11;

import "./Structs.sol";

interface MetadataHandlerLike {
  function getCelestialTokenURI(uint256 id, Celestial memory character) external view returns (string memory);

  function getFreakTokenURI(uint256 id, Freak memory character) external view returns (string memory);
}

interface InventoryCelestialsLike {
  function getAttributes(Celestial memory character, uint256 id) external pure returns (bytes memory);

  function getImage(uint256 id) external view returns (bytes memory);
}

interface InventoryFreaksLike {
  function getAttributes(Freak memory character, uint256 id) external view returns (bytes memory);

  function getImage(Freak memory character) external view returns (bytes memory);
}

interface IFnG {
  function transferFrom(
    address from,
    address to,
    uint256 id
  ) external;

  function ownerOf(uint256 id) external returns (address owner);

  function isFreak(uint256 tokenId) external view returns (bool);

  function getSpecies(uint256 tokenId) external view returns (uint8);

  function getFreakAttributes(uint256 tokenId) external view returns (Freak memory);

  function setFreakAttributes(uint256 tokenId, Freak memory attributes) external;

  function getCelestialAttributes(uint256 tokenId) external view returns (Celestial memory);

  function setCelestialAttributes(uint256 tokenId, Celestial memory attributes) external;
}

interface IFBX {
  function mint(address to, uint256 amount) external;

  function burn(address from, uint256 amount) external;
}

interface ICKEY {
  function ownerOf(uint256 tokenId) external returns (address);
}

interface IVAULT {
  function depositsOf(address account) external view returns (uint256[] memory);
  function _depositedBlocks(address account, uint256 tokenId) external returns(uint256);
}

interface ERC20Like {
  function balanceOf(address from) external view returns (uint256 balance);

  function burn(address from, uint256 amount) external;

  function mint(address from, uint256 amount) external;

  function transfer(address to, uint256 amount) external;
}

interface ERC1155Like {
  function mint(
    address to,
    uint256 id,
    uint256 amount
  ) external;

  function burn(
    address from,
    uint256 id,
    uint256 amount
  ) external;
}

interface ERC721Like {
  function transferFrom(
    address from,
    address to,
    uint256 id
  ) external;

  function transfer(address to, uint256 id) external;

  function ownerOf(uint256 id) external returns (address owner);

  function mint(address to, uint256 tokenid) external;
}

interface PortalLike {
  function sendMessage(bytes calldata) external;
}

File 3 of 19 : Structs.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

struct Freak {
  uint8 species;
  uint8 body;
  uint8 armor;
  uint8 mainHand;
  uint8 offHand;
  uint8 power;
  uint8 health;
  uint8 criticalStrikeMod;

}
struct Celestial {
  uint8 healthMod;
  uint8 powMod;
  uint8 cPP;
  uint8 cLevel;
}

struct Layer {
  string name;
  string data;
}

struct LayerInput {
  string name;
  string data;
  uint8 layerIndex;
  uint8 itemIndex;
}

File 4 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

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

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 7 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 19 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 10 of 19 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error BurnedQueryForZeroAddress();
error AuxQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerIndexOutOfBounds();
error OwnerQueryForNonexistentToken();
error TokenIndexOutOfBounds();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

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

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

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

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

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

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

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

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

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

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

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

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

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        if (owner == address(0)) revert AuxQueryForZeroAddress();
        _addressData[owner].aux = aux;
    }

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

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

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

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

        _approve(to, tokenId, owner);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

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

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

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

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            isApprovedForAll(prevOwnership.addr, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

        _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[prevOwnership.addr].balance -= 1;
            _addressData[prevOwnership.addr].numberBurned += 1;

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

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

        emit Transfer(prevOwnership.addr, address(0), tokenId);
        _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

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

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

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

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

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

File 11 of 19 : controllable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

/// @title Controllable
abstract contract Controllable {
  /// @notice address => is controller.
  mapping(address => bool) private _isController;
  /// @notice Require the caller to be a controller.
  modifier onlyController() {
    require(_isController[msg.sender], "Controllable: Caller is not a controller");
    _;
  }

  /// @notice Check if `addr` is a controller.
  function isController(address addr) public view returns (bool) {
    return _isController[addr];
  }

  /// @notice Set the `addr` controller status to `status`.
  function _setController(address addr, bool status) internal {
    _isController[addr] = status;
  }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

File 14 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 16 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxCelestialSupply","type":"uint256"},{"internalType":"address","name":"_fbx","type":"address"},{"internalType":"address","name":"_ckey","type":"address"},{"internalType":"address","name":"_metadataHandler","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bytes32","name":"_whitelistRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"FNG_PRICE_ETH_HOLDERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FNG_PRICE_ETH_PUBLIC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FNG_PRICE_ETH_WHITELIST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FNG_PRICE_FBX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"celestialSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"celestials","outputs":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ckey","outputs":[{"internalType":"contract ICKEY","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fbx","outputs":[{"internalType":"contract IFBX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freakSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"freaks","outputs":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"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":"getCelestialAttributes","outputs":[{"components":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"}],"internalType":"struct Celestial","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFreakAttributes","outputs":[{"components":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"internalType":"struct Freak","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSpecies","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getTokens","outputs":[{"internalType":"uint256[]","name":"tokens","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":[{"internalType":"address","name":"addr","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isFreak","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCelestialSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPubMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWlMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadaHandler","outputs":[{"internalType":"contract MetadataHandlerLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ckeyIds","type":"uint256[]"}],"name":"mintWithETHHoldersOnly","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintWithETHWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWithFBX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redeemedCKEYs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fbx","type":"address"},{"internalType":"address","name":"_ckey","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_metadataHandler","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setControllers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxWlMints","type":"uint256"},{"internalType":"uint256","name":"_maxPubMints","type":"uint256"}],"name":"setMaxMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pauseToggle","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSaleState","type":"uint256"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setWhitelistRoot","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":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVAULT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"withdrawERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526016805463ffffffff1916620101011790553480156200002357600080fd5b50604051620048893803806200488983398101604081905262000046916200030d565b604080518082018252600f81526e467265616b73204e204775696c647360881b60208083019190915282518084019093526003835262466e4760e81b908301526001805460ff19169055906200009c3362000149565b8151620000b190600490602085019062000219565b508051620000c790600590602084019062000219565b5060016002908155600f8a90556010899055600c80546001600160a01b03808b166001600160a01b031992831617909255600d80548a8416908316179055600e8054888416908316179055601c805492891692909116919091179055600b849055601455505060046015556200013c620001a3565b5050505050505062000453565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff1615620001d25760405162461bcd60e51b8152600401620001c990620003bc565b60405180910390fd5b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336040516200020f9190620003fc565b60405180910390a1565b828054620002279062000422565b90600052602060002090601f0160209004810192826200024b576000855562000296565b82601f106200026657805160ff191683800117855562000296565b8280016001018555821562000296579182015b828111156200029657825182559160200191906001019062000279565b50620002a4929150620002a8565b5090565b5b80821115620002a45760008155600101620002a9565b805b8114620002cd57600080fd5b50565b8051620002dd81620002bf565b92915050565b60006001600160a01b038216620002dd565b620002c181620002e3565b8051620002dd81620002f5565b600080600080600080600060e0888a0312156200032d576200032d600080fd5b60006200033b8a8a620002d0565b97505060206200034e8a828b01620002d0565b9650506040620003618a828b0162000300565b9550506060620003748a828b0162000300565b9450506080620003878a828b0162000300565b93505060a06200039a8a828b0162000300565b92505060c0620003ad8a828b01620002d0565b91505092959891949750929550565b60208082528101620002dd81601081526f14185d5cd8589b194e881c185d5cd95960821b602082015260400190565b620003f681620002e3565b82525050565b60208101620002dd8284620003eb565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200043757607f821691505b602082108114156200044d576200044d6200040c565b50919050565b61442680620004636000396000f3fe6080604052600436106103975760003560e01c80637255e9aa116101dc578063b429afeb11610102578063d5abeb01116100a0578063f2fde38b1161006f578063f2fde38b14610b5d578063f3e414f814610b7d578063f5aa406d14610b9d578063fbfa77cf14610bbd57600080fd5b8063d5abeb0114610af7578063d65c741e14610b0d578063e392b41e14610b20578063e985e9c514610b3d57600080fd5b8063bf989b6e116100dc578063bf989b6e14610a81578063c7ece1a514610aa1578063c87b56dd14610ac1578063d143891114610ae157600080fd5b8063b429afeb14610a08578063b88d4fde14610a41578063bedb86fb14610a6157600080fd5b80638da5cb5b1161017a5780639e171141116101495780639e17114114610985578063a0914a36146109b2578063a1db9782146109c8578063a22cb465146109e857600080fd5b80638da5cb5b14610905578063922ae7cd1461092857806395d89b411461094357806398a8cffe1461095857600080fd5b80637e1c4542116101b65780637e1c4542146108825780637fde274d146108a257806387982726146108c25780638ab4d22a146108d557600080fd5b80637255e9aa1461082c578063772b73251461084c57806379cb179d1461086257600080fd5b806339ead720116102c157806355a305aa1161025f57806367e99e8a1161022e57806367e99e8a146107095780636c57f21e1461079b57806370a08231146107f7578063715018a61461081757600080fd5b806355a305aa1461069b5780635c975abb146106bb578063603f4d52146106d35780636352211e146106e957600080fd5b806342842e0e1161029b57806342842e0e1461060157806342966c6814610621578063450efe211461064157806351dd48b11461066e57600080fd5b806339ead7201461059e5780633c5d62e0146105be57806340350391146105eb57600080fd5b806318160ddd116103395780632c3b372e116103085780632c3b372e146105395780632e1a7d4d1461054c5780632e79dcda1461056c578063386bfc981461058857600080fd5b806318160ddd146104b35780631ebdc59c146104d057806323b872dd146104ec5780632be6a2a91461050c57600080fd5b8063084c408811610375578063084c408814610421578063095ea7b3146104435780630e61cfff146104635780631015805b1461048657600080fd5b806301ffc9a71461039c57806306fdde03146103d2578063081812fc146103f4575b600080fd5b3480156103a857600080fd5b506103bc6103b73660046132a9565b610bdd565b6040516103c991906132d4565b60405180910390f35b3480156103de57600080fd5b506103e7610c2f565b6040516103c99190613340565b34801561040057600080fd5b5061041461040f366004613362565b610cc1565b6040516103c9919061339d565b34801561042d57600080fd5b5061044161043c366004613362565b610d05565b005b34801561044f57600080fd5b5061044161045e3660046133bf565b610d43565b34801561046f57600080fd5b5061047960115481565b6040516103c99190613402565b34801561049257600080fd5b506104796104a1366004613410565b601b6020526000908152604090205481565b3480156104bf57600080fd5b506003546002540360001901610479565b3480156104dc57600080fd5b5061047967013fbe85edc9000081565b3480156104f857600080fd5b50610441610507366004613431565b610dd1565b34801561051857600080fd5b5061052c610527366004613362565b610ddc565b6040516103c9919061348a565b610441610547366004613362565b610e0b565b34801561055857600080fd5b50610441610567366004613362565b611072565b34801561057857600080fd5b5061047967015fb7f9b8c3800081565b34801561059457600080fd5b50610479600b5481565b3480156105aa57600080fd5b506104416105b93660046134b7565b6110d3565b3480156105ca57600080fd5b506105de6105d9366004613362565b61116c565b6040516103c99190613583565b3480156105f757600080fd5b5061047960105481565b34801561060d57600080fd5b5061044161061c366004613431565b611266565b34801561062d57600080fd5b5061044161063c366004613362565b611281565b34801561064d57600080fd5b5061066161065c366004613410565b611338565b6040516103c991906135ef565b34801561067a57600080fd5b50600c5461068e906001600160a01b031681565b6040516103c99190613614565b3480156106a757600080fd5b50601c5461068e906001600160a01b031681565b3480156106c757600080fd5b5060015460ff166103bc565b3480156106df57600080fd5b5061047960135481565b3480156106f557600080fd5b50610414610704366004613362565b611403565b34801561071557600080fd5b50610787610724366004613362565b60176020526000908152604090205460ff8082169161010081048216916201000082048116916301000000810482169164010000000082048116916501000000000081048216916601000000000000820481169167010000000000000090041688565b6040516103c9989796959493929190613622565b3480156107a757600080fd5b506107e76107b6366004613362565b60186020526000908152604090205460ff808216916101008104821691620100008204811691630100000090041684565b6040516103c99493929190613699565b34801561080357600080fd5b50610479610812366004613410565b611415565b34801561082357600080fd5b50610441611464565b34801561083857600080fd5b506103bc610847366004613362565b6114a0565b34801561085857600080fd5b5061047960125481565b34801561086e57600080fd5b50600d5461068e906001600160a01b031681565b34801561088e57600080fd5b5061044161089d36600461373c565b6114ec565b3480156108ae57600080fd5b506104416108bd366004613362565b61158e565b6104416108d036600461388f565b611785565b3480156108e157600080fd5b506103bc6108f0366004613362565b60196020526000908152604090205460ff1681565b34801561091157600080fd5b5060015461010090046001600160a01b0316610414565b34801561093457600080fd5b5061047966f8b0a10e47000081565b34801561094f57600080fd5b506103e76119b2565b34801561096457600080fd5b50610479610973366004613410565b601a6020526000908152604090205481565b34801561099157600080fd5b506109a56109a0366004613362565b6119c1565b6040516103c99190613927565b3480156109be57600080fd5b5061047960145481565b3480156109d457600080fd5b506104416109e3366004613935565b611a5c565b3480156109f457600080fd5b50610441610a03366004613957565b611afd565b348015610a1457600080fd5b506103bc610a23366004613410565b6001600160a01b031660009081526020819052604090205460ff1690565b348015610a4d57600080fd5b50610441610a5c366004613a19565b611b96565b348015610a6d57600080fd5b50610441610a7c366004613a98565b611be1565b348015610a8d57600080fd5b50610441610a9c366004613ab9565b611c2c565b348015610aad57600080fd5b50610441610abc366004613b11565b611cb9565b348015610acd57600080fd5b506103e7610adc366004613362565b611cf4565b348015610aed57600080fd5b5061047960155481565b348015610b0357600080fd5b50610479600f5481565b610441610b1b366004613ba8565b611ed6565b348015610b2c57600080fd5b50610479683635c9adc5dea0000081565b348015610b4957600080fd5b506103bc610b58366004613be3565b6122c6565b348015610b6957600080fd5b50610441610b78366004613410565b612317565b348015610b8957600080fd5b50610441610b98366004613935565b612376565b348015610ba957600080fd5b50610441610bb8366004613362565b61240c565b348015610bc957600080fd5b50600e5461068e906001600160a01b031681565b60006001600160e01b031982166380ac58cd60e01b1480610c0e57506001600160e01b03198216635b5e139f60e01b145b80610c2957506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060048054610c3e90613c2c565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90613c2c565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b6000610ccc82612441565b610ce9576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6001546001600160a01b03610100909104163314610d3e5760405162461bcd60e51b8152600401610d3590613c8e565b60405180910390fd5b601355565b6000610d4e82611403565b9050806001600160a01b0316836001600160a01b03161415610d835760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610da35750610da181336122c6565b155b15610dc1576040516367d9dca160e11b815260040160405180910390fd5b610dcc83838361247a565b505050565b610dcc8383836124e3565b6000610de7826114a0565b1515600114610df557600080fd5b5060009081526017602052604090205460ff1690565b33803b90328114610e2e5760405162461bcd60e51b8152600401610d3590613cd2565b8115610e4c5760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff1615610e6f5760405162461bcd60e51b8152600401610d3590613d16565b600254600f54610e80906001613d3c565b610e8a8583613d3c565b1115610ea85760405162461bcd60e51b8152600401610d3590613d88565b60015461010090046001600160a01b03166001600160a01b0316336001600160a01b031614610f6b57600084118015610efc5750601554336000908152601b6020526040902054610ef99086613d3c565b11155b610f185760405162461bcd60e51b8152600401610d3590613dcc565b601354600214610f3a5760405162461bcd60e51b8152600401610d3590613e10565b610f4c67015fb7f9b8c3800085613e20565b341015610f6b5760405162461bcd60e51b8152600401610d3590613e73565b6000610f756126f9565b905060005b85811015610ffc576000610f8f606484613e99565b9050600f81108015610fa457506105dc601154105b15610fc457610fb38185612734565b610fbd838561281f565b9250610fdb565b610fce8185612853565b610fd8838561281f565b92505b610fe6600185613d3c565b9350508080610ff490613ead565b915050610f7a565b506110193386604051806020016040528060008152506000612acb565b336000908152601b602052604081208054879290611038908490613d3c565b909155505060405161105292508391504190602001613ef0565b60408051601f198184030181529190528051602090910120600a55505050565b6001546001600160a01b036101009091041633146110a25760405162461bcd60e51b8152600401610d3590613c8e565b604051339082156108fc029083906000818181858888f193505050501580156110cf573d6000803e3d6000fd5b5050565b6001546001600160a01b036101009091041633146111035760405162461bcd60e51b8152600401610d3590613c8e565b604051637921219560e11b81526001600160a01b0384169063f242432a90611135903090339087908790600401613f16565b600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b50505050505050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101919091526111b682612441565b6111d25760405162461bcd60e51b8152600401610d3590613f9a565b5060009081526017602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216938101939093526301000000820481166060840152640100000000820481166080840152650100000000008204811660a084015266010000000000008204811660c08401526701000000000000009091041660e082015290565b610dcc83838360405180602001604052806000815250611b96565b6001546001600160a01b036101009091041633146112b15760405162461bcd60e51b8152600401610d3590613c8e565b6112ba816114a0565b156112fa576000818152601760205260408120805467ffffffffffffffff1916905560128054600192906112ef908490613faa565b9091555061132c9050565b6000818152601860205260408120805463ffffffff191690556011805460019290611326908490613faa565b90915550505b61133581612c9c565b50565b6060600061134583611415565b90508067ffffffffffffffff8111156113605761136061378d565b604051908082528060200260200182016040528015611389578160200160208202803683370190505b509150600060015b6002548110156113fb57846001600160a01b03166113ae82611403565b6001600160a01b031614156113e957808483815181106113d0576113d0613fc1565b60209081029190910101526113e6600183613d3c565b91505b806113f381613ead565b915050611391565b505050919050565b600061140e82612e3c565b5192915050565b60006001600160a01b03821661143e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6001546001600160a01b036101009091041633146114945760405162461bcd60e51b8152600401610d3590613c8e565b61149e6000612f65565b565b60006114ab82612441565b6114c75760405162461bcd60e51b8152600401610d3590613f9a565b60008281526017602052604090205460ff166114e4576000610c29565b600192915050565b6001546001600160a01b0361010090910416331461151c5760405162461bcd60e51b8152600401610d3590613c8e565b60005b828110156115885761157684848381811061153c5761153c613fc1565b90506020020160208101906115519190613410565b6001600160a01b03166000908152602081905260409020805460ff1916841515179055565b8061158081613ead565b91505061151f565b50505050565b33803b903281146115b15760405162461bcd60e51b8152600401610d3590613cd2565b81156115cf5760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff16156115f25760405162461bcd60e51b8152600401610d3590613d16565b601354600214156116155760405162461bcd60e51b8152600401610d3590613e10565b600254600f54611626906001613d3c565b6116308583613d3c565b111561164e5760405162461bcd60e51b8152600401610d3590613d88565b60006116586126f9565b905060005b858110156116df576000611672606484613e99565b9050600f8110801561168757506105dc601154105b156116a7576116968185612734565b6116a0838561281f565b92506116be565b6116b18185612853565b6116bb838561281f565b92505b836116c881613ead565b9450505080806116d790613ead565b91505061165d565b50600c546001600160a01b0316639dc29fac3361170588683635c9adc5dea00000613e20565b6040518363ffffffff1660e01b8152600401611722929190613fd7565b600060405180830381600087803b15801561173c57600080fd5b505af1158015611750573d6000803e3d6000fd5b505050506117703386604051806020016040528060008152506000612acb565b50508041604051602001611052929190613ef0565b60015460ff16156117a85760405162461bcd60e51b8152600401610d3590613d16565b6013546001146117ca5760405162461bcd60e51b8152600401610d3590613e10565b600254600f546117db906001613d3c565b6117e58483613d3c565b11156118035760405162461bcd60e51b8152600401610d3590613d88565b60008311801561182e5750601454336000908152601a602052604090205461182b9085613d3c565b11155b61184a5760405162461bcd60e51b8152600401610d3590614035565b61185c67013fbe85edc9000084613e20565b34101561187b5760405162461bcd60e51b8152600401610d3590613e73565b60003360405160200161188e9190614045565b6040516020818303038152906040528051906020012090506118bd600b548285612fcc9092919063ffffffff16565b6118d95760405162461bcd60e51b8152600401610d359061407e565b60006118e36126f9565b905060005b8581101561196a5760006118fd606484613e99565b9050600f8110801561191257506105dc601154105b15611932576119218186612734565b61192b838661281f565b9250611949565b61193c8186612853565b611946838661281f565b92505b611954600186613d3c565b945050808061196290613ead565b9150506118e8565b506119873386604051806020016040528060008152506000612acb565b336000908152601a6020526040812080548792906119a6908490613d3c565b90915550505050505050565b606060058054610c3e90613c2c565b6040805160808101825260008082526020820181905291810182905260608101919091526119ee82612441565b611a0a5760405162461bcd60e51b8152600401610d3590613f9a565b506000908152601860209081526040918290208251608081018452905460ff80821683526101008204811693830193909352620100008104831693820193909352630100000090920416606082015290565b6001546001600160a01b03610100909104163314611a8c5760405162461bcd60e51b8152600401610d3590613c8e565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb90611aba9033908590600401613fd7565b6020604051808303816000875af1158015611ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcc9190614099565b6001600160a01b038216331415611b275760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611b8a9085906132d4565b60405180910390a35050565b611ba18484846124e3565b6001600160a01b0383163b15158015611bc35750611bc184848484612fe2565b155b15611588576040516368d2bf6b60e11b815260040160405180910390fd5b6001546001600160a01b03610100909104163314611c115760405162461bcd60e51b8152600401610d3590613c8e565b60018115151415611c24576113356130cb565b611335613134565b6001546001600160a01b03610100909104163314611c5c5760405162461bcd60e51b8152600401610d3590613c8e565b600c80546001600160a01b0395861673ffffffffffffffffffffffffffffffffffffffff1991821617909155600d805494861694821694909417909355600e805492851692841692909217909155601c8054919093169116179055565b6001546001600160a01b03610100909104163314611ce95760405162461bcd60e51b8152600401610d3590613c8e565b601491909155601555565b6060611cff82612441565b611d1b5760405162461bcd60e51b8152600401610d3590613f9a565b611d24826114a0565b611df1576000828152601860209081526040918290208251608081018452905460ff80821683526101008204811693830193909352620100008104831682850152630100000090049091166060820152601c5491516303bb6f4f60e01b815290916001600160a01b0316906303bb6f4f90611da590869085906004016140ba565b600060405180830381865afa158015611dc2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611dea919081019061412d565b9392505050565b611dfa826114a0565b15611ebd5760008281526017602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216818501526301000000830482166060820152640100000000830482166080820152650100000000008304821660a082015266010000000000008304821660c08201526701000000000000009092041660e0820152601c54915163011c789160e31b815290916001600160a01b0316906308e3c48890611da59086908590600401614168565b505060408051602081019091526000815290565b919050565b33803b90328114611ef95760405162461bcd60e51b8152600401610d3590613cd2565b8115611f175760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff1615611f3a5760405162461bcd60e51b8152600401610d3590613d16565b60135460021415611f5d5760405162461bcd60e51b8152600401610d3590613e10565b600254835180611f7f5760405162461bcd60e51b8152600401610d35906141b8565b600f54611f8d906001613d3c565b611f978284613d3c565b1115611fb55760405162461bcd60e51b8152600401610d3590613d88565b60015461010090046001600160a01b03166001600160a01b0316336001600160a01b03161461200e57611fef66f8b0a10e47000082613e20565b34101561200e5760405162461bcd60e51b8152600401610d3590613e73565b60006120186126f9565b905060005b8281101561229357600d5487516001600160a01b0390911690636352211e9089908490811061204e5761204e613fc1565b60200260200101516040518263ffffffff1660e01b81526004016120729190613402565b6020604051808303816000875af1158015612091573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b591906141d3565b6001600160a01b0316336001600160a01b031614806121655750600e5487516001600160a01b039091169063f1442e399033908a90859081106120fa576120fa613fc1565b60200260200101516040518363ffffffff1660e01b815260040161211f929190613fd7565b6020604051808303816000875af115801561213e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216291906141ff565b15155b6121815760405162461bcd60e51b8152600401610d35906141b8565b6019600088838151811061219757612197613fc1565b60209081029190910181015182528101919091526040016000205460ff16156121d25760405162461bcd60e51b8152600401610d3590614254565b6001601960008984815181106121ea576121ea613fc1565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555060006064836122269190613e99565b9050600f8110801561223b57506105dc601154105b1561225b5761224a8186612734565b612254838661281f565b9250612272565b6122658186612853565b61226f838661281f565b92505b61227d600186613d3c565b945050808061228b90613ead565b91505061201d565b506122b03383604051806020016040528060008152506000612acb565b5050508041604051602001611052929190613ef0565b6001600160a01b03811660009081526020819052604081205460ff1680611dea5750506001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b6001546001600160a01b036101009091041633146123475760405162461bcd60e51b8152600401610d3590613c8e565b6001600160a01b03811661236d5760405162461bcd60e51b8152600401610d35906142a7565b61133581612f65565b6001546001600160a01b036101009091041633146123a65760405162461bcd60e51b8152600401610d3590613c8e565b604051632142170760e11b81526001600160a01b038316906342842e0e906123d6903090339086906004016142b7565b600060405180830381600087803b1580156123f057600080fd5b505af1158015612404573d6000803e3d6000fd5b505050505050565b6001546001600160a01b0361010090910416331461243c5760405162461bcd60e51b8152600401610d3590613c8e565b600b55565b600081600111158015612455575060025482105b8015610c29575050600090815260066020526040902054600160e01b900460ff161590565b600082815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006124ee82612e3c565b80519091506000906001600160a01b0316336001600160a01b0316148061251c5750815161251c90336122c6565b8061253757503361252c84610cc1565b6001600160a01b0316145b90508061255757604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b03161461258c5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166125b357604051633a954ecd60e21b815260040160405180910390fd5b6125c3600084846000015161247a565b6001600160a01b038581166000908152600760209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600690945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166126af576002548110156126af578251600082815260066020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b600033424842600a546040516020016127169594939291906142df565b6040516020818303038152906040528051906020012060001c905090565b6000612740838361281f565b9050600061274d82613187565b9050612759828461281f565b9150600061276683613187565b6040805160808101825260ff858116825283811660208084019182526016546201000080820485168688019081526101009283900486166060880190815260008e815260189095529784208751815496519251995190881661ffff19909716969096179187169093021763ffff000019169685160263ff000000191695909517630100000092909316919091029190911790925560118054939450909260019290612812908490613d3c565b9091555050505050505050565b60008282604051602001612834929190614338565b60408051601f1981840301815291905280516020909101209392505050565b600061285f838361281f565b9050600061286e600383613e99565b612879906001613d3c565b9050612885828461281f565b91506000612894600384613e99565b61289f906001613d3c565b90506128ab838561281f565b925060006128ba600385613e99565b6128c5906001613d3c565b90506128d1848661281f565b935060006128df848661319f565b90506128eb858761281f565b945060006128f985876131e0565b9050612905868861281f565b95506000612914600388613e99565b61291f906001613d3c565b90506000806040518061010001604052808960ff1681526020018760ff1681526020018460ff1681526020018860ff168152602001601660039054906101000a900460ff1660ff1681526020018660ff1681526020018560ff1681526020018360ff16815250905080601760008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff160217905550905050600160126000828254612ab99190613d3c565b90915550505050505050505050505050565b6002546001600160a01b038516612af457604051622e076360e81b815260040160405180910390fd5b83612b125760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260076020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600690925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612bc457506001600160a01b0387163b15155b15612c4d575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612c156000888480600101955088612fe2565b612c32576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612bca578260025414612c4857600080fd5b612c93565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612c4e575b506002556126f2565b6000612ca782612e3c565b9050612cb9600083836000015161247a565b80516001600160a01b039081166000908152600760209081526040808320805467ffffffffffffffff19811667ffffffffffffffff9182166000190182161790915585518516845281842080547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff81167001000000000000000000000000000000009182900484166001908101851690920217909155865188865260069094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b1916939093179055908501808352912054909116612df357600254811015612df3578151600082815260066020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600380546001019055565b60408051606081018252600080825260208201819052918101919091528180600111158015612e6c575060025481105b15612f4c57600081815260066020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290612f4a5780516001600160a01b031615612ee0579392505050565b5060001901600081815260066020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215612f45579392505050565b612ee0565b505b604051636f96cda160e11b815260040160405180910390fd5b600180546001600160a01b0383811661010081810274ffffffffffffffffffffffffffffffffffffffff001985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612fd98584613213565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613017903390899088908890600401614346565b6020604051808303816000875af1925050508015613052575060408051601f3d908101601f1916820190925261304f9181019061438b565b60015b6130ad573d808015613080576040519150601f19603f3d011682016040523d82523d6000602084013e613085565b606091505b5080516130a5576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60015460ff16156130ee5760405162461bcd60e51b8152600401610d3590613d16565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b60405161312a919061339d565b60405180910390a1565b60015460ff166131565760405162461bcd60e51b8152600401610d35906143e0565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361311d565b6000613194600483613e99565b610c29906005613d3c565b6000605a600160ff851614156131b7575060736131c7565b8360ff16600214156131c7575060415b60ff81166131d6601585613e99565b6130c39190613d3c565b6000605a600160ff851614156131f8575060326131c7565b8360ff16600214156131c757506046806131d6601585613e99565b600081815b845181101561327f57600085828151811061323557613235613fc1565b6020026020010151905080831161325b576000838152602082905260409020925061326c565b600081815260208490526040902092505b508061327781613ead565b915050613218565b509392505050565b6001600160e01b031981165b811461133557600080fd5b8035610c2981613287565b6000602082840312156132be576132be600080fd5b60006130c3848461329e565b8015155b82525050565b60208101610c2982846132ca565b60005b838110156132fd5781810151838201526020016132e5565b838111156115885750506000910152565b6000613318825190565b80845260208401935061332f8185602086016132e2565b601f01601f19169290920192915050565b60208082528101611dea818461330e565b80613293565b8035610c2981613351565b60006020828403121561337757613377600080fd5b60006130c38484613357565b60006001600160a01b038216610c29565b6132ce81613383565b60208101610c298284613394565b61329381613383565b8035610c29816133ab565b600080604083850312156133d5576133d5600080fd5b60006133e185856133b4565b92505060206133f285828601613357565b9150509250929050565b806132ce565b60208101610c2982846133fc565b60006020828403121561342557613425600080fd5b60006130c384846133b4565b60008060006060848603121561344957613449600080fd5b600061345586866133b4565b9350506020613466868287016133b4565b925050604061347786828701613357565b9150509250925092565b60ff81166132ce565b60208101610c298284613481565b6000610c2982613383565b61329381613498565b8035610c29816134a3565b6000806000606084860312156134cf576134cf600080fd5b60006134db86866134ac565b935050602061346686828701613357565b80516101008301906134fe8482613481565b5060208201516135116020850182613481565b5060408201516135246040850182613481565b5060608201516135376060850182613481565b50608082015161354a6080850182613481565b5060a082015161355d60a0850182613481565b5060c082015161357060c0850182613481565b5060e082015161158860e0850182613481565b6101008101610c2982846134ec565b600061359e83836133fc565b505060200190565b60006135b0825190565b80845260209384019383018060005b838110156135e45781516135d38882613592565b9750602083019250506001016135bf565b509495945050505050565b60208082528101611dea81846135a6565b6000610c2982613498565b6132ce81613600565b60208101610c29828461360b565b6101008101613631828b613481565b61363e602083018a613481565b61364b6040830189613481565b6136586060830188613481565b6136656080830187613481565b61367260a0830186613481565b61367f60c0830185613481565b61368c60e0830184613481565b9998505050505050505050565b608081016136a78287613481565b6136b46020830186613481565b6136c16040830185613481565b6136ce6060830184613481565b95945050505050565b60008083601f8401126136ec576136ec600080fd5b50813567ffffffffffffffff81111561370757613707600080fd5b60208301915083602082028301111561372257613722600080fd5b9250929050565b801515613293565b8035610c2981613729565b60008060006040848603121561375457613754600080fd5b833567ffffffffffffffff81111561376e5761376e600080fd5b61377a868287016136d7565b9350935050602061347786828701613731565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156137c9576137c961378d565b6040525050565b60006137db60405190565b9050611ed182826137a3565b600067ffffffffffffffff8211156138015761380161378d565b5060209081020190565b600061381e613819846137e7565b6137d0565b8381529050602080820190840283018581111561383d5761383d600080fd5b835b8181101561386157806138528882613357565b8452506020928301920161383f565b5050509392505050565b600082601f83011261387f5761387f600080fd5b81356130c384826020860161380b565b600080604083850312156138a5576138a5600080fd5b60006138b18585613357565b925050602083013567ffffffffffffffff8111156138d1576138d1600080fd5b6133f28582860161386b565b805160808301906138ee8482613481565b5060208201516139016020850182613481565b5060408201516139146040850182613481565b5060608201516115886060850182613481565b60808101610c2982846138dd565b6000806040838503121561394b5761394b600080fd5b60006133e185856134ac565b6000806040838503121561396d5761396d600080fd5b600061397985856133b4565b92505060206133f285828601613731565b600067ffffffffffffffff8211156139a4576139a461378d565b601f19601f83011660200192915050565b82818337506000910152565b60006139cf6138198461398a565b9050828152602081018484840111156139ea576139ea600080fd5b61327f8482856139b5565b600082601f830112613a0957613a09600080fd5b81356130c38482602086016139c1565b60008060008060808587031215613a3257613a32600080fd5b6000613a3e87876133b4565b9450506020613a4f878288016133b4565b9350506040613a6087828801613357565b925050606085013567ffffffffffffffff811115613a8057613a80600080fd5b613a8c878288016139f5565b91505092959194509250565b600060208284031215613aad57613aad600080fd5b60006130c38484613731565b60008060008060808587031215613ad257613ad2600080fd5b6000613ade87876133b4565b9450506020613aef878288016133b4565b9350506040613b00878288016133b4565b9250506060613a8c878288016133b4565b60008060408385031215613b2757613b27600080fd5b60006133e18585613357565b6000613b41613819846137e7565b83815290506020808201908402830185811115613b6057613b60600080fd5b835b818110156138615780613b758882613357565b84525060209283019201613b62565b600082601f830112613b9857613b98600080fd5b81356130c3848260208601613b33565b600060208284031215613bbd57613bbd600080fd5b813567ffffffffffffffff811115613bd757613bd7600080fd5b6130c384828501613b84565b60008060408385031215613bf957613bf9600080fd5b6000613c0585856133b4565b92505060206133f2858286016133b4565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613c4057607f821691505b60208210811415613c5357613c53613c16565b50919050565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610c2981613c59565b601781526000602082017f796f7527726520747279696e6720746f2063686561742100000000000000000081529150613c87565b60208082528101610c2981613c9e565b601081526000602082017f5061757361626c653a207061757365640000000000000000000000000000000081529150613c87565b60208082528101610c2981613ce2565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d4f57613d4f613d26565b500190565b601681526000602082017f6d6178696d756d20737570706c7920726561636865640000000000000000000081529150613c87565b60208082528101610c2981613d54565b601081526000602082017f496e76616c6964207175616e746974790000000000000000000000000000000081529150613c87565b60208082528101610c2981613d98565b601381526000602082017f4d696e74207374616765206e6f74206c6976650000000000000000000000000081529150613c87565b60208082528101610c2981613ddc565b6000816000190483118215151615613e3a57613e3a613d26565b500290565b601481526000602082017f696e76616c696420657468657220616d6f756e7400000000000000000000000081529150613c87565b60208082528101610c2981613e3f565b634e487b7160e01b600052601260045260246000fd5b600082613ea857613ea8613e83565b500690565b6000600019821415613ec157613ec1613d26565b5060010190565b6000610c298260601b90565b6000610c2982613ec8565b6132ce613eeb82613383565b613ed4565b6000613efc8285613edf565b601482019150613f0c8284613edf565b5060140192915050565b60a08101613f248287613394565b613f316020830186613394565b613f3e60408301856133fc565b613f4b60608301846133fc565b818103608083015260008152602081015b9695505050505050565b601481526000602082017f746f6b656e20646f6573206e6f7420657869737400000000000000000000000081529150613c87565b60208082528101610c2981613f66565b600082821015613fbc57613fbc613d26565b500390565b634e487b7160e01b600052603260045260246000fd5b60408101613fe58285613394565b611dea60208301846133fc565b602381526000602082017f496e76616c6964207175616e7469747920666f722077686974656c697374206d8152621a5b9d60ea1b602082015291505b5060400190565b60208082528101610c2981613ff2565b60006140518284613edf565b50601401919050565b600d81526000602082016c24b73b30b634b210383937b7b360991b81529150613c87565b60208082528101610c298161405a565b8051610c2981613729565b6000602082840312156140ae576140ae600080fd5b60006130c3848461408e565b60a081016140c882856133fc565b611dea60208301846138dd565b60006140e36138198461398a565b9050828152602081018484840111156140fe576140fe600080fd5b61327f8482856132e2565b600082601f83011261411d5761411d600080fd5b81516130c38482602086016140d5565b60006020828403121561414257614142600080fd5b815167ffffffffffffffff81111561415c5761415c600080fd5b6130c384828501614109565b610120810161417782856133fc565b611dea60208301846134ec565b601081526000602082017f696e76616c696420746f6b656e2049440000000000000000000000000000000081529150613c87565b60208082528101610c2981614184565b8051610c29816133ab565b6000602082840312156141e8576141e8600080fd5b60006130c384846141c8565b8051610c2981613351565b60006020828403121561421457614214600080fd5b60006130c384846141f4565b601a81526000602082017f746f6b656e20616c7265616479207573656420746f206d696e7400000000000081529150613c87565b60208082528101610c2981614220565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061402e565b60208082528101610c2981614264565b606081016142c58286613394565b6142d26020830185613394565b6130c360408301846133fc565b60006142eb8288613edf565b6014820191506142fb82876133fc565b60208201915061430b82866133fc565b60208201915061431b82856133fc565b60208201915061432b82846133fc565b5060200195945050505050565b60408101613fe582856133fc565b608081016143548287613394565b6143616020830186613394565b61436e60408301856133fc565b8181036060830152613f5c818461330e565b8051610c2981613287565b6000602082840312156143a0576143a0600080fd5b60006130c38484614380565b601481526000602082017f5061757361626c653a206e6f742070617573656400000000000000000000000081529150613c87565b60208082528101610c29816143ac56fea26469706673582212200c7ac9cbcd5f0e6cc0b0e800444d4f0e10037457242341c01765006c1d2c220b64736f6c634300080b0033000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000006e91888dac29234d6de8507087ed7ef046335f50000000000000000000000008328f8d228450a9662bfedd526c25278dfbf5e9d000000000000000000000000059905e2d03816b8b322eb8c29b634c291162e0f00000000000000000000000065393db179747458608012a2c805ae6047195699ef9fa995f80f2c2a30869ebca6ad88f37090d878aa75e2eec44bc6176c40c5aa

Deployed Bytecode

0x6080604052600436106103975760003560e01c80637255e9aa116101dc578063b429afeb11610102578063d5abeb01116100a0578063f2fde38b1161006f578063f2fde38b14610b5d578063f3e414f814610b7d578063f5aa406d14610b9d578063fbfa77cf14610bbd57600080fd5b8063d5abeb0114610af7578063d65c741e14610b0d578063e392b41e14610b20578063e985e9c514610b3d57600080fd5b8063bf989b6e116100dc578063bf989b6e14610a81578063c7ece1a514610aa1578063c87b56dd14610ac1578063d143891114610ae157600080fd5b8063b429afeb14610a08578063b88d4fde14610a41578063bedb86fb14610a6157600080fd5b80638da5cb5b1161017a5780639e171141116101495780639e17114114610985578063a0914a36146109b2578063a1db9782146109c8578063a22cb465146109e857600080fd5b80638da5cb5b14610905578063922ae7cd1461092857806395d89b411461094357806398a8cffe1461095857600080fd5b80637e1c4542116101b65780637e1c4542146108825780637fde274d146108a257806387982726146108c25780638ab4d22a146108d557600080fd5b80637255e9aa1461082c578063772b73251461084c57806379cb179d1461086257600080fd5b806339ead720116102c157806355a305aa1161025f57806367e99e8a1161022e57806367e99e8a146107095780636c57f21e1461079b57806370a08231146107f7578063715018a61461081757600080fd5b806355a305aa1461069b5780635c975abb146106bb578063603f4d52146106d35780636352211e146106e957600080fd5b806342842e0e1161029b57806342842e0e1461060157806342966c6814610621578063450efe211461064157806351dd48b11461066e57600080fd5b806339ead7201461059e5780633c5d62e0146105be57806340350391146105eb57600080fd5b806318160ddd116103395780632c3b372e116103085780632c3b372e146105395780632e1a7d4d1461054c5780632e79dcda1461056c578063386bfc981461058857600080fd5b806318160ddd146104b35780631ebdc59c146104d057806323b872dd146104ec5780632be6a2a91461050c57600080fd5b8063084c408811610375578063084c408814610421578063095ea7b3146104435780630e61cfff146104635780631015805b1461048657600080fd5b806301ffc9a71461039c57806306fdde03146103d2578063081812fc146103f4575b600080fd5b3480156103a857600080fd5b506103bc6103b73660046132a9565b610bdd565b6040516103c991906132d4565b60405180910390f35b3480156103de57600080fd5b506103e7610c2f565b6040516103c99190613340565b34801561040057600080fd5b5061041461040f366004613362565b610cc1565b6040516103c9919061339d565b34801561042d57600080fd5b5061044161043c366004613362565b610d05565b005b34801561044f57600080fd5b5061044161045e3660046133bf565b610d43565b34801561046f57600080fd5b5061047960115481565b6040516103c99190613402565b34801561049257600080fd5b506104796104a1366004613410565b601b6020526000908152604090205481565b3480156104bf57600080fd5b506003546002540360001901610479565b3480156104dc57600080fd5b5061047967013fbe85edc9000081565b3480156104f857600080fd5b50610441610507366004613431565b610dd1565b34801561051857600080fd5b5061052c610527366004613362565b610ddc565b6040516103c9919061348a565b610441610547366004613362565b610e0b565b34801561055857600080fd5b50610441610567366004613362565b611072565b34801561057857600080fd5b5061047967015fb7f9b8c3800081565b34801561059457600080fd5b50610479600b5481565b3480156105aa57600080fd5b506104416105b93660046134b7565b6110d3565b3480156105ca57600080fd5b506105de6105d9366004613362565b61116c565b6040516103c99190613583565b3480156105f757600080fd5b5061047960105481565b34801561060d57600080fd5b5061044161061c366004613431565b611266565b34801561062d57600080fd5b5061044161063c366004613362565b611281565b34801561064d57600080fd5b5061066161065c366004613410565b611338565b6040516103c991906135ef565b34801561067a57600080fd5b50600c5461068e906001600160a01b031681565b6040516103c99190613614565b3480156106a757600080fd5b50601c5461068e906001600160a01b031681565b3480156106c757600080fd5b5060015460ff166103bc565b3480156106df57600080fd5b5061047960135481565b3480156106f557600080fd5b50610414610704366004613362565b611403565b34801561071557600080fd5b50610787610724366004613362565b60176020526000908152604090205460ff8082169161010081048216916201000082048116916301000000810482169164010000000082048116916501000000000081048216916601000000000000820481169167010000000000000090041688565b6040516103c9989796959493929190613622565b3480156107a757600080fd5b506107e76107b6366004613362565b60186020526000908152604090205460ff808216916101008104821691620100008204811691630100000090041684565b6040516103c99493929190613699565b34801561080357600080fd5b50610479610812366004613410565b611415565b34801561082357600080fd5b50610441611464565b34801561083857600080fd5b506103bc610847366004613362565b6114a0565b34801561085857600080fd5b5061047960125481565b34801561086e57600080fd5b50600d5461068e906001600160a01b031681565b34801561088e57600080fd5b5061044161089d36600461373c565b6114ec565b3480156108ae57600080fd5b506104416108bd366004613362565b61158e565b6104416108d036600461388f565b611785565b3480156108e157600080fd5b506103bc6108f0366004613362565b60196020526000908152604090205460ff1681565b34801561091157600080fd5b5060015461010090046001600160a01b0316610414565b34801561093457600080fd5b5061047966f8b0a10e47000081565b34801561094f57600080fd5b506103e76119b2565b34801561096457600080fd5b50610479610973366004613410565b601a6020526000908152604090205481565b34801561099157600080fd5b506109a56109a0366004613362565b6119c1565b6040516103c99190613927565b3480156109be57600080fd5b5061047960145481565b3480156109d457600080fd5b506104416109e3366004613935565b611a5c565b3480156109f457600080fd5b50610441610a03366004613957565b611afd565b348015610a1457600080fd5b506103bc610a23366004613410565b6001600160a01b031660009081526020819052604090205460ff1690565b348015610a4d57600080fd5b50610441610a5c366004613a19565b611b96565b348015610a6d57600080fd5b50610441610a7c366004613a98565b611be1565b348015610a8d57600080fd5b50610441610a9c366004613ab9565b611c2c565b348015610aad57600080fd5b50610441610abc366004613b11565b611cb9565b348015610acd57600080fd5b506103e7610adc366004613362565b611cf4565b348015610aed57600080fd5b5061047960155481565b348015610b0357600080fd5b50610479600f5481565b610441610b1b366004613ba8565b611ed6565b348015610b2c57600080fd5b50610479683635c9adc5dea0000081565b348015610b4957600080fd5b506103bc610b58366004613be3565b6122c6565b348015610b6957600080fd5b50610441610b78366004613410565b612317565b348015610b8957600080fd5b50610441610b98366004613935565b612376565b348015610ba957600080fd5b50610441610bb8366004613362565b61240c565b348015610bc957600080fd5b50600e5461068e906001600160a01b031681565b60006001600160e01b031982166380ac58cd60e01b1480610c0e57506001600160e01b03198216635b5e139f60e01b145b80610c2957506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060048054610c3e90613c2c565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90613c2c565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b6000610ccc82612441565b610ce9576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6001546001600160a01b03610100909104163314610d3e5760405162461bcd60e51b8152600401610d3590613c8e565b60405180910390fd5b601355565b6000610d4e82611403565b9050806001600160a01b0316836001600160a01b03161415610d835760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610da35750610da181336122c6565b155b15610dc1576040516367d9dca160e11b815260040160405180910390fd5b610dcc83838361247a565b505050565b610dcc8383836124e3565b6000610de7826114a0565b1515600114610df557600080fd5b5060009081526017602052604090205460ff1690565b33803b90328114610e2e5760405162461bcd60e51b8152600401610d3590613cd2565b8115610e4c5760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff1615610e6f5760405162461bcd60e51b8152600401610d3590613d16565b600254600f54610e80906001613d3c565b610e8a8583613d3c565b1115610ea85760405162461bcd60e51b8152600401610d3590613d88565b60015461010090046001600160a01b03166001600160a01b0316336001600160a01b031614610f6b57600084118015610efc5750601554336000908152601b6020526040902054610ef99086613d3c565b11155b610f185760405162461bcd60e51b8152600401610d3590613dcc565b601354600214610f3a5760405162461bcd60e51b8152600401610d3590613e10565b610f4c67015fb7f9b8c3800085613e20565b341015610f6b5760405162461bcd60e51b8152600401610d3590613e73565b6000610f756126f9565b905060005b85811015610ffc576000610f8f606484613e99565b9050600f81108015610fa457506105dc601154105b15610fc457610fb38185612734565b610fbd838561281f565b9250610fdb565b610fce8185612853565b610fd8838561281f565b92505b610fe6600185613d3c565b9350508080610ff490613ead565b915050610f7a565b506110193386604051806020016040528060008152506000612acb565b336000908152601b602052604081208054879290611038908490613d3c565b909155505060405161105292508391504190602001613ef0565b60408051601f198184030181529190528051602090910120600a55505050565b6001546001600160a01b036101009091041633146110a25760405162461bcd60e51b8152600401610d3590613c8e565b604051339082156108fc029083906000818181858888f193505050501580156110cf573d6000803e3d6000fd5b5050565b6001546001600160a01b036101009091041633146111035760405162461bcd60e51b8152600401610d3590613c8e565b604051637921219560e11b81526001600160a01b0384169063f242432a90611135903090339087908790600401613f16565b600060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b50505050505050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101919091526111b682612441565b6111d25760405162461bcd60e51b8152600401610d3590613f9a565b5060009081526017602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216938101939093526301000000820481166060840152640100000000820481166080840152650100000000008204811660a084015266010000000000008204811660c08401526701000000000000009091041660e082015290565b610dcc83838360405180602001604052806000815250611b96565b6001546001600160a01b036101009091041633146112b15760405162461bcd60e51b8152600401610d3590613c8e565b6112ba816114a0565b156112fa576000818152601760205260408120805467ffffffffffffffff1916905560128054600192906112ef908490613faa565b9091555061132c9050565b6000818152601860205260408120805463ffffffff191690556011805460019290611326908490613faa565b90915550505b61133581612c9c565b50565b6060600061134583611415565b90508067ffffffffffffffff8111156113605761136061378d565b604051908082528060200260200182016040528015611389578160200160208202803683370190505b509150600060015b6002548110156113fb57846001600160a01b03166113ae82611403565b6001600160a01b031614156113e957808483815181106113d0576113d0613fc1565b60209081029190910101526113e6600183613d3c565b91505b806113f381613ead565b915050611391565b505050919050565b600061140e82612e3c565b5192915050565b60006001600160a01b03821661143e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b6001546001600160a01b036101009091041633146114945760405162461bcd60e51b8152600401610d3590613c8e565b61149e6000612f65565b565b60006114ab82612441565b6114c75760405162461bcd60e51b8152600401610d3590613f9a565b60008281526017602052604090205460ff166114e4576000610c29565b600192915050565b6001546001600160a01b0361010090910416331461151c5760405162461bcd60e51b8152600401610d3590613c8e565b60005b828110156115885761157684848381811061153c5761153c613fc1565b90506020020160208101906115519190613410565b6001600160a01b03166000908152602081905260409020805460ff1916841515179055565b8061158081613ead565b91505061151f565b50505050565b33803b903281146115b15760405162461bcd60e51b8152600401610d3590613cd2565b81156115cf5760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff16156115f25760405162461bcd60e51b8152600401610d3590613d16565b601354600214156116155760405162461bcd60e51b8152600401610d3590613e10565b600254600f54611626906001613d3c565b6116308583613d3c565b111561164e5760405162461bcd60e51b8152600401610d3590613d88565b60006116586126f9565b905060005b858110156116df576000611672606484613e99565b9050600f8110801561168757506105dc601154105b156116a7576116968185612734565b6116a0838561281f565b92506116be565b6116b18185612853565b6116bb838561281f565b92505b836116c881613ead565b9450505080806116d790613ead565b91505061165d565b50600c546001600160a01b0316639dc29fac3361170588683635c9adc5dea00000613e20565b6040518363ffffffff1660e01b8152600401611722929190613fd7565b600060405180830381600087803b15801561173c57600080fd5b505af1158015611750573d6000803e3d6000fd5b505050506117703386604051806020016040528060008152506000612acb565b50508041604051602001611052929190613ef0565b60015460ff16156117a85760405162461bcd60e51b8152600401610d3590613d16565b6013546001146117ca5760405162461bcd60e51b8152600401610d3590613e10565b600254600f546117db906001613d3c565b6117e58483613d3c565b11156118035760405162461bcd60e51b8152600401610d3590613d88565b60008311801561182e5750601454336000908152601a602052604090205461182b9085613d3c565b11155b61184a5760405162461bcd60e51b8152600401610d3590614035565b61185c67013fbe85edc9000084613e20565b34101561187b5760405162461bcd60e51b8152600401610d3590613e73565b60003360405160200161188e9190614045565b6040516020818303038152906040528051906020012090506118bd600b548285612fcc9092919063ffffffff16565b6118d95760405162461bcd60e51b8152600401610d359061407e565b60006118e36126f9565b905060005b8581101561196a5760006118fd606484613e99565b9050600f8110801561191257506105dc601154105b15611932576119218186612734565b61192b838661281f565b9250611949565b61193c8186612853565b611946838661281f565b92505b611954600186613d3c565b945050808061196290613ead565b9150506118e8565b506119873386604051806020016040528060008152506000612acb565b336000908152601a6020526040812080548792906119a6908490613d3c565b90915550505050505050565b606060058054610c3e90613c2c565b6040805160808101825260008082526020820181905291810182905260608101919091526119ee82612441565b611a0a5760405162461bcd60e51b8152600401610d3590613f9a565b506000908152601860209081526040918290208251608081018452905460ff80821683526101008204811693830193909352620100008104831693820193909352630100000090920416606082015290565b6001546001600160a01b03610100909104163314611a8c5760405162461bcd60e51b8152600401610d3590613c8e565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb90611aba9033908590600401613fd7565b6020604051808303816000875af1158015611ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcc9190614099565b6001600160a01b038216331415611b275760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611b8a9085906132d4565b60405180910390a35050565b611ba18484846124e3565b6001600160a01b0383163b15158015611bc35750611bc184848484612fe2565b155b15611588576040516368d2bf6b60e11b815260040160405180910390fd5b6001546001600160a01b03610100909104163314611c115760405162461bcd60e51b8152600401610d3590613c8e565b60018115151415611c24576113356130cb565b611335613134565b6001546001600160a01b03610100909104163314611c5c5760405162461bcd60e51b8152600401610d3590613c8e565b600c80546001600160a01b0395861673ffffffffffffffffffffffffffffffffffffffff1991821617909155600d805494861694821694909417909355600e805492851692841692909217909155601c8054919093169116179055565b6001546001600160a01b03610100909104163314611ce95760405162461bcd60e51b8152600401610d3590613c8e565b601491909155601555565b6060611cff82612441565b611d1b5760405162461bcd60e51b8152600401610d3590613f9a565b611d24826114a0565b611df1576000828152601860209081526040918290208251608081018452905460ff80821683526101008204811693830193909352620100008104831682850152630100000090049091166060820152601c5491516303bb6f4f60e01b815290916001600160a01b0316906303bb6f4f90611da590869085906004016140ba565b600060405180830381865afa158015611dc2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611dea919081019061412d565b9392505050565b611dfa826114a0565b15611ebd5760008281526017602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216818501526301000000830482166060820152640100000000830482166080820152650100000000008304821660a082015266010000000000008304821660c08201526701000000000000009092041660e0820152601c54915163011c789160e31b815290916001600160a01b0316906308e3c48890611da59086908590600401614168565b505060408051602081019091526000815290565b919050565b33803b90328114611ef95760405162461bcd60e51b8152600401610d3590613cd2565b8115611f175760405162461bcd60e51b8152600401610d3590613cd2565b60015460ff1615611f3a5760405162461bcd60e51b8152600401610d3590613d16565b60135460021415611f5d5760405162461bcd60e51b8152600401610d3590613e10565b600254835180611f7f5760405162461bcd60e51b8152600401610d35906141b8565b600f54611f8d906001613d3c565b611f978284613d3c565b1115611fb55760405162461bcd60e51b8152600401610d3590613d88565b60015461010090046001600160a01b03166001600160a01b0316336001600160a01b03161461200e57611fef66f8b0a10e47000082613e20565b34101561200e5760405162461bcd60e51b8152600401610d3590613e73565b60006120186126f9565b905060005b8281101561229357600d5487516001600160a01b0390911690636352211e9089908490811061204e5761204e613fc1565b60200260200101516040518263ffffffff1660e01b81526004016120729190613402565b6020604051808303816000875af1158015612091573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b591906141d3565b6001600160a01b0316336001600160a01b031614806121655750600e5487516001600160a01b039091169063f1442e399033908a90859081106120fa576120fa613fc1565b60200260200101516040518363ffffffff1660e01b815260040161211f929190613fd7565b6020604051808303816000875af115801561213e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216291906141ff565b15155b6121815760405162461bcd60e51b8152600401610d35906141b8565b6019600088838151811061219757612197613fc1565b60209081029190910181015182528101919091526040016000205460ff16156121d25760405162461bcd60e51b8152600401610d3590614254565b6001601960008984815181106121ea576121ea613fc1565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555060006064836122269190613e99565b9050600f8110801561223b57506105dc601154105b1561225b5761224a8186612734565b612254838661281f565b9250612272565b6122658186612853565b61226f838661281f565b92505b61227d600186613d3c565b945050808061228b90613ead565b91505061201d565b506122b03383604051806020016040528060008152506000612acb565b5050508041604051602001611052929190613ef0565b6001600160a01b03811660009081526020819052604081205460ff1680611dea5750506001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b6001546001600160a01b036101009091041633146123475760405162461bcd60e51b8152600401610d3590613c8e565b6001600160a01b03811661236d5760405162461bcd60e51b8152600401610d35906142a7565b61133581612f65565b6001546001600160a01b036101009091041633146123a65760405162461bcd60e51b8152600401610d3590613c8e565b604051632142170760e11b81526001600160a01b038316906342842e0e906123d6903090339086906004016142b7565b600060405180830381600087803b1580156123f057600080fd5b505af1158015612404573d6000803e3d6000fd5b505050505050565b6001546001600160a01b0361010090910416331461243c5760405162461bcd60e51b8152600401610d3590613c8e565b600b55565b600081600111158015612455575060025482105b8015610c29575050600090815260066020526040902054600160e01b900460ff161590565b600082815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006124ee82612e3c565b80519091506000906001600160a01b0316336001600160a01b0316148061251c5750815161251c90336122c6565b8061253757503361252c84610cc1565b6001600160a01b0316145b90508061255757604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b03161461258c5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166125b357604051633a954ecd60e21b815260040160405180910390fd5b6125c3600084846000015161247a565b6001600160a01b038581166000908152600760209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600690945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166126af576002548110156126af578251600082815260066020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b600033424842600a546040516020016127169594939291906142df565b6040516020818303038152906040528051906020012060001c905090565b6000612740838361281f565b9050600061274d82613187565b9050612759828461281f565b9150600061276683613187565b6040805160808101825260ff858116825283811660208084019182526016546201000080820485168688019081526101009283900486166060880190815260008e815260189095529784208751815496519251995190881661ffff19909716969096179187169093021763ffff000019169685160263ff000000191695909517630100000092909316919091029190911790925560118054939450909260019290612812908490613d3c565b9091555050505050505050565b60008282604051602001612834929190614338565b60408051601f1981840301815291905280516020909101209392505050565b600061285f838361281f565b9050600061286e600383613e99565b612879906001613d3c565b9050612885828461281f565b91506000612894600384613e99565b61289f906001613d3c565b90506128ab838561281f565b925060006128ba600385613e99565b6128c5906001613d3c565b90506128d1848661281f565b935060006128df848661319f565b90506128eb858761281f565b945060006128f985876131e0565b9050612905868861281f565b95506000612914600388613e99565b61291f906001613d3c565b90506000806040518061010001604052808960ff1681526020018760ff1681526020018460ff1681526020018860ff168152602001601660039054906101000a900460ff1660ff1681526020018660ff1681526020018560ff1681526020018360ff16815250905080601760008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff160217905550905050600160126000828254612ab99190613d3c565b90915550505050505050505050505050565b6002546001600160a01b038516612af457604051622e076360e81b815260040160405180910390fd5b83612b125760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260076020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600690925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612bc457506001600160a01b0387163b15155b15612c4d575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612c156000888480600101955088612fe2565b612c32576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612bca578260025414612c4857600080fd5b612c93565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612c4e575b506002556126f2565b6000612ca782612e3c565b9050612cb9600083836000015161247a565b80516001600160a01b039081166000908152600760209081526040808320805467ffffffffffffffff19811667ffffffffffffffff9182166000190182161790915585518516845281842080547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff81167001000000000000000000000000000000009182900484166001908101851690920217909155865188865260069094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b1916939093179055908501808352912054909116612df357600254811015612df3578151600082815260066020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600380546001019055565b60408051606081018252600080825260208201819052918101919091528180600111158015612e6c575060025481105b15612f4c57600081815260066020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290612f4a5780516001600160a01b031615612ee0579392505050565b5060001901600081815260066020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215612f45579392505050565b612ee0565b505b604051636f96cda160e11b815260040160405180910390fd5b600180546001600160a01b0383811661010081810274ffffffffffffffffffffffffffffffffffffffff001985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612fd98584613213565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613017903390899088908890600401614346565b6020604051808303816000875af1925050508015613052575060408051601f3d908101601f1916820190925261304f9181019061438b565b60015b6130ad573d808015613080576040519150601f19603f3d011682016040523d82523d6000602084013e613085565b606091505b5080516130a5576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60015460ff16156130ee5760405162461bcd60e51b8152600401610d3590613d16565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b60405161312a919061339d565b60405180910390a1565b60015460ff166131565760405162461bcd60e51b8152600401610d35906143e0565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361311d565b6000613194600483613e99565b610c29906005613d3c565b6000605a600160ff851614156131b7575060736131c7565b8360ff16600214156131c7575060415b60ff81166131d6601585613e99565b6130c39190613d3c565b6000605a600160ff851614156131f8575060326131c7565b8360ff16600214156131c757506046806131d6601585613e99565b600081815b845181101561327f57600085828151811061323557613235613fc1565b6020026020010151905080831161325b576000838152602082905260409020925061326c565b600081815260208490526040902092505b508061327781613ead565b915050613218565b509392505050565b6001600160e01b031981165b811461133557600080fd5b8035610c2981613287565b6000602082840312156132be576132be600080fd5b60006130c3848461329e565b8015155b82525050565b60208101610c2982846132ca565b60005b838110156132fd5781810151838201526020016132e5565b838111156115885750506000910152565b6000613318825190565b80845260208401935061332f8185602086016132e2565b601f01601f19169290920192915050565b60208082528101611dea818461330e565b80613293565b8035610c2981613351565b60006020828403121561337757613377600080fd5b60006130c38484613357565b60006001600160a01b038216610c29565b6132ce81613383565b60208101610c298284613394565b61329381613383565b8035610c29816133ab565b600080604083850312156133d5576133d5600080fd5b60006133e185856133b4565b92505060206133f285828601613357565b9150509250929050565b806132ce565b60208101610c2982846133fc565b60006020828403121561342557613425600080fd5b60006130c384846133b4565b60008060006060848603121561344957613449600080fd5b600061345586866133b4565b9350506020613466868287016133b4565b925050604061347786828701613357565b9150509250925092565b60ff81166132ce565b60208101610c298284613481565b6000610c2982613383565b61329381613498565b8035610c29816134a3565b6000806000606084860312156134cf576134cf600080fd5b60006134db86866134ac565b935050602061346686828701613357565b80516101008301906134fe8482613481565b5060208201516135116020850182613481565b5060408201516135246040850182613481565b5060608201516135376060850182613481565b50608082015161354a6080850182613481565b5060a082015161355d60a0850182613481565b5060c082015161357060c0850182613481565b5060e082015161158860e0850182613481565b6101008101610c2982846134ec565b600061359e83836133fc565b505060200190565b60006135b0825190565b80845260209384019383018060005b838110156135e45781516135d38882613592565b9750602083019250506001016135bf565b509495945050505050565b60208082528101611dea81846135a6565b6000610c2982613498565b6132ce81613600565b60208101610c29828461360b565b6101008101613631828b613481565b61363e602083018a613481565b61364b6040830189613481565b6136586060830188613481565b6136656080830187613481565b61367260a0830186613481565b61367f60c0830185613481565b61368c60e0830184613481565b9998505050505050505050565b608081016136a78287613481565b6136b46020830186613481565b6136c16040830185613481565b6136ce6060830184613481565b95945050505050565b60008083601f8401126136ec576136ec600080fd5b50813567ffffffffffffffff81111561370757613707600080fd5b60208301915083602082028301111561372257613722600080fd5b9250929050565b801515613293565b8035610c2981613729565b60008060006040848603121561375457613754600080fd5b833567ffffffffffffffff81111561376e5761376e600080fd5b61377a868287016136d7565b9350935050602061347786828701613731565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156137c9576137c961378d565b6040525050565b60006137db60405190565b9050611ed182826137a3565b600067ffffffffffffffff8211156138015761380161378d565b5060209081020190565b600061381e613819846137e7565b6137d0565b8381529050602080820190840283018581111561383d5761383d600080fd5b835b8181101561386157806138528882613357565b8452506020928301920161383f565b5050509392505050565b600082601f83011261387f5761387f600080fd5b81356130c384826020860161380b565b600080604083850312156138a5576138a5600080fd5b60006138b18585613357565b925050602083013567ffffffffffffffff8111156138d1576138d1600080fd5b6133f28582860161386b565b805160808301906138ee8482613481565b5060208201516139016020850182613481565b5060408201516139146040850182613481565b5060608201516115886060850182613481565b60808101610c2982846138dd565b6000806040838503121561394b5761394b600080fd5b60006133e185856134ac565b6000806040838503121561396d5761396d600080fd5b600061397985856133b4565b92505060206133f285828601613731565b600067ffffffffffffffff8211156139a4576139a461378d565b601f19601f83011660200192915050565b82818337506000910152565b60006139cf6138198461398a565b9050828152602081018484840111156139ea576139ea600080fd5b61327f8482856139b5565b600082601f830112613a0957613a09600080fd5b81356130c38482602086016139c1565b60008060008060808587031215613a3257613a32600080fd5b6000613a3e87876133b4565b9450506020613a4f878288016133b4565b9350506040613a6087828801613357565b925050606085013567ffffffffffffffff811115613a8057613a80600080fd5b613a8c878288016139f5565b91505092959194509250565b600060208284031215613aad57613aad600080fd5b60006130c38484613731565b60008060008060808587031215613ad257613ad2600080fd5b6000613ade87876133b4565b9450506020613aef878288016133b4565b9350506040613b00878288016133b4565b9250506060613a8c878288016133b4565b60008060408385031215613b2757613b27600080fd5b60006133e18585613357565b6000613b41613819846137e7565b83815290506020808201908402830185811115613b6057613b60600080fd5b835b818110156138615780613b758882613357565b84525060209283019201613b62565b600082601f830112613b9857613b98600080fd5b81356130c3848260208601613b33565b600060208284031215613bbd57613bbd600080fd5b813567ffffffffffffffff811115613bd757613bd7600080fd5b6130c384828501613b84565b60008060408385031215613bf957613bf9600080fd5b6000613c0585856133b4565b92505060206133f2858286016133b4565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613c4057607f821691505b60208210811415613c5357613c53613c16565b50919050565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610c2981613c59565b601781526000602082017f796f7527726520747279696e6720746f2063686561742100000000000000000081529150613c87565b60208082528101610c2981613c9e565b601081526000602082017f5061757361626c653a207061757365640000000000000000000000000000000081529150613c87565b60208082528101610c2981613ce2565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d4f57613d4f613d26565b500190565b601681526000602082017f6d6178696d756d20737570706c7920726561636865640000000000000000000081529150613c87565b60208082528101610c2981613d54565b601081526000602082017f496e76616c6964207175616e746974790000000000000000000000000000000081529150613c87565b60208082528101610c2981613d98565b601381526000602082017f4d696e74207374616765206e6f74206c6976650000000000000000000000000081529150613c87565b60208082528101610c2981613ddc565b6000816000190483118215151615613e3a57613e3a613d26565b500290565b601481526000602082017f696e76616c696420657468657220616d6f756e7400000000000000000000000081529150613c87565b60208082528101610c2981613e3f565b634e487b7160e01b600052601260045260246000fd5b600082613ea857613ea8613e83565b500690565b6000600019821415613ec157613ec1613d26565b5060010190565b6000610c298260601b90565b6000610c2982613ec8565b6132ce613eeb82613383565b613ed4565b6000613efc8285613edf565b601482019150613f0c8284613edf565b5060140192915050565b60a08101613f248287613394565b613f316020830186613394565b613f3e60408301856133fc565b613f4b60608301846133fc565b818103608083015260008152602081015b9695505050505050565b601481526000602082017f746f6b656e20646f6573206e6f7420657869737400000000000000000000000081529150613c87565b60208082528101610c2981613f66565b600082821015613fbc57613fbc613d26565b500390565b634e487b7160e01b600052603260045260246000fd5b60408101613fe58285613394565b611dea60208301846133fc565b602381526000602082017f496e76616c6964207175616e7469747920666f722077686974656c697374206d8152621a5b9d60ea1b602082015291505b5060400190565b60208082528101610c2981613ff2565b60006140518284613edf565b50601401919050565b600d81526000602082016c24b73b30b634b210383937b7b360991b81529150613c87565b60208082528101610c298161405a565b8051610c2981613729565b6000602082840312156140ae576140ae600080fd5b60006130c3848461408e565b60a081016140c882856133fc565b611dea60208301846138dd565b60006140e36138198461398a565b9050828152602081018484840111156140fe576140fe600080fd5b61327f8482856132e2565b600082601f83011261411d5761411d600080fd5b81516130c38482602086016140d5565b60006020828403121561414257614142600080fd5b815167ffffffffffffffff81111561415c5761415c600080fd5b6130c384828501614109565b610120810161417782856133fc565b611dea60208301846134ec565b601081526000602082017f696e76616c696420746f6b656e2049440000000000000000000000000000000081529150613c87565b60208082528101610c2981614184565b8051610c29816133ab565b6000602082840312156141e8576141e8600080fd5b60006130c384846141c8565b8051610c2981613351565b60006020828403121561421457614214600080fd5b60006130c384846141f4565b601a81526000602082017f746f6b656e20616c7265616479207573656420746f206d696e7400000000000081529150613c87565b60208082528101610c2981614220565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061402e565b60208082528101610c2981614264565b606081016142c58286613394565b6142d26020830185613394565b6130c360408301846133fc565b60006142eb8288613edf565b6014820191506142fb82876133fc565b60208201915061430b82866133fc565b60208201915061431b82856133fc565b60208201915061432b82846133fc565b5060200195945050505050565b60408101613fe582856133fc565b608081016143548287613394565b6143616020830186613394565b61436e60408301856133fc565b8181036060830152613f5c818461330e565b8051610c2981613287565b6000602082840312156143a0576143a0600080fd5b60006130c38484614380565b601481526000602082017f5061757361626c653a206e6f742070617573656400000000000000000000000081529150613c87565b60208082528101610c29816143ac56fea26469706673582212200c7ac9cbcd5f0e6cc0b0e800444d4f0e10037457242341c01765006c1d2c220b64736f6c634300080b0033

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

000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000006e91888dac29234d6de8507087ed7ef046335f50000000000000000000000008328f8d228450a9662bfedd526c25278dfbf5e9d000000000000000000000000059905e2d03816b8b322eb8c29b634c291162e0f00000000000000000000000065393db179747458608012a2c805ae6047195699ef9fa995f80f2c2a30869ebca6ad88f37090d878aa75e2eec44bc6176c40c5aa

-----Decoded View---------------
Arg [0] : _maxSupply (uint256): 10000
Arg [1] : _maxCelestialSupply (uint256): 1500
Arg [2] : _fbx (address): 0x06e91888dAc29234d6DE8507087eD7eF046335F5
Arg [3] : _ckey (address): 0x8328F8d228450A9662BfEdd526c25278DfBF5e9d
Arg [4] : _metadataHandler (address): 0x059905E2d03816b8b322eb8c29b634c291162e0f
Arg [5] : _vault (address): 0x65393DB179747458608012A2C805AE6047195699
Arg [6] : _whitelistRoot (bytes32): 0xef9fa995f80f2c2a30869ebca6ad88f37090d878aa75e2eec44bc6176c40c5aa

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [1] : 00000000000000000000000000000000000000000000000000000000000005dc
Arg [2] : 00000000000000000000000006e91888dac29234d6de8507087ed7ef046335f5
Arg [3] : 0000000000000000000000008328f8d228450a9662bfedd526c25278dfbf5e9d
Arg [4] : 000000000000000000000000059905e2d03816b8b322eb8c29b634c291162e0f
Arg [5] : 00000000000000000000000065393db179747458608012a2c805ae6047195699
Arg [6] : ef9fa995f80f2c2a30869ebca6ad88f37090d878aa75e2eec44bc6176c40c5aa


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.