ETH Price: $2,521.10 (-0.77%)

Contract

0xe640F65a838F15b499C5E3268cb231de061241CD
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Safe Transfer Fr...159827532022-11-16 13:01:47716 days ago1668603707IN
0xe640F65a...e061241CD
0 ETH0.0008687313.49728652
Set Simple Minta...159780022022-11-15 21:05:59716 days ago1668546359IN
0xe640F65a...e061241CD
0 ETH0.0004610415.90070867
Simple Mint159779632022-11-15 20:58:11716 days ago1668545891IN
0xe640F65a...e061241CD
0 ETH0.0068174515.53236498
Set Simple Minta...159777552022-11-15 20:16:11716 days ago1668543371IN
0xe640F65a...e061241CD
0 ETH0.0005636919.43310955
Set Simple Minta...159777412022-11-15 20:13:23716 days ago1668543203IN
0xe640F65a...e061241CD
0 ETH0.0005350220.42458669
Request Random W...159751412022-11-15 11:28:47717 days ago1668511727IN
0xe640F65a...e061241CD
0 ETH0.0011082914.50984586
Set Subscription...159750882022-11-15 11:18:11717 days ago1668511091IN
0xe640F65a...e061241CD
0 ETH0.0004179314.35356365
Request Random W...159736492022-11-15 6:28:59717 days ago1668493739IN
0xe640F65a...e061241CD
0 ETH0.0011800615.44954557
Request Random W...159735812022-11-15 6:15:23717 days ago1668492923IN
0xe640F65a...e061241CD
0 ETH0.0013136614.05254743
Set Subscription...159735732022-11-15 6:13:47717 days ago1668492827IN
0xe640F65a...e061241CD
0 ETH0.0004229914.52754435
Set Simple Minta...159615762022-11-13 14:03:59719 days ago1668348239IN
0xe640F65a...e061241CD
0 ETH0.0004340514.97000393
Set Simple Minta...159615502022-11-13 13:58:47719 days ago1668347927IN
0xe640F65a...e061241CD
0 ETH0.000498617.18913708
Set Simple Minta...159613302022-11-13 13:14:47719 days ago1668345287IN
0xe640F65a...e061241CD
0 ETH0.0003978413.72105543
0x60a06040159612902022-11-13 13:06:23719 days ago1668344783IN
 Create: IlluminaNFT_V2
0 ETH0.0749935713.77384634

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IlluminaNFT_V2

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 25 : IlluminaNFT_V2.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 "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "./Erc721OperatorFilter/IOperatorFilter.sol";
import "./BlackSquareNFT.sol";

contract IlluminaNFT_V2 is ERC721, 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 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 = 0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805;
    address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
    address private treasury;

    string private illuminaURI;
    string private baseURI;

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

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

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

    event MintToken(uint256 tokenId, address purchaser);
    event BatchMinted();

    constructor(address tokenAddress, address _blackSquareAddress, address _treasury, 
    uint256 _royaltyValue, uint64 _subscriptionId, string memory _illuminaBaseURI,
    uint256 _minTime, uint256 _maxTime, uint256 _illuminaFactor, bool _getRandomnessFromOracles, address _operatorFilter) VRFConsumerBaseV2(vrfCoordinator) ERC721("Illumina", "Ill") {
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        obyToken = OBYToken(tokenAddress);
        blackSquare = BlackSquareNFT(_blackSquareAddress);
        operatorFilter = IOperatorFilter(_operatorFilter);
        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 setSimpleMintable(bool _simpleMintable) public onlyEligible {
        simpleMintable = _simpleMintable;
    }

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

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

    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 setContractURI(string memory _contractURI) external onlyOwner {
        illuminaURI = _contractURI;
    }

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

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

    function getIlluminaMaxSupply () internal pure returns (uint256) {
        return ILLUMINA_BASE_SUPPLY;
    }

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

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

    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 _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override(ERC721) {
        if (
            from != address(0) &&
            to != address(0) &&
            !_mayTransfer(msg.sender, tokenId)
        ) {
            revert("ERC721OperatorFilter: illegal operator");
        }
        super._beforeTokenTransfer(from, to, tokenId);
    }

    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 requestRandomWords() public onlyEligible  {
    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++;
                }
            }
        }
        if (tokenIds.length > 0) {
            return tokenIds;
        }  else {
            return emptyTokens;
        }
    }


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

        require(_tokenIds.current() <= getIlluminaMaxSupply(), 'Max Amount of Illuminas minted');

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

        require(blackSquare.getAvailableIlluminaCount() > _tokenIds.current(), 'IlluminaNFT, max mintable number reached');

        (uint256 pricePerToken, ,) = getIlluminaPrice();

        bool ok1 = obyToken.checkBalances(pricePerToken, _msgSender());
        require(ok1, 'IlluminaNFT, insufficient balances');

        _tokenIds.increment();

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

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

        emit MintToken(_tokenIds.current(), _msgSender());

        obyToken.burnToken(pricePerToken, _msgSender());

        _tokenURIs[_tokenIds.current()] = ipfsHash;

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

            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 {
                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) {
        if (blackSquare.getAvailableIlluminaCount() == 0) {
            return 0;
        } else {
            return _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 25 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _owners[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) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        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);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

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

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

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

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

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

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

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {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 a {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 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 {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` 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 tokenId
    ) 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.
     * - `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 tokenId
    ) internal virtual {}
}

File 3 of 25 : 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 4 of 25 : 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 5 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 6 of 25 : 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;
}

File 7 of 25 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** ****************************************************************************
 * @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 8 of 25 : IOperatorFilter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

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

File 9 of 25 : 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
    ) internal virtual override(ERC721) {
        if (
            from != address(0) &&
            to != address(0) &&
            !_mayTransfer(msg.sender, tokenId)
        ) {
            revert("ERC721OperatorFilter: illegal operator");
        }
        super._beforeTokenTransfer(from, to, tokenId);
    }

    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 10 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 25 : 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 12 of 25 : 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 13 of 25 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 16 of 25 : 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 17 of 25 : 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 18 of 25 : 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 19 of 25 : 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 20 of 25 : 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 21 of 25 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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.zeppelin.solutions/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 `sender` to `recipient`.
     *
     * 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;
        }
        _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;
        _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;
        }
        _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 22 of 25 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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(uint160(account), 20),
                        " 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.
     */
    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.
     */
    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`.
     */
    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.
     *
     * [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.
     */
    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.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 23 of 25 : 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 24 of 25 : 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 25 of 25 : 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;
}

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"},{"internalType":"address","name":"_operatorFilter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","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":[],"name":"BatchMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"purchaser","type":"address"}],"name":"MintToken","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":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"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":[],"name":"requestRandomWords","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":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","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"}],"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":"bool","name":"_simpleMintable","type":"bool"}],"name":"setSimpleMintable","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":"ipfsHash","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"simpleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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"}]

60a06040526000600d556003600e60006101000a81548161ffff021916908361ffff1602179055506001600e60026101000a81548163ffffffff021916908363ffffffff160217905550622625a0600e60066101000a81548163ffffffff021916908363ffffffff1602179055507f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded8680560001b600f5573271682deb8c4e0901d1a1550ad2e64d568e69909601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601460006101000a81548160ff0219169083151502179055506001601460026101000a81548160ff0219169083151502179055503480156200012c57600080fd5b506040516200657f3803806200657f8339818101604052810190620001529190620007ad565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518060400160405280600881526020017f496c6c756d696e610000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f496c6c00000000000000000000000000000000000000000000000000000000008152508160009080519060200190620001f992919062000623565b5080600190805190602001906200021292919062000623565b50505062000235620002296200046860201b60201c565b6200047060201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a601460036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555086600e600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555085601390805190602001906200041592919062000623565b5084600a8190555083600b8190555082600c8190555081601460016101000a81548160ff0219169083151502179055506200045789896200053660201b60201c565b505050505050505050505062000ba6565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6127108111156200057e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005759062000900565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b828054620006319062000a26565b90600052602060002090601f016020900481019282620006555760008555620006a1565b82601f106200067057805160ff1916838001178555620006a1565b82800160010185558215620006a1579182015b82811115620006a057825182559160200191906001019062000683565b5b509050620006b09190620006b4565b5090565b5b80821115620006cf576000816000905550600101620006b5565b5090565b6000620006ea620006e4846200094b565b62000922565b90508281526020810184848401111562000709576200070862000af5565b5b62000716848285620009f0565b509392505050565b6000815190506200072f8162000b3e565b92915050565b600081519050620007468162000b58565b92915050565b600082601f83011262000764576200076362000af0565b5b815162000776848260208601620006d3565b91505092915050565b600081519050620007908162000b72565b92915050565b600081519050620007a78162000b8c565b92915050565b60008060008060008060008060008060006101608c8e031215620007d657620007d562000aff565b5b6000620007e68e828f016200071e565b9b50506020620007f98e828f016200071e565b9a505060406200080c8e828f016200071e565b99505060606200081f8e828f016200077f565b9850506080620008328e828f0162000796565b97505060a08c015167ffffffffffffffff81111562000856576200085562000afa565b5b620008648e828f016200074c565b96505060c0620008778e828f016200077f565b95505060e06200088a8e828f016200077f565b9450506101006200089e8e828f016200077f565b935050610120620008b28e828f0162000735565b925050610140620008c68e828f016200071e565b9150509295989b509295989b9093969950565b6000620008e8601a8362000981565b9150620008f58262000b15565b602082019050919050565b600060208201905081810360008301526200091b81620008d9565b9050919050565b60006200092e62000941565b90506200093c828262000a5c565b919050565b6000604051905090565b600067ffffffffffffffff82111562000969576200096862000ac1565b5b620009748262000b04565b9050602081019050919050565b600082825260208201905092915050565b60006200099f82620009b2565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b60005b8381101562000a10578082015181840152602081019050620009f3565b8381111562000a20576000848401525b50505050565b6000600282049050600182168062000a3f57607f821691505b6020821081141562000a565762000a5562000a92565b5b50919050565b62000a678262000b04565b810181811067ffffffffffffffff8211171562000a895762000a8862000ac1565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b62000b498162000992565b811462000b5557600080fd5b50565b62000b6381620009a6565b811462000b6f57600080fd5b50565b62000b7d81620009d2565b811462000b8957600080fd5b50565b62000b9781620009dc565b811462000ba357600080fd5b50565b60805160601c6159b362000bcc60003960008181610be70152610c3b01526159b36000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c80638da5cb5b11610146578063b88d4fde116100c3578063e0c8628911610087578063e0c86289146106e0578063e89e106a146106ea578063e8a3d48514610708578063e985e9c514610726578063ea7b4f7714610756578063f2fde38b146107725761025e565b8063b88d4fde1461063e578063c819c1761461065a578063c87b56dd14610676578063caa0f92a146106a6578063d6cac5dc146106c45761025e565b80639b08fd711161010a5780639b08fd71146105ac578063a22cb465146105ca578063ad18d079146105e6578063b2e491db14610602578063b538f3791461061e5761025e565b80638da5cb5b1461051c5780638e4503e91461053a578063938e3d7b1461055657806395d89b411461057257806398544710146105905761025e565b80632a76baf5116101df5780636352211e116101a35780636352211e1461044857806370a0823114610478578063715018a6146104a85780637b9659eb146104b25780638101ee98146104e25780638c7ea24b146105005761025e565b80632a76baf5146103ba5780633cd6adf4146103d857806342842e0e146103f457806355f804b314610410578063633b376c1461042c5761025e565b80630c05bf6c116102265780630c05bf6c146103195780631fe543e31461033557806323b872dd1461035157806326e98ec71461036d5780632a55205a146103895761025e565b806301ffc9a71461026357806306fdde031461029357806306ff54d3146102b1578063081812fc146102cd578063095ea7b3146102fd575b600080fd5b61027d60048036038101906102789190613fda565b61078e565b60405161028a9190614880565b60405180910390f35b61029b6107a0565b6040516102a891906148ee565b60405180910390f35b6102cb60048036038101906102c69190613f13565b610832565b005b6102e760048036038101906102e291906140d9565b6109a0565b6040516102f491906147a5565b60405180910390f35b61031760048036038101906103129190613f13565b610a25565b005b610333600480360381019061032e919061418f565b610b3d565b005b61034f600480360381019061034a9190614133565b610be5565b005b61036b60048036038101906103669190613dfd565b610ca5565b005b61038760048036038101906103829190613d90565b610d05565b005b6103a3600480360381019061039e91906141eb565b610ddc565b6040516103b1929190614835565b60405180910390f35b6103c2610e9c565b6040516103cf9190614c30565b60405180910390f35b6103f260048036038101906103ed9190613f53565b610ea2565b005b61040e60048036038101906104099190613dfd565b610f9d565b005b61042a60048036038101906104259190614034565b610fbd565b005b61044660048036038101906104419190614258565b611053565b005b610462600480360381019061045d91906140d9565b6110dc565b60405161046f91906147a5565b60405180910390f35b610492600480360381019061048d9190613d90565b61118e565b60405161049f9190614c30565b60405180910390f35b6104b0611246565b005b6104cc60048036038101906104c79190613d90565b6112ce565b6040516104d9919061485e565b60405180910390f35b6104ea61145d565b6040516104f79190614880565b60405180910390f35b61051a60048036038101906105159190613f13565b611470565b005b6105246114fa565b60405161053191906147a5565b60405180910390f35b610554600480360381019061054f9190613f53565b611524565b005b610570600480360381019061056b9190614034565b6115bd565b005b61057a611653565b60405161058791906148ee565b60405180910390f35b6105aa60048036038101906105a59190613fad565b6116e5565b005b6105b461176b565b6040516105c19190614880565b60405180910390f35b6105e460048036038101906105df9190613ed3565b61177e565b005b61060060048036038101906105fb91906140d9565b611794565b005b61061c6004803603810190610617919061407d565b61187c565b005b610626611f38565b60405161063593929190614c9d565b60405180910390f35b61065860048036038101906106539190613e50565b612062565b005b610674600480360381019061066f9190613f53565b6120c4565b005b610690600480360381019061068b91906140d9565b6121bf565b60405161069d91906148ee565b60405180910390f35b6106ae6122b7565b6040516106bb9190614c30565b60405180910390f35b6106de60048036038101906106d99190614258565b612385565b005b6106e861240e565b005b6106f26125f5565b6040516106ff9190614c30565b60405180910390f35b6107106125fb565b60405161071d91906148ee565b60405180910390f35b610740600480360381019061073b9190613dbd565b61268d565b60405161074d9190614880565b60405180910390f35b610770600480360381019061076b919061422b565b612721565b005b61078c60048036038101906107879190613d90565b6127c9565b005b6000610799826128c1565b9050919050565b6060600080546107af90615017565b80601f01602080910402602001604051908101604052809291908181526020018280546107db90615017565b80156108285780601f106107fd57610100808354040283529160200191610828565b820191906000526020600020905b81548152906001019060200180831161080b57829003601f168201915b5050505050905090565b61083a61293b565b73ffffffffffffffffffffffffffffffffffffffff166108586114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806108d15750600115156019600061088561293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090790614bf0565b60405180910390fd5b600061091b836112ce565b905060005b815181101561099a578281101561098757600082828151811061094657610945615181565b5b6020026020010151905061095981612943565b6001601a600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505b80806109929061507a565b915050610920565b50505050565b60006109ab82612a60565b6109ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e190614b10565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a30826110dc565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9890614bb0565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ac061293b565b73ffffffffffffffffffffffffffffffffffffffff161480610aef5750610aee81610ae961293b565b61268d565b5b610b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2590614a70565b60405180910390fd5b610b388383612acc565b505050565b610b4561293b565b73ffffffffffffffffffffffffffffffffffffffff16610b636114fa565b73ffffffffffffffffffffffffffffffffffffffff1614610bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb090614b30565b60405180910390fd5b80601860008481526020019081526020016000209080519060200190610be0929190613a9d565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9757337f00000000000000000000000000000000000000000000000000000000000000006040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610c8e9291906147c0565b60405180910390fd5b610ca18282612b85565b5050565b610cb6610cb061293b565b82612c28565b610cf5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cec90614bd0565b60405180910390fd5b610d00838383612d06565b505050565b610d0d61293b565b73ffffffffffffffffffffffffffffffffffffffff16610d2b6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614610d81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7890614b30565b60405180910390fd5b6001601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080600060076040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905080600001519250612710816020015162ffffff1685610e889190614e8a565b610e929190614e59565b9150509250929050565b600d5481565b610eaa61293b565b73ffffffffffffffffffffffffffffffffffffffff16610ec86114fa565b73ffffffffffffffffffffffffffffffffffffffff161480610f4157506001151560196000610ef561293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610f80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7790614bf0565b60405180910390fd5b80601460026101000a81548160ff02191690831515021790555050565b610fb883838360405180602001604052806000815250612062565b505050565b610fc561293b565b73ffffffffffffffffffffffffffffffffffffffff16610fe36114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611039576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103090614b30565b60405180910390fd5b806013908051906020019061104f929190613a9d565b5050565b61105b61293b565b73ffffffffffffffffffffffffffffffffffffffff166110796114fa565b73ffffffffffffffffffffffffffffffffffffffff16146110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690614b30565b60405180910390fd5b8060ff16600b8190555050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c90614ab0565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f690614a90565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61124e61293b565b73ffffffffffffffffffffffffffffffffffffffff1661126c6114fa565b73ffffffffffffffffffffffffffffffffffffffff16146112c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b990614b30565b60405180910390fd5b6112cc6000612f6d565b565b606060006112db8361118e565b905060008067ffffffffffffffff8111156112f9576112f86151b0565b5b6040519080825280602002602001820160405280156113275781602001602082028036833780820191505090505b50905060008267ffffffffffffffff811115611346576113456151b0565b5b6040519080825280602002602001820160405280156113745781602001602082028036833780820191505090505b509050600080600190505b6113896017613033565b811161143957601a600082815260200190815260200160002060009054906101000a900460ff166114265760006113bf826110dc565b90508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611424578184848151811061140957611408615181565b5b60200260200101818152505082806114209061507a565b9350505b505b80806114319061507a565b91505061137f565b506000825111156114505781945050505050611458565b829450505050505b919050565b601460019054906101000a900460ff1681565b61147861293b565b73ffffffffffffffffffffffffffffffffffffffff166114966114fa565b73ffffffffffffffffffffffffffffffffffffffff16146114ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e390614b30565b60405180910390fd5b6114f68282613041565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61152c61293b565b73ffffffffffffffffffffffffffffffffffffffff1661154a6114fa565b73ffffffffffffffffffffffffffffffffffffffff16146115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159790614b30565b60405180910390fd5b80601460016101000a81548160ff02191690831515021790555050565b6115c561293b565b73ffffffffffffffffffffffffffffffffffffffff166115e36114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611639576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163090614b30565b60405180910390fd5b806012908051906020019061164f929190613a9d565b5050565b60606001805461166290615017565b80601f016020809104026020016040519081016040528092919081815260200182805461168e90615017565b80156116db5780601f106116b0576101008083540402835291602001916116db565b820191906000526020600020905b8154815290600101906020018083116116be57829003601f168201915b5050505050905090565b6116ed61293b565b73ffffffffffffffffffffffffffffffffffffffff1661170b6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611761576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175890614b30565b60405180910390fd5b80600f8190555050565b601460029054906101000a900460ff1681565b61179061178961293b565b838361312b565b5050565b61179c61293b565b73ffffffffffffffffffffffffffffffffffffffff166117ba6114fa565b73ffffffffffffffffffffffffffffffffffffffff161480611833575060011515601960006117e761293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b611872576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186990614bf0565b60405180910390fd5b80600d8190555050565b60011515601460009054906101000a900460ff161515146118d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c990614b50565b60405180910390fd5b6118da613298565b6118e46017613033565b1115611925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191c90614b90565b60405180910390fd5b61192d6122b7565b811461196e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196590614b70565b60405180910390fd5b6119786017613033565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a189190614106565b11611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90614a10565b60405180910390fd5b6000611a62611f38565b505090506000601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633105a79083611aaf61293b565b6040518363ffffffff1660e01b8152600401611acc929190614c4b565b60206040518083038186803b158015611ae457600080fd5b505afa158015611af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1c9190613f80565b905080611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5590614930565b60405180910390fd5b611b6860176132a2565b611b7a611b756017613033565b612a60565b15611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb190614a50565b60405180910390fd5b611bd4611bc561293b565b611bcf6017613033565b6132b8565b7f817fb43eae8b3e4767bb96622a5c74f5e68f4400210abce47c47564bd7590005611bff6017613033565b611c0761293b565b604051611c15929190614c4b565b60405180910390a1601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc593ca583611c6461293b565b6040518363ffffffff1660e01b8152600401611c81929190614c4b565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b505050508360186000611cc26017613033565b81526020019081526020016000209080519060200190611ce3929190613a9d565b506019611cf06017613033565b1480611d2657506019611d036017613033565b118015611d25575060006019611d196017613033565b611d2391906150c3565b145b5b15611f3257601460019054906101000a900460ff16611f28576000600a546001600a54600b54611d569190614ee4565b611d609190614e03565b7f64eeb8567ad496f244c24c274bb1c2f12e4b32f933bab58a456cb5a5864dc58d60001c611d8e91906150c3565b611d989190614e03565b905060008142611da89190614e03565b9050601460029054906101000a900460ff1615611f19576000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f9040316040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2957600080fd5b505afa158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190614106565b9050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663299716c982846040518363ffffffff1660e01b8152600401611ec0929190614c74565b602060405180830381600087803b158015611eda57600080fd5b505af1158015611eee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f129190614106565b5050611f21565b80600d819055505b5050611f31565b611f3061240e565b5b5b50505050565b600080600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b158015611fa657600080fd5b505afa158015611fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fde9190614106565b90506000611fec6017613033565b905060008183611ffc9190614ee4565b9050600c548161200c9190614e59565b60e1111561204f576000600c54826120249190614e59565b60e16120309190614ee4565b9050601e81111561204d578084839650965096505050505061205d565b505b601e83829550955095505050505b909192565b61207361206d61293b565b83612c28565b6120b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a990614bd0565b60405180910390fd5b6120be84848484613492565b50505050565b6120cc61293b565b73ffffffffffffffffffffffffffffffffffffffff166120ea6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806121635750600115156019600061211761293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6121a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219990614bf0565b60405180910390fd5b80601460006101000a81548160ff02191690831515021790555050565b606060006121cb6134ee565b905060006018600085815260200190815260200160002080546121ed90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461221990615017565b80156122665780601f1061223b57610100808354040283529160200191612266565b820191906000526020600020905b81548152906001019060200180831161224957829003601f168201915b50505050509050600082511161228b57604051806020016040528060008152506122ae565b818160405160200161229e929190614781565b6040516020818303038152906040525b92505050919050565b600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235a9190614106565b14156123695760009050612382565b60016123756017613033565b61237f9190614e03565b90505b90565b61238d61293b565b73ffffffffffffffffffffffffffffffffffffffff166123ab6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614612401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f890614b30565b60405180910390fd5b8060ff16600a8190555050565b61241661293b565b73ffffffffffffffffffffffffffffffffffffffff166124346114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806124ad5750600115156019600061246161293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e390614bf0565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30600f54600e600a9054906101000a900467ffffffffffffffff16600e60009054906101000a900461ffff16600e60069054906101000a900463ffffffff16600e60029054906101000a900463ffffffff166040518663ffffffff1660e01b815260040161259b95949392919061489b565b602060405180830381600087803b1580156125b557600080fd5b505af11580156125c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ed9190614106565b600981905550565b60095481565b60606012805461260a90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461263690615017565b80156126835780601f1061265857610100808354040283529160200191612683565b820191906000526020600020905b81548152906001019060200180831161266657829003601f168201915b5050505050905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61272961293b565b73ffffffffffffffffffffffffffffffffffffffff166127476114fa565b73ffffffffffffffffffffffffffffffffffffffff161461279d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279490614b30565b60405180910390fd5b80600e600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6127d161293b565b73ffffffffffffffffffffffffffffffffffffffff166127ef6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614612845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161283c90614b30565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ac90614970565b60405180910390fd5b6128be81612f6d565b50565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612934575061293382613580565b5b9050919050565b600033905090565b600061294e826110dc565b905061295c81600084613662565b612967600083612acc565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129b79190614ee4565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a5c8160008461372f565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612b3f836110dc565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000815111612bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc090614ad0565b60405180910390fd5b6000600a546001600a54600b54612be09190614ee4565b612bea9190614e03565b83600081518110612bfe57612bfd615181565b5b6020026020010151612c1091906150c3565b612c1a9190614e03565b905080600d81905550505050565b6000612c3382612a60565b612c72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c6990614a30565b60405180910390fd5b6000612c7d836110dc565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612cbf5750612cbe818561268d565b5b80612cfd57508373ffffffffffffffffffffffffffffffffffffffff16612ce5846109a0565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612d26826110dc565b73ffffffffffffffffffffffffffffffffffffffff1614612d7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7390614990565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612de3906149d0565b60405180910390fd5b612df7838383613662565b612e02600082612acc565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612e529190614ee4565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ea99190614e03565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f6883838361372f565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b612710811115613086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161307d90614910565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561319a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613191906149f0565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161328b9190614880565b60405180910390a3505050565b6000614e20905090565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161331f90614af0565b60405180910390fd5b61333181612a60565b15613371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613368906149b0565b60405180910390fd5b61337d60008383613662565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546133cd9190614e03565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461348e6000838361372f565b5050565b61349d848484612d06565b6134a984848484613734565b6134e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134df90614950565b60405180910390fd5b50505050565b6060601380546134fd90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461352990615017565b80156135765780601f1061354b57610100808354040283529160200191613576565b820191906000526020600020905b81548152906001019060200180831161355957829003601f168201915b5050505050905090565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061364b57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061365b575061365a826138cb565b5b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156136cc5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156136df57506136dd3382613935565b155b1561371f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371690614c10565b60405180910390fd5b61372a838383613a75565b505050565b505050565b60006137558473ffffffffffffffffffffffffffffffffffffffff16613a7a565b156138be578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261377e61293b565b8786866040518563ffffffff1660e01b81526004016137a094939291906147e9565b602060405180830381600087803b1580156137ba57600080fd5b505af19250505080156137eb57506040513d601f19601f820116820180604052508101906137e89190614007565b60015b61386e573d806000811461381b576040519150601f19603f3d011682016040523d82523d6000602084013e613820565b606091505b50600081511415613866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161385d90614950565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506138c3565b600190505b949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600080601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561399c576001915050613a6f565b6139a5836110dc565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156139e2576001915050613a6f565b8073ffffffffffffffffffffffffffffffffffffffff1663192c596e336040518263ffffffff1660e01b8152600401613a1b91906147a5565b60206040518083038186803b158015613a3357600080fd5b505afa158015613a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6b9190613f80565b9150505b92915050565b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054613aa990615017565b90600052602060002090601f016020900481019282613acb5760008555613b12565b82601f10613ae457805160ff1916838001178555613b12565b82800160010185558215613b12579182015b82811115613b11578251825591602001919060010190613af6565b5b509050613b1f9190613b23565b5090565b5b80821115613b3c576000816000905550600101613b24565b5090565b6000613b53613b4e84614cf9565b614cd4565b90508083825260208201905082856020860282011115613b7657613b756151e4565b5b60005b85811015613ba65781613b8c8882613d3c565b845260208401935060208301925050600181019050613b79565b5050509392505050565b6000613bc3613bbe84614d25565b614cd4565b905082815260208101848484011115613bdf57613bde6151e9565b5b613bea848285614fd5565b509392505050565b6000613c05613c0084614d56565b614cd4565b905082815260208101848484011115613c2157613c206151e9565b5b613c2c848285614fd5565b509392505050565b600081359050613c43816158dc565b92915050565b600082601f830112613c5e57613c5d6151df565b5b8135613c6e848260208601613b40565b91505092915050565b600081359050613c86816158f3565b92915050565b600081519050613c9b816158f3565b92915050565b600081359050613cb08161590a565b92915050565b600081359050613cc581615921565b92915050565b600081519050613cda81615921565b92915050565b600082601f830112613cf557613cf46151df565b5b8135613d05848260208601613bb0565b91505092915050565b600082601f830112613d2357613d226151df565b5b8135613d33848260208601613bf2565b91505092915050565b600081359050613d4b81615938565b92915050565b600081519050613d6081615938565b92915050565b600081359050613d758161594f565b92915050565b600081359050613d8a81615966565b92915050565b600060208284031215613da657613da56151f3565b5b6000613db484828501613c34565b91505092915050565b60008060408385031215613dd457613dd36151f3565b5b6000613de285828601613c34565b9250506020613df385828601613c34565b9150509250929050565b600080600060608486031215613e1657613e156151f3565b5b6000613e2486828701613c34565b9350506020613e3586828701613c34565b9250506040613e4686828701613d3c565b9150509250925092565b60008060008060808587031215613e6a57613e696151f3565b5b6000613e7887828801613c34565b9450506020613e8987828801613c34565b9350506040613e9a87828801613d3c565b925050606085013567ffffffffffffffff811115613ebb57613eba6151ee565b5b613ec787828801613ce0565b91505092959194509250565b60008060408385031215613eea57613ee96151f3565b5b6000613ef885828601613c34565b9250506020613f0985828601613c77565b9150509250929050565b60008060408385031215613f2a57613f296151f3565b5b6000613f3885828601613c34565b9250506020613f4985828601613d3c565b9150509250929050565b600060208284031215613f6957613f686151f3565b5b6000613f7784828501613c77565b91505092915050565b600060208284031215613f9657613f956151f3565b5b6000613fa484828501613c8c565b91505092915050565b600060208284031215613fc357613fc26151f3565b5b6000613fd184828501613ca1565b91505092915050565b600060208284031215613ff057613fef6151f3565b5b6000613ffe84828501613cb6565b91505092915050565b60006020828403121561401d5761401c6151f3565b5b600061402b84828501613ccb565b91505092915050565b60006020828403121561404a576140496151f3565b5b600082013567ffffffffffffffff811115614068576140676151ee565b5b61407484828501613d0e565b91505092915050565b60008060408385031215614094576140936151f3565b5b600083013567ffffffffffffffff8111156140b2576140b16151ee565b5b6140be85828601613d0e565b92505060206140cf85828601613d3c565b9150509250929050565b6000602082840312156140ef576140ee6151f3565b5b60006140fd84828501613d3c565b91505092915050565b60006020828403121561411c5761411b6151f3565b5b600061412a84828501613d51565b91505092915050565b6000806040838503121561414a576141496151f3565b5b600061415885828601613d3c565b925050602083013567ffffffffffffffff811115614179576141786151ee565b5b61418585828601613c49565b9150509250929050565b600080604083850312156141a6576141a56151f3565b5b60006141b485828601613d3c565b925050602083013567ffffffffffffffff8111156141d5576141d46151ee565b5b6141e185828601613d0e565b9150509250929050565b60008060408385031215614202576142016151f3565b5b600061421085828601613d3c565b925050602061422185828601613d3c565b9150509250929050565b600060208284031215614241576142406151f3565b5b600061424f84828501613d66565b91505092915050565b60006020828403121561426e5761426d6151f3565b5b600061427c84828501613d7b565b91505092915050565b60006142918383614745565b60208301905092915050565b6142a681614f18565b82525050565b60006142b782614d97565b6142c18185614dc5565b93506142cc83614d87565b8060005b838110156142fd5781516142e48882614285565b97506142ef83614db8565b9250506001810190506142d0565b5085935050505092915050565b61431381614f2a565b82525050565b61432281614f36565b82525050565b600061433382614da2565b61433d8185614dd6565b935061434d818560208601614fe4565b614356816151f8565b840191505092915050565b600061436c82614dad565b6143768185614de7565b9350614386818560208601614fe4565b61438f816151f8565b840191505092915050565b60006143a582614dad565b6143af8185614df8565b93506143bf818560208601614fe4565b80840191505092915050565b60006143d8601a83614de7565b91506143e382615209565b602082019050919050565b60006143fb602283614de7565b915061440682615232565b604082019050919050565b600061441e603283614de7565b915061442982615281565b604082019050919050565b6000614441602683614de7565b915061444c826152d0565b604082019050919050565b6000614464602583614de7565b915061446f8261531f565b604082019050919050565b6000614487601c83614de7565b91506144928261536e565b602082019050919050565b60006144aa602483614de7565b91506144b582615397565b604082019050919050565b60006144cd601983614de7565b91506144d8826153e6565b602082019050919050565b60006144f0602883614de7565b91506144fb8261540f565b604082019050919050565b6000614513602c83614de7565b915061451e8261545e565b604082019050919050565b6000614536602183614de7565b9150614541826154ad565b604082019050919050565b6000614559603883614de7565b9150614564826154fc565b604082019050919050565b600061457c602a83614de7565b91506145878261554b565b604082019050919050565b600061459f602983614de7565b91506145aa8261559a565b604082019050919050565b60006145c2602383614de7565b91506145cd826155e9565b604082019050919050565b60006145e5602083614de7565b91506145f082615638565b602082019050919050565b6000614608602c83614de7565b915061461382615661565b604082019050919050565b600061462b602083614de7565b9150614636826156b0565b602082019050919050565b600061464e602583614de7565b9150614659826156d9565b604082019050919050565b6000614671602c83614de7565b915061467c82615728565b604082019050919050565b6000614694601e83614de7565b915061469f82615777565b602082019050919050565b60006146b7602183614de7565b91506146c2826157a0565b604082019050919050565b60006146da603183614de7565b91506146e5826157ef565b604082019050919050565b60006146fd602383614de7565b91506147088261583e565b604082019050919050565b6000614720602683614de7565b915061472b8261588d565b604082019050919050565b61473f81614f6c565b82525050565b61474e81614f9a565b82525050565b61475d81614f9a565b82525050565b61476c81614fa4565b82525050565b61477b81614fb4565b82525050565b600061478d828561439a565b9150614799828461439a565b91508190509392505050565b60006020820190506147ba600083018461429d565b92915050565b60006040820190506147d5600083018561429d565b6147e2602083018461429d565b9392505050565b60006080820190506147fe600083018761429d565b61480b602083018661429d565b6148186040830185614754565b818103606083015261482a8184614328565b905095945050505050565b600060408201905061484a600083018561429d565b6148576020830184614754565b9392505050565b6000602082019050818103600083015261487881846142ac565b905092915050565b6000602082019050614895600083018461430a565b92915050565b600060a0820190506148b06000830188614319565b6148bd6020830187614772565b6148ca6040830186614736565b6148d76060830185614763565b6148e46080830184614763565b9695505050505050565b600060208201905081810360008301526149088184614361565b905092915050565b60006020820190508181036000830152614929816143cb565b9050919050565b60006020820190508181036000830152614949816143ee565b9050919050565b6000602082019050818103600083015261496981614411565b9050919050565b6000602082019050818103600083015261498981614434565b9050919050565b600060208201905081810360008301526149a981614457565b9050919050565b600060208201905081810360008301526149c98161447a565b9050919050565b600060208201905081810360008301526149e98161449d565b9050919050565b60006020820190508181036000830152614a09816144c0565b9050919050565b60006020820190508181036000830152614a29816144e3565b9050919050565b60006020820190508181036000830152614a4981614506565b9050919050565b60006020820190508181036000830152614a6981614529565b9050919050565b60006020820190508181036000830152614a898161454c565b9050919050565b60006020820190508181036000830152614aa98161456f565b9050919050565b60006020820190508181036000830152614ac981614592565b9050919050565b60006020820190508181036000830152614ae9816145b5565b9050919050565b60006020820190508181036000830152614b09816145d8565b9050919050565b60006020820190508181036000830152614b29816145fb565b9050919050565b60006020820190508181036000830152614b498161461e565b9050919050565b60006020820190508181036000830152614b6981614641565b9050919050565b60006020820190508181036000830152614b8981614664565b9050919050565b60006020820190508181036000830152614ba981614687565b9050919050565b60006020820190508181036000830152614bc9816146aa565b9050919050565b60006020820190508181036000830152614be9816146cd565b9050919050565b60006020820190508181036000830152614c09816146f0565b9050919050565b60006020820190508181036000830152614c2981614713565b9050919050565b6000602082019050614c456000830184614754565b92915050565b6000604082019050614c606000830185614754565b614c6d602083018461429d565b9392505050565b6000604082019050614c896000830185614754565b614c966020830184614754565b9392505050565b6000606082019050614cb26000830186614754565b614cbf6020830185614754565b614ccc6040830184614754565b949350505050565b6000614cde614cef565b9050614cea8282615049565b919050565b6000604051905090565b600067ffffffffffffffff821115614d1457614d136151b0565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614d4057614d3f6151b0565b5b614d49826151f8565b9050602081019050919050565b600067ffffffffffffffff821115614d7157614d706151b0565b5b614d7a826151f8565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614e0e82614f9a565b9150614e1983614f9a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614e4e57614e4d6150f4565b5b828201905092915050565b6000614e6482614f9a565b9150614e6f83614f9a565b925082614e7f57614e7e615123565b5b828204905092915050565b6000614e9582614f9a565b9150614ea083614f9a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614ed957614ed86150f4565b5b828202905092915050565b6000614eef82614f9a565b9150614efa83614f9a565b925082821015614f0d57614f0c6150f4565b5b828203905092915050565b6000614f2382614f7a565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015615002578082015181840152602081019050614fe7565b83811115615011576000848401525b50505050565b6000600282049050600182168061502f57607f821691505b6020821081141561504357615042615152565b5b50919050565b615052826151f8565b810181811067ffffffffffffffff82111715615071576150706151b0565b5b80604052505050565b600061508582614f9a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156150b8576150b76150f4565b5b600182019050919050565b60006150ce82614f9a565b91506150d983614f9a565b9250826150e9576150e8615123565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b7f496c6c756d696e614e46542c20696e73756666696369656e742062616c616e6360008201527f6573000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f496c6c756d696e614e46542c206d6178206d696e7461626c65206e756d62657260008201527f2072656163686564000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a20546f6b656e20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4f7261636c65436f6e74726163743a204e6f204e756d6265722064656c69766560008201527f7265640000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4e6f20746f6b656e732063616e206265206d696e74656420617420746865206d60008201527f6f6d656e74000000000000000000000000000000000000000000000000000000602082015250565b7f547279696e6720746f206d696e7420546f6b656e207769746820696e636f727260008201527f656374204d657461646174610000000000000000000000000000000000000000602082015250565b7f4d617820416d6f756e74206f6620496c6c756d696e6173206d696e7465640000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a2063616c6c6572206973206e6f7420656c69676960008201527f626c650000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732314f70657261746f7246696c7465723a20696c6c6567616c206f7060008201527f657261746f720000000000000000000000000000000000000000000000000000602082015250565b6158e581614f18565b81146158f057600080fd5b50565b6158fc81614f2a565b811461590757600080fd5b50565b61591381614f36565b811461591e57600080fd5b50565b61592a81614f40565b811461593557600080fd5b50565b61594181614f9a565b811461594c57600080fd5b50565b61595881614fb4565b811461596357600080fd5b50565b61596f81614fc8565b811461597a57600080fd5b5056fea2646970667358221220031ed67e31e94dfe5a343f3f17d3e64aec4014f2f6ddb8501565621b70e8c36064736f6c634300080700330000000000000000000000001768312bd4e292375b0321a0998d27f5e80b50910000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf06900000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000001cc000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c01f22acb041d49d9590095ecc2fa0489bc2e23000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e6174612e636c6f75642f697066732f0000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025e5760003560e01c80638da5cb5b11610146578063b88d4fde116100c3578063e0c8628911610087578063e0c86289146106e0578063e89e106a146106ea578063e8a3d48514610708578063e985e9c514610726578063ea7b4f7714610756578063f2fde38b146107725761025e565b8063b88d4fde1461063e578063c819c1761461065a578063c87b56dd14610676578063caa0f92a146106a6578063d6cac5dc146106c45761025e565b80639b08fd711161010a5780639b08fd71146105ac578063a22cb465146105ca578063ad18d079146105e6578063b2e491db14610602578063b538f3791461061e5761025e565b80638da5cb5b1461051c5780638e4503e91461053a578063938e3d7b1461055657806395d89b411461057257806398544710146105905761025e565b80632a76baf5116101df5780636352211e116101a35780636352211e1461044857806370a0823114610478578063715018a6146104a85780637b9659eb146104b25780638101ee98146104e25780638c7ea24b146105005761025e565b80632a76baf5146103ba5780633cd6adf4146103d857806342842e0e146103f457806355f804b314610410578063633b376c1461042c5761025e565b80630c05bf6c116102265780630c05bf6c146103195780631fe543e31461033557806323b872dd1461035157806326e98ec71461036d5780632a55205a146103895761025e565b806301ffc9a71461026357806306fdde031461029357806306ff54d3146102b1578063081812fc146102cd578063095ea7b3146102fd575b600080fd5b61027d60048036038101906102789190613fda565b61078e565b60405161028a9190614880565b60405180910390f35b61029b6107a0565b6040516102a891906148ee565b60405180910390f35b6102cb60048036038101906102c69190613f13565b610832565b005b6102e760048036038101906102e291906140d9565b6109a0565b6040516102f491906147a5565b60405180910390f35b61031760048036038101906103129190613f13565b610a25565b005b610333600480360381019061032e919061418f565b610b3d565b005b61034f600480360381019061034a9190614133565b610be5565b005b61036b60048036038101906103669190613dfd565b610ca5565b005b61038760048036038101906103829190613d90565b610d05565b005b6103a3600480360381019061039e91906141eb565b610ddc565b6040516103b1929190614835565b60405180910390f35b6103c2610e9c565b6040516103cf9190614c30565b60405180910390f35b6103f260048036038101906103ed9190613f53565b610ea2565b005b61040e60048036038101906104099190613dfd565b610f9d565b005b61042a60048036038101906104259190614034565b610fbd565b005b61044660048036038101906104419190614258565b611053565b005b610462600480360381019061045d91906140d9565b6110dc565b60405161046f91906147a5565b60405180910390f35b610492600480360381019061048d9190613d90565b61118e565b60405161049f9190614c30565b60405180910390f35b6104b0611246565b005b6104cc60048036038101906104c79190613d90565b6112ce565b6040516104d9919061485e565b60405180910390f35b6104ea61145d565b6040516104f79190614880565b60405180910390f35b61051a60048036038101906105159190613f13565b611470565b005b6105246114fa565b60405161053191906147a5565b60405180910390f35b610554600480360381019061054f9190613f53565b611524565b005b610570600480360381019061056b9190614034565b6115bd565b005b61057a611653565b60405161058791906148ee565b60405180910390f35b6105aa60048036038101906105a59190613fad565b6116e5565b005b6105b461176b565b6040516105c19190614880565b60405180910390f35b6105e460048036038101906105df9190613ed3565b61177e565b005b61060060048036038101906105fb91906140d9565b611794565b005b61061c6004803603810190610617919061407d565b61187c565b005b610626611f38565b60405161063593929190614c9d565b60405180910390f35b61065860048036038101906106539190613e50565b612062565b005b610674600480360381019061066f9190613f53565b6120c4565b005b610690600480360381019061068b91906140d9565b6121bf565b60405161069d91906148ee565b60405180910390f35b6106ae6122b7565b6040516106bb9190614c30565b60405180910390f35b6106de60048036038101906106d99190614258565b612385565b005b6106e861240e565b005b6106f26125f5565b6040516106ff9190614c30565b60405180910390f35b6107106125fb565b60405161071d91906148ee565b60405180910390f35b610740600480360381019061073b9190613dbd565b61268d565b60405161074d9190614880565b60405180910390f35b610770600480360381019061076b919061422b565b612721565b005b61078c60048036038101906107879190613d90565b6127c9565b005b6000610799826128c1565b9050919050565b6060600080546107af90615017565b80601f01602080910402602001604051908101604052809291908181526020018280546107db90615017565b80156108285780601f106107fd57610100808354040283529160200191610828565b820191906000526020600020905b81548152906001019060200180831161080b57829003601f168201915b5050505050905090565b61083a61293b565b73ffffffffffffffffffffffffffffffffffffffff166108586114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806108d15750600115156019600061088561293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090790614bf0565b60405180910390fd5b600061091b836112ce565b905060005b815181101561099a578281101561098757600082828151811061094657610945615181565b5b6020026020010151905061095981612943565b6001601a600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505b80806109929061507a565b915050610920565b50505050565b60006109ab82612a60565b6109ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e190614b10565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a30826110dc565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9890614bb0565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ac061293b565b73ffffffffffffffffffffffffffffffffffffffff161480610aef5750610aee81610ae961293b565b61268d565b5b610b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2590614a70565b60405180910390fd5b610b388383612acc565b505050565b610b4561293b565b73ffffffffffffffffffffffffffffffffffffffff16610b636114fa565b73ffffffffffffffffffffffffffffffffffffffff1614610bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb090614b30565b60405180910390fd5b80601860008481526020019081526020016000209080519060200190610be0929190613a9d565b505050565b7f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c9757337f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610c8e9291906147c0565b60405180910390fd5b610ca18282612b85565b5050565b610cb6610cb061293b565b82612c28565b610cf5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cec90614bd0565b60405180910390fd5b610d00838383612d06565b505050565b610d0d61293b565b73ffffffffffffffffffffffffffffffffffffffff16610d2b6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614610d81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7890614b30565b60405180910390fd5b6001601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080600060076040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905080600001519250612710816020015162ffffff1685610e889190614e8a565b610e929190614e59565b9150509250929050565b600d5481565b610eaa61293b565b73ffffffffffffffffffffffffffffffffffffffff16610ec86114fa565b73ffffffffffffffffffffffffffffffffffffffff161480610f4157506001151560196000610ef561293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b610f80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7790614bf0565b60405180910390fd5b80601460026101000a81548160ff02191690831515021790555050565b610fb883838360405180602001604052806000815250612062565b505050565b610fc561293b565b73ffffffffffffffffffffffffffffffffffffffff16610fe36114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611039576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103090614b30565b60405180910390fd5b806013908051906020019061104f929190613a9d565b5050565b61105b61293b565b73ffffffffffffffffffffffffffffffffffffffff166110796114fa565b73ffffffffffffffffffffffffffffffffffffffff16146110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690614b30565b60405180910390fd5b8060ff16600b8190555050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c90614ab0565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f690614a90565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61124e61293b565b73ffffffffffffffffffffffffffffffffffffffff1661126c6114fa565b73ffffffffffffffffffffffffffffffffffffffff16146112c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b990614b30565b60405180910390fd5b6112cc6000612f6d565b565b606060006112db8361118e565b905060008067ffffffffffffffff8111156112f9576112f86151b0565b5b6040519080825280602002602001820160405280156113275781602001602082028036833780820191505090505b50905060008267ffffffffffffffff811115611346576113456151b0565b5b6040519080825280602002602001820160405280156113745781602001602082028036833780820191505090505b509050600080600190505b6113896017613033565b811161143957601a600082815260200190815260200160002060009054906101000a900460ff166114265760006113bf826110dc565b90508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611424578184848151811061140957611408615181565b5b60200260200101818152505082806114209061507a565b9350505b505b80806114319061507a565b91505061137f565b506000825111156114505781945050505050611458565b829450505050505b919050565b601460019054906101000a900460ff1681565b61147861293b565b73ffffffffffffffffffffffffffffffffffffffff166114966114fa565b73ffffffffffffffffffffffffffffffffffffffff16146114ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e390614b30565b60405180910390fd5b6114f68282613041565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61152c61293b565b73ffffffffffffffffffffffffffffffffffffffff1661154a6114fa565b73ffffffffffffffffffffffffffffffffffffffff16146115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159790614b30565b60405180910390fd5b80601460016101000a81548160ff02191690831515021790555050565b6115c561293b565b73ffffffffffffffffffffffffffffffffffffffff166115e36114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611639576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163090614b30565b60405180910390fd5b806012908051906020019061164f929190613a9d565b5050565b60606001805461166290615017565b80601f016020809104026020016040519081016040528092919081815260200182805461168e90615017565b80156116db5780601f106116b0576101008083540402835291602001916116db565b820191906000526020600020905b8154815290600101906020018083116116be57829003601f168201915b5050505050905090565b6116ed61293b565b73ffffffffffffffffffffffffffffffffffffffff1661170b6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614611761576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175890614b30565b60405180910390fd5b80600f8190555050565b601460029054906101000a900460ff1681565b61179061178961293b565b838361312b565b5050565b61179c61293b565b73ffffffffffffffffffffffffffffffffffffffff166117ba6114fa565b73ffffffffffffffffffffffffffffffffffffffff161480611833575060011515601960006117e761293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b611872576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186990614bf0565b60405180910390fd5b80600d8190555050565b60011515601460009054906101000a900460ff161515146118d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c990614b50565b60405180910390fd5b6118da613298565b6118e46017613033565b1115611925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191c90614b90565b60405180910390fd5b61192d6122b7565b811461196e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196590614b70565b60405180910390fd5b6119786017613033565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a189190614106565b11611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90614a10565b60405180910390fd5b6000611a62611f38565b505090506000601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633105a79083611aaf61293b565b6040518363ffffffff1660e01b8152600401611acc929190614c4b565b60206040518083038186803b158015611ae457600080fd5b505afa158015611af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1c9190613f80565b905080611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5590614930565b60405180910390fd5b611b6860176132a2565b611b7a611b756017613033565b612a60565b15611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb190614a50565b60405180910390fd5b611bd4611bc561293b565b611bcf6017613033565b6132b8565b7f817fb43eae8b3e4767bb96622a5c74f5e68f4400210abce47c47564bd7590005611bff6017613033565b611c0761293b565b604051611c15929190614c4b565b60405180910390a1601460039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc593ca583611c6461293b565b6040518363ffffffff1660e01b8152600401611c81929190614c4b565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b505050508360186000611cc26017613033565b81526020019081526020016000209080519060200190611ce3929190613a9d565b506019611cf06017613033565b1480611d2657506019611d036017613033565b118015611d25575060006019611d196017613033565b611d2391906150c3565b145b5b15611f3257601460019054906101000a900460ff16611f28576000600a546001600a54600b54611d569190614ee4565b611d609190614e03565b7f64eeb8567ad496f244c24c274bb1c2f12e4b32f933bab58a456cb5a5864dc58d60001c611d8e91906150c3565b611d989190614e03565b905060008142611da89190614e03565b9050601460029054906101000a900460ff1615611f19576000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f9040316040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2957600080fd5b505afa158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190614106565b9050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663299716c982846040518363ffffffff1660e01b8152600401611ec0929190614c74565b602060405180830381600087803b158015611eda57600080fd5b505af1158015611eee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f129190614106565b5050611f21565b80600d819055505b5050611f31565b611f3061240e565b5b5b50505050565b600080600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b158015611fa657600080fd5b505afa158015611fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fde9190614106565b90506000611fec6017613033565b905060008183611ffc9190614ee4565b9050600c548161200c9190614e59565b60e1111561204f576000600c54826120249190614e59565b60e16120309190614ee4565b9050601e81111561204d578084839650965096505050505061205d565b505b601e83829550955095505050505b909192565b61207361206d61293b565b83612c28565b6120b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a990614bd0565b60405180910390fd5b6120be84848484613492565b50505050565b6120cc61293b565b73ffffffffffffffffffffffffffffffffffffffff166120ea6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806121635750600115156019600061211761293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6121a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219990614bf0565b60405180910390fd5b80601460006101000a81548160ff02191690831515021790555050565b606060006121cb6134ee565b905060006018600085815260200190815260200160002080546121ed90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461221990615017565b80156122665780601f1061223b57610100808354040283529160200191612266565b820191906000526020600020905b81548152906001019060200180831161224957829003601f168201915b50505050509050600082511161228b57604051806020016040528060008152506122ae565b818160405160200161229e929190614781565b6040516020818303038152906040525b92505050919050565b600080601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa31ddcf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235a9190614106565b14156123695760009050612382565b60016123756017613033565b61237f9190614e03565b90505b90565b61238d61293b565b73ffffffffffffffffffffffffffffffffffffffff166123ab6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614612401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f890614b30565b60405180910390fd5b8060ff16600a8190555050565b61241661293b565b73ffffffffffffffffffffffffffffffffffffffff166124346114fa565b73ffffffffffffffffffffffffffffffffffffffff1614806124ad5750600115156019600061246161293b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b6124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e390614bf0565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30600f54600e600a9054906101000a900467ffffffffffffffff16600e60009054906101000a900461ffff16600e60069054906101000a900463ffffffff16600e60029054906101000a900463ffffffff166040518663ffffffff1660e01b815260040161259b95949392919061489b565b602060405180830381600087803b1580156125b557600080fd5b505af11580156125c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ed9190614106565b600981905550565b60095481565b60606012805461260a90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461263690615017565b80156126835780601f1061265857610100808354040283529160200191612683565b820191906000526020600020905b81548152906001019060200180831161266657829003601f168201915b5050505050905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61272961293b565b73ffffffffffffffffffffffffffffffffffffffff166127476114fa565b73ffffffffffffffffffffffffffffffffffffffff161461279d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279490614b30565b60405180910390fd5b80600e600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6127d161293b565b73ffffffffffffffffffffffffffffffffffffffff166127ef6114fa565b73ffffffffffffffffffffffffffffffffffffffff1614612845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161283c90614b30565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ac90614970565b60405180910390fd5b6128be81612f6d565b50565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612934575061293382613580565b5b9050919050565b600033905090565b600061294e826110dc565b905061295c81600084613662565b612967600083612acc565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129b79190614ee4565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a5c8160008461372f565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612b3f836110dc565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000815111612bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc090614ad0565b60405180910390fd5b6000600a546001600a54600b54612be09190614ee4565b612bea9190614e03565b83600081518110612bfe57612bfd615181565b5b6020026020010151612c1091906150c3565b612c1a9190614e03565b905080600d81905550505050565b6000612c3382612a60565b612c72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c6990614a30565b60405180910390fd5b6000612c7d836110dc565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612cbf5750612cbe818561268d565b5b80612cfd57508373ffffffffffffffffffffffffffffffffffffffff16612ce5846109a0565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612d26826110dc565b73ffffffffffffffffffffffffffffffffffffffff1614612d7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7390614990565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612de3906149d0565b60405180910390fd5b612df7838383613662565b612e02600082612acc565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612e529190614ee4565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ea99190614e03565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f6883838361372f565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b612710811115613086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161307d90614910565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020018262ffffff16815250600760008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055509050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561319a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613191906149f0565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161328b9190614880565b60405180910390a3505050565b6000614e20905090565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161331f90614af0565b60405180910390fd5b61333181612a60565b15613371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613368906149b0565b60405180910390fd5b61337d60008383613662565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546133cd9190614e03565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461348e6000838361372f565b5050565b61349d848484612d06565b6134a984848484613734565b6134e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134df90614950565b60405180910390fd5b50505050565b6060601380546134fd90615017565b80601f016020809104026020016040519081016040528092919081815260200182805461352990615017565b80156135765780601f1061354b57610100808354040283529160200191613576565b820191906000526020600020905b81548152906001019060200180831161355957829003601f168201915b5050505050905090565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061364b57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061365b575061365a826138cb565b5b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156136cc5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156136df57506136dd3382613935565b155b1561371f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371690614c10565b60405180910390fd5b61372a838383613a75565b505050565b505050565b60006137558473ffffffffffffffffffffffffffffffffffffffff16613a7a565b156138be578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261377e61293b565b8786866040518563ffffffff1660e01b81526004016137a094939291906147e9565b602060405180830381600087803b1580156137ba57600080fd5b505af19250505080156137eb57506040513d601f19601f820116820180604052508101906137e89190614007565b60015b61386e573d806000811461381b576040519150601f19603f3d011682016040523d82523d6000602084013e613820565b606091505b50600081511415613866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161385d90614950565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506138c3565b600190505b949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600080601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561399c576001915050613a6f565b6139a5836110dc565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156139e2576001915050613a6f565b8073ffffffffffffffffffffffffffffffffffffffff1663192c596e336040518263ffffffff1660e01b8152600401613a1b91906147a5565b60206040518083038186803b158015613a3357600080fd5b505afa158015613a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6b9190613f80565b9150505b92915050565b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054613aa990615017565b90600052602060002090601f016020900481019282613acb5760008555613b12565b82601f10613ae457805160ff1916838001178555613b12565b82800160010185558215613b12579182015b82811115613b11578251825591602001919060010190613af6565b5b509050613b1f9190613b23565b5090565b5b80821115613b3c576000816000905550600101613b24565b5090565b6000613b53613b4e84614cf9565b614cd4565b90508083825260208201905082856020860282011115613b7657613b756151e4565b5b60005b85811015613ba65781613b8c8882613d3c565b845260208401935060208301925050600181019050613b79565b5050509392505050565b6000613bc3613bbe84614d25565b614cd4565b905082815260208101848484011115613bdf57613bde6151e9565b5b613bea848285614fd5565b509392505050565b6000613c05613c0084614d56565b614cd4565b905082815260208101848484011115613c2157613c206151e9565b5b613c2c848285614fd5565b509392505050565b600081359050613c43816158dc565b92915050565b600082601f830112613c5e57613c5d6151df565b5b8135613c6e848260208601613b40565b91505092915050565b600081359050613c86816158f3565b92915050565b600081519050613c9b816158f3565b92915050565b600081359050613cb08161590a565b92915050565b600081359050613cc581615921565b92915050565b600081519050613cda81615921565b92915050565b600082601f830112613cf557613cf46151df565b5b8135613d05848260208601613bb0565b91505092915050565b600082601f830112613d2357613d226151df565b5b8135613d33848260208601613bf2565b91505092915050565b600081359050613d4b81615938565b92915050565b600081519050613d6081615938565b92915050565b600081359050613d758161594f565b92915050565b600081359050613d8a81615966565b92915050565b600060208284031215613da657613da56151f3565b5b6000613db484828501613c34565b91505092915050565b60008060408385031215613dd457613dd36151f3565b5b6000613de285828601613c34565b9250506020613df385828601613c34565b9150509250929050565b600080600060608486031215613e1657613e156151f3565b5b6000613e2486828701613c34565b9350506020613e3586828701613c34565b9250506040613e4686828701613d3c565b9150509250925092565b60008060008060808587031215613e6a57613e696151f3565b5b6000613e7887828801613c34565b9450506020613e8987828801613c34565b9350506040613e9a87828801613d3c565b925050606085013567ffffffffffffffff811115613ebb57613eba6151ee565b5b613ec787828801613ce0565b91505092959194509250565b60008060408385031215613eea57613ee96151f3565b5b6000613ef885828601613c34565b9250506020613f0985828601613c77565b9150509250929050565b60008060408385031215613f2a57613f296151f3565b5b6000613f3885828601613c34565b9250506020613f4985828601613d3c565b9150509250929050565b600060208284031215613f6957613f686151f3565b5b6000613f7784828501613c77565b91505092915050565b600060208284031215613f9657613f956151f3565b5b6000613fa484828501613c8c565b91505092915050565b600060208284031215613fc357613fc26151f3565b5b6000613fd184828501613ca1565b91505092915050565b600060208284031215613ff057613fef6151f3565b5b6000613ffe84828501613cb6565b91505092915050565b60006020828403121561401d5761401c6151f3565b5b600061402b84828501613ccb565b91505092915050565b60006020828403121561404a576140496151f3565b5b600082013567ffffffffffffffff811115614068576140676151ee565b5b61407484828501613d0e565b91505092915050565b60008060408385031215614094576140936151f3565b5b600083013567ffffffffffffffff8111156140b2576140b16151ee565b5b6140be85828601613d0e565b92505060206140cf85828601613d3c565b9150509250929050565b6000602082840312156140ef576140ee6151f3565b5b60006140fd84828501613d3c565b91505092915050565b60006020828403121561411c5761411b6151f3565b5b600061412a84828501613d51565b91505092915050565b6000806040838503121561414a576141496151f3565b5b600061415885828601613d3c565b925050602083013567ffffffffffffffff811115614179576141786151ee565b5b61418585828601613c49565b9150509250929050565b600080604083850312156141a6576141a56151f3565b5b60006141b485828601613d3c565b925050602083013567ffffffffffffffff8111156141d5576141d46151ee565b5b6141e185828601613d0e565b9150509250929050565b60008060408385031215614202576142016151f3565b5b600061421085828601613d3c565b925050602061422185828601613d3c565b9150509250929050565b600060208284031215614241576142406151f3565b5b600061424f84828501613d66565b91505092915050565b60006020828403121561426e5761426d6151f3565b5b600061427c84828501613d7b565b91505092915050565b60006142918383614745565b60208301905092915050565b6142a681614f18565b82525050565b60006142b782614d97565b6142c18185614dc5565b93506142cc83614d87565b8060005b838110156142fd5781516142e48882614285565b97506142ef83614db8565b9250506001810190506142d0565b5085935050505092915050565b61431381614f2a565b82525050565b61432281614f36565b82525050565b600061433382614da2565b61433d8185614dd6565b935061434d818560208601614fe4565b614356816151f8565b840191505092915050565b600061436c82614dad565b6143768185614de7565b9350614386818560208601614fe4565b61438f816151f8565b840191505092915050565b60006143a582614dad565b6143af8185614df8565b93506143bf818560208601614fe4565b80840191505092915050565b60006143d8601a83614de7565b91506143e382615209565b602082019050919050565b60006143fb602283614de7565b915061440682615232565b604082019050919050565b600061441e603283614de7565b915061442982615281565b604082019050919050565b6000614441602683614de7565b915061444c826152d0565b604082019050919050565b6000614464602583614de7565b915061446f8261531f565b604082019050919050565b6000614487601c83614de7565b91506144928261536e565b602082019050919050565b60006144aa602483614de7565b91506144b582615397565b604082019050919050565b60006144cd601983614de7565b91506144d8826153e6565b602082019050919050565b60006144f0602883614de7565b91506144fb8261540f565b604082019050919050565b6000614513602c83614de7565b915061451e8261545e565b604082019050919050565b6000614536602183614de7565b9150614541826154ad565b604082019050919050565b6000614559603883614de7565b9150614564826154fc565b604082019050919050565b600061457c602a83614de7565b91506145878261554b565b604082019050919050565b600061459f602983614de7565b91506145aa8261559a565b604082019050919050565b60006145c2602383614de7565b91506145cd826155e9565b604082019050919050565b60006145e5602083614de7565b91506145f082615638565b602082019050919050565b6000614608602c83614de7565b915061461382615661565b604082019050919050565b600061462b602083614de7565b9150614636826156b0565b602082019050919050565b600061464e602583614de7565b9150614659826156d9565b604082019050919050565b6000614671602c83614de7565b915061467c82615728565b604082019050919050565b6000614694601e83614de7565b915061469f82615777565b602082019050919050565b60006146b7602183614de7565b91506146c2826157a0565b604082019050919050565b60006146da603183614de7565b91506146e5826157ef565b604082019050919050565b60006146fd602383614de7565b91506147088261583e565b604082019050919050565b6000614720602683614de7565b915061472b8261588d565b604082019050919050565b61473f81614f6c565b82525050565b61474e81614f9a565b82525050565b61475d81614f9a565b82525050565b61476c81614fa4565b82525050565b61477b81614fb4565b82525050565b600061478d828561439a565b9150614799828461439a565b91508190509392505050565b60006020820190506147ba600083018461429d565b92915050565b60006040820190506147d5600083018561429d565b6147e2602083018461429d565b9392505050565b60006080820190506147fe600083018761429d565b61480b602083018661429d565b6148186040830185614754565b818103606083015261482a8184614328565b905095945050505050565b600060408201905061484a600083018561429d565b6148576020830184614754565b9392505050565b6000602082019050818103600083015261487881846142ac565b905092915050565b6000602082019050614895600083018461430a565b92915050565b600060a0820190506148b06000830188614319565b6148bd6020830187614772565b6148ca6040830186614736565b6148d76060830185614763565b6148e46080830184614763565b9695505050505050565b600060208201905081810360008301526149088184614361565b905092915050565b60006020820190508181036000830152614929816143cb565b9050919050565b60006020820190508181036000830152614949816143ee565b9050919050565b6000602082019050818103600083015261496981614411565b9050919050565b6000602082019050818103600083015261498981614434565b9050919050565b600060208201905081810360008301526149a981614457565b9050919050565b600060208201905081810360008301526149c98161447a565b9050919050565b600060208201905081810360008301526149e98161449d565b9050919050565b60006020820190508181036000830152614a09816144c0565b9050919050565b60006020820190508181036000830152614a29816144e3565b9050919050565b60006020820190508181036000830152614a4981614506565b9050919050565b60006020820190508181036000830152614a6981614529565b9050919050565b60006020820190508181036000830152614a898161454c565b9050919050565b60006020820190508181036000830152614aa98161456f565b9050919050565b60006020820190508181036000830152614ac981614592565b9050919050565b60006020820190508181036000830152614ae9816145b5565b9050919050565b60006020820190508181036000830152614b09816145d8565b9050919050565b60006020820190508181036000830152614b29816145fb565b9050919050565b60006020820190508181036000830152614b498161461e565b9050919050565b60006020820190508181036000830152614b6981614641565b9050919050565b60006020820190508181036000830152614b8981614664565b9050919050565b60006020820190508181036000830152614ba981614687565b9050919050565b60006020820190508181036000830152614bc9816146aa565b9050919050565b60006020820190508181036000830152614be9816146cd565b9050919050565b60006020820190508181036000830152614c09816146f0565b9050919050565b60006020820190508181036000830152614c2981614713565b9050919050565b6000602082019050614c456000830184614754565b92915050565b6000604082019050614c606000830185614754565b614c6d602083018461429d565b9392505050565b6000604082019050614c896000830185614754565b614c966020830184614754565b9392505050565b6000606082019050614cb26000830186614754565b614cbf6020830185614754565b614ccc6040830184614754565b949350505050565b6000614cde614cef565b9050614cea8282615049565b919050565b6000604051905090565b600067ffffffffffffffff821115614d1457614d136151b0565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614d4057614d3f6151b0565b5b614d49826151f8565b9050602081019050919050565b600067ffffffffffffffff821115614d7157614d706151b0565b5b614d7a826151f8565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614e0e82614f9a565b9150614e1983614f9a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614e4e57614e4d6150f4565b5b828201905092915050565b6000614e6482614f9a565b9150614e6f83614f9a565b925082614e7f57614e7e615123565b5b828204905092915050565b6000614e9582614f9a565b9150614ea083614f9a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614ed957614ed86150f4565b5b828202905092915050565b6000614eef82614f9a565b9150614efa83614f9a565b925082821015614f0d57614f0c6150f4565b5b828203905092915050565b6000614f2382614f7a565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015615002578082015181840152602081019050614fe7565b83811115615011576000848401525b50505050565b6000600282049050600182168061502f57607f821691505b6020821081141561504357615042615152565b5b50919050565b615052826151f8565b810181811067ffffffffffffffff82111715615071576150706151b0565b5b80604052505050565b600061508582614f9a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156150b8576150b76150f4565b5b600182019050919050565b60006150ce82614f9a565b91506150d983614f9a565b9250826150e9576150e8615123565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332393831526f79616c746965733a20546f6f2068696768000000000000600082015250565b7f496c6c756d696e614e46542c20696e73756666696369656e742062616c616e6360008201527f6573000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f496c6c756d696e614e46542c206d6178206d696e7461626c65206e756d62657260008201527f2072656163686564000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a20546f6b656e20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4f7261636c65436f6e74726163743a204e6f204e756d6265722064656c69766560008201527f7265640000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4e6f20746f6b656e732063616e206265206d696e74656420617420746865206d60008201527f6f6d656e74000000000000000000000000000000000000000000000000000000602082015250565b7f547279696e6720746f206d696e7420546f6b656e207769746820696e636f727260008201527f656374204d657461646174610000000000000000000000000000000000000000602082015250565b7f4d617820416d6f756e74206f6620496c6c756d696e6173206d696e7465640000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f496c6c756d696e614e46543a2063616c6c6572206973206e6f7420656c69676960008201527f626c650000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732314f70657261746f7246696c7465723a20696c6c6567616c206f7060008201527f657261746f720000000000000000000000000000000000000000000000000000602082015250565b6158e581614f18565b81146158f057600080fd5b50565b6158fc81614f2a565b811461590757600080fd5b50565b61591381614f36565b811461591e57600080fd5b50565b61592a81614f40565b811461593557600080fd5b50565b61594181614f9a565b811461594c57600080fd5b50565b61595881614fb4565b811461596357600080fd5b50565b61596f81614fc8565b811461597a57600080fd5b5056fea2646970667358221220031ed67e31e94dfe5a343f3f17d3e64aec4014f2f6ddb8501565621b70e8c36064736f6c63430008070033

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

0000000000000000000000001768312bd4e292375b0321a0998d27f5e80b50910000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf06900000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000001cc000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c01f22acb041d49d9590095ecc2fa0489bc2e23000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e6174612e636c6f75642f697066732f0000000000000000000000000000000000000000

-----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): 460
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
Arg [10] : _operatorFilter (address): 0x8C01f22aCB041D49d9590095ecC2Fa0489Bc2E23

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000001768312bd4e292375b0321a0998d27f5e80b5091
Arg [1] : 0000000000000000000000005eca0798c74c1ab8b8acd6764cc02a8f901cf069
Arg [2] : 00000000000000000000000024bfc3d97b27a3e4c1807c7462896ace7b4803fd
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001cc
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [6] : 00000000000000000000000000000000000000000000000000000000000d2f00
Arg [7] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000008c01f22acb041d49d9590095ecc2fa0489bc2e23
Arg [11] : 000000000000000000000000000000000000000000000000000000000000002c
Arg [12] : 68747470733a2f2f68636976656c616d72696d697a616b2e6d7970696e617461
Arg [13] : 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

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.