ETH Price: $2,655.95 (+0.50%)

Contract

0xfE8f5042556C95f57D6a01989828178d3Af423C2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...179676092023-08-22 3:36:23367 days ago1692675383IN
Illumina: Ill Token
0 ETH0.0004625718.63129409
Set Approval For...179674862023-08-22 3:11:35367 days ago1692673895IN
Illumina: Ill Token
0 ETH0.0011318424.21583537
Simple Mint164604312023-01-22 6:03:35579 days ago1674367415IN
Illumina: Ill Token
0 ETH0.0136391115.86858308
Set Approval For...164074542023-01-14 20:32:11586 days ago1673728331IN
Illumina: Ill Token
0 ETH0.0004265217.23764696
Simple Mint163612232023-01-08 9:37:35593 days ago1673170655IN
Illumina: Ill Token
0 ETH0.0226935116.62578699
Simple Mint163402122023-01-05 11:11:59596 days ago1672917119IN
Illumina: Ill Token
0 ETH0.0123155914.61958822
Simple Mint163401762023-01-05 11:04:47596 days ago1672916687IN
Illumina: Ill Token
0 ETH0.0129498115.4605408
Simple Mint163401352023-01-05 10:56:35596 days ago1672916195IN
Illumina: Ill Token
0 ETH0.0129911915.42157126
Simple Mint162649962022-12-25 23:18:11606 days ago1672010291IN
Illumina: Ill Token
0 ETH0.0099409211.60954399
Simple Mint162360102022-12-21 22:18:35610 days ago1671661115IN
Illumina: Ill Token
0 ETH0.009457214.70320041
Simple Mint162208062022-12-19 19:22:35612 days ago1671477755IN
Illumina: Ill Token
0 ETH0.0207875214.2751453
Simple Mint162207822022-12-19 19:17:47612 days ago1671477467IN
Illumina: Ill Token
0 ETH0.0124629114.60999804
Simple Mint162207572022-12-19 19:12:47612 days ago1671477167IN
Illumina: Ill Token
0 ETH0.0092951116.55361362
Simple Mint162035292022-12-17 9:29:59615 days ago1671269399IN
Illumina: Ill Token
0 ETH0.0094993314.47479798
Simple Mint161966292022-12-16 10:21:59616 days ago1671186119IN
Illumina: Ill Token
0 ETH0.0071652615.51201144
Simple Mint161873622022-12-15 3:18:11617 days ago1671074291IN
Illumina: Ill Token
0 ETH0.008334412.69972349
Set Approval For...161781342022-12-13 20:22:47618 days ago1670962967IN
Illumina: Ill Token
0 ETH0.0006437413.79764943
Simple Mint161781242022-12-13 20:20:47618 days ago1670962847IN
Illumina: Ill Token
0 ETH0.0092808414.14187507
Set Approval For...161764092022-12-13 14:35:59618 days ago1670942159IN
Illumina: Ill Token
0 ETH0.0012269726.29840163
Set Approval For...161762892022-12-13 14:11:47618 days ago1670940707IN
Illumina: Ill Token
0 ETH0.0016285634.90580271
Simple Mint161714292022-12-12 21:52:47619 days ago1670881967IN
Illumina: Ill Token
0 ETH0.0081258414.53399613
Simple Mint161410162022-12-08 15:54:59623 days ago1670514899IN
Illumina: Ill Token
0 ETH0.0105390616.05911128
Set Approval For...161390502022-12-08 9:18:35624 days ago1670491115IN
Illumina: Ill Token
0 ETH0.0006783314.53912373
Simple Mint161390362022-12-08 9:15:47624 days ago1670490947IN
Illumina: Ill Token
0 ETH0.0211382414.94472885
Simple Mint161202032022-12-05 17:54:11626 days ago1670262851IN
Illumina: Ill Token
0 ETH0.0092136914.02228057
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IlluminaNFT_V3

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 29 : IlluminaNFT_V3.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import './ERC2981/ERC2981ContractWideRoyalties.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {DefaultOperatorFilterer} from "./OpenseaOperatorFilter//DefaultOperatorFilterer.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "./BlackSquareNFT.sol";
import "./OBYToken.sol";


contract IlluminaNFT_V3 is ERC721, DefaultOperatorFilterer, Ownable, ERC2981ContractWideRoyalties, VRFConsumerBaseV2 {
    VRFCoordinatorV2Interface COORDINATOR;
    using Counters for Counters.Counter;

    uint256 public s_requestId;
    uint256 private min;
    uint256 private max;
    uint256 private illuminaFactor;
    uint256 public illuminationTimeStamp = 0;
    uint256 public maxMintable = 5;
    uint256 constant ILLUMINA_BASE_SUPPLY = 20000;
    uint256 constant ILLUMINA_REGULAR_PRICE = 225;
    uint256 constant ILLUMINA_MIN_PRICE = 30;
    uint256 constant THRESHOLD = 25;

    uint16 requestConfirmations = 3;
    uint32 numWords =  1;
    uint32 callbackGasLimit = 2500000;
    uint64 s_subscriptionId;

    bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
    address vrfCoordinator = address(0x271682DEB8C4E0901D1a1550aD2e64D568E69909);
    address private treasury;

    string private baseURI;

    bool public getRandomnessFromOracles;
    bool public editBlacksquareEditions = true;
    bool public simpleMintable = true;

    OBYToken obyToken;
    BlackSquareNFT blackSquare;
    Counters.Counter private _tokenIds;

    mapping(uint256 => string) private _tokenURIs;
    mapping(address => bool) private _eligibles;
    mapping(uint256 => bool) private _burnedTokens;

    event MintTokens(uint256[] tokens, address purchaser, uint256 quantity);


    constructor(address tokenAddress, address _blackSquareAddress, address _treasury, 
    uint256 _royaltyValue, uint64 _subscriptionId, string memory _illuminaBaseURI,
    uint256 _minTime, uint256 _maxTime, uint256 _illuminaFactor, bool _getRandomnessFromOracles) VRFConsumerBaseV2(vrfCoordinator) ERC721("Illumina", "Ill") {
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        obyToken = OBYToken(tokenAddress);
        blackSquare = BlackSquareNFT(_blackSquareAddress);
        treasury = _treasury;
        s_subscriptionId = _subscriptionId;
        baseURI = _illuminaBaseURI;
        min = _minTime;
        max = _maxTime;
        illuminaFactor = _illuminaFactor;
        getRandomnessFromOracles = _getRandomnessFromOracles;
        _setRoyalties(_treasury, _royaltyValue);
    }

     modifier onlyEligible() {
        require(owner() == _msgSender() || _eligibles[_msgSender()] == true, "IlluminaNFT: caller is not eligible");
        _;
    }

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

    function setEditBlacksquareEditions (bool _edit) public onlyEligible {
        editBlacksquareEditions = _edit;
    }

    function setBulkMintAttributes (uint256 _maxMintable, bool _simpleMintable) public onlyEligible {
        maxMintable = _maxMintable;
        simpleMintable = _simpleMintable;
    }

    function setEligibles(address _eligible, bool _val) public onlyOwner {
        _eligibles[_eligible] = _val;
    }

    function setIlluminationTimeStamp(uint256 _illuminationTimeStamp) public onlyEligible {
        illuminationTimeStamp = _illuminationTimeStamp;
    }

    function setRandomnessFromOracles(bool _getRandomnessFromOracles) public onlyOwner {
        getRandomnessFromOracles = _getRandomnessFromOracles;
    }

    function setRoyalties(address recipient, uint256 value) external onlyOwner {
        _setRoyalties(recipient, value);
    }

    function setKeyHash(bytes32 _keyHash) external onlyOwner {
        keyHash = _keyHash;
    }

    function setMin(uint8 _min) external onlyOwner {
        min = _min;
    }

    function setMax(uint8 _max) external onlyOwner {
        max = _max;
    }

    function setSubscriptionId(uint64 _s_subscriptionId) external onlyOwner {
        s_subscriptionId = _s_subscriptionId;
    }

    function setBaseURI(string memory _illuminaBaseURI) external onlyOwner {
        baseURI = _illuminaBaseURI;
    }

    function setTokenIpfsHash(uint256 tokenId, string memory ipfsHash) external onlyOwner {
        _tokenURIs[tokenId] = ipfsHash;
    }

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

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        string memory illuminaBaseURI = _baseURI();
        string memory tokenURIHash = _tokenURIs[tokenId];
        return bytes(illuminaBaseURI).length > 0 ? string(abi.encodePacked(illuminaBaseURI, tokenURIHash)) : "";
    }

     function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
        public
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    function requestRandomWords() internal  {
        s_requestId = COORDINATOR.requestRandomWords(
            keyHash,
            s_subscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );
    }

    function fulfillRandomWords(
        uint256,
        uint256[] memory randomWords
    ) internal override {
        require(randomWords.length > 0, 'OracleContract: No Number delivered');
        uint256 illuminationDate = randomWords[0] % (max - min + 1) + min;

        illuminationTimeStamp = illuminationDate;
    }

    function getTokensHeldByUser(address user) public view returns (uint256[] memory) {
        uint256 balance = balanceOf(user);
        uint256[] memory emptyTokens = new uint256[](0);
        uint256[] memory tokenIds = new uint256[](balance);
        uint256 j = 0;
        for (uint256 i = 1; i <= _tokenIds.current(); i++ ) {
            if (!_burnedTokens[i]) {
                address tokenOwner = ownerOf(i);

                if (tokenOwner == user) {
                    tokenIds[j] = i;
                    j++;
                }
            }
        }
        return tokenIds.length > 0 ? tokenIds : emptyTokens;
    }

    function simpleMint(string[] memory _ipfsHashes, uint256[] memory _tokens) external {
        require(simpleMintable == true, 'No tokens can be minted at the moment');

        if (_tokens.length <= maxMintable) {
            fulfillRequirements(_tokens[0], _tokens.length);
            handleMint(_ipfsHashes, _tokens.length, _tokens);
        }
    }


    function fulfillRequirements(uint256 tokenId, uint256 qtyToMint) internal view {
        require(_tokenIds.current() <= ILLUMINA_BASE_SUPPLY, 'Max Amount of Illuminas minted');

        require(tokenId == getNextTokenId(), 'Trying to mint Token with incorrect Metadata');

        require(blackSquare.getAvailableIlluminaCount() >= (_tokenIds.current() + qtyToMint), 'IlluminaNFT, max mintable number reached');
        (uint256 pricePerToken, ,) = getIlluminaPrice();
        uint256 totalPrice = pricePerToken * qtyToMint;

        bool balancesChecked = obyToken.checkBalances(totalPrice, _msgSender());
        require(balancesChecked, 'IlluminaNFT, insufficient balances');
    }

    function handleMint (string[] memory _ipfsHashes, uint256 qtyToMint, uint256[] memory _tokens) internal {
        (uint256 pricePerToken, ,) = getIlluminaPrice();
        uint256 totalPrice = pricePerToken * qtyToMint;

        for (uint i = 0; i < qtyToMint; i++) {
            _tokenIds.increment();

            require(!_exists(_tokenIds.current()), "IlluminaNFT: Token already exists");

            _mint(_msgSender(), _tokenIds.current());

            _tokenURIs[_tokenIds.current()] = _ipfsHashes[i];

            if ((_tokenIds.current() == THRESHOLD || (_tokenIds.current() > THRESHOLD && _tokenIds.current() % THRESHOLD == 0))) {
                handleEditionEdit();
            }

        }

        emit MintTokens(_tokens, _msgSender(), qtyToMint);

        obyToken.burnToken(totalPrice, _msgSender());
    }

    function handleEditionEdit () internal {
        if (!getRandomnessFromOracles) {
            uint256 randmomNumber = uint256(keccak256("wow")) % (max - min + 1) + min;

            uint256 randomnDate = block.timestamp + randmomNumber;

            if(editBlacksquareEditions) {
                uint256 editionId = blackSquare.getFirstEditionToSetIlluminationDate();
                blackSquare.editEdition(editionId, randomnDate);
            } else {
                illuminationTimeStamp = randomnDate;
            }
        } else {
            if(editBlacksquareEditions) {
                requestRandomWords();
            }
        }
    }

    function getIlluminaPrice() public view returns (uint256, uint256, uint256) {
        uint256 availableIllumina = blackSquare.getAvailableIlluminaCount();

        uint256 soldIllumina = _tokenIds.current();

        uint256 vacantIllumina = availableIllumina - soldIllumina;

        if (ILLUMINA_REGULAR_PRICE > (vacantIllumina / illuminaFactor)) {
            uint256 residualPrice = ILLUMINA_REGULAR_PRICE - ( vacantIllumina / illuminaFactor );

            if (residualPrice > ILLUMINA_MIN_PRICE) {
                return (residualPrice, availableIllumina, vacantIllumina);
            }
        }

        return (ILLUMINA_MIN_PRICE, availableIllumina, vacantIllumina);
    }

    function getNextTokenId() public view returns (uint256) {
        return blackSquare.getAvailableIlluminaCount() == 0 ? 0 : _tokenIds.current() + 1;
    }

    function burnIllumina(address user, uint256 _burnThreshold) public onlyEligible {
        uint256[] memory tokenIds = getTokensHeldByUser(user);

        for (uint256 i = 0; i < tokenIds.length; i++ ) {
            if (i < _burnThreshold) {
                uint256 tokenId = tokenIds[i];

                super._burn(tokenId);

                _burnedTokens[tokenId] = true;
            }
        }
    }
}

File 2 of 29 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

File 3 of 29 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 4 of 29 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 5 of 29 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 8 of 29 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 10 of 29 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @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 virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @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) {
        _requireMinted(tokenId);

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_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 {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _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 {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * 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
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a 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 _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 11 of 29 : 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 12 of 29 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 14 of 29 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 15 of 29 : 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 16 of 29 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 18 of 29 : 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 19 of 29 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 21 of 29 : BlackSquareNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import './ERC2981/ERC2981ContractWideRoyalties.sol';
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Erc721OperatorFilter/IOperatorFilter.sol";
import "./OBYToken.sol";


contract BlackSquareNFT is ERC721, Ownable, ERC2981ContractWideRoyalties {
    using Strings for uint256;
    using Counters for Counters.Counter;

    uint256 private rewardPerCycle;
    uint256 public totalCycleCount = 0;
    uint256 constant THRESHOLD = 25;
    uint256 constant TOKENS_PER_EDITION = 25;
    uint256 constant MAX_NUMBER_EDITIONS = 58;

    address private treasury;

    string public openSeaContractURI;
    string public baseURI;

    OBYToken obyToken;
    IOperatorFilter operatorFilter;
    Counters.Counter private _editionIds;
    Counters.Counter private _tokenIds;

   struct Edition {
        uint256[TOKENS_PER_EDITION] tokens;
        uint256 illuminationTimeStamp;
        uint256 lastUpdateTimestamp;
        uint256 cycle;
        uint256 id;
        string editionThumbnail;
        string illumination;
    }

    struct OwnerReward {
        uint256 rewardPaid;
        uint256 rewardStored;
    }

    struct CreateEditionStruct {
        uint256[TOKENS_PER_EDITION] tokens;
        uint256 illuminationMoment;
        string editionThumbnail;
        string illumination;
    }

    mapping(uint256 => mapping(uint256 => OwnerReward)) private _ownersReward;
    mapping(address => bool) private _eligibles;
    mapping(uint256 => Edition) private _editions;
    mapping(uint256 => uint256) private _editionOfToken;
    mapping(address => uint256) private _totalRewardsClaimed;

    event RewardWithdrawn(uint256 amount, address sender);
    event EditionCreated(uint256 editionId);


    constructor(address obyAddress, address _treasury, uint256 _royaltyValue, string memory _openSeaContractURI, string memory _blackSquareBaseURI,
    uint256 _rewardPerCycle, address _operatorFilter) ERC721("BlackSquare", "B2") {
        obyToken = OBYToken(obyAddress);
        operatorFilter = IOperatorFilter(_operatorFilter);
        treasury = _treasury;
        openSeaContractURI = _openSeaContractURI;
        baseURI = _blackSquareBaseURI;
        rewardPerCycle = _rewardPerCycle;
        _setRoyalties(_treasury, _royaltyValue);
    }

    modifier onlyEligible() {
        require(owner() == _msgSender() || _eligibles[_msgSender()] == true, "BlackSquareNFT: caller is not eligible");
        _;
    }

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

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

    function setContractURI(string memory _contractURI) external onlyOwner {
        openSeaContractURI = _contractURI;
    }

    function setBaseURI(string memory _blackSquareBaseURI) external onlyOwner {
        baseURI = _blackSquareBaseURI;
    }


    function setRewardPerCycle(uint256 _rewardPerCycle) external onlyOwner {
        rewardPerCycle = _rewardPerCycle;
    }

    function setRoyalties(address recipient, uint256 value) external onlyOwner {
        _setRoyalties(recipient, value);
    }

    function setEligibles(address _eligible) external onlyOwner  {
        _eligibles[_eligible] = true;

        
    }

    function contractURI() public view returns (string memory) {
        return openSeaContractURI;
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId,
        uint256 batchSize
    ) internal virtual override(ERC721) {
        if (
            from != address(0) &&
            to != address(0) &&
            !_mayTransfer(msg.sender, tokenId)
        ) {
            revert("ERC721OperatorFilter: illegal operator");
        }
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    function _mayTransfer(address operator, uint256 tokenId)
        private
        view
        returns (bool)
    {
        IOperatorFilter filter = operatorFilter;
        if (address(filter) == address(0)) return true;
        if (operator == ownerOf(tokenId)) return true;
        return filter.mayTransfer(msg.sender);
    }

    function getEditions() public view returns (Edition[] memory) {
        Edition[] memory editions = new Edition[](_editionIds.current() + 1);

        for (uint256 editionCounter = 1; editionCounter <= _editionIds.current(); editionCounter++){
            editions[editionCounter] = _editions[editionCounter];
        }
        return editions;
    }

    function deleteEdition (uint256 editionId) public onlyOwner {
        delete _editions[editionId];
    }

    function createEdition(CreateEditionStruct memory _createEditionStruct) public onlyOwner  {
        _editionIds.increment();
        uint256 editionId = _editionIds.current();
        

        for (uint256 i = 0; i < _createEditionStruct.tokens.length; i++) {
            _editionOfToken[_createEditionStruct.tokens[i]] = _editionIds.current();
        }

        _editions[editionId].tokens = _createEditionStruct.tokens;
        _editions[editionId].illuminationTimeStamp = _createEditionStruct.illuminationMoment;
        _editions[editionId].lastUpdateTimestamp = block.timestamp;
        _editions[editionId].cycle = 1;
        _editions[editionId].id = editionId;
        _editions[editionId].editionThumbnail = _createEditionStruct.editionThumbnail;
        _editions[editionId].illumination = _createEditionStruct.illumination;

        emit EditionCreated(editionId);
    }


    function getCurrentTokenId() external view returns (uint256) {
        return _tokenIds.current();
    }

    function getRewardInOBY () public view returns (uint256, uint256) {
        uint256[] memory tokens = getTokensHeldByUser(_msgSender());

        require(tokens.length > 0, 'NO BlackSquares held');
        uint256 availableReward = 0;

        uint256 paidReward = _totalRewardsClaimed[_msgSender()];

        for (uint256 i = 0; i < tokens.length; i++) {
            (uint256 rewardPertoken, ,) = _getAvailableRewardInOby(tokens[i]);
            availableReward += rewardPertoken;
            
        }
        return (availableReward, paidReward);
    }

    function claimRewardInOBY () public returns (uint256) {
        uint256[] memory tokens = getTokensHeldByUser(_msgSender());

        require(tokens.length > 0, 'NO BlackSquares held');
        uint256 availableReward = 0;

        for (uint256 i = 0; i < tokens.length; i++) {
            (uint256 rewardPertoken, uint256 cycle, uint256 rewardStoredPrev) = _getAvailableRewardInOby(tokens[i]);
            availableReward += rewardPertoken;

            uint256 tokenId = tokens[i];

            uint256 previousCycle = cycle > 1 ? cycle - 1 : 1;
            uint256 rewardPaid = rewardPertoken - rewardStoredPrev;

            _ownersReward[tokenId][cycle].rewardPaid += rewardPaid;

            _totalRewardsClaimed[_msgSender()] += rewardPertoken;
            _ownersReward[tokenId][cycle].rewardStored = 0;
            if (cycle > 1) {
                _ownersReward[tokenId][previousCycle].rewardStored = 0;
            }
        }

        require(availableReward > 0, 'No OBY available to mint');

        if (availableReward > 0) {
            obyToken.mint(_msgSender(), availableReward);
        }

        emit RewardWithdrawn(availableReward, _msgSender());
        
        return availableReward;
    }

    function getTokensHeldByUser(address user) public view returns (uint256[] memory) {
        uint256 balance = balanceOf(user);
        uint256[] memory emptyTokens = new uint256[](0);
        uint256[] memory tokenIds = new uint256[](balance);
        uint256 j = 0;

        for (uint256 i = 1; i <= _tokenIds.current(); i++ ) {
            address tokenOwner = ownerOf(i);

            if (tokenOwner == user) {
                tokenIds[j] = i;
                j++;
            }
        }
        if (tokenIds.length > 0) {
            return tokenIds;
        }  else {
            return emptyTokens;
        }
    }

    function mintAndDrop(address[] memory recipients, CreateEditionStruct[] memory _createEditionStruct) public onlyOwner {
        uint256 editionCount = 0;

        if(_editionIds.current() <= MAX_NUMBER_EDITIONS) {
            for (uint256 i = 0; i < recipients.length; i++) {
                _tokenIds.increment();
                uint256 currentTokenId = _tokenIds.current();

                unchecked {
                    _mint(recipients[i], currentTokenId);

                    if (currentTokenId == 25 || currentTokenId > 25 && currentTokenId % 25 ==  0) {
                        createEdition(_createEditionStruct[editionCount]);
                        editionCount++;
                    }
                }
            }
        }
    }

    function editEdition(uint256 _editionId, uint256 _illuminationTimeStamp) public onlyEligible returns (uint256) {
        updateStoredReward(_editionId);

        _editions[_editionId].illuminationTimeStamp = _illuminationTimeStamp;
        _editions[_editionId].lastUpdateTimestamp = block.timestamp;
        _editions[_editionId].cycle += 1;

        totalCycleCount ++;

        return _editionId;
    }

    function updateStoredReward(uint256 editionId) public onlyEligible  {
        uint256 editionCycle = _editions[editionId].cycle;
        for (uint256 tokenId = 0; tokenId < _editions[editionId].tokens.length; tokenId++ ) {
            uint256 currentToken = _editions[editionId].tokens[tokenId];

            // Normal update where cycle is > 1, Up to the normal rewardPerPeriod was paid out & There is a stored reward >= 0
            if (_ownersReward[currentToken][editionCycle].rewardPaid <= (rewardPerCycle / 10000) && editionCycle > 1 && _ownersReward[currentToken][editionCycle - 1].rewardStored >= 0) {
                _ownersReward[currentToken][editionCycle].rewardStored =  (rewardPerCycle / 10000) -  _ownersReward[currentToken][editionCycle].rewardPaid + _ownersReward[currentToken][editionCycle - 1].rewardStored;

            // We are in Cycle one, so there is no previously stored reward. Now everything gets stored which is a positive amount or 0
            } else if (_ownersReward[currentToken][editionCycle].rewardPaid <= (rewardPerCycle / 10000) && editionCycle == 1) {
                _ownersReward[currentToken][editionCycle].rewardStored = (rewardPerCycle / 10000) -  _ownersReward[currentToken][editionCycle].rewardPaid;

            // In case due to some rounding errors etc. RewardPaid > Reward, Only Stored Reward is carried over if Cycle > 1 and Stored Reward is bigger than 0
            } else if (_ownersReward[currentToken][editionCycle].rewardPaid > (rewardPerCycle / 10000) && editionCycle > 1 && _ownersReward[currentToken][editionCycle - 1].rewardStored > 0) {
                _ownersReward[currentToken][editionCycle].rewardStored = _ownersReward[currentToken][editionCycle - 1].rewardStored;

            // Handle the Edge Cases
            } else {
                _ownersReward[currentToken][editionCycle].rewardStored = 0;
            }
            
        }
        
    }

    function getFirstEditionToSetIlluminationDate() public view returns (uint256) {
        for (uint256 editionCounter = 1; editionCounter <= _editionIds.current(); editionCounter++){
            if (_editions[editionCounter].illuminationTimeStamp < block.timestamp) {
                return editionCounter;
            }
        }
        return 0;
    }

    function getAvailableIlluminaCount() public view returns (uint256) {
        uint256 availableIlluminas = totalCycleCount * THRESHOLD;
        for (uint256 editionCounter = 1; editionCounter <= _editionIds.current(); editionCounter++){
            if (_editions[editionCounter].illuminationTimeStamp < block.timestamp) {
                availableIlluminas += THRESHOLD;
            }
        }
        return availableIlluminas;
    }

    function setIlluminationTimeStamp(uint256 _editionId, uint256 _illuminationTimeStamp) public onlyOwner {
        _editions[_editionId].illuminationTimeStamp = _illuminationTimeStamp;
    }

     function _getAvailableRewardInOby(uint256 tokenId) internal view returns (uint256, uint256, uint256) {
        uint256 editionId = _editionOfToken[tokenId];

        require(editionId != 0, 'Token Not associated with any Edition');

        uint256 illuminationTimeStamp = _editions[editionId].illuminationTimeStamp;
        uint256 cycle = _editions[editionId].cycle;
        uint256 previousCycle = cycle > 1 ? cycle - 1 : 1;
        uint256 lastUpdateTimestamp = _editions[editionId].lastUpdateTimestamp;

        uint256 rewardPaid = _ownersReward[tokenId][cycle].rewardPaid > 0 ? _ownersReward[tokenId][cycle].rewardPaid : 0;
        uint256 rewardStoredPrev = cycle > 1 ? _ownersReward[tokenId][previousCycle].rewardStored : 0;

        // We are in the normal distribution Cycle
        if (lastUpdateTimestamp < illuminationTimeStamp && block.timestamp < illuminationTimeStamp && block.timestamp > lastUpdateTimestamp) {
            uint256 rewardPerSecond = rewardPerCycle / (illuminationTimeStamp - lastUpdateTimestamp);

            uint256 rewardPayableFromCycle = (((rewardPerSecond) * ((block.timestamp) - lastUpdateTimestamp)) / 10000) - rewardPaid;

            uint256 returnableAmount = rewardPayableFromCycle >= 1 ? rewardPayableFromCycle + rewardStoredPrev : rewardStoredPrev;

            return (returnableAmount, cycle, rewardStoredPrev);
        // We are outside the normal cycle, during time of Illumina sale
        } else if (lastUpdateTimestamp < illuminationTimeStamp && block.timestamp > illuminationTimeStamp && block.timestamp > lastUpdateTimestamp) {

            uint256 returnableAmount = rewardStoredPrev + (rewardPerCycle / 10000) - rewardPaid;
            return (returnableAmount, cycle, rewardStoredPrev);
        // Handle all edge cases
        } else {
            return (rewardStoredPrev, cycle, rewardStoredPrev);
        }
    }
}

File 22 of 29 : ERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './IERC2981Royalties.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981 is ERC165, IERC2981Royalties {
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 23 of 29 : ERC2981ContractWideRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './ERC2981.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981 {
    RoyaltyInfo private _royalties;

    /// @dev Sets token royalties
    /// @param recipient recipient of the royalties
    /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 10000, 'ERC2981Royalties: Too high');
        _royalties = RoyaltyInfo(recipient, uint24(value));
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value * royalties.amount) / 10000;
    }
}

File 24 of 29 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _value - the sale price of the NFT asset specified by _tokenId
    /// @return _receiver - address of who should be sent the royalty payment
    /// @return _royaltyAmount - the royalty payment amount for value sale price
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

File 25 of 29 : IOperatorFilter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

interface IOperatorFilter {
    function mayTransfer(address operator) external view returns (bool);
}

File 26 of 29 : OBYToken.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";


contract OBYToken is ERC20, Ownable {
    mapping(address => bool) private _eligibles;

    event Destruction(uint256 amount);

    constructor() ERC20("OBYToken", "OBY") {}

    modifier onlyEligible() {
        require(owner() == _msgSender() || _eligibles[msg.sender], "OBYToken: caller is not eligible");
        _;
    }

    function setEligibles(address _eligible) public onlyOwner {
        _eligibles[_eligible] = true;
    }

    function mint(address account, uint256 amount) external onlyEligible {
        uint256 sendAmount = amount * (10**18);
        _mint(account, sendAmount);
    }

    function checkBalances(uint256 tokenPrice, address account) external onlyEligible view returns (bool) {
        if (balanceOf(account) >= tokenPrice) {
            return true;
        }
        return false;
    }

    function burnToken(uint256 amount, address account) external onlyEligible {
        uint256 sendAmount = amount * (10**18);
        _burn(account, sendAmount);

        emit Destruction(amount);
    }

    function getEligibles(address account) public view onlyEligible returns (bool) {
        require (account != address(0), "OBYToken: address must not be empty");
        return _eligibles[account];
    }
}

File 27 of 29 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import {OperatorFilterer} from "./OperatorFilterer.sol";

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

File 28 of 29 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

File 29 of 29 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (subscribe) {
                operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    operatorFilterRegistry.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (
                !(
                    operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)
                        && operatorFilterRegistry.isOperatorAllowed(address(this), from)
                )
            ) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"_blackSquareAddress","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_royaltyValue","type":"uint256"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"},{"internalType":"string","name":"_illuminaBaseURI","type":"string"},{"internalType":"uint256","name":"_minTime","type":"uint256"},{"internalType":"uint256","name":"_maxTime","type":"uint256"},{"internalType":"uint256","name":"_illuminaFactor","type":"uint256"},{"internalType":"bool","name":"_getRandomnessFromOracles","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":false,"internalType":"uint256[]","name":"tokens","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"MintTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"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":"address","name":"user","type":"address"},{"internalType":"uint256","name":"_burnThreshold","type":"uint256"}],"name":"burnIllumina","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"editBlacksquareEditions","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIlluminaPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomnessFromOracles","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTokensHeldByUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"illuminationTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_illuminaBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintable","type":"uint256"},{"internalType":"bool","name":"_simpleMintable","type":"bool"}],"name":"setBulkMintAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_edit","type":"bool"}],"name":"setEditBlacksquareEditions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_eligible","type":"address"},{"internalType":"bool","name":"_val","type":"bool"}],"name":"setEligibles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_illuminationTimeStamp","type":"uint256"}],"name":"setIlluminationTimeStamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"name":"setKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_max","type":"uint8"}],"name":"setMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_min","type":"uint8"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_getRandomnessFromOracles","type":"bool"}],"name":"setRandomnessFromOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_s_subscriptionId","type":"uint64"}],"name":"setSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"ipfsHash","type":"string"}],"name":"setTokenIpfsHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_ipfsHashes","type":"string[]"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"simpleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"simpleMintable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"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"}]

60a06040526000600d556005600e556003600f60006101000a81548161ffff021916908361ffff1602179055506001600f60026101000a81548163ffffffff021916908363ffffffff160217905550622625a0600f60066101000a81548163ffffffff021916908363ffffffff1602179055507f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef60001b60105573271682deb8c4e0901d1a1550ad2e64d568e69909601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601460016101000a81548160ff0219169083151502179055506001601460026101000a81548160ff0219169083151502179055503480156200013157600080fd5b506040516200674d3803806200674d83398181016040528101906200015791906200097e565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280600881526020017f496c6c756d696e610000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f496c6c0000000000000000000000000000000000000000000000000000000000815250816000908051906020019062000215929190620007f4565b5080600190805190602001906200022e929190620007f4565b50505060006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b111562000426578015620002ec576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b8152600401620002b292919062000ae8565b600060405180830381600087803b158015620002cd57600080fd5b505af1158015620002e2573d6000803e3d6000fd5b5050505062000425565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620003a6576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b81526004016200036c92919062000ae8565b600060405180830381600087803b1580156200038757600080fd5b505af11580156200039c573d6000803e3d6000fd5b5050505062000424565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b8152600401620003ef919062000acb565b600060405180830381600087803b1580156200040a57600080fd5b505af11580156200041f573d6000803e3d6000fd5b505050505b5b5b5050620004486200043c6200063960201b60201c565b6200064160201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089601460036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600f600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508460139080519060200190620005e7929190620007f4565b5083600a8190555082600b8190555081600c8190555080601460006101000a81548160ff0219169083151502179055506200062988886200070760201b60201c565b5050505050505050505062000dbb565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6127108111156200074f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007469062000b15565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b828054620008029062000c3b565b90600052602060002090601f01602090048101928262000826576000855562000872565b82601f106200084157805160ff191683800117855562000872565b8280016001018555821562000872579182015b828111156200087157825182559160200191906001019062000854565b5b50905062000881919062000885565b5090565b5b80821115620008a057600081600090555060010162000886565b5090565b6000620008bb620008b58462000b60565b62000b37565b905082815260208101848484011115620008da57620008d962000d0a565b5b620008e784828562000c05565b509392505050565b600081519050620009008162000d53565b92915050565b600081519050620009178162000d6d565b92915050565b600082601f83011262000935576200093462000d05565b5b815162000947848260208601620008a4565b91505092915050565b600081519050620009618162000d87565b92915050565b600081519050620009788162000da1565b92915050565b6000806000806000806000806000806101408b8d031215620009a557620009a462000d14565b5b6000620009b58d828e01620008ef565b9a50506020620009c88d828e01620008ef565b9950506040620009db8d828e01620008ef565b9850506060620009ee8d828e0162000950565b975050608062000a018d828e0162000967565b96505060a08b015167ffffffffffffffff81111562000a255762000a2462000d0f565b5b62000a338d828e016200091d565b95505060c062000a468d828e0162000950565b94505060e062000a598d828e0162000950565b93505061010062000a6d8d828e0162000950565b92505061012062000a818d828e0162000906565b9150509295989b9194979a5092959850565b62000a9e8162000ba7565b82525050565b600062000ab3601a8362000b96565b915062000ac08262000d2a565b602082019050919050565b600060208201905062000ae2600083018462000a93565b92915050565b600060408201905062000aff600083018562000a93565b62000b0e602083018462000a93565b9392505050565b6000602082019050818103600083015262000b308162000aa4565b9050919050565b600062000b4362000b56565b905062000b51828262000c71565b919050565b6000604051905090565b600067ffffffffffffffff82111562000b7e5762000b7d62000cd6565b5b62000b898262000d19565b9050602081019050919050565b600082825260208201905092915050565b600062000bb48262000bc7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b60005b8381101562000c2557808201518184015260208101905062000c08565b8381111562000c35576000848401525b50505050565b6000600282049050600182168062000c5457607f821691505b6020821081141562000c6b5762000c6a62000ca7565b5b50919050565b62000c7c8262000d19565b810181811067ffffffffffffffff8211171562000c9e5762000c9d62000cd6565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b62000d5e8162000ba7565b811462000d6a57600080fd5b50565b62000d788162000bbb565b811462000d8457600080fd5b50565b62000d928162000be7565b811462000d9e57600080fd5b50565b62000dac8162000bf1565b811462000db857600080fd5b50565b60805160601c61596c62000de160003960008181610b210152610b75015261596c6000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638101ee9811610146578063b538f379116100c3578063d6cac5dc11610087578063d6cac5dc146106bd578063e89e106a146106d9578063e985e9c5146106f7578063ea7b4f7714610727578063f2fde38b14610743578063fa24eac91461075f57610253565b8063b538f37914610617578063b88d4fde14610637578063c77c6a1c14610653578063c87b56dd1461066f578063caa0f92a1461069f57610253565b8063985447101161010a57806398544710146105875780639b08fd71146105a35780639caa89ed146105c1578063a22cb465146105df578063ad18d079146105fb57610253565b80638101ee98146104f55780638c7ea24b146105135780638da5cb5b1461052f5780638e4503e91461054d57806395d89b411461056957610253565b80632a76baf5116101d4578063633b376c11610198578063633b376c1461043f5780636352211e1461045b57806370a082311461048b578063715018a6146104bb5780637b9659eb146104c557610253565b80632a76baf5146103b15780633cd6adf4146103cf57806342842e0e146103eb578063475eed5d1461040757806355f804b31461042357610253565b80630c05bf6c1161021b5780630c05bf6c1461030e5780631fe543e31461032a5780632154dc391461034657806323b872dd146103645780632a55205a1461038057610253565b806301ffc9a71461025857806306fdde031461028857806306ff54d3146102a6578063081812fc146102c2578063095ea7b3146102f2575b600080fd5b610272600480360381019061026d9190614121565b61077b565b60405161027f9190614980565b60405180910390f35b61029061078d565b60405161029d91906149ee565b60405180910390f35b6102c060048036038101906102bb9190613fe2565b61081f565b005b6102dc60048036038101906102d791906141c4565b61098d565b6040516102e99190614867565b60405180910390f35b61030c60048036038101906103079190613fe2565b6109d3565b005b610328600480360381019061032391906142ba565b610aeb565b005b610344600480360381019061033f919061421e565b610b1f565b005b61034e610bdf565b60405161035b9190614cd0565b60405180910390f35b61037e60048036038101906103799190613ecc565b610be5565b005b61039a60048036038101906103959190614316565b610de6565b6040516103a89291906148f7565b60405180910390f35b6103b9610ea6565b6040516103c69190614cd0565b60405180910390f35b6103e960048036038101906103e4919061409a565b610eac565b005b61040560048036038101906104009190613ecc565b610fa7565b005b610421600480360381019061041c919061427a565b6111a8565b005b61043d6004803603810190610438919061417b565b6112ab565b005b61045960048036038101906104549190614383565b6112cd565b005b610475600480360381019061047091906141c4565b6112e2565b6040516104829190614867565b60405180910390f35b6104a560048036038101906104a09190613e5f565b611369565b6040516104b29190614cd0565b60405180910390f35b6104c3611421565b005b6104df60048036038101906104da9190613e5f565b611435565b6040516104ec9190614920565b60405180910390f35b6104fd6115bd565b60405161050a9190614980565b60405180910390f35b61052d60048036038101906105289190613fe2565b6115d0565b005b6105376115e6565b6040516105449190614867565b60405180910390f35b6105676004803603810190610562919061409a565b611610565b005b610571611635565b60405161057e91906149ee565b60405180910390f35b6105a1600480360381019061059c91906140f4565b6116c7565b005b6105ab6116d9565b6040516105b89190614980565b60405180910390f35b6105c96116ec565b6040516105d69190614980565b60405180910390f35b6105f960048036038101906105f49190613fa2565b6116ff565b005b610615600480360381019061061091906141c4565b611715565b005b61061f6117fd565b60405161062e93929190614d3d565b60405180910390f35b610651600480360381019061064c9190613f1f565b611927565b005b61066d60048036038101906106689190614022565b611b2b565b005b610689600480360381019061068491906141c4565b611bc2565b60405161069691906149ee565b60405180910390f35b6106a7611cba565b6040516106b49190614cd0565b60405180910390f35b6106d760048036038101906106d29190614383565b611d85565b005b6106e1611d9a565b6040516106ee9190614cd0565b60405180910390f35b610711600480360381019061070c9190613e8c565b611da0565b60405161071e9190614980565b60405180910390f35b610741600480360381019061073c9190614356565b611e34565b005b61075d60048036038101906107589190613e5f565b611e68565b005b61077960048036038101906107749190613fa2565b611eec565b005b600061078682611f4f565b9050919050565b60606000805461079c906150e3565b80601f01602080910402602001604051908101604052809291908181526020018280546107c8906150e3565b80156108155780601f106107ea57610100808354040283529160200191610815565b820191906000526020600020905b8154815290600101906020018083116107f857829003601f168201915b5050505050905090565b610827611fc9565b73ffffffffffffffffffffffffffffffffffffffff166108456115e6565b73ffffffffffffffffffffffffffffffffffffffff1614806108be57506001151560186000610872611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f490614cb0565b60405180910390fd5b600061090883611435565b905060005b815181101561098757828110156109745760008282815181106109335761093261524d565b5b6020026020010151905061094681611fd1565b60016019600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505b808061097f90615146565b91505061090d565b50505050565b60006109988261211f565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109de826112e2565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4690614c70565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a6e611fc9565b73ffffffffffffffffffffffffffffffffffffffff161480610a9d5750610a9c81610a97611fc9565b611da0565b5b610adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad390614c90565b60405180910390fd5b610ae6838361216a565b505050565b610af3612223565b80601760008481526020019081526020016000209080519060200190610b1a929190613ab0565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bd157337f00000000000000000000000000000000000000000000000000000000000000006040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610bc8929190614882565b60405180910390fd5b610bdb82826122a1565b5050565b600e5481565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115610dd4573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c5857610c53848484612344565b610de0565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401610ca1929190614882565b60206040518083038186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf191906140c7565b8015610d9257506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401610d41929190614882565b60206040518083038186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906140c7565b5b610dd357336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401610dca9190614867565b60405180910390fd5b5b610ddf848484612344565b5b50505050565b600080600060076040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905080600001519250612710816020015162ffffff1685610e929190614f56565b610e9c9190614f25565b9150509250929050565b600d5481565b610eb4611fc9565b73ffffffffffffffffffffffffffffffffffffffff16610ed26115e6565b73ffffffffffffffffffffffffffffffffffffffff161480610f4b57506001151560186000610eff611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610f8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8190614cb0565b60405180910390fd5b80601460016101000a81548160ff02191690831515021790555050565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611196573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561101a576110158484846123a4565b6111a2565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401611063929190614882565b60206040518083038186803b15801561107b57600080fd5b505afa15801561108f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b391906140c7565b801561115457506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611103929190614882565b60206040518083038186803b15801561111b57600080fd5b505afa15801561112f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115391906140c7565b5b61119557336040517fede71dcc00000000000000000000000000000000000000000000000000000000815260040161118c9190614867565b60405180910390fd5b5b6111a18484846123a4565b5b50505050565b6111b0611fc9565b73ffffffffffffffffffffffffffffffffffffffff166111ce6115e6565b73ffffffffffffffffffffffffffffffffffffffff161480611247575060011515601860006111fb611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b611286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127d90614cb0565b60405180910390fd5b81600e8190555080601460026101000a81548160ff0219169083151502179055505050565b6112b3612223565b80601390805190602001906112c9929190613ab0565b5050565b6112d5612223565b8060ff16600b8190555050565b6000806112ee836123c4565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135790614c30565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d190614b70565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611429612223565b6114336000612401565b565b6060600061144283611369565b905060008067ffffffffffffffff8111156114605761145f61527c565b5b60405190808252806020026020018201604052801561148e5781602001602082028036833780820191505090505b50905060008267ffffffffffffffff8111156114ad576114ac61527c565b5b6040519080825280602002602001820160405280156114db5781602001602082028036833780820191505090505b509050600080600190505b6114f060166124c7565b81116115a0576019600082815260200190815260200160002060009054906101000a900460ff1661158d576000611526826112e2565b90508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158b57818484815181106115705761156f61524d565b5b602002602001018181525050828061158790615146565b9350505b505b808061159890615146565b9150506114e6565b5060008251116115b057826115b2565b815b945050505050919050565b601460009054906101000a900460ff1681565b6115d8612223565b6115e282826124d5565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611618612223565b80601460006101000a81548160ff02191690831515021790555050565b606060018054611644906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054611670906150e3565b80156116bd5780601f10611692576101008083540402835291602001916116bd565b820191906000526020600020905b8154815290600101906020018083116116a057829003601f168201915b5050505050905090565b6116cf612223565b8060108190555050565b601460019054906101000a900460ff1681565b601460029054906101000a900460ff1681565b61171161170a611fc9565b83836125bf565b5050565b61171d611fc9565b73ffffffffffffffffffffffffffffffffffffffff1661173b6115e6565b73ffffffffffffffffffffffffffffffffffffffff1614806117b457506001151560186000611768611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6117f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ea90614cb0565b60405180910390fd5b80600d8190555050565b600080600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186b57600080fd5b505afa15801561187f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a391906141f1565b905060006118b160166124c7565b9050600081836118c19190614fb0565b9050600c54816118d19190614f25565b60e11115611914576000600c54826118e99190614f25565b60e16118f59190614fb0565b9050601e8111156119125780848396509650965050505050611922565b505b601e83829550955095505050505b909192565b8360006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611b17573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561199b576119968585858561272c565b611b24565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b81526004016119e4929190614882565b60206040518083038186803b1580156119fc57600080fd5b505afa158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906140c7565b8015611ad557506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611a84929190614882565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad491906140c7565b5b611b1657336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401611b0d9190614867565b60405180910390fd5b5b611b238585858561272c565b5b5050505050565b60011515601460029054906101000a900460ff16151514611b81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7890614bf0565b60405180910390fd5b600e54815111611bbe57611bb181600081518110611ba257611ba161524d565b5b6020026020010151825161278e565b611bbd82825183612a38565b5b5050565b60606000611bce612c65565b90506000601760008581526020019081526020016000208054611bf0906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054611c1c906150e3565b8015611c695780601f10611c3e57610100808354040283529160200191611c69565b820191906000526020600020905b815481529060010190602001808311611c4c57829003601f168201915b505050505090506000825111611c8e5760405180602001604052806000815250611cb1565b8181604051602001611ca1929190614843565b6040516020818303038152906040525b92505050919050565b600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2557600080fd5b505afa158015611d39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5d91906141f1565b14611d7d576001611d6e60166124c7565b611d789190614ecf565b611d80565b60005b905090565b611d8d612223565b8060ff16600a8190555050565b60095481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611e3c612223565b80600f600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b611e70612223565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ee0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed790614a90565b60405180910390fd5b611ee981612401565b50565b611ef4612223565b80601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611fc25750611fc182612cf7565b5b9050919050565b600033905090565b6000611fdc826112e2565b9050611fec816000846001612dd9565b611ff5826112e2565b90506004600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461211b816000846001612eff565b5050565b61212881612f05565b612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e90614c30565b60405180910390fd5b50565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166121dd836112e2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61222b611fc9565b73ffffffffffffffffffffffffffffffffffffffff166122496115e6565b73ffffffffffffffffffffffffffffffffffffffff161461229f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229690614bd0565b60405180910390fd5b565b60008151116122e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122dc90614b90565b60405180910390fd5b6000600a546001600a54600b546122fc9190614fb0565b6123069190614ecf565b8360008151811061231a5761231961524d565b5b602002602001015161232c919061518f565b6123369190614ecf565b905080600d81905550505050565b61235561234f611fc9565b82612f46565b612394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238b90614a10565b60405180910390fd5b61239f838383612fdb565b505050565b6123bf83838360405180602001604052806000815250611927565b505050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b61271081111561251a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251190614a30565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561262e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262590614b10565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161271f9190614980565b60405180910390a3505050565b61273d612737611fc9565b83612f46565b61277c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277390614a10565b60405180910390fd5b612788848484846132d5565b50505050565b614e2061279b60166124c7565b11156127dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d390614c50565b60405180910390fd5b6127e4611cba565b8214612825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281c90614c10565b60405180910390fd5b8061283060166124c7565b61283a9190614ecf565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128a257600080fd5b505afa1580156128b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128da91906141f1565b101561291b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291290614b30565b60405180910390fd5b60006129256117fd565b50509050600082826129379190614f56565b90506000601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633105a79083612982611fc9565b6040518363ffffffff1660e01b815260040161299f929190614ceb565b60206040518083038186803b1580156129b757600080fd5b505afa1580156129cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ef91906140c7565b905080612a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2890614a50565b60405180910390fd5b5050505050565b6000612a426117fd565b5050905060008382612a549190614f56565b905060005b84811015612b8557612a6b6016613331565b612a7d612a7860166124c7565b612f05565b15612abd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab490614b50565b60405180910390fd5b612ad7612ac8611fc9565b612ad260166124c7565b613347565b858181518110612aea57612ae961524d565b5b602002602001015160176000612b0060166124c7565b81526020019081526020016000209080519060200190612b21929190613ab0565b506019612b2e60166124c7565b1480612b6457506019612b4160166124c7565b118015612b63575060006019612b5760166124c7565b612b61919061518f565b145b5b15612b7257612b71613565565b5b8080612b7d90615146565b915050612a59565b507ffeb1abb9e9d00e67147a64e98a3b0e67c24561731b5a33f56d51dc96779fe77e83612bb0611fc9565b86604051612bc093929190614942565b60405180910390a1601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc593ca582612c0f611fc9565b6040518363ffffffff1660e01b8152600401612c2c929190614ceb565b600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505050505050565b606060138054612c74906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054612ca0906150e3565b8015612ced5780601f10612cc257610100808354040283529160200191612ced565b820191906000526020600020905b815481529060010190602001808311612cd057829003601f168201915b5050505050905090565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612dc257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612dd25750612dd182613783565b5b9050919050565b6001811115612ef957600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614612e6d5780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612e659190614fb0565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612ef85780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ef09190614ecf565b925050819055505b5b50505050565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff16612f27836123c4565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080612f52836112e2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612f945750612f938185611da0565b5b80612fd257508373ffffffffffffffffffffffffffffffffffffffff16612fba8461098d565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612ffb826112e2565b73ffffffffffffffffffffffffffffffffffffffff1614613051576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304890614ab0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156130c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b890614af0565b60405180910390fd5b6130ce8383836001612dd9565b8273ffffffffffffffffffffffffffffffffffffffff166130ee826112e2565b73ffffffffffffffffffffffffffffffffffffffff1614613144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161313b90614ab0565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46132d08383836001612eff565b505050565b6132e0848484612fdb565b6132ec848484846137ed565b61332b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161332290614a70565b60405180910390fd5b50505050565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156133b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133ae90614bb0565b60405180910390fd5b6133c081612f05565b15613400576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133f790614ad0565b60405180910390fd5b61340e600083836001612dd9565b61341781612f05565b15613457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161344e90614ad0565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613561600083836001612eff565b5050565b601460009054906101000a900460ff16613762576000600a546001600a54600b546135909190614fb0565b61359a9190614ecf565b7f64eeb8567ad496f244c24c274bb1c2f12e4b32f933bab58a456cb5a5864dc58d60001c6135c8919061518f565b6135d29190614ecf565b9050600081426135e29190614ecf565b9050601460019054906101000a900460ff1615613753576000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f9040316040518163ffffffff1660e01b815260040160206040518083038186803b15801561366357600080fd5b505afa158015613677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061369b91906141f1565b9050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663299716c982846040518363ffffffff1660e01b81526004016136fa929190614d14565b602060405180830381600087803b15801561371457600080fd5b505af1158015613728573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061374c91906141f1565b505061375b565b80600d819055505b5050613781565b601460019054906101000a900460ff16156137805761377f613984565b5b5b565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600061380e8473ffffffffffffffffffffffffffffffffffffffff16613a8d565b15613977578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613837611fc9565b8786866040518563ffffffff1660e01b815260040161385994939291906148ab565b602060405180830381600087803b15801561387357600080fd5b505af19250505080156138a457506040513d601f19601f820116820180604052508101906138a1919061414e565b60015b613927573d80600081146138d4576040519150601f19603f3d011682016040523d82523d6000602084013e6138d9565b606091505b5060008151141561391f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161391690614a70565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061397c565b600190505b949350505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601054600f600a9054906101000a900467ffffffffffffffff16600f60009054906101000a900461ffff16600f60069054906101000a900463ffffffff16600f60029054906101000a900463ffffffff166040518663ffffffff1660e01b8152600401613a3395949392919061499b565b602060405180830381600087803b158015613a4d57600080fd5b505af1158015613a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8591906141f1565b600981905550565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054613abc906150e3565b90600052602060002090601f016020900481019282613ade5760008555613b25565b82601f10613af757805160ff1916838001178555613b25565b82800160010185558215613b25579182015b82811115613b24578251825591602001919060010190613b09565b5b509050613b329190613b36565b5090565b5b80821115613b4f576000816000905550600101613b37565b5090565b6000613b66613b6184614d99565b614d74565b90508083825260208201905082856020860282011115613b8957613b886152b0565b5b60005b85811015613bd757813567ffffffffffffffff811115613baf57613bae6152ab565b5b808601613bbc8982613ddd565b85526020850194506020840193505050600181019050613b8c565b5050509392505050565b6000613bf4613bef84614dc5565b614d74565b90508083825260208201905082856020860282011115613c1757613c166152b0565b5b60005b85811015613c475781613c2d8882613e0b565b845260208401935060208301925050600181019050613c1a565b5050509392505050565b6000613c64613c5f84614df1565b614d74565b905082815260208101848484011115613c8057613c7f6152b5565b5b613c8b8482856150a1565b509392505050565b6000613ca6613ca184614e22565b614d74565b905082815260208101848484011115613cc257613cc16152b5565b5b613ccd8482856150a1565b509392505050565b600081359050613ce481615895565b92915050565b600082601f830112613cff57613cfe6152ab565b5b8135613d0f848260208601613b53565b91505092915050565b600082601f830112613d2d57613d2c6152ab565b5b8135613d3d848260208601613be1565b91505092915050565b600081359050613d55816158ac565b92915050565b600081519050613d6a816158ac565b92915050565b600081359050613d7f816158c3565b92915050565b600081359050613d94816158da565b92915050565b600081519050613da9816158da565b92915050565b600082601f830112613dc457613dc36152ab565b5b8135613dd4848260208601613c51565b91505092915050565b600082601f830112613df257613df16152ab565b5b8135613e02848260208601613c93565b91505092915050565b600081359050613e1a816158f1565b92915050565b600081519050613e2f816158f1565b92915050565b600081359050613e4481615908565b92915050565b600081359050613e598161591f565b92915050565b600060208284031215613e7557613e746152bf565b5b6000613e8384828501613cd5565b91505092915050565b60008060408385031215613ea357613ea26152bf565b5b6000613eb185828601613cd5565b9250506020613ec285828601613cd5565b9150509250929050565b600080600060608486031215613ee557613ee46152bf565b5b6000613ef386828701613cd5565b9350506020613f0486828701613cd5565b9250506040613f1586828701613e0b565b9150509250925092565b60008060008060808587031215613f3957613f386152bf565b5b6000613f4787828801613cd5565b9450506020613f5887828801613cd5565b9350506040613f6987828801613e0b565b925050606085013567ffffffffffffffff811115613f8a57613f896152ba565b5b613f9687828801613daf565b91505092959194509250565b60008060408385031215613fb957613fb86152bf565b5b6000613fc785828601613cd5565b9250506020613fd885828601613d46565b9150509250929050565b60008060408385031215613ff957613ff86152bf565b5b600061400785828601613cd5565b925050602061401885828601613e0b565b9150509250929050565b60008060408385031215614039576140386152bf565b5b600083013567ffffffffffffffff811115614057576140566152ba565b5b61406385828601613cea565b925050602083013567ffffffffffffffff811115614084576140836152ba565b5b61409085828601613d18565b9150509250929050565b6000602082840312156140b0576140af6152bf565b5b60006140be84828501613d46565b91505092915050565b6000602082840312156140dd576140dc6152bf565b5b60006140eb84828501613d5b565b91505092915050565b60006020828403121561410a576141096152bf565b5b600061411884828501613d70565b91505092915050565b600060208284031215614137576141366152bf565b5b600061414584828501613d85565b91505092915050565b600060208284031215614164576141636152bf565b5b600061417284828501613d9a565b91505092915050565b600060208284031215614191576141906152bf565b5b600082013567ffffffffffffffff8111156141af576141ae6152ba565b5b6141bb84828501613ddd565b91505092915050565b6000602082840312156141da576141d96152bf565b5b60006141e884828501613e0b565b91505092915050565b600060208284031215614207576142066152bf565b5b600061421584828501613e20565b91505092915050565b60008060408385031215614235576142346152bf565b5b600061424385828601613e0b565b925050602083013567ffffffffffffffff811115614264576142636152ba565b5b61427085828601613d18565b9150509250929050565b60008060408385031215614291576142906152bf565b5b600061429f85828601613e0b565b92505060206142b085828601613d46565b9150509250929050565b600080604083850312156142d1576142d06152bf565b5b60006142df85828601613e0b565b925050602083013567ffffffffffffffff811115614300576142ff6152ba565b5b61430c85828601613ddd565b9150509250929050565b6000806040838503121561432d5761432c6152bf565b5b600061433b85828601613e0b565b925050602061434c85828601613e0b565b9150509250929050565b60006020828403121561436c5761436b6152bf565b5b600061437a84828501613e35565b91505092915050565b600060208284031215614399576143986152bf565b5b60006143a784828501613e4a565b91505092915050565b60006143bc8383614807565b60208301905092915050565b6143d181614fe4565b82525050565b60006143e282614e63565b6143ec8185614e91565b93506143f783614e53565b8060005b8381101561442857815161440f88826143b0565b975061441a83614e84565b9250506001810190506143fb565b5085935050505092915050565b61443e81614ff6565b82525050565b61444d81615002565b82525050565b600061445e82614e6e565b6144688185614ea2565b93506144788185602086016150b0565b614481816152c4565b840191505092915050565b600061449782614e79565b6144a18185614eb3565b93506144b18185602086016150b0565b6144ba816152c4565b840191505092915050565b60006144d082614e79565b6144da8185614ec4565b93506144ea8185602086016150b0565b80840191505092915050565b6000614503602d83614eb3565b915061450e826152d5565b604082019050919050565b6000614526601a83614eb3565b915061453182615324565b602082019050919050565b6000614549602283614eb3565b91506145548261534d565b604082019050919050565b600061456c603283614eb3565b91506145778261539c565b604082019050919050565b600061458f602683614eb3565b915061459a826153eb565b604082019050919050565b60006145b2602583614eb3565b91506145bd8261543a565b604082019050919050565b60006145d5601c83614eb3565b91506145e082615489565b602082019050919050565b60006145f8602483614eb3565b9150614603826154b2565b604082019050919050565b600061461b601983614eb3565b915061462682615501565b602082019050919050565b600061463e602883614eb3565b91506146498261552a565b604082019050919050565b6000614661602183614eb3565b915061466c82615579565b604082019050919050565b6000614684602983614eb3565b915061468f826155c8565b604082019050919050565b60006146a7602383614eb3565b91506146b282615617565b604082019050919050565b60006146ca602083614eb3565b91506146d582615666565b602082019050919050565b60006146ed602083614eb3565b91506146f88261568f565b602082019050919050565b6000614710602583614eb3565b915061471b826156b8565b604082019050919050565b6000614733602c83614eb3565b915061473e82615707565b604082019050919050565b6000614756601883614eb3565b915061476182615756565b602082019050919050565b6000614779601e83614eb3565b91506147848261577f565b602082019050919050565b600061479c602183614eb3565b91506147a7826157a8565b604082019050919050565b60006147bf603d83614eb3565b91506147ca826157f7565b604082019050919050565b60006147e2602383614eb3565b91506147ed82615846565b604082019050919050565b61480181615038565b82525050565b61481081615066565b82525050565b61481f81615066565b82525050565b61482e81615070565b82525050565b61483d81615080565b82525050565b600061484f82856144c5565b915061485b82846144c5565b91508190509392505050565b600060208201905061487c60008301846143c8565b92915050565b600060408201905061489760008301856143c8565b6148a460208301846143c8565b9392505050565b60006080820190506148c060008301876143c8565b6148cd60208301866143c8565b6148da6040830185614816565b81810360608301526148ec8184614453565b905095945050505050565b600060408201905061490c60008301856143c8565b6149196020830184614816565b9392505050565b6000602082019050818103600083015261493a81846143d7565b905092915050565b6000606082019050818103600083015261495c81866143d7565b905061496b60208301856143c8565b6149786040830184614816565b949350505050565b60006020820190506149956000830184614435565b92915050565b600060a0820190506149b06000830188614444565b6149bd6020830187614834565b6149ca60408301866147f8565b6149d76060830185614825565b6149e46080830184614825565b9695505050505050565b60006020820190508181036000830152614a08818461448c565b905092915050565b60006020820190508181036000830152614a29816144f6565b9050919050565b60006020820190508181036000830152614a4981614519565b9050919050565b60006020820190508181036000830152614a698161453c565b9050919050565b60006020820190508181036000830152614a898161455f565b9050919050565b60006020820190508181036000830152614aa981614582565b9050919050565b60006020820190508181036000830152614ac9816145a5565b9050919050565b60006020820190508181036000830152614ae9816145c8565b9050919050565b60006020820190508181036000830152614b09816145eb565b9050919050565b60006020820190508181036000830152614b298161460e565b9050919050565b60006020820190508181036000830152614b4981614631565b9050919050565b60006020820190508181036000830152614b6981614654565b9050919050565b60006020820190508181036000830152614b8981614677565b9050919050565b60006020820190508181036000830152614ba98161469a565b9050919050565b60006020820190508181036000830152614bc9816146bd565b9050919050565b60006020820190508181036000830152614be9816146e0565b9050919050565b60006020820190508181036000830152614c0981614703565b9050919050565b60006020820190508181036000830152614c2981614726565b9050919050565b60006020820190508181036000830152614c4981614749565b9050919050565b60006020820190508181036000830152614c698161476c565b9050919050565b60006020820190508181036000830152614c898161478f565b9050919050565b60006020820190508181036000830152614ca9816147b2565b9050919050565b60006020820190508181036000830152614cc9816147d5565b9050919050565b6000602082019050614ce56000830184614816565b92915050565b6000604082019050614d006000830185614816565b614d0d60208301846143c8565b9392505050565b6000604082019050614d296000830185614816565b614d366020830184614816565b9392505050565b6000606082019050614d526000830186614816565b614d5f6020830185614816565b614d6c6040830184614816565b949350505050565b6000614d7e614d8f565b9050614d8a8282615115565b919050565b6000604051905090565b600067ffffffffffffffff821115614db457614db361527c565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614de057614ddf61527c565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614e0c57614e0b61527c565b5b614e15826152c4565b9050602081019050919050565b600067ffffffffffffffff821115614e3d57614e3c61527c565b5b614e46826152c4565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614eda82615066565b9150614ee583615066565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614f1a57614f196151c0565b5b828201905092915050565b6000614f3082615066565b9150614f3b83615066565b925082614f4b57614f4a6151ef565b5b828204905092915050565b6000614f6182615066565b9150614f6c83615066565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614fa557614fa46151c0565b5b828202905092915050565b6000614fbb82615066565b9150614fc683615066565b925082821015614fd957614fd86151c0565b5b828203905092915050565b6000614fef82615046565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156150ce5780820151818401526020810190506150b3565b838111156150dd576000848401525b50505050565b600060028204905060018216806150fb57607f821691505b6020821081141561510f5761510e61521e565b5b50919050565b61511e826152c4565b810181811067ffffffffffffffff8211171561513d5761513c61527c565b5b80604052505050565b600061515182615066565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615184576151836151c0565b5b600182019050919050565b600061519a82615066565b91506151a583615066565b9250826151b5576151b46151ef565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b7f496c6c756d696e614e46542c20696e73756666696369656e742062616c616e6360008201527f6573000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f496c6c756d696e614e46542c206d6178206d696e7461626c65206e756d62657260008201527f2072656163686564000000000000000000000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a20546f6b656e20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f7261636c65436f6e74726163743a204e6f204e756d6265722064656c69766560008201527f7265640000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4e6f20746f6b656e732063616e206265206d696e74656420617420746865206d60008201527f6f6d656e74000000000000000000000000000000000000000000000000000000602082015250565b7f547279696e6720746f206d696e7420546f6b656e207769746820696e636f727260008201527f656374204d657461646174610000000000000000000000000000000000000000602082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4d617820416d6f756e74206f6620496c6c756d696e6173206d696e7465640000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b7f496c6c756d696e614e46543a2063616c6c6572206973206e6f7420656c69676960008201527f626c650000000000000000000000000000000000000000000000000000000000602082015250565b61589e81614fe4565b81146158a957600080fd5b50565b6158b581614ff6565b81146158c057600080fd5b50565b6158cc81615002565b81146158d757600080fd5b50565b6158e38161500c565b81146158ee57600080fd5b50565b6158fa81615066565b811461590557600080fd5b50565b61591181615080565b811461591c57600080fd5b50565b61592881615094565b811461593357600080fd5b5056fea26469706673582212202f9527c5dfcb7598961d99b3e8717b9e2d4d288e336b79982be3246da0e33b2764736f6c634300080700330000000000000000000000001768312bd4e292375b0321a0998d27f5e80b50910000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf06900000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000020c000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e6174612e636c6f75642f697066732f0000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102535760003560e01c80638101ee9811610146578063b538f379116100c3578063d6cac5dc11610087578063d6cac5dc146106bd578063e89e106a146106d9578063e985e9c5146106f7578063ea7b4f7714610727578063f2fde38b14610743578063fa24eac91461075f57610253565b8063b538f37914610617578063b88d4fde14610637578063c77c6a1c14610653578063c87b56dd1461066f578063caa0f92a1461069f57610253565b8063985447101161010a57806398544710146105875780639b08fd71146105a35780639caa89ed146105c1578063a22cb465146105df578063ad18d079146105fb57610253565b80638101ee98146104f55780638c7ea24b146105135780638da5cb5b1461052f5780638e4503e91461054d57806395d89b411461056957610253565b80632a76baf5116101d4578063633b376c11610198578063633b376c1461043f5780636352211e1461045b57806370a082311461048b578063715018a6146104bb5780637b9659eb146104c557610253565b80632a76baf5146103b15780633cd6adf4146103cf57806342842e0e146103eb578063475eed5d1461040757806355f804b31461042357610253565b80630c05bf6c1161021b5780630c05bf6c1461030e5780631fe543e31461032a5780632154dc391461034657806323b872dd146103645780632a55205a1461038057610253565b806301ffc9a71461025857806306fdde031461028857806306ff54d3146102a6578063081812fc146102c2578063095ea7b3146102f2575b600080fd5b610272600480360381019061026d9190614121565b61077b565b60405161027f9190614980565b60405180910390f35b61029061078d565b60405161029d91906149ee565b60405180910390f35b6102c060048036038101906102bb9190613fe2565b61081f565b005b6102dc60048036038101906102d791906141c4565b61098d565b6040516102e99190614867565b60405180910390f35b61030c60048036038101906103079190613fe2565b6109d3565b005b610328600480360381019061032391906142ba565b610aeb565b005b610344600480360381019061033f919061421e565b610b1f565b005b61034e610bdf565b60405161035b9190614cd0565b60405180910390f35b61037e60048036038101906103799190613ecc565b610be5565b005b61039a60048036038101906103959190614316565b610de6565b6040516103a89291906148f7565b60405180910390f35b6103b9610ea6565b6040516103c69190614cd0565b60405180910390f35b6103e960048036038101906103e4919061409a565b610eac565b005b61040560048036038101906104009190613ecc565b610fa7565b005b610421600480360381019061041c919061427a565b6111a8565b005b61043d6004803603810190610438919061417b565b6112ab565b005b61045960048036038101906104549190614383565b6112cd565b005b610475600480360381019061047091906141c4565b6112e2565b6040516104829190614867565b60405180910390f35b6104a560048036038101906104a09190613e5f565b611369565b6040516104b29190614cd0565b60405180910390f35b6104c3611421565b005b6104df60048036038101906104da9190613e5f565b611435565b6040516104ec9190614920565b60405180910390f35b6104fd6115bd565b60405161050a9190614980565b60405180910390f35b61052d60048036038101906105289190613fe2565b6115d0565b005b6105376115e6565b6040516105449190614867565b60405180910390f35b6105676004803603810190610562919061409a565b611610565b005b610571611635565b60405161057e91906149ee565b60405180910390f35b6105a1600480360381019061059c91906140f4565b6116c7565b005b6105ab6116d9565b6040516105b89190614980565b60405180910390f35b6105c96116ec565b6040516105d69190614980565b60405180910390f35b6105f960048036038101906105f49190613fa2565b6116ff565b005b610615600480360381019061061091906141c4565b611715565b005b61061f6117fd565b60405161062e93929190614d3d565b60405180910390f35b610651600480360381019061064c9190613f1f565b611927565b005b61066d60048036038101906106689190614022565b611b2b565b005b610689600480360381019061068491906141c4565b611bc2565b60405161069691906149ee565b60405180910390f35b6106a7611cba565b6040516106b49190614cd0565b60405180910390f35b6106d760048036038101906106d29190614383565b611d85565b005b6106e1611d9a565b6040516106ee9190614cd0565b60405180910390f35b610711600480360381019061070c9190613e8c565b611da0565b60405161071e9190614980565b60405180910390f35b610741600480360381019061073c9190614356565b611e34565b005b61075d60048036038101906107589190613e5f565b611e68565b005b61077960048036038101906107749190613fa2565b611eec565b005b600061078682611f4f565b9050919050565b60606000805461079c906150e3565b80601f01602080910402602001604051908101604052809291908181526020018280546107c8906150e3565b80156108155780601f106107ea57610100808354040283529160200191610815565b820191906000526020600020905b8154815290600101906020018083116107f857829003601f168201915b5050505050905090565b610827611fc9565b73ffffffffffffffffffffffffffffffffffffffff166108456115e6565b73ffffffffffffffffffffffffffffffffffffffff1614806108be57506001151560186000610872611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f490614cb0565b60405180910390fd5b600061090883611435565b905060005b815181101561098757828110156109745760008282815181106109335761093261524d565b5b6020026020010151905061094681611fd1565b60016019600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505b808061097f90615146565b91505061090d565b50505050565b60006109988261211f565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109de826112e2565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4690614c70565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a6e611fc9565b73ffffffffffffffffffffffffffffffffffffffff161480610a9d5750610a9c81610a97611fc9565b611da0565b5b610adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad390614c90565b60405180910390fd5b610ae6838361216a565b505050565b610af3612223565b80601760008481526020019081526020016000209080519060200190610b1a929190613ab0565b505050565b7f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bd157337f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610bc8929190614882565b60405180910390fd5b610bdb82826122a1565b5050565b600e5481565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115610dd4573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c5857610c53848484612344565b610de0565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401610ca1929190614882565b60206040518083038186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf191906140c7565b8015610d9257506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401610d41929190614882565b60206040518083038186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906140c7565b5b610dd357336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401610dca9190614867565b60405180910390fd5b5b610ddf848484612344565b5b50505050565b600080600060076040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905080600001519250612710816020015162ffffff1685610e929190614f56565b610e9c9190614f25565b9150509250929050565b600d5481565b610eb4611fc9565b73ffffffffffffffffffffffffffffffffffffffff16610ed26115e6565b73ffffffffffffffffffffffffffffffffffffffff161480610f4b57506001151560186000610eff611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610f8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8190614cb0565b60405180910390fd5b80601460016101000a81548160ff02191690831515021790555050565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611196573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561101a576110158484846123a4565b6111a2565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401611063929190614882565b60206040518083038186803b15801561107b57600080fd5b505afa15801561108f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b391906140c7565b801561115457506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611103929190614882565b60206040518083038186803b15801561111b57600080fd5b505afa15801561112f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115391906140c7565b5b61119557336040517fede71dcc00000000000000000000000000000000000000000000000000000000815260040161118c9190614867565b60405180910390fd5b5b6111a18484846123a4565b5b50505050565b6111b0611fc9565b73ffffffffffffffffffffffffffffffffffffffff166111ce6115e6565b73ffffffffffffffffffffffffffffffffffffffff161480611247575060011515601860006111fb611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b611286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127d90614cb0565b60405180910390fd5b81600e8190555080601460026101000a81548160ff0219169083151502179055505050565b6112b3612223565b80601390805190602001906112c9929190613ab0565b5050565b6112d5612223565b8060ff16600b8190555050565b6000806112ee836123c4565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135790614c30565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d190614b70565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611429612223565b6114336000612401565b565b6060600061144283611369565b905060008067ffffffffffffffff8111156114605761145f61527c565b5b60405190808252806020026020018201604052801561148e5781602001602082028036833780820191505090505b50905060008267ffffffffffffffff8111156114ad576114ac61527c565b5b6040519080825280602002602001820160405280156114db5781602001602082028036833780820191505090505b509050600080600190505b6114f060166124c7565b81116115a0576019600082815260200190815260200160002060009054906101000a900460ff1661158d576000611526826112e2565b90508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158b57818484815181106115705761156f61524d565b5b602002602001018181525050828061158790615146565b9350505b505b808061159890615146565b9150506114e6565b5060008251116115b057826115b2565b815b945050505050919050565b601460009054906101000a900460ff1681565b6115d8612223565b6115e282826124d5565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611618612223565b80601460006101000a81548160ff02191690831515021790555050565b606060018054611644906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054611670906150e3565b80156116bd5780601f10611692576101008083540402835291602001916116bd565b820191906000526020600020905b8154815290600101906020018083116116a057829003601f168201915b5050505050905090565b6116cf612223565b8060108190555050565b601460019054906101000a900460ff1681565b601460029054906101000a900460ff1681565b61171161170a611fc9565b83836125bf565b5050565b61171d611fc9565b73ffffffffffffffffffffffffffffffffffffffff1661173b6115e6565b73ffffffffffffffffffffffffffffffffffffffff1614806117b457506001151560186000611768611fc9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6117f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ea90614cb0565b60405180910390fd5b80600d8190555050565b600080600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186b57600080fd5b505afa15801561187f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a391906141f1565b905060006118b160166124c7565b9050600081836118c19190614fb0565b9050600c54816118d19190614f25565b60e11115611914576000600c54826118e99190614f25565b60e16118f59190614fb0565b9050601e8111156119125780848396509650965050505050611922565b505b601e83829550955095505050505b909192565b8360006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611b17573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561199b576119968585858561272c565b611b24565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b81526004016119e4929190614882565b60206040518083038186803b1580156119fc57600080fd5b505afa158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906140c7565b8015611ad557506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611a84929190614882565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad491906140c7565b5b611b1657336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401611b0d9190614867565b60405180910390fd5b5b611b238585858561272c565b5b5050505050565b60011515601460029054906101000a900460ff16151514611b81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7890614bf0565b60405180910390fd5b600e54815111611bbe57611bb181600081518110611ba257611ba161524d565b5b6020026020010151825161278e565b611bbd82825183612a38565b5b5050565b60606000611bce612c65565b90506000601760008581526020019081526020016000208054611bf0906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054611c1c906150e3565b8015611c695780601f10611c3e57610100808354040283529160200191611c69565b820191906000526020600020905b815481529060010190602001808311611c4c57829003601f168201915b505050505090506000825111611c8e5760405180602001604052806000815250611cb1565b8181604051602001611ca1929190614843565b6040516020818303038152906040525b92505050919050565b600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2557600080fd5b505afa158015611d39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5d91906141f1565b14611d7d576001611d6e60166124c7565b611d789190614ecf565b611d80565b60005b905090565b611d8d612223565b8060ff16600a8190555050565b60095481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611e3c612223565b80600f600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b611e70612223565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ee0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed790614a90565b60405180910390fd5b611ee981612401565b50565b611ef4612223565b80601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611fc25750611fc182612cf7565b5b9050919050565b600033905090565b6000611fdc826112e2565b9050611fec816000846001612dd9565b611ff5826112e2565b90506004600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461211b816000846001612eff565b5050565b61212881612f05565b612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e90614c30565b60405180910390fd5b50565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166121dd836112e2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61222b611fc9565b73ffffffffffffffffffffffffffffffffffffffff166122496115e6565b73ffffffffffffffffffffffffffffffffffffffff161461229f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229690614bd0565b60405180910390fd5b565b60008151116122e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122dc90614b90565b60405180910390fd5b6000600a546001600a54600b546122fc9190614fb0565b6123069190614ecf565b8360008151811061231a5761231961524d565b5b602002602001015161232c919061518f565b6123369190614ecf565b905080600d81905550505050565b61235561234f611fc9565b82612f46565b612394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238b90614a10565b60405180910390fd5b61239f838383612fdb565b505050565b6123bf83838360405180602001604052806000815250611927565b505050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b61271081111561251a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251190614a30565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561262e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262590614b10565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161271f9190614980565b60405180910390a3505050565b61273d612737611fc9565b83612f46565b61277c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277390614a10565b60405180910390fd5b612788848484846132d5565b50505050565b614e2061279b60166124c7565b11156127dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d390614c50565b60405180910390fd5b6127e4611cba565b8214612825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281c90614c10565b60405180910390fd5b8061283060166124c7565b61283a9190614ecf565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128a257600080fd5b505afa1580156128b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128da91906141f1565b101561291b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291290614b30565b60405180910390fd5b60006129256117fd565b50509050600082826129379190614f56565b90506000601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633105a79083612982611fc9565b6040518363ffffffff1660e01b815260040161299f929190614ceb565b60206040518083038186803b1580156129b757600080fd5b505afa1580156129cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ef91906140c7565b905080612a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2890614a50565b60405180910390fd5b5050505050565b6000612a426117fd565b5050905060008382612a549190614f56565b905060005b84811015612b8557612a6b6016613331565b612a7d612a7860166124c7565b612f05565b15612abd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab490614b50565b60405180910390fd5b612ad7612ac8611fc9565b612ad260166124c7565b613347565b858181518110612aea57612ae961524d565b5b602002602001015160176000612b0060166124c7565b81526020019081526020016000209080519060200190612b21929190613ab0565b506019612b2e60166124c7565b1480612b6457506019612b4160166124c7565b118015612b63575060006019612b5760166124c7565b612b61919061518f565b145b5b15612b7257612b71613565565b5b8080612b7d90615146565b915050612a59565b507ffeb1abb9e9d00e67147a64e98a3b0e67c24561731b5a33f56d51dc96779fe77e83612bb0611fc9565b86604051612bc093929190614942565b60405180910390a1601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc593ca582612c0f611fc9565b6040518363ffffffff1660e01b8152600401612c2c929190614ceb565b600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505050505050565b606060138054612c74906150e3565b80601f0160208091040260200160405190810160405280929190818152602001828054612ca0906150e3565b8015612ced5780601f10612cc257610100808354040283529160200191612ced565b820191906000526020600020905b815481529060010190602001808311612cd057829003601f168201915b5050505050905090565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612dc257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612dd25750612dd182613783565b5b9050919050565b6001811115612ef957600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614612e6d5780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612e659190614fb0565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612ef85780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ef09190614ecf565b925050819055505b5b50505050565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff16612f27836123c4565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080612f52836112e2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612f945750612f938185611da0565b5b80612fd257508373ffffffffffffffffffffffffffffffffffffffff16612fba8461098d565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612ffb826112e2565b73ffffffffffffffffffffffffffffffffffffffff1614613051576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304890614ab0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156130c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b890614af0565b60405180910390fd5b6130ce8383836001612dd9565b8273ffffffffffffffffffffffffffffffffffffffff166130ee826112e2565b73ffffffffffffffffffffffffffffffffffffffff1614613144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161313b90614ab0565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46132d08383836001612eff565b505050565b6132e0848484612fdb565b6132ec848484846137ed565b61332b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161332290614a70565b60405180910390fd5b50505050565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156133b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133ae90614bb0565b60405180910390fd5b6133c081612f05565b15613400576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133f790614ad0565b60405180910390fd5b61340e600083836001612dd9565b61341781612f05565b15613457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161344e90614ad0565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613561600083836001612eff565b5050565b601460009054906101000a900460ff16613762576000600a546001600a54600b546135909190614fb0565b61359a9190614ecf565b7f64eeb8567ad496f244c24c274bb1c2f12e4b32f933bab58a456cb5a5864dc58d60001c6135c8919061518f565b6135d29190614ecf565b9050600081426135e29190614ecf565b9050601460019054906101000a900460ff1615613753576000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f9040316040518163ffffffff1660e01b815260040160206040518083038186803b15801561366357600080fd5b505afa158015613677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061369b91906141f1565b9050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663299716c982846040518363ffffffff1660e01b81526004016136fa929190614d14565b602060405180830381600087803b15801561371457600080fd5b505af1158015613728573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061374c91906141f1565b505061375b565b80600d819055505b5050613781565b601460019054906101000a900460ff16156137805761377f613984565b5b5b565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600061380e8473ffffffffffffffffffffffffffffffffffffffff16613a8d565b15613977578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613837611fc9565b8786866040518563ffffffff1660e01b815260040161385994939291906148ab565b602060405180830381600087803b15801561387357600080fd5b505af19250505080156138a457506040513d601f19601f820116820180604052508101906138a1919061414e565b60015b613927573d80600081146138d4576040519150601f19603f3d011682016040523d82523d6000602084013e6138d9565b606091505b5060008151141561391f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161391690614a70565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061397c565b600190505b949350505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601054600f600a9054906101000a900467ffffffffffffffff16600f60009054906101000a900461ffff16600f60069054906101000a900463ffffffff16600f60029054906101000a900463ffffffff166040518663ffffffff1660e01b8152600401613a3395949392919061499b565b602060405180830381600087803b158015613a4d57600080fd5b505af1158015613a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8591906141f1565b600981905550565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054613abc906150e3565b90600052602060002090601f016020900481019282613ade5760008555613b25565b82601f10613af757805160ff1916838001178555613b25565b82800160010185558215613b25579182015b82811115613b24578251825591602001919060010190613b09565b5b509050613b329190613b36565b5090565b5b80821115613b4f576000816000905550600101613b37565b5090565b6000613b66613b6184614d99565b614d74565b90508083825260208201905082856020860282011115613b8957613b886152b0565b5b60005b85811015613bd757813567ffffffffffffffff811115613baf57613bae6152ab565b5b808601613bbc8982613ddd565b85526020850194506020840193505050600181019050613b8c565b5050509392505050565b6000613bf4613bef84614dc5565b614d74565b90508083825260208201905082856020860282011115613c1757613c166152b0565b5b60005b85811015613c475781613c2d8882613e0b565b845260208401935060208301925050600181019050613c1a565b5050509392505050565b6000613c64613c5f84614df1565b614d74565b905082815260208101848484011115613c8057613c7f6152b5565b5b613c8b8482856150a1565b509392505050565b6000613ca6613ca184614e22565b614d74565b905082815260208101848484011115613cc257613cc16152b5565b5b613ccd8482856150a1565b509392505050565b600081359050613ce481615895565b92915050565b600082601f830112613cff57613cfe6152ab565b5b8135613d0f848260208601613b53565b91505092915050565b600082601f830112613d2d57613d2c6152ab565b5b8135613d3d848260208601613be1565b91505092915050565b600081359050613d55816158ac565b92915050565b600081519050613d6a816158ac565b92915050565b600081359050613d7f816158c3565b92915050565b600081359050613d94816158da565b92915050565b600081519050613da9816158da565b92915050565b600082601f830112613dc457613dc36152ab565b5b8135613dd4848260208601613c51565b91505092915050565b600082601f830112613df257613df16152ab565b5b8135613e02848260208601613c93565b91505092915050565b600081359050613e1a816158f1565b92915050565b600081519050613e2f816158f1565b92915050565b600081359050613e4481615908565b92915050565b600081359050613e598161591f565b92915050565b600060208284031215613e7557613e746152bf565b5b6000613e8384828501613cd5565b91505092915050565b60008060408385031215613ea357613ea26152bf565b5b6000613eb185828601613cd5565b9250506020613ec285828601613cd5565b9150509250929050565b600080600060608486031215613ee557613ee46152bf565b5b6000613ef386828701613cd5565b9350506020613f0486828701613cd5565b9250506040613f1586828701613e0b565b9150509250925092565b60008060008060808587031215613f3957613f386152bf565b5b6000613f4787828801613cd5565b9450506020613f5887828801613cd5565b9350506040613f6987828801613e0b565b925050606085013567ffffffffffffffff811115613f8a57613f896152ba565b5b613f9687828801613daf565b91505092959194509250565b60008060408385031215613fb957613fb86152bf565b5b6000613fc785828601613cd5565b9250506020613fd885828601613d46565b9150509250929050565b60008060408385031215613ff957613ff86152bf565b5b600061400785828601613cd5565b925050602061401885828601613e0b565b9150509250929050565b60008060408385031215614039576140386152bf565b5b600083013567ffffffffffffffff811115614057576140566152ba565b5b61406385828601613cea565b925050602083013567ffffffffffffffff811115614084576140836152ba565b5b61409085828601613d18565b9150509250929050565b6000602082840312156140b0576140af6152bf565b5b60006140be84828501613d46565b91505092915050565b6000602082840312156140dd576140dc6152bf565b5b60006140eb84828501613d5b565b91505092915050565b60006020828403121561410a576141096152bf565b5b600061411884828501613d70565b91505092915050565b600060208284031215614137576141366152bf565b5b600061414584828501613d85565b91505092915050565b600060208284031215614164576141636152bf565b5b600061417284828501613d9a565b91505092915050565b600060208284031215614191576141906152bf565b5b600082013567ffffffffffffffff8111156141af576141ae6152ba565b5b6141bb84828501613ddd565b91505092915050565b6000602082840312156141da576141d96152bf565b5b60006141e884828501613e0b565b91505092915050565b600060208284031215614207576142066152bf565b5b600061421584828501613e20565b91505092915050565b60008060408385031215614235576142346152bf565b5b600061424385828601613e0b565b925050602083013567ffffffffffffffff811115614264576142636152ba565b5b61427085828601613d18565b9150509250929050565b60008060408385031215614291576142906152bf565b5b600061429f85828601613e0b565b92505060206142b085828601613d46565b9150509250929050565b600080604083850312156142d1576142d06152bf565b5b60006142df85828601613e0b565b925050602083013567ffffffffffffffff811115614300576142ff6152ba565b5b61430c85828601613ddd565b9150509250929050565b6000806040838503121561432d5761432c6152bf565b5b600061433b85828601613e0b565b925050602061434c85828601613e0b565b9150509250929050565b60006020828403121561436c5761436b6152bf565b5b600061437a84828501613e35565b91505092915050565b600060208284031215614399576143986152bf565b5b60006143a784828501613e4a565b91505092915050565b60006143bc8383614807565b60208301905092915050565b6143d181614fe4565b82525050565b60006143e282614e63565b6143ec8185614e91565b93506143f783614e53565b8060005b8381101561442857815161440f88826143b0565b975061441a83614e84565b9250506001810190506143fb565b5085935050505092915050565b61443e81614ff6565b82525050565b61444d81615002565b82525050565b600061445e82614e6e565b6144688185614ea2565b93506144788185602086016150b0565b614481816152c4565b840191505092915050565b600061449782614e79565b6144a18185614eb3565b93506144b18185602086016150b0565b6144ba816152c4565b840191505092915050565b60006144d082614e79565b6144da8185614ec4565b93506144ea8185602086016150b0565b80840191505092915050565b6000614503602d83614eb3565b915061450e826152d5565b604082019050919050565b6000614526601a83614eb3565b915061453182615324565b602082019050919050565b6000614549602283614eb3565b91506145548261534d565b604082019050919050565b600061456c603283614eb3565b91506145778261539c565b604082019050919050565b600061458f602683614eb3565b915061459a826153eb565b604082019050919050565b60006145b2602583614eb3565b91506145bd8261543a565b604082019050919050565b60006145d5601c83614eb3565b91506145e082615489565b602082019050919050565b60006145f8602483614eb3565b9150614603826154b2565b604082019050919050565b600061461b601983614eb3565b915061462682615501565b602082019050919050565b600061463e602883614eb3565b91506146498261552a565b604082019050919050565b6000614661602183614eb3565b915061466c82615579565b604082019050919050565b6000614684602983614eb3565b915061468f826155c8565b604082019050919050565b60006146a7602383614eb3565b91506146b282615617565b604082019050919050565b60006146ca602083614eb3565b91506146d582615666565b602082019050919050565b60006146ed602083614eb3565b91506146f88261568f565b602082019050919050565b6000614710602583614eb3565b915061471b826156b8565b604082019050919050565b6000614733602c83614eb3565b915061473e82615707565b604082019050919050565b6000614756601883614eb3565b915061476182615756565b602082019050919050565b6000614779601e83614eb3565b91506147848261577f565b602082019050919050565b600061479c602183614eb3565b91506147a7826157a8565b604082019050919050565b60006147bf603d83614eb3565b91506147ca826157f7565b604082019050919050565b60006147e2602383614eb3565b91506147ed82615846565b604082019050919050565b61480181615038565b82525050565b61481081615066565b82525050565b61481f81615066565b82525050565b61482e81615070565b82525050565b61483d81615080565b82525050565b600061484f82856144c5565b915061485b82846144c5565b91508190509392505050565b600060208201905061487c60008301846143c8565b92915050565b600060408201905061489760008301856143c8565b6148a460208301846143c8565b9392505050565b60006080820190506148c060008301876143c8565b6148cd60208301866143c8565b6148da6040830185614816565b81810360608301526148ec8184614453565b905095945050505050565b600060408201905061490c60008301856143c8565b6149196020830184614816565b9392505050565b6000602082019050818103600083015261493a81846143d7565b905092915050565b6000606082019050818103600083015261495c81866143d7565b905061496b60208301856143c8565b6149786040830184614816565b949350505050565b60006020820190506149956000830184614435565b92915050565b600060a0820190506149b06000830188614444565b6149bd6020830187614834565b6149ca60408301866147f8565b6149d76060830185614825565b6149e46080830184614825565b9695505050505050565b60006020820190508181036000830152614a08818461448c565b905092915050565b60006020820190508181036000830152614a29816144f6565b9050919050565b60006020820190508181036000830152614a4981614519565b9050919050565b60006020820190508181036000830152614a698161453c565b9050919050565b60006020820190508181036000830152614a898161455f565b9050919050565b60006020820190508181036000830152614aa981614582565b9050919050565b60006020820190508181036000830152614ac9816145a5565b9050919050565b60006020820190508181036000830152614ae9816145c8565b9050919050565b60006020820190508181036000830152614b09816145eb565b9050919050565b60006020820190508181036000830152614b298161460e565b9050919050565b60006020820190508181036000830152614b4981614631565b9050919050565b60006020820190508181036000830152614b6981614654565b9050919050565b60006020820190508181036000830152614b8981614677565b9050919050565b60006020820190508181036000830152614ba98161469a565b9050919050565b60006020820190508181036000830152614bc9816146bd565b9050919050565b60006020820190508181036000830152614be9816146e0565b9050919050565b60006020820190508181036000830152614c0981614703565b9050919050565b60006020820190508181036000830152614c2981614726565b9050919050565b60006020820190508181036000830152614c4981614749565b9050919050565b60006020820190508181036000830152614c698161476c565b9050919050565b60006020820190508181036000830152614c898161478f565b9050919050565b60006020820190508181036000830152614ca9816147b2565b9050919050565b60006020820190508181036000830152614cc9816147d5565b9050919050565b6000602082019050614ce56000830184614816565b92915050565b6000604082019050614d006000830185614816565b614d0d60208301846143c8565b9392505050565b6000604082019050614d296000830185614816565b614d366020830184614816565b9392505050565b6000606082019050614d526000830186614816565b614d5f6020830185614816565b614d6c6040830184614816565b949350505050565b6000614d7e614d8f565b9050614d8a8282615115565b919050565b6000604051905090565b600067ffffffffffffffff821115614db457614db361527c565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614de057614ddf61527c565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614e0c57614e0b61527c565b5b614e15826152c4565b9050602081019050919050565b600067ffffffffffffffff821115614e3d57614e3c61527c565b5b614e46826152c4565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614eda82615066565b9150614ee583615066565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614f1a57614f196151c0565b5b828201905092915050565b6000614f3082615066565b9150614f3b83615066565b925082614f4b57614f4a6151ef565b5b828204905092915050565b6000614f6182615066565b9150614f6c83615066565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614fa557614fa46151c0565b5b828202905092915050565b6000614fbb82615066565b9150614fc683615066565b925082821015614fd957614fd86151c0565b5b828203905092915050565b6000614fef82615046565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156150ce5780820151818401526020810190506150b3565b838111156150dd576000848401525b50505050565b600060028204905060018216806150fb57607f821691505b6020821081141561510f5761510e61521e565b5b50919050565b61511e826152c4565b810181811067ffffffffffffffff8211171561513d5761513c61527c565b5b80604052505050565b600061515182615066565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615184576151836151c0565b5b600182019050919050565b600061519a82615066565b91506151a583615066565b9250826151b5576151b46151ef565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b7f496c6c756d696e614e46542c20696e73756666696369656e742062616c616e6360008201527f6573000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f496c6c756d696e614e46542c206d6178206d696e7461626c65206e756d62657260008201527f2072656163686564000000000000000000000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a20546f6b656e20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f7261636c65436f6e74726163743a204e6f204e756d6265722064656c69766560008201527f7265640000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4e6f20746f6b656e732063616e206265206d696e74656420617420746865206d60008201527f6f6d656e74000000000000000000000000000000000000000000000000000000602082015250565b7f547279696e6720746f206d696e7420546f6b656e207769746820696e636f727260008201527f656374204d657461646174610000000000000000000000000000000000000000602082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4d617820416d6f756e74206f6620496c6c756d696e6173206d696e7465640000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b7f496c6c756d696e614e46543a2063616c6c6572206973206e6f7420656c69676960008201527f626c650000000000000000000000000000000000000000000000000000000000602082015250565b61589e81614fe4565b81146158a957600080fd5b50565b6158b581614ff6565b81146158c057600080fd5b50565b6158cc81615002565b81146158d757600080fd5b50565b6158e38161500c565b81146158ee57600080fd5b50565b6158fa81615066565b811461590557600080fd5b50565b61591181615080565b811461591c57600080fd5b50565b61592881615094565b811461593357600080fd5b5056fea26469706673582212202f9527c5dfcb7598961d99b3e8717b9e2d4d288e336b79982be3246da0e33b2764736f6c63430008070033

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

0000000000000000000000001768312bd4e292375b0321a0998d27f5e80b50910000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf06900000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000020c000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000000278d0000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e6174612e636c6f75642f697066732f0000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : tokenAddress (address): 0x1768312bD4e292375B0321a0998d27f5E80b5091
Arg [1] : _blackSquareAddress (address): 0x5EcA0798C74c1Ab8b8acd6764CC02a8f901CF069
Arg [2] : _treasury (address): 0x24bFc3D97B27a3e4C1807C7462896acE7B4803fd
Arg [3] : _royaltyValue (uint256): 1000
Arg [4] : _subscriptionId (uint64): 524
Arg [5] : _illuminaBaseURI (string): https://hcivelamrimizak.mypinata.cloud/ipfs/
Arg [6] : _minTime (uint256): 864000
Arg [7] : _maxTime (uint256): 2592000
Arg [8] : _illuminaFactor (uint256): 2
Arg [9] : _getRandomnessFromOracles (bool): False

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000001768312bd4e292375b0321a0998d27f5e80b5091
Arg [1] : 0000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf069
Arg [2] : 00000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 000000000000000000000000000000000000000000000000000000000000020c
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [6] : 00000000000000000000000000000000000000000000000000000000000d2f00
Arg [7] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000002c
Arg [11] : 68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e617461
Arg [12] : 2e636c6f75642f697066732f0000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Illumina form a collection of 20,000 generative artworks interactively created by Blacksquare members with each vote submitted. Every generated Illumina documents the progression of the Blacksquare project in an artistic way, and reveals one character of the encrypted manifesto at a time.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.