ETH Price: $2,708.16 (-1.21%)

Contract

0x8252f8C3B1e0b85f26c93908A8224D10C6a2105f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...214787512024-12-25 10:00:1143 days ago1735120811IN
Genetic Chain: GCP6 Token
0 ETH0.00025875.58464164
Set Approval For...214508392024-12-21 12:19:1147 days ago1734783551IN
Genetic Chain: GCP6 Token
0 ETH0.000418429.03033945
Set Approval For...201087792024-06-17 3:18:47234 days ago1718594327IN
Genetic Chain: GCP6 Token
0 ETH0.000131342.83538933
Transfer From200775442024-06-12 18:29:35238 days ago1718216975IN
Genetic Chain: GCP6 Token
0 ETH0.0006384816.1855196
Transfer From200775412024-06-12 18:28:59238 days ago1718216939IN
Genetic Chain: GCP6 Token
0 ETH0.0006446316.34142285
Transfer From200775312024-06-12 18:26:59238 days ago1718216819IN
Genetic Chain: GCP6 Token
0 ETH0.000619715.70946923
Set Approval For...190561262024-01-21 15:26:47382 days ago1705850807IN
Genetic Chain: GCP6 Token
0 ETH0.0009404120.30089622
Set Approval For...187432942023-12-08 18:21:47425 days ago1702059707IN
Genetic Chain: GCP6 Token
0 ETH0.0020950545.22602841
Set Approval For...187196562023-12-05 10:49:23429 days ago1701773363IN
Genetic Chain: GCP6 Token
0 ETH0.0010476142.91381986
Set Approval For...181684032023-09-19 7:14:47506 days ago1695107687IN
Genetic Chain: GCP6 Token
0 ETH0.0005255511.34529753
Set Approval For...181244362023-09-13 2:33:35512 days ago1694572415IN
Genetic Chain: GCP6 Token
0 ETH0.0004758610.27257648
Set Approval For...175467272023-06-24 3:29:35593 days ago1687577375IN
Genetic Chain: GCP6 Token
0 ETH0.0006358213.71842617
Set Approval For...174880242023-06-15 21:43:59601 days ago1686865439IN
Genetic Chain: GCP6 Token
0 ETH0.0008386618.10441143
Set Approval For...173414872023-05-26 6:26:47622 days ago1685082407IN
Genetic Chain: GCP6 Token
0 ETH0.0012311126.57607304
Set Approval For...173180212023-05-22 23:12:35625 days ago1684797155IN
Genetic Chain: GCP6 Token
0 ETH0.001700736.71325359
Set Approval For...172179532023-05-08 19:49:35639 days ago1683575375IN
Genetic Chain: GCP6 Token
0 ETH0.00486433105.0068319
Safe Transfer Fr...170348802023-04-12 22:30:47665 days ago1681338647IN
Genetic Chain: GCP6 Token
0 ETH0.0011058225.75110516
Set Approval For...170342242023-04-12 20:16:59665 days ago1681330619IN
Genetic Chain: GCP6 Token
0 ETH0.0011843925.56768797
Set Approval For...169154932023-03-27 1:35:11682 days ago1679880911IN
Genetic Chain: GCP6 Token
0 ETH0.0008272317.85753762
Set Approval For...168977052023-03-24 13:38:23685 days ago1679665103IN
Genetic Chain: GCP6 Token
0 ETH0.0016865636.40796153
Set Approval For...168732312023-03-21 3:04:59688 days ago1679367899IN
Genetic Chain: GCP6 Token
0 ETH0.0007348615.86367604
Set Approval For...168643722023-03-19 21:16:59689 days ago1679260619IN
Genetic Chain: GCP6 Token
0 ETH0.0011790725.4527002
Set Approval For...168590352023-03-19 3:16:35690 days ago1679195795IN
Genetic Chain: GCP6 Token
0 ETH0.0006206913.39900789
Set Approval For...168568462023-03-18 19:53:47690 days ago1679169227IN
Genetic Chain: GCP6 Token
0 ETH0.0007299115.75670731
Set Approval For...165864362023-02-08 20:31:23728 days ago1675888283IN
Genetic Chain: GCP6 Token
0 ETH0.0016212434.9978577
View all transactions

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
137744062021-12-10 1:16:431154 days ago1639099003
Genetic Chain: GCP6 Token
1.18 ETH
137743902021-12-10 1:12:211154 days ago1639098741
Genetic Chain: GCP6 Token
1.18 ETH
137743842021-12-10 1:11:191154 days ago1639098679
Genetic Chain: GCP6 Token
1.18 ETH
137743632021-12-10 1:07:551154 days ago1639098475
Genetic Chain: GCP6 Token
20.06 ETH
137743482021-12-10 1:03:481154 days ago1639098228
Genetic Chain: GCP6 Token
1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Loomways

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 22 : Loomways.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: Loomways
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

import "./GeneticChainMetadata.sol";

//------------------------------------------------------------------------------
// Loomways
//------------------------------------------------------------------------------

/**
 * @title Loomways
 * GeneticChain - Project #6 - Loomways
 */
contract Loomways is GeneticChainMetadata
{

    //-------------------------------------------------------------------------
    // structs
    //-------------------------------------------------------------------------

    struct ArtState {
        int64 flutA;
        int64 lnThk;
        bool moving;
        bool _set;
    }

    //-------------------------------------------------------------------------
    // events
    //-------------------------------------------------------------------------

    event StateChange(address indexed owner, uint256 tokenId, ArtState state);

    //-------------------------------------------------------------------------
    // fields
    //-------------------------------------------------------------------------

    // token state
    mapping(uint256 => ArtState) _state;

    //-------------------------------------------------------------------------
    // ctor
    //-------------------------------------------------------------------------

    constructor(
        IpfsAsset memory lib,
        string memory code_,
        string memory baseUri,
        uint256[3] memory tokenMax,
        uint256 seed,
        address proxyRegistryAddress)
        GeneticChainMetadata(
          lib,
          code_,
          baseUri,
          tokenMax,
          seed,
          proxyRegistryAddress)
    {
    }

    //-------------------------------------------------------------------------
    // state
    //-------------------------------------------------------------------------

    function state(uint256 tokenId)
        public
        view
        validTokenId(tokenId)
        returns (int64 flutA, int64 lnThk, bool moving)
    {
        if (_state[tokenId]._set == false) {
            flutA  = 0;
            lnThk  = 0;
            moving = true;
        } else {
            flutA  = _state[tokenId].flutA;
            lnThk  = _state[tokenId].lnThk;
            moving = _state[tokenId].moving;
        }
    }

    //-------------------------------------------------------------------------

    /**
     * Updates state of token, only owner or approved is allowed.
     * @param tokenId - token to update state on
     * @param flutA - flutter; -7-20
     * @param lnThk - line thinkness; -1-4
     * @param moving - animatied; true/false
     *
     * Emits a {StateUpdated} event.
     */
    function updateState(uint256 tokenId, int64 flutA, int64 lnThk, bool moving)
        public
        approvedOrOwner(_msgSender(), tokenId)
    {
        require(-7 <= flutA && flutA <= 20, "invalid flutA");
        require(-1 <= lnThk && lnThk <= 4, "invalid lnThk");
        _state[tokenId].flutA  = flutA;
        _state[tokenId].lnThk  = lnThk;
        _state[tokenId].moving = moving;
        _state[tokenId]._set   = true;

        emit StateChange(msg.sender, tokenId, _state[tokenId]);
    }

}

File 2 of 22 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 3 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

File 4 of 22 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 22 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 6 of 22 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 7 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 8 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 9 of 22 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 10 of 22 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 11 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 12 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 13 of 22 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 14 of 22 : GeneticChain721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: GeneticChain721
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";

import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequencial.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";

//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------

contract OwnableDelegateProxy {}

contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

//------------------------------------------------------------------------------
// GeneticChain721
//------------------------------------------------------------------------------

/**
 * @title GeneticChain721
 *
 * ERC721 contract with various features:
 *  - low-gas implmentation
 *  - off-chain whitelist verify (secure minting)
 *  - dynamic token allocation
 *  - artist allocation
 *  - gallery allocation
 *  - low-gas generative token hash
 *  - protected controlled burns
 *  - opensea proxy setup
 *  - simple funds withdrawl
 */
abstract contract GeneticChain721 is
    ContextMixin,
    ERC721SeqEnumerable,
    NativeMetaTransaction,
    Ownable
{
    using ECDSA for bytes32;
    using State for State.Data;

    //-------------------------------------------------------------------------
    // fields
    //-------------------------------------------------------------------------

    // mint price (0.03 / 0.05)
    uint256 constant public memberPrice = 30000000000000000;
    uint256 constant public publicPrice = 50000000000000000;

    // verification address
    address constant private _signer = 0x11CD1d96F4F215E7240E8072535bA85dDaaB2A09;

    // token limits
    uint256 public immutable publicMax;
    uint256 public immutable artistMax;
    uint256 public immutable galleryMax;

    // token data
    uint256 private immutable _seed;

    // opensea proxy
    address private immutable _proxyRegistryAddress;

    // token limits
    State.Data private _state;

    // roles
    address private _burnerAddress;
    address private _artistAddress = 0xDA9e8026FbDe7D44d7E9268d6e2efd76033a49c7;

    // track mint count per address
    mapping (address => uint256) private _mints;

    //-------------------------------------------------------------------------
    // modifiers
    //-------------------------------------------------------------------------

    modifier validTokenId(uint256 tokenId) {
        require(_exists(tokenId), "invalid token");
        _;
    }

    modifier approvedOrOwner(address operator, uint256 tokenId) {
        require(_isApprovedOrOwner(operator, tokenId));
        _;
    }

    modifier isArtist() {
        require(_msgSender() == _artistAddress, "caller not artist");
        _;
    }

    modifier isBurner() {
        require(_msgSender() == _burnerAddress, "caller not burner");
        _;
    }

    modifier notLocked() {
        require(_state._locked == 0, "contract is locked");
        _;
    }

    //-------------------------------------------------------------------------
    // ctor
    //-------------------------------------------------------------------------

    constructor(
        uint256[3] memory tokenMax_,
        uint256 seed,
        address proxyRegistryAddress)
        ERC721Sequencial("Loomways", "GCP6")
    {
        publicMax             = tokenMax_[0];
        artistMax             = tokenMax_[1];
        galleryMax            = tokenMax_[2];
        _seed                 = seed;
        _proxyRegistryAddress = proxyRegistryAddress;
        _initializeEIP712("Loomways");

        // start tokens at 1 index
        _owners.push();
    }

    //-------------------------------------------------------------------------
    // accessors
    //-------------------------------------------------------------------------

    /**
     * Set artist address.
     */
    function setArtistAddress(address artist)
        public onlyOwner
    {
        _artistAddress = artist;
    }

    //-------------------------------------------------------------------------

    /**
     * Set burner address.
     */
    function setBurnerAddress(address burner)
        public onlyOwner
    {
        _burnerAddress = burner;
    }

    //-------------------------------------------------------------------------

    /**
     * Enable public minting.
     */
    function enablePublicMint()
        public onlyOwner
    {
        _state.setLive(1);
    }

    //-------------------------------------------------------------------------

    /**
     * Lock contract.  Disable public/member minting. Disallow on-chain
     *  code/library updates.
     */
    function lockContract()
        public onlyOwner
    {
        _state.setLocked(1);
    }

    //-------------------------------------------------------------------------

    /**
     * Get total gallery has minted.
     */
    function gallryMinted()
        public view returns (uint256)
    {
        return _state._gallery;
    }

    //-------------------------------------------------------------------------

    /**
     * Get total artist has minted.
     */
    function artistMinted()
        public view returns (uint256)
    {
        return _state._artist;
    }

    //-------------------------------------------------------------------------

    /**
     * Get total public has minted.
     */
    function publicMinted()
        public view returns (uint256)
    {
        return _state._public;
    }

    //-------------------------------------------------------------------------

    /**
     * Check if public minting is live.
     */
    function publicLive()
        public view returns (bool)
    {
        return _state._live == 1;
    }

    //-------------------------------------------------------------------------
    // security
    //-------------------------------------------------------------------------

    /**
     * Validate hash contains input data.
     */
    function validateHash(
            bytes32 msgHash,
            address sender,
            uint256 allocation,
            uint256 count)
        private pure returns(bool)
    {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32",
            keccak256(abi.encodePacked(sender, allocation, count)))) == msgHash;
    }

    //-------------------------------------------------------------------------

    /**
     * Validate message was signed by signer.
     */
    function validateSigner(bytes32 msgHash, bytes memory signature)
        private pure returns(bool)
    {
        return msgHash.recover(signature) == _signer;
    }

    //-------------------------------------------------------------------------
    // minting
    //-------------------------------------------------------------------------

    /**
     * Allow anyone to mint tokens for the right price.
     */
    function mint(uint256 count)
        payable public notLocked
    {
        require(_state._live == 1, "public mint not live");
        require(publicPrice * count == msg.value, "insufficient funds");
        require(_state._public + count <= publicMax, "exceed public supply");
        _state.addPublic(count);
        for (uint256 i = 0; i < count; ++i) {
            _safeMint(msg.sender);
        }
    }

    //-------------------------------------------------------------------------

    /**
     * Mint count tokens using securely signed message.
     */
    function secureMint(
            bytes32 msgHash,
            bytes calldata signature,
            uint256 allocation,
            uint256 count)
        payable external notLocked
    {
        require(memberPrice * count == msg.value, "insufficient funds");
        require(_state._public + count <= publicMax, "exceed public supply");
        require(_mints[msg.sender] + count <= allocation, "exceed allocation");
        require(validateSigner(msgHash, signature), "invalid signer");
        require(validateHash(msgHash, msg.sender, allocation, count), "invalid hash");
        _state.addPublic(count);
        unchecked {
            _mints[msg.sender] += count;
        }
        for (uint256 i = 0; i < count; ++i) {
            _safeMint(msg.sender);
        }
    }

    //-------------------------------------------------------------------------

    /**
     * @dev Mints a token to an address.
     * @param _to address of the future owner of the token
     */
    function galleryMintTo(address _to, uint256 count)
        public onlyOwner
    {
        require(_state._gallery + count <= galleryMax, "exceed gallery supply");
        _state.addGallery(count);
        for (uint256 i = 0; i < count; ++i) {
            _safeMint(_to);
        }
    }

    //-------------------------------------------------------------------------

    /**
     * @dev Mints a token to an address.
     * @param _to address of the future owner of the token
     */
    function artistMintTo(address _to, uint256 count)
        public isArtist
    {
        require(_state._artist + count <= artistMax, "exceed artist supply");
        _state.addArtist(count);
        for (uint256 i = 0; i < count; ++i) {
            _safeMint(_to);
        }
    }

    //-------------------------------------------------------------------------

    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     */
    function burn(uint256 tokenId)
        public isBurner
    {
        _burn(tokenId);
    }

    //-------------------------------------------------------------------------
    // ERC721Metadata
    //-------------------------------------------------------------------------

    function baseTokenURI()
        virtual public view returns (string memory);

    //-------------------------------------------------------------------------

    /**
     * @dev Returns uri of a token.  Not guarenteed token exists.
     */
    function tokenURI(uint256 tokenId)
        override public view returns (string memory)
    {
        return string(abi.encodePacked(
            baseTokenURI(), "/", Strings.toString(tokenId), "/meta"));
    }

    //-------------------------------------------------------------------------
    // generative
    //-------------------------------------------------------------------------

    /**
     * @dev Low-Gas alternative to storing the hash on the chain.
     * @return generated hash associated with valid a token.
     */
    function tokenHash(uint256 tokenId)
        public view validTokenId(tokenId) returns (bytes32)
    {
      return keccak256(
          abi.encodePacked(
              _seed,
              tokenId,
              address(this)));
    }

    //-------------------------------------------------------------------------
    // money
    //-------------------------------------------------------------------------

    /**
     * Pull money out of this contract.
     */
    function withdraw(address to, uint256 amount)
        public onlyOwner
    {
        require(amount > 0, "amount empty");
        require(amount <= address(this).balance, "amount exceeds balance");
        require(to != address(0), "address null");
        payable(to).transfer(amount);
    }

    //-------------------------------------------------------------------------
    // approval
    //-------------------------------------------------------------------------

    /**
     * Override isApprovedForAll to whitelist user's OpenSea proxy accounts
     *  to enable gas-less listings.
     */
    function isApprovedForAll(address owner, address operator)
        override public view returns (bool)
    {
        // whitelist OpenSea proxy contract for easy trading.
        ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress);
        if (address(proxyRegistry.proxies(owner)) == operator) {
            return true;
        }

        return super.isApprovedForAll(owner, operator);
    }

    //-------------------------------------------------------------------------

    /**
     * This is used instead of msg.sender as transactions won't be sent by
     *  the original token owner, but by OpenSea.
     */
    function _msgSender()
        override internal view returns (address sender)
    {
        return ContextMixin.msgSender();
    }

}

File 15 of 22 : GeneticChainMetadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: GeneticChainMetadata
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

import "./GeneticChain721.sol";

//------------------------------------------------------------------------------
// GeneticChainMetadata
//------------------------------------------------------------------------------

/**
 * @title GeneticChainMetadata
 * Holds all required metadata for Genetic Chain projects.
 */
abstract contract GeneticChainMetadata is GeneticChain721
{
    //-------------------------------------------------------------------------
    // structs
    //-------------------------------------------------------------------------

    struct IpfsAsset {
        string name;
        string hash;
    }

    //-------------------------------------------------------------------------
    // fields
    //-------------------------------------------------------------------------

    uint256 constant public projectId  = 6;
    string constant public artist      = "Klabelkholosh";
    string constant public description = "Living threads of colour pulled across an unseen canvas, creating mood and space.";

    string public code;
    string private _baseUri;
    IpfsAsset[] public libraries;

    //-------------------------------------------------------------------------
    // ctor
    //-------------------------------------------------------------------------

    constructor(
        IpfsAsset memory lib,
        string memory code_,
        string memory baseUri_,
        uint256[3] memory tokenMax,
        uint256 seed,
        address proxyRegistryAddress)
        GeneticChain721(
          tokenMax,
          seed,
          proxyRegistryAddress)
    {
        code     = code_;
        _baseUri = baseUri_;
        addLibrary(lib.name, lib.hash);
    }

    //-------------------------------------------------------------------------
    // accessors
    //-------------------------------------------------------------------------

    function setCode(string memory code_)
        public onlyOwner notLocked
    {
        code = code_;
    }

    //-------------------------------------------------------------------------

    function addLibrary(string memory name, string memory hash)
        public onlyOwner notLocked
    {
        IpfsAsset memory lib = IpfsAsset(name, hash);
        libraries.push(lib);
    }

    //-------------------------------------------------------------------------

    function removeLibrary(uint256 index)
        public onlyOwner notLocked
    {
        require(index < libraries.length);
        libraries[index] = libraries[libraries.length-1];
        libraries.pop();
    }

    //-------------------------------------------------------------------------

    function getLibraryCount()
        public view returns (uint256)
    {
        return libraries.length;
    }

    //-------------------------------------------------------------------------

    function getLibraries()
        public view returns (IpfsAsset[] memory)
    {
        IpfsAsset[] memory libs = new IpfsAsset[](libraries.length);
        for (uint256 i = 0; i < libraries.length; ++i) {
          IpfsAsset storage lib = libraries[i];
          libs[i] = lib;
        }
        return libs;
    }

    //-------------------------------------------------------------------------

    function baseTokenURI()
        override public view returns (string memory)
    {
        return string(abi.encodePacked(_baseUri, "/api/project/", Strings.toString(projectId), "/token"));
    }

    //-------------------------------------------------------------------------

    function contractURI()
        public view returns (string memory)
    {
        return string(abi.encodePacked(_baseUri, "/api/project/", Strings.toString(projectId), "/contract"));
    }

}

File 16 of 22 : ContentMixin.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

abstract contract ContextMixin {
    function msgSender()
        internal
        view
        returns (address payable sender)
    {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}

File 17 of 22 : EIP712Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string constant public ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
        bytes(
            "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
        )
    );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contracts that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(
        string memory name
    )
        internal
        initializer
    {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

File 18 of 22 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

File 19 of 22 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {SafeMath} from  "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import {EIP712Base} from "./EIP712Base.sol";

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
        bytes(
            "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
        )
    );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            payable(msg.sender),
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}

File 20 of 22 : ERC721SeqEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: ERC721SeqEnumerable
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

import "./ERC721Sequencial.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

/**
 * @dev This is a no storage implemntation of the optional extension {ERC721}
 * defined in the EIP that adds enumerability of all the token ids in the
 * contract as well as all token ids owned by each account. These functions
 * are mainly for convienence and should NEVER be called from inside a
 * contract on the chain.
 */
abstract contract ERC721SeqEnumerable is ERC721Sequencial, IERC721Enumerable {

    address constant zero = address(0);

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(
        address owner,
        uint256 index
    ) public view virtual override returns (uint256 tokenId) {
        uint256 length = _owners.length;

        unchecked {
            for (; tokenId < length; ++tokenId) {
                if (_owners[tokenId] == owner) {
                    if (index-- == 0) {
                        break;
                    }
                }
            }
        }

        require(tokenId < length, "ERC721Enumerable: owner index out of bounds");
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256 supply) {
        unchecked {
            uint256 length = _owners.length;
            for (uint256 tokenId = 0; tokenId < length; ++tokenId) {
                if (_owners[tokenId] != zero) {
                    ++supply;
                }
            }
        }
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(
        uint256 index
    ) public view virtual override returns (uint256 tokenId) {
        uint256 length = _owners.length;

        unchecked {
            for (; tokenId < length; ++tokenId) {
                if (_owners[tokenId] != zero) {
                    if (index-- == 0) {
                        break;
                    }
                }
            }
        }

        require(tokenId < length, "ERC721Enumerable: global index out of bounds");
    }

    /**
     * @dev Get all tokens owned by owner.
     */
    function ownerTokens(
        address owner
    ) public view returns (uint256[] memory) {
        uint256 tokenCount = ERC721Sequencial.balanceOf(owner);
        require(tokenCount != 0, "ERC721Enumerable: owner owns no tokens");

        uint256 length = _owners.length;
        uint256[] memory tokenIds = new uint256[](tokenCount);
        unchecked {
            uint256 i = 0;
            for (uint256 tokenId = 0; tokenId < length; ++tokenId) {
                if (_owners[tokenId] == owner) {
                    tokenIds[i++] = tokenId;
                }
            }
        }

        return tokenIds;
    }

}

File 21 of 22 : ERC721Sequencial.sol
// SPDX-License-Identifier: MIT
// Forked from: OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: ERC721Sequencial
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

import "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "openzeppelin-solidity/contracts/utils/Address.sol";
import "openzeppelin-solidity/contracts/utils/Context.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721
 *  [ERC721] Non-Fungible Token Standard
 *
 *  This implmentation of ERC721 assumes sequencial token creation to provide
 *  efficient minting.  Storage for balance are no longer required reducing
 *  gas significantly.  This comes at the price of calculating the balance by
 *  iterating through the entire array.  The balanceOf function should NOT
 *  be used inside a contract.  Gas usage will explode as the size of tokens
 *  increase.  A convineiance function is provided which returns the entire
 *  list of owners whose index maps tokenIds to thier owners.  Zero addresses
 *  indicate burned tokens.
 *
 */
contract ERC721Sequencial 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
    address[] _owners;

    // 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 balance) {
        require(owner != address(0), "ERC721: balance query for the zero address");

        unchecked {
            uint256 length = _owners.length;
            for (uint256 i = 0; i < length; ++i) {
                if (_owners[i] == owner) {
                    ++balance;
                }
            }
        }

    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: owner query for nonexistent token");
        address owner = _owners[tokenId];
        return owner;
    }

    /**
     * @dev Returns entire list of owner enumerated by thier tokenIds.  Burned tokens
     * will have a zero address.
     */
    function owners() public view returns (address[] memory) {
        address[] memory owners_ = _owners;
        return owners_;
    }

    /**
     * @dev Return largest tokenId minted.
     */
    function maxTokenId() public view returns (uint256) {
        return _owners.length - 1;
    }

    /**
     * @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 overriden 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 = ERC721Sequencial.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 tokenId < _owners.length && _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 = ERC721Sequencial.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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) internal virtual returns (uint256 tokenId) {
        tokenId = _safeMint(to, "");
    }

    /**
     * @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,
        bytes memory _data
    ) internal virtual returns (uint256 tokenId) {
        tokenId = _mint(to);
        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) internal virtual returns (uint256 tokenId) {
        require(to != address(0), "ERC721: mint to the zero address");
        tokenId = _owners.length;

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

        _owners.push(to);

        emit Transfer(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 = ERC721Sequencial.ownerOf(tokenId);

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

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

        delete _owners[tokenId];

        emit Transfer(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(ERC721Sequencial.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _owners[tokenId] = to;

        emit Transfer(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(ERC721Sequencial.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 {}
}

File 22 of 22 : State.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

//------------------------------------------------------------------------------
// geneticchain.io - NextGen Generative NFT Platform
//------------------------------------------------------------------------------
//    _______                   __   __        ______ __          __
//   |     __|-----.-----.-----|  |_|__|----. |      |  |--.---.-|__|-----.
//   |    |  |  -__|     |  -__|   _|  |  __| |   ---|     |  _  |  |     |
//   |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__|
//
//------------------------------------------------------------------------------
// Genetic Chain: library/State
//------------------------------------------------------------------------------
// Author: papaver (@tronicdreams)
//------------------------------------------------------------------------------

/**
 * @dev Handle contract state efficiently as possbile.
 */
library State {

    struct Data {
        uint16  _gallery;
        uint16  _artist;
        uint16  _public;
        uint16  _live;
        uint16  _locked;
        uint176 _unused;
    }

    function addGallery(Data storage data, uint256 count)
        internal
     {
        unchecked {
            data._gallery += uint16(count);
        }
    }

    function addArtist(Data storage data, uint256 count)
        internal
     {
        unchecked {
            data._artist += uint16(count);
        }
    }

    function addPublic(Data storage data, uint256 count)
        internal
     {
        unchecked {
            data._public += uint16(count);
        }
    }

    function setLive(Data storage data, uint256 enable)
        internal
     {
        data._live = uint16(enable);
    }

    function setLocked(Data storage data, uint256 enable)
        internal
    {
        data._locked = uint16(enable);
    }

    function set(Data storage data, uint256 _gallery, uint256 _artist, uint256 _public)
        internal
    {
        data._gallery = uint16(_gallery);
        data._artist  = uint16(_artist);
        data._public  = uint16(_public);
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"hash","type":"string"}],"internalType":"struct GeneticChainMetadata.IpfsAsset","name":"lib","type":"tuple"},{"internalType":"string","name":"code_","type":"string"},{"internalType":"string","name":"baseUri","type":"string"},{"internalType":"uint256[3]","name":"tokenMax","type":"uint256[3]"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"address","name":"proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"int64","name":"flutA","type":"int64"},{"internalType":"int64","name":"lnThk","type":"int64"},{"internalType":"bool","name":"moving","type":"bool"},{"internalType":"bool","name":"_set","type":"bool"}],"indexed":false,"internalType":"struct Loomways.ArtState","name":"state","type":"tuple"}],"name":"StateChange","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":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"hash","type":"string"}],"name":"addLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artist","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artistMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"artistMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artistMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"code","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enablePublicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"galleryMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"galleryMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gallryMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLibraries","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"hash","type":"string"}],"internalType":"struct GeneticChainMetadata.IpfsAsset[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLibraryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"libraries","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"hash","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","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":"address","name":"owner","type":"address"}],"name":"ownerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"msgHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"secureMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"artist","type":"address"}],"name":"setArtistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"setBurnerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"code_","type":"string"}],"name":"setCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"state","outputs":[{"internalType":"int64","name":"flutA","type":"int64"},{"internalType":"int64","name":"lnThk","type":"int64"},{"internalType":"bool","name":"moving","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int64","name":"flutA","type":"int64"},{"internalType":"int64","name":"lnThk","type":"int64"},{"internalType":"bool","name":"moving","type":"bool"}],"name":"updateState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101206040526005805460ff19169055600b80546001600160a01b03191673da9e8026fbde7d44d7e9268d6e2efd76033a49c71790553480156200004257600080fd5b50604051620053123803806200531283398101604081905262000065916200071a565b858585858585828282604051806040016040528060088152602001674c6f6f6d7761797360c01b8152506040518060400160405280600481526020016323a1a81b60e11b8152508160009080519060200190620000c4929190620004da565b508051620000da906001906020840190620004da565b505050620000f7620000f1620001ab60201b60201c565b620001c7565b825160805260208084015160a05260408085015160c05260e08490526001600160a01b03831661010052805180820190915260088152674c6f6f6d7761797360c01b918101919091526200014b9062000219565b50506002805460010181556000525084516200016f90600d906020880190620004da565b5083516200018590600e906020870190620004da565b50855160208701516200019991906200027e565b50505050505050505050505062000873565b6000620001c2620003d960201b62002ef41760201c565b905090565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60055460ff1615620002635760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b60448201526064015b60405180910390fd5b6200026e8162000438565b506005805460ff19166001179055565b62000288620001ab565b6001600160a01b0316620002a46008546001600160a01b031690565b6001600160a01b031614620002fc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200025a565b60095468010000000000000000900461ffff1615620003535760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b60448201526064016200025a565b604080518082019091528281526020808201839052600f805460018101825560009190915282518051849360029093027f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020192620003b6928492910190620004da565b506020828101518051620003d19260018501920190620004da565b505050505050565b6000333014156200043257600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620004359050565b50335b90565b6040518060800160405280604f8152602001620052c3604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600655565b828054620004e89062000836565b90600052602060002090601f0160209004810192826200050c576000855562000557565b82601f106200052757805160ff191683800117855562000557565b8280016001018555821562000557579182015b82811115620005575782518255916020019190600101906200053a565b506200056592915062000569565b5090565b5b808211156200056557600081556001016200056a565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620005bb57620005bb62000580565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620005ec57620005ec62000580565b604052919050565b600082601f8301126200060657600080fd5b81516001600160401b0381111562000622576200062262000580565b602062000638601f8301601f19168201620005c1565b82815285828487010111156200064d57600080fd5b60005b838110156200066d57858101830151828201840152820162000650565b838111156200067f5760008385840101525b5095945050505050565b600082601f8301126200069b57600080fd5b604051606081016001600160401b0381118282101715620006c057620006c062000580565b604052806060840185811115620006d657600080fd5b845b81811015620006f2578051835260209283019201620006d8565b509195945050505050565b80516001600160a01b03811681146200071557600080fd5b919050565b60008060008060008061010087890312156200073557600080fd5b86516001600160401b03808211156200074d57600080fd5b908801906040828b0312156200076257600080fd5b6200076c62000596565b8251828111156200077c57600080fd5b6200078a8c828601620005f4565b825250602083015182811115620007a057600080fd5b620007ae8c828601620005f4565b602083015250809850506020890151915080821115620007cd57600080fd5b620007db8a838b01620005f4565b96506040890151915080821115620007f257600080fd5b506200080189828a01620005f4565b94505062000813886060890162000689565b925060c087015191506200082a60e08801620006fd565b90509295509295509295565b600181811c908216806200084b57607f821691505b602082108114156200086d57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516149ef620008d46000396000612be20152600061213f01526000818161076501526116ea015260008181610ae2015261103d015260008181610a5a01528181611f8b015261283e01526149ef6000f3fe6080604052600436106103a25760003560e01c80638b5af65a116101e7578063bba7723e1161010d578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610b04578063f3fef3a314610b24578063f593bd5314610b44578063f8f0b80e14610b5d57600080fd5b8063e8a3d48514610a7c578063e985e9c514610a91578063ed329fa814610ab1578063ef3c662414610ad057600080fd5b8063d62f3b1c116100dc578063d62f3b1c14610a00578063d81bc66314610a15578063e403f1a714610a28578063e527c6dd14610a4857600080fd5b8063bba7723e1461097e578063c87b56dd146109ab578063c93ed70a146109cb578063d547cfb7146109eb57600080fd5b8063a22e4faa11610185578063affe39c111610154578063affe39c1146108e8578063b1fbe72d1461090a578063b7f751d814610938578063b88d4fde1461095e57600080fd5b8063a22e4faa1461086c578063a38643971461088c578063a4f4f8af146108ac578063a945bf80146108cd57600080fd5b806395d89b41116101c157806395d89b41146108045780639df806d614610819578063a0712d6814610839578063a22cb4651461084c57600080fd5b80638b5af65a146107b15780638da5cb5b146107d157806391ba317a146107ef57600080fd5b80633e4f49e6116102cc5780636352211e1161026a578063715018a611610239578063715018a61461073e57806371dedace146107535780637284e41614610787578063753868e31461079c57600080fd5b80636352211e146106c3578063636e746b146106e3578063638e19b4146106fe57806370a082311461071e57600080fd5b806342966c68116102a657806342966c681461062a57806343bc16121461064a57806344be774f146106835780634f6ccce7146106a357600080fd5b80633e4f49e6146105b05780633fafa127146105f557806342842e0e1461060a57600080fd5b806318160ddd116103445780632d0335ab116103135780632d0335ab146105255780632f745c591461055b5780633408e4701461057b5780633e02bc381461058e57600080fd5b806318160ddd146104b857806320379ee5146104db57806323b872dd146104f057806324c12bf61461051057600080fd5b8063095ea7b311610380578063095ea7b3146104365780630c53c51c146104585780630f7e59701461046b57806314d7d5171461049857600080fd5b806301ffc9a7146103a757806306fdde03146103dc578063081812fc146103fe575b600080fd5b3480156103b357600080fd5b506103c76103c2366004613f44565b610b72565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b9d565b6040516103d39190613fb9565b34801561040a57600080fd5b5061041e610419366004613fcc565b610c2f565b6040516001600160a01b0390911681526020016103d3565b34801561044257600080fd5b50610456610451366004613ffa565b610cbc565b005b6103f16104663660046140c9565b610de4565b34801561047757600080fd5b506103f1604051806040016040528060018152602001603160f81b81525081565b3480156104a457600080fd5b506104566104b3366004613ffa565b610fce565b3480156104c457600080fd5b506104cd611107565b6040519081526020016103d3565b3480156104e757600080fd5b506006546104cd565b3480156104fc57600080fd5b5061045661050b366004614147565b611163565b34801561051c57600080fd5b506103f16111e5565b34801561053157600080fd5b506104cd610540366004614188565b6001600160a01b031660009081526007602052604090205490565b34801561056757600080fd5b506104cd610576366004613ffa565b611273565b34801561058757600080fd5b50466104cd565b34801561059a57600080fd5b506105a361133e565b6040516103d391906141a5565b3480156105bc57600080fd5b506105d06105cb366004613fcc565b61153e565b60408051600794850b81529290930b60208301521515918101919091526060016103d3565b34801561060157600080fd5b506104cd600681565b34801561061657600080fd5b50610456610625366004614147565b6115ed565b34801561063657600080fd5b50610456610645366004613fcc565b611608565b34801561065657600080fd5b506103f16040518060400160405280600d81526020016c096d8c2c4cad8d6d0ded8dee6d609b1b81525081565b34801561068f57600080fd5b5061045661069e366004613ffa565b61167e565b3480156106af57600080fd5b506104cd6106be366004613fcc565b6117a3565b3480156106cf57600080fd5b5061041e6106de366004613fcc565b611868565b3480156106ef57600080fd5b506104cd666a94d74f43000081565b34801561070a57600080fd5b5061045661071936600461422a565b611902565b34801561072a57600080fd5b506104cd610739366004614188565b611a3b565b34801561074a57600080fd5b50610456611b02565b34801561075f57600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561079357600080fd5b506103f1611b75565b3480156107a857600080fd5b50610456611b91565b3480156107bd57600080fd5b506104566107cc3660046142b5565b611c13565b3480156107dd57600080fd5b506008546001600160a01b031661041e565b3480156107fb57600080fd5b506104cd611dd3565b34801561081057600080fd5b506103f1611dea565b34801561082557600080fd5b50610456610834366004614188565b611df9565b610456610847366004613fcc565b611e82565b34801561085857600080fd5b50610456610867366004614302565b612056565b34801561087857600080fd5b50610456610887366004614188565b612068565b34801561089857600080fd5b506104cd6108a7366004613fcc565b6120f1565b3480156108b857600080fd5b50600954640100000000900461ffff166104cd565b3480156108d957600080fd5b506104cd66b1a2bc2ec5000081565b3480156108f457600080fd5b506108fd6121a3565b6040516103d39190614337565b34801561091657600080fd5b5061092a610925366004613fcc565b612209565b6040516103d3929190614384565b34801561094457600080fd5b506009546601000000000000900461ffff166001146103c7565b34801561096a57600080fd5b506104566109793660046143b2565b61234d565b34801561098a57600080fd5b5061099e610999366004614188565b6123d6565b6040516103d3919061441e565b3480156109b757600080fd5b506103f16109c6366004613fcc565b612508565b3480156109d757600080fd5b506104566109e6366004613fcc565b612542565b3480156109f757600080fd5b506103f16126df565b348015610a0c57600080fd5b50610456612712565b610456610a23366004614456565b612795565b348015610a3457600080fd5b50610456610a433660046144e1565b612ad7565b348015610a5457600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a8857600080fd5b506103f1612ba1565b348015610a9d57600080fd5b506103c7610aac366004614516565b612bc0565b348015610abd57600080fd5b5060095462010000900461ffff166104cd565b348015610adc57600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000000081565b348015610b1057600080fd5b50610456610b1f366004614188565b612cae565b348015610b3057600080fd5b50610456610b3f366004613ffa565b612d83565b348015610b5057600080fd5b5060095461ffff166104cd565b348015610b6957600080fd5b50600f546104cd565b60006001600160e01b0319821663780e9d6360e01b1480610b975750610b9782612f51565b92915050565b606060008054610bac9061454f565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd89061454f565b8015610c255780601f10610bfa57610100808354040283529160200191610c25565b820191906000526020600020905b815481529060010190602001808311610c0857829003601f168201915b5050505050905090565b6000610c3a82612fa1565b610ca05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b6000610cc782611868565b9050806001600160a01b0316836001600160a01b03161415610d355760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c97565b806001600160a01b0316610d47612feb565b6001600160a01b03161480610d635750610d6381610aac612feb565b610dd55760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c97565b610ddf8383612ff5565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610e228782878787613063565b610e785760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610c97565b6001600160a01b038716600090815260076020526040902054610e9c906001613153565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610eec90899033908a90614584565b60405180910390a1600080306001600160a01b0316888a604051602001610f149291906145b0565b60408051601f1981840301815290829052610f2e916145e7565b6000604051808303816000865af19150503d8060008114610f6b576040519150601f19603f3d011682016040523d82523d6000602084013e610f70565b606091505b509150915081610fc25760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610c97565b98975050505050505050565b600b546001600160a01b0316610fe2612feb565b6001600160a01b0316146110385760405162461bcd60e51b815260206004820152601160248201527f63616c6c6572206e6f74206172746973740000000000000000000000000000006044820152606401610c97565b6009547f00000000000000000000000000000000000000000000000000000000000000009061107290839062010000900461ffff16614619565b11156110c05760405162461bcd60e51b815260206004820152601460248201527f6578636565642061727469737420737570706c790000000000000000000000006044820152606401610c97565b6009805461ffff62010000808304821685019091160263ffff00001990911617905560005b81811015610ddf576110f683613166565b5061110081614631565b90506110e5565b600254600090815b8181101561115e5760006001600160a01b0316600282815481106111355761113561464c565b6000918252602090912001546001600160a01b031614611156578260010192505b60010161110f565b505090565b61117461116e612feb565b82613181565b6111da5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610c97565b610ddf838383613243565b600d80546111f29061454f565b80601f016020809104026020016040519081016040528092919081815260200182805461121e9061454f565b801561126b5780601f106112405761010080835404028352916020019161126b565b820191906000526020600020905b81548152906001019060200180831161124e57829003601f168201915b505050505081565b6002546000905b808210156112d457836001600160a01b03166002838154811061129f5761129f61464c565b6000918252602090912001546001600160a01b031614156112c9576000198301926112c9576112d4565b81600101915061127a565b8082106113375760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c97565b5092915050565b600f5460609060009067ffffffffffffffff81111561135f5761135f614026565b6040519080825280602002602001820160405280156113a457816020015b604080518082019091526060808252602082015281526020019060019003908161137d5790505b50905060005b600f54811015611538576000600f82815481106113c9576113c961464c565b90600052602060002090600202019050806040518060400160405290816000820180546113f59061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546114219061454f565b801561146e5780601f106114435761010080835404028352916020019161146e565b820191906000526020600020905b81548152906001019060200180831161145157829003601f168201915b505050505081526020016001820180546114879061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546114b39061454f565b80156115005780601f106114d557610100808354040283529160200191611500565b820191906000526020600020905b8154815290600101906020018083116114e357829003601f168201915b50505050508152505083838151811061151b5761151b61464c565b6020026020010181905250508061153190614631565b90506113aa565b50919050565b60008060008361154d81612fa1565b6115895760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610c97565b600085815260106020526040902054600160881b900460ff166115b7576000935060009250600191506115e5565b600085815260106020526040902054600781810b9550600160401b8204900b9350600160801b900460ff1691505b509193909250565b610ddf8383836040518060200160405280600081525061234d565b600a546001600160a01b031661161c612feb565b6001600160a01b0316146116725760405162461bcd60e51b815260206004820152601160248201527f63616c6c6572206e6f74206275726e65720000000000000000000000000000006044820152606401610c97565b61167b81613399565b50565b611686612feb565b6001600160a01b03166116a16008546001600160a01b031690565b6001600160a01b0316146116e55760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009547f00000000000000000000000000000000000000000000000000000000000000009061171990839061ffff16614619565b11156117675760405162461bcd60e51b815260206004820152601560248201527f6578636565642067616c6c65727920737570706c7900000000000000000000006044820152606401610c97565b6009805461ffff80821684011661ffff1990911617905560005b81811015610ddf5761179283613166565b5061179c81614631565b9050611781565b6002546000905b808210156118045760006001600160a01b0316600283815481106117d0576117d061464c565b6000918252602090912001546001600160a01b0316146117f9576000198301926117f957611804565b8160010191506117aa565b8082106115385760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c97565b600061187382612fa1565b6118d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c97565b6000600283815481106118e6576118e661464c565b6000918252602090912001546001600160a01b03169392505050565b61190a612feb565b6001600160a01b03166119256008546001600160a01b031690565b6001600160a01b0316146119695760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff16156119b95760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b604080518082019091528281526020808201839052600f805460018101825560009190915282518051849360029093027f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020192611a1a928492910190613de4565b506020828101518051611a339260018501920190613de4565b505050505050565b60006001600160a01b038216611aa65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c97565b60025460005b81811015611afb57836001600160a01b031660028281548110611ad157611ad161464c565b6000918252602090912001546001600160a01b03161415611af3578260010192505b600101611aac565b5050919050565b611b0a612feb565b6001600160a01b0316611b256008546001600160a01b031690565b6001600160a01b031614611b695760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b611b736000613416565b565b6040518060800160405280605181526020016149496051913981565b611b99612feb565b6001600160a01b0316611bb46008546001600160a01b031690565b6001600160a01b031614611bf85760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009805469ffff00000000000000001916600160401b179055565b611c1b612feb565b84611c268282613181565b611c2f57600080fd5b8460070b60061913158015611c48575060148560070b13155b611c845760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420666c75744160981b6044820152606401610c97565b8360070b60001913158015611c9d575060048460070b13155b611cd95760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206c6e54686b60981b6044820152606401610c97565b60008681526010602052604090819020805471ff000000000000000000000000000000000019861515600160801b021671ffff000000000000000000000000000000001967ffffffffffffffff898116600160401b026fffffffffffffffffffffffffffffffff19909416908b1617929092179190911617600160881b178155905133917f528f40efe391d536916a26d19c12bdd74bc2e5678aadd1a796a8f962acfac79591611dc3918a825254600781810b6020840152604082811c90910b90830152608081811c60ff9081161515606085015260889290921c90911615159082015260a00190565b60405180910390a2505050505050565b600254600090611de590600190614662565b905090565b606060018054610bac9061454f565b611e01612feb565b6001600160a01b0316611e1c6008546001600160a01b031690565b6001600160a01b031614611e605760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600954600160401b900461ffff1615611ed25760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b6009546601000000000000900461ffff16600114611f325760405162461bcd60e51b815260206004820152601460248201527f7075626c6963206d696e74206e6f74206c6976650000000000000000000000006044820152606401610c97565b34611f448266b1a2bc2ec50000614679565b14611f865760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610c97565b6009547f000000000000000000000000000000000000000000000000000000000000000090611fc2908390640100000000900461ffff16614619565b11156120075760405162461bcd60e51b8152602060048201526014602482015273657863656564207075626c696320737570706c7960601b6044820152606401610c97565b6009805461ffff640100000000808304821685019091160265ffff000000001990911617905560005b818110156120525761204133613166565b5061204b81614631565b9050612030565b5050565b612052612061612feb565b8383613468565b612070612feb565b6001600160a01b031661208b6008546001600160a01b031690565b6001600160a01b0316146120cf5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000816120fd81612fa1565b6121395760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610c97565b604080517f0000000000000000000000000000000000000000000000000000000000000000602082015290810184905230606090811b6bffffffffffffffffffffffff19169082015260740160405160208183030381529060405280519060200120915050919050565b6060600060028054806020026020016040519081016040528092919081815260200182805480156121fd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121df575b50939695505050505050565b600f818154811061221957600080fd5b906000526020600020906002020160009150905080600001805461223c9061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546122689061454f565b80156122b55780601f1061228a576101008083540402835291602001916122b5565b820191906000526020600020905b81548152906001019060200180831161229857829003601f168201915b5050505050908060010180546122ca9061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546122f69061454f565b80156123435780601f1061231857610100808354040283529160200191612343565b820191906000526020600020905b81548152906001019060200180831161232657829003601f168201915b5050505050905082565b61235e612358612feb565b83613181565b6123c45760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610c97565b6123d084848484613537565b50505050565b606060006123e383611a3b565b9050806124415760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f20604482015265746f6b656e7360d01b6064820152608401610c97565b60025460008267ffffffffffffffff81111561245f5761245f614026565b604051908082528060200260200182016040528015612488578160200160208202803683370190505b5090506000805b838110156124fd57866001600160a01b0316600282815481106124b4576124b461464c565b6000918252602090912001546001600160a01b031614156124f557808383806001019450815181106124e8576124e861464c565b6020026020010181815250505b60010161248f565b509095945050505050565b60606125126126df565b61251b836135b5565b60405160200161252c929190614698565b6040516020818303038152906040529050919050565b61254a612feb565b6001600160a01b03166125656008546001600160a01b031690565b6001600160a01b0316146125a95760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff16156125f95760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b600f54811061260757600080fd5b600f805461261790600190614662565b815481106126275761262761464c565b9060005260206000209060020201600f82815481106126485761264861464c565b9060005260206000209060020201600082018160000190805461266a9061454f565b612675929190613e68565b50600182018160010190805461268a9061454f565b612695929190613e68565b50905050600f8054806126aa576126aa6146e6565b600082815260208120600019909201916002830201906126ca8282613ee3565b6126d8600183016000613ee3565b5050905550565b6060600e6126ed60066135b5565b6040516020016126fe929190614796565b604051602081830303815290604052905090565b61271a612feb565b6001600160a01b03166127356008546001600160a01b031690565b6001600160a01b0316146127795760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009805467ffff00000000000019166601000000000000179055565b600954600160401b900461ffff16156127e55760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b346127f782666a94d74f430000614679565b146128395760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610c97565b6009547f000000000000000000000000000000000000000000000000000000000000000090612875908390640100000000900461ffff16614619565b11156128ba5760405162461bcd60e51b8152602060048201526014602482015273657863656564207075626c696320737570706c7960601b6044820152606401610c97565b336000908152600c602052604090205482906128d7908390614619565b11156129255760405162461bcd60e51b815260206004820152601160248201527f65786365656420616c6c6f636174696f6e0000000000000000000000000000006044820152606401610c97565b6129658585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136cb92505050565b6129b15760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964207369676e65720000000000000000000000000000000000006044820152606401610c97565b604080513360601b6bffffffffffffffffffffffff1916602080830191909152603482018590526054808301859052835180840390910181526074830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a333200000000609484015260b0808401919091528351808403909101815260d090920190925280519101208514612a795760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c840d0c2e6d60a31b6044820152606401610c97565b6009805461ffff640100000000808304821685019091160265ffff0000000019909116179055336000908152600c602052604081208054830190555b81811015611a3357612ac633613166565b50612ad081614631565b9050612ab5565b612adf612feb565b6001600160a01b0316612afa6008546001600160a01b031690565b6001600160a01b031614612b3e5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff1615612b8e5760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b805161205290600d906020840190613de4565b6060600e612baf60066135b5565b6040516020016126fe9291906147e7565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000091848116919083169063c45527919060240160206040518083038186803b158015612c2b57600080fd5b505afa158015612c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c63919061483b565b6001600160a01b03161415612c7c576001915050610b97565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b612cb6612feb565b6001600160a01b0316612cd16008546001600160a01b031690565b6001600160a01b031614612d155760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6001600160a01b038116612d7a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c97565b61167b81613416565b612d8b612feb565b6001600160a01b0316612da66008546001600160a01b031690565b6001600160a01b031614612dea5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b60008111612e295760405162461bcd60e51b815260206004820152600c60248201526b616d6f756e7420656d70747960a01b6044820152606401610c97565b47811115612e795760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420657863656564732062616c616e6365000000000000000000006044820152606401610c97565b6001600160a01b038216612ebe5760405162461bcd60e51b815260206004820152600c60248201526b1859191c995cdcc81b9d5b1b60a21b6044820152606401610c97565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610ddf573d6000803e3d6000fd5b600033301415612f4b57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150612f4e9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b1480612f8257506001600160e01b03198216635b5e139f60e01b145b80610b9757506301ffc9a760e01b6001600160e01b0319831614610b97565b60025460009082108015610b97575060006001600160a01b031660028381548110612fce57612fce61464c565b6000918252602090912001546001600160a01b0316141592915050565b6000611de5612ef4565b600081815260036020526040902080546001600160a01b0319166001600160a01b038416908117909155819061302a82611868565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166130c95760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610c97565b60016130dc6130d7876136fd565b61377a565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561312a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061315f8284614619565b9392505050565b6000610b9782604051806020016040528060008152506137aa565b600061318c82612fa1565b6131ed5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c97565b60006131f883611868565b9050806001600160a01b0316846001600160a01b031614806132335750836001600160a01b031661322884610c2f565b6001600160a01b0316145b80612ca65750612ca68185612bc0565b826001600160a01b031661325682611868565b6001600160a01b0316146132be5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610c97565b6001600160a01b0382166133205760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c97565b61332b600082612ff5565b816002828154811061333f5761333f61464c565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006133a482611868565b90506133b1600083612ff5565b600282815481106133c4576133c461464c565b6000918252602082200180546001600160a01b03191690556040518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134ca5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c97565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613542848484613243565b61354e8484848461382b565b6123d05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b6060816135d95750506040805180820190915260018152600360fc1b602082015290565b8160005b811561360357806135ed81614631565b91506135fc9050600a8361486e565b91506135dd565b60008167ffffffffffffffff81111561361e5761361e614026565b6040519080825280601f01601f191660200182016040528015613648576020820181803683370190505b5090505b8415612ca65761365d600183614662565b915061366a600a86614882565b613675906030614619565b60f81b81838151811061368a5761368a61464c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136c4600a8661486e565b945061364c565b60007311cd1d96f4f215e7240e8072535ba85ddaab2a096136ec8484613987565b6001600160a01b0316149392505050565b6000604051806080016040528060438152602001614906604391398051602091820120835184830151604080870151805190860120905161375d950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061378560065490565b60405161190160f01b602082015260228101919091526042810183905260620161375d565b60006137b5836139ab565b90506137c4600084838561382b565b610b975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b60006001600160a01b0384163b1561397f57836001600160a01b031663150b7a02613854612feb565b8786866040518563ffffffff1660e01b81526004016138769493929190614896565b602060405180830381600087803b15801561389057600080fd5b505af19250505080156138c0575060408051601f3d908101601f191682019092526138bd918101906148d2565b60015b613965573d8080156138ee576040519150601f19603f3d011682016040523d82523d6000602084013e6138f3565b606091505b50805161395d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ca6565b506001612ca6565b60008060006139968585613a84565b915091506139a381613af4565b509392505050565b60006001600160a01b038216613a035760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c97565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b600080825160411415613abb5760208301516040840151606085015160001a613aaf87828585613caf565b94509450505050613aed565b825160401415613ae55760208301516040840151613ada868383613d9c565b935093505050613aed565b506000905060025b9250929050565b6000816004811115613b0857613b086148ef565b1415613b115750565b6001816004811115613b2557613b256148ef565b1415613b735760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c97565b6002816004811115613b8757613b876148ef565b1415613bd55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c97565b6003816004811115613be957613be96148ef565b1415613c425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c97565b6004816004811115613c5657613c566148ef565b141561167b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610c97565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613ce65750600090506003613d93565b8460ff16601b14158015613cfe57508460ff16601c14155b15613d0f5750600090506004613d93565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613d63573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613d8c57600060019250925050613d93565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613dd687828885613caf565b935093505050935093915050565b828054613df09061454f565b90600052602060002090601f016020900481019282613e125760008555613e58565b82601f10613e2b57805160ff1916838001178555613e58565b82800160010185558215613e58579182015b82811115613e58578251825591602001919060010190613e3d565b50613e64929150613f19565b5090565b828054613e749061454f565b90600052602060002090601f016020900481019282613e965760008555613e58565b82601f10613ea75780548555613e58565b82800160010185558215613e5857600052602060002091601f016020900482015b82811115613e58578254825591600101919060010190613ec8565b508054613eef9061454f565b6000825580601f10613eff575050565b601f01602090049060005260206000209081019061167b91905b5b80821115613e645760008155600101613f1a565b6001600160e01b03198116811461167b57600080fd5b600060208284031215613f5657600080fd5b813561315f81613f2e565b60005b83811015613f7c578181015183820152602001613f64565b838111156123d05750506000910152565b60008151808452613fa5816020860160208601613f61565b601f01601f19169290920160200192915050565b60208152600061315f6020830184613f8d565b600060208284031215613fde57600080fd5b5035919050565b6001600160a01b038116811461167b57600080fd5b6000806040838503121561400d57600080fd5b823561401881613fe5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261404d57600080fd5b813567ffffffffffffffff8082111561406857614068614026565b604051601f8301601f19908116603f0116810190828211818310171561409057614090614026565b816040528381528660208588010111156140a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156140e157600080fd5b85356140ec81613fe5565b9450602086013567ffffffffffffffff81111561410857600080fd5b6141148882890161403c565b9450506040860135925060608601359150608086013560ff8116811461413957600080fd5b809150509295509295909350565b60008060006060848603121561415c57600080fd5b833561416781613fe5565b9250602084013561417781613fe5565b929592945050506040919091013590565b60006020828403121561419a57600080fd5b813561315f81613fe5565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561421c57888303603f19018552815180518785526141f088860182613f8d565b91890151858303868b01529190506142088183613f8d565b9689019694505050908601906001016141cc565b509098975050505050505050565b6000806040838503121561423d57600080fd5b823567ffffffffffffffff8082111561425557600080fd5b6142618683870161403c565b9350602085013591508082111561427757600080fd5b506142848582860161403c565b9150509250929050565b8035600781900b81146142a057600080fd5b919050565b803580151581146142a057600080fd5b600080600080608085870312156142cb57600080fd5b843593506142db6020860161428e565b92506142e96040860161428e565b91506142f7606086016142a5565b905092959194509250565b6000806040838503121561431557600080fd5b823561432081613fe5565b915061432e602084016142a5565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156143785783516001600160a01b031683529284019291840191600101614353565b50909695505050505050565b6040815260006143976040830185613f8d565b82810360208401526143a98185613f8d565b95945050505050565b600080600080608085870312156143c857600080fd5b84356143d381613fe5565b935060208501356143e381613fe5565b925060408501359150606085013567ffffffffffffffff81111561440657600080fd5b6144128782880161403c565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156143785783518352928401929184019160010161443a565b60008060008060006080868803121561446e57600080fd5b85359450602086013567ffffffffffffffff8082111561448d57600080fd5b818801915088601f8301126144a157600080fd5b8135818111156144b057600080fd5b8960208285010111156144c257600080fd5b9699602092909201985095966040810135965060600135945092505050565b6000602082840312156144f357600080fd5b813567ffffffffffffffff81111561450a57600080fd5b612ca68482850161403c565b6000806040838503121561452957600080fd5b823561453481613fe5565b9150602083013561454481613fe5565b809150509250929050565b600181811c9082168061456357607f821691505b6020821081141561153857634e487b7160e01b600052602260045260246000fd5b60006001600160a01b038086168352808516602084015250606060408301526143a96060830184613f8d565b600083516145c2818460208801613f61565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600082516145f9818460208701613f61565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561462c5761462c614603565b500190565b600060001982141561464557614645614603565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60008282101561467457614674614603565b500390565b600081600019048311821515161561469357614693614603565b500290565b600083516146aa818460208801613f61565b602f60f81b90830190815283516146c8816001840160208801613f61565b642f6d65746160d81b60019290910191820152600601949350505050565b634e487b7160e01b600052603160045260246000fd5b8054600090600181811c908083168061471657607f831692505b602080841082141561473857634e487b7160e01b600052602260045260246000fd5b81801561474c576001811461475d5761478a565b60ff1986168952848901965061478a565b60008881526020902060005b868110156147825781548b820152908501908301614769565b505084890196505b50505050505092915050565b60006147a282856146fc565b6c2f6170692f70726f6a6563742f60981b815283516147c881600d840160208801613f61565b6517ba37b5b2b760d11b600d9290910191820152601301949350505050565b60006147f382856146fc565b6c2f6170692f70726f6a6563742f60981b8152835161481981600d840160208801613f61565b680bd8dbdb9d1c9858dd60ba1b600d9290910191820152601601949350505050565b60006020828403121561484d57600080fd5b815161315f81613fe5565b634e487b7160e01b600052601260045260246000fd5b60008261487d5761487d614858565b500490565b60008261489157614891614858565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148c86080830184613f8d565b9695505050505050565b6000602082840312156148e457600080fd5b815161315f81613f2e565b634e487b7160e01b600052602160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294c6976696e672074687265616473206f6620636f6c6f75722070756c6c6564206163726f737320616e20756e7365656e2063616e7661732c206372656174696e67206d6f6f6420616e642073706163652e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220ceef12aff52e3b159f4fdca52537426211104ea6174038e0ec31e538200815b564736f6c63430008090033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000334000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000142ff8c89e94ed08d125f826460da0373bc6ae56515f6a8c2ec1d5a8559042f45a000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001070352d76312e342e302e6d696e2e6a7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d65596b4435614c386465395a4778567244484e316a773267704a654d7a574e3848767152577237554e444c5300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082829203d3e207b7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001768747470733a2f2f67656e65746963636861696e2e696f000000000000000000

Deployed Bytecode

0x6080604052600436106103a25760003560e01c80638b5af65a116101e7578063bba7723e1161010d578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610b04578063f3fef3a314610b24578063f593bd5314610b44578063f8f0b80e14610b5d57600080fd5b8063e8a3d48514610a7c578063e985e9c514610a91578063ed329fa814610ab1578063ef3c662414610ad057600080fd5b8063d62f3b1c116100dc578063d62f3b1c14610a00578063d81bc66314610a15578063e403f1a714610a28578063e527c6dd14610a4857600080fd5b8063bba7723e1461097e578063c87b56dd146109ab578063c93ed70a146109cb578063d547cfb7146109eb57600080fd5b8063a22e4faa11610185578063affe39c111610154578063affe39c1146108e8578063b1fbe72d1461090a578063b7f751d814610938578063b88d4fde1461095e57600080fd5b8063a22e4faa1461086c578063a38643971461088c578063a4f4f8af146108ac578063a945bf80146108cd57600080fd5b806395d89b41116101c157806395d89b41146108045780639df806d614610819578063a0712d6814610839578063a22cb4651461084c57600080fd5b80638b5af65a146107b15780638da5cb5b146107d157806391ba317a146107ef57600080fd5b80633e4f49e6116102cc5780636352211e1161026a578063715018a611610239578063715018a61461073e57806371dedace146107535780637284e41614610787578063753868e31461079c57600080fd5b80636352211e146106c3578063636e746b146106e3578063638e19b4146106fe57806370a082311461071e57600080fd5b806342966c68116102a657806342966c681461062a57806343bc16121461064a57806344be774f146106835780634f6ccce7146106a357600080fd5b80633e4f49e6146105b05780633fafa127146105f557806342842e0e1461060a57600080fd5b806318160ddd116103445780632d0335ab116103135780632d0335ab146105255780632f745c591461055b5780633408e4701461057b5780633e02bc381461058e57600080fd5b806318160ddd146104b857806320379ee5146104db57806323b872dd146104f057806324c12bf61461051057600080fd5b8063095ea7b311610380578063095ea7b3146104365780630c53c51c146104585780630f7e59701461046b57806314d7d5171461049857600080fd5b806301ffc9a7146103a757806306fdde03146103dc578063081812fc146103fe575b600080fd5b3480156103b357600080fd5b506103c76103c2366004613f44565b610b72565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b9d565b6040516103d39190613fb9565b34801561040a57600080fd5b5061041e610419366004613fcc565b610c2f565b6040516001600160a01b0390911681526020016103d3565b34801561044257600080fd5b50610456610451366004613ffa565b610cbc565b005b6103f16104663660046140c9565b610de4565b34801561047757600080fd5b506103f1604051806040016040528060018152602001603160f81b81525081565b3480156104a457600080fd5b506104566104b3366004613ffa565b610fce565b3480156104c457600080fd5b506104cd611107565b6040519081526020016103d3565b3480156104e757600080fd5b506006546104cd565b3480156104fc57600080fd5b5061045661050b366004614147565b611163565b34801561051c57600080fd5b506103f16111e5565b34801561053157600080fd5b506104cd610540366004614188565b6001600160a01b031660009081526007602052604090205490565b34801561056757600080fd5b506104cd610576366004613ffa565b611273565b34801561058757600080fd5b50466104cd565b34801561059a57600080fd5b506105a361133e565b6040516103d391906141a5565b3480156105bc57600080fd5b506105d06105cb366004613fcc565b61153e565b60408051600794850b81529290930b60208301521515918101919091526060016103d3565b34801561060157600080fd5b506104cd600681565b34801561061657600080fd5b50610456610625366004614147565b6115ed565b34801561063657600080fd5b50610456610645366004613fcc565b611608565b34801561065657600080fd5b506103f16040518060400160405280600d81526020016c096d8c2c4cad8d6d0ded8dee6d609b1b81525081565b34801561068f57600080fd5b5061045661069e366004613ffa565b61167e565b3480156106af57600080fd5b506104cd6106be366004613fcc565b6117a3565b3480156106cf57600080fd5b5061041e6106de366004613fcc565b611868565b3480156106ef57600080fd5b506104cd666a94d74f43000081565b34801561070a57600080fd5b5061045661071936600461422a565b611902565b34801561072a57600080fd5b506104cd610739366004614188565b611a3b565b34801561074a57600080fd5b50610456611b02565b34801561075f57600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000001481565b34801561079357600080fd5b506103f1611b75565b3480156107a857600080fd5b50610456611b91565b3480156107bd57600080fd5b506104566107cc3660046142b5565b611c13565b3480156107dd57600080fd5b506008546001600160a01b031661041e565b3480156107fb57600080fd5b506104cd611dd3565b34801561081057600080fd5b506103f1611dea565b34801561082557600080fd5b50610456610834366004614188565b611df9565b610456610847366004613fcc565b611e82565b34801561085857600080fd5b50610456610867366004614302565b612056565b34801561087857600080fd5b50610456610887366004614188565b612068565b34801561089857600080fd5b506104cd6108a7366004613fcc565b6120f1565b3480156108b857600080fd5b50600954640100000000900461ffff166104cd565b3480156108d957600080fd5b506104cd66b1a2bc2ec5000081565b3480156108f457600080fd5b506108fd6121a3565b6040516103d39190614337565b34801561091657600080fd5b5061092a610925366004613fcc565b612209565b6040516103d3929190614384565b34801561094457600080fd5b506009546601000000000000900461ffff166001146103c7565b34801561096a57600080fd5b506104566109793660046143b2565b61234d565b34801561098a57600080fd5b5061099e610999366004614188565b6123d6565b6040516103d3919061441e565b3480156109b757600080fd5b506103f16109c6366004613fcc565b612508565b3480156109d757600080fd5b506104566109e6366004613fcc565b612542565b3480156109f757600080fd5b506103f16126df565b348015610a0c57600080fd5b50610456612712565b610456610a23366004614456565b612795565b348015610a3457600080fd5b50610456610a433660046144e1565b612ad7565b348015610a5457600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000033481565b348015610a8857600080fd5b506103f1612ba1565b348015610a9d57600080fd5b506103c7610aac366004614516565b612bc0565b348015610abd57600080fd5b5060095462010000900461ffff166104cd565b348015610adc57600080fd5b506104cd7f000000000000000000000000000000000000000000000000000000000000000a81565b348015610b1057600080fd5b50610456610b1f366004614188565b612cae565b348015610b3057600080fd5b50610456610b3f366004613ffa565b612d83565b348015610b5057600080fd5b5060095461ffff166104cd565b348015610b6957600080fd5b50600f546104cd565b60006001600160e01b0319821663780e9d6360e01b1480610b975750610b9782612f51565b92915050565b606060008054610bac9061454f565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd89061454f565b8015610c255780601f10610bfa57610100808354040283529160200191610c25565b820191906000526020600020905b815481529060010190602001808311610c0857829003601f168201915b5050505050905090565b6000610c3a82612fa1565b610ca05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b6000610cc782611868565b9050806001600160a01b0316836001600160a01b03161415610d355760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c97565b806001600160a01b0316610d47612feb565b6001600160a01b03161480610d635750610d6381610aac612feb565b610dd55760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c97565b610ddf8383612ff5565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610e228782878787613063565b610e785760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610c97565b6001600160a01b038716600090815260076020526040902054610e9c906001613153565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610eec90899033908a90614584565b60405180910390a1600080306001600160a01b0316888a604051602001610f149291906145b0565b60408051601f1981840301815290829052610f2e916145e7565b6000604051808303816000865af19150503d8060008114610f6b576040519150601f19603f3d011682016040523d82523d6000602084013e610f70565b606091505b509150915081610fc25760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610c97565b98975050505050505050565b600b546001600160a01b0316610fe2612feb565b6001600160a01b0316146110385760405162461bcd60e51b815260206004820152601160248201527f63616c6c6572206e6f74206172746973740000000000000000000000000000006044820152606401610c97565b6009547f000000000000000000000000000000000000000000000000000000000000000a9061107290839062010000900461ffff16614619565b11156110c05760405162461bcd60e51b815260206004820152601460248201527f6578636565642061727469737420737570706c790000000000000000000000006044820152606401610c97565b6009805461ffff62010000808304821685019091160263ffff00001990911617905560005b81811015610ddf576110f683613166565b5061110081614631565b90506110e5565b600254600090815b8181101561115e5760006001600160a01b0316600282815481106111355761113561464c565b6000918252602090912001546001600160a01b031614611156578260010192505b60010161110f565b505090565b61117461116e612feb565b82613181565b6111da5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610c97565b610ddf838383613243565b600d80546111f29061454f565b80601f016020809104026020016040519081016040528092919081815260200182805461121e9061454f565b801561126b5780601f106112405761010080835404028352916020019161126b565b820191906000526020600020905b81548152906001019060200180831161124e57829003601f168201915b505050505081565b6002546000905b808210156112d457836001600160a01b03166002838154811061129f5761129f61464c565b6000918252602090912001546001600160a01b031614156112c9576000198301926112c9576112d4565b81600101915061127a565b8082106113375760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610c97565b5092915050565b600f5460609060009067ffffffffffffffff81111561135f5761135f614026565b6040519080825280602002602001820160405280156113a457816020015b604080518082019091526060808252602082015281526020019060019003908161137d5790505b50905060005b600f54811015611538576000600f82815481106113c9576113c961464c565b90600052602060002090600202019050806040518060400160405290816000820180546113f59061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546114219061454f565b801561146e5780601f106114435761010080835404028352916020019161146e565b820191906000526020600020905b81548152906001019060200180831161145157829003601f168201915b505050505081526020016001820180546114879061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546114b39061454f565b80156115005780601f106114d557610100808354040283529160200191611500565b820191906000526020600020905b8154815290600101906020018083116114e357829003601f168201915b50505050508152505083838151811061151b5761151b61464c565b6020026020010181905250508061153190614631565b90506113aa565b50919050565b60008060008361154d81612fa1565b6115895760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610c97565b600085815260106020526040902054600160881b900460ff166115b7576000935060009250600191506115e5565b600085815260106020526040902054600781810b9550600160401b8204900b9350600160801b900460ff1691505b509193909250565b610ddf8383836040518060200160405280600081525061234d565b600a546001600160a01b031661161c612feb565b6001600160a01b0316146116725760405162461bcd60e51b815260206004820152601160248201527f63616c6c6572206e6f74206275726e65720000000000000000000000000000006044820152606401610c97565b61167b81613399565b50565b611686612feb565b6001600160a01b03166116a16008546001600160a01b031690565b6001600160a01b0316146116e55760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009547f00000000000000000000000000000000000000000000000000000000000000149061171990839061ffff16614619565b11156117675760405162461bcd60e51b815260206004820152601560248201527f6578636565642067616c6c65727920737570706c7900000000000000000000006044820152606401610c97565b6009805461ffff80821684011661ffff1990911617905560005b81811015610ddf5761179283613166565b5061179c81614631565b9050611781565b6002546000905b808210156118045760006001600160a01b0316600283815481106117d0576117d061464c565b6000918252602090912001546001600160a01b0316146117f9576000198301926117f957611804565b8160010191506117aa565b8082106115385760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610c97565b600061187382612fa1565b6118d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c97565b6000600283815481106118e6576118e661464c565b6000918252602090912001546001600160a01b03169392505050565b61190a612feb565b6001600160a01b03166119256008546001600160a01b031690565b6001600160a01b0316146119695760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff16156119b95760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b604080518082019091528281526020808201839052600f805460018101825560009190915282518051849360029093027f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020192611a1a928492910190613de4565b506020828101518051611a339260018501920190613de4565b505050505050565b60006001600160a01b038216611aa65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c97565b60025460005b81811015611afb57836001600160a01b031660028281548110611ad157611ad161464c565b6000918252602090912001546001600160a01b03161415611af3578260010192505b600101611aac565b5050919050565b611b0a612feb565b6001600160a01b0316611b256008546001600160a01b031690565b6001600160a01b031614611b695760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b611b736000613416565b565b6040518060800160405280605181526020016149496051913981565b611b99612feb565b6001600160a01b0316611bb46008546001600160a01b031690565b6001600160a01b031614611bf85760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009805469ffff00000000000000001916600160401b179055565b611c1b612feb565b84611c268282613181565b611c2f57600080fd5b8460070b60061913158015611c48575060148560070b13155b611c845760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420666c75744160981b6044820152606401610c97565b8360070b60001913158015611c9d575060048460070b13155b611cd95760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206c6e54686b60981b6044820152606401610c97565b60008681526010602052604090819020805471ff000000000000000000000000000000000019861515600160801b021671ffff000000000000000000000000000000001967ffffffffffffffff898116600160401b026fffffffffffffffffffffffffffffffff19909416908b1617929092179190911617600160881b178155905133917f528f40efe391d536916a26d19c12bdd74bc2e5678aadd1a796a8f962acfac79591611dc3918a825254600781810b6020840152604082811c90910b90830152608081811c60ff9081161515606085015260889290921c90911615159082015260a00190565b60405180910390a2505050505050565b600254600090611de590600190614662565b905090565b606060018054610bac9061454f565b611e01612feb565b6001600160a01b0316611e1c6008546001600160a01b031690565b6001600160a01b031614611e605760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600954600160401b900461ffff1615611ed25760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b6009546601000000000000900461ffff16600114611f325760405162461bcd60e51b815260206004820152601460248201527f7075626c6963206d696e74206e6f74206c6976650000000000000000000000006044820152606401610c97565b34611f448266b1a2bc2ec50000614679565b14611f865760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610c97565b6009547f000000000000000000000000000000000000000000000000000000000000033490611fc2908390640100000000900461ffff16614619565b11156120075760405162461bcd60e51b8152602060048201526014602482015273657863656564207075626c696320737570706c7960601b6044820152606401610c97565b6009805461ffff640100000000808304821685019091160265ffff000000001990911617905560005b818110156120525761204133613166565b5061204b81614631565b9050612030565b5050565b612052612061612feb565b8383613468565b612070612feb565b6001600160a01b031661208b6008546001600160a01b031690565b6001600160a01b0316146120cf5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000816120fd81612fa1565b6121395760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610c97565b604080517f2ff8c89e94ed08d125f826460da0373bc6ae56515f6a8c2ec1d5a8559042f45a602082015290810184905230606090811b6bffffffffffffffffffffffff19169082015260740160405160208183030381529060405280519060200120915050919050565b6060600060028054806020026020016040519081016040528092919081815260200182805480156121fd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121df575b50939695505050505050565b600f818154811061221957600080fd5b906000526020600020906002020160009150905080600001805461223c9061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546122689061454f565b80156122b55780601f1061228a576101008083540402835291602001916122b5565b820191906000526020600020905b81548152906001019060200180831161229857829003601f168201915b5050505050908060010180546122ca9061454f565b80601f01602080910402602001604051908101604052809291908181526020018280546122f69061454f565b80156123435780601f1061231857610100808354040283529160200191612343565b820191906000526020600020905b81548152906001019060200180831161232657829003601f168201915b5050505050905082565b61235e612358612feb565b83613181565b6123c45760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610c97565b6123d084848484613537565b50505050565b606060006123e383611a3b565b9050806124415760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f20604482015265746f6b656e7360d01b6064820152608401610c97565b60025460008267ffffffffffffffff81111561245f5761245f614026565b604051908082528060200260200182016040528015612488578160200160208202803683370190505b5090506000805b838110156124fd57866001600160a01b0316600282815481106124b4576124b461464c565b6000918252602090912001546001600160a01b031614156124f557808383806001019450815181106124e8576124e861464c565b6020026020010181815250505b60010161248f565b509095945050505050565b60606125126126df565b61251b836135b5565b60405160200161252c929190614698565b6040516020818303038152906040529050919050565b61254a612feb565b6001600160a01b03166125656008546001600160a01b031690565b6001600160a01b0316146125a95760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff16156125f95760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b600f54811061260757600080fd5b600f805461261790600190614662565b815481106126275761262761464c565b9060005260206000209060020201600f82815481106126485761264861464c565b9060005260206000209060020201600082018160000190805461266a9061454f565b612675929190613e68565b50600182018160010190805461268a9061454f565b612695929190613e68565b50905050600f8054806126aa576126aa6146e6565b600082815260208120600019909201916002830201906126ca8282613ee3565b6126d8600183016000613ee3565b5050905550565b6060600e6126ed60066135b5565b6040516020016126fe929190614796565b604051602081830303815290604052905090565b61271a612feb565b6001600160a01b03166127356008546001600160a01b031690565b6001600160a01b0316146127795760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6009805467ffff00000000000019166601000000000000179055565b600954600160401b900461ffff16156127e55760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b346127f782666a94d74f430000614679565b146128395760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610c97565b6009547f000000000000000000000000000000000000000000000000000000000000033490612875908390640100000000900461ffff16614619565b11156128ba5760405162461bcd60e51b8152602060048201526014602482015273657863656564207075626c696320737570706c7960601b6044820152606401610c97565b336000908152600c602052604090205482906128d7908390614619565b11156129255760405162461bcd60e51b815260206004820152601160248201527f65786365656420616c6c6f636174696f6e0000000000000000000000000000006044820152606401610c97565b6129658585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136cb92505050565b6129b15760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964207369676e65720000000000000000000000000000000000006044820152606401610c97565b604080513360601b6bffffffffffffffffffffffff1916602080830191909152603482018590526054808301859052835180840390910181526074830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a333200000000609484015260b0808401919091528351808403909101815260d090920190925280519101208514612a795760405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c840d0c2e6d60a31b6044820152606401610c97565b6009805461ffff640100000000808304821685019091160265ffff0000000019909116179055336000908152600c602052604081208054830190555b81811015611a3357612ac633613166565b50612ad081614631565b9050612ab5565b612adf612feb565b6001600160a01b0316612afa6008546001600160a01b031690565b6001600160a01b031614612b3e5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b600954600160401b900461ffff1615612b8e5760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610c97565b805161205290600d906020840190613de4565b6060600e612baf60066135b5565b6040516020016126fe9291906147e7565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c191848116919083169063c45527919060240160206040518083038186803b158015612c2b57600080fd5b505afa158015612c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c63919061483b565b6001600160a01b03161415612c7c576001915050610b97565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b612cb6612feb565b6001600160a01b0316612cd16008546001600160a01b031690565b6001600160a01b031614612d155760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b6001600160a01b038116612d7a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c97565b61167b81613416565b612d8b612feb565b6001600160a01b0316612da66008546001600160a01b031690565b6001600160a01b031614612dea5760405162461bcd60e51b8152602060048201819052602482015260008051602061499a8339815191526044820152606401610c97565b60008111612e295760405162461bcd60e51b815260206004820152600c60248201526b616d6f756e7420656d70747960a01b6044820152606401610c97565b47811115612e795760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420657863656564732062616c616e6365000000000000000000006044820152606401610c97565b6001600160a01b038216612ebe5760405162461bcd60e51b815260206004820152600c60248201526b1859191c995cdcc81b9d5b1b60a21b6044820152606401610c97565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610ddf573d6000803e3d6000fd5b600033301415612f4b57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150612f4e9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b1480612f8257506001600160e01b03198216635b5e139f60e01b145b80610b9757506301ffc9a760e01b6001600160e01b0319831614610b97565b60025460009082108015610b97575060006001600160a01b031660028381548110612fce57612fce61464c565b6000918252602090912001546001600160a01b0316141592915050565b6000611de5612ef4565b600081815260036020526040902080546001600160a01b0319166001600160a01b038416908117909155819061302a82611868565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166130c95760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610c97565b60016130dc6130d7876136fd565b61377a565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561312a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061315f8284614619565b9392505050565b6000610b9782604051806020016040528060008152506137aa565b600061318c82612fa1565b6131ed5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c97565b60006131f883611868565b9050806001600160a01b0316846001600160a01b031614806132335750836001600160a01b031661322884610c2f565b6001600160a01b0316145b80612ca65750612ca68185612bc0565b826001600160a01b031661325682611868565b6001600160a01b0316146132be5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610c97565b6001600160a01b0382166133205760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c97565b61332b600082612ff5565b816002828154811061333f5761333f61464c565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006133a482611868565b90506133b1600083612ff5565b600282815481106133c4576133c461464c565b6000918252602082200180546001600160a01b03191690556040518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134ca5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c97565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613542848484613243565b61354e8484848461382b565b6123d05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b6060816135d95750506040805180820190915260018152600360fc1b602082015290565b8160005b811561360357806135ed81614631565b91506135fc9050600a8361486e565b91506135dd565b60008167ffffffffffffffff81111561361e5761361e614026565b6040519080825280601f01601f191660200182016040528015613648576020820181803683370190505b5090505b8415612ca65761365d600183614662565b915061366a600a86614882565b613675906030614619565b60f81b81838151811061368a5761368a61464c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136c4600a8661486e565b945061364c565b60007311cd1d96f4f215e7240e8072535ba85ddaab2a096136ec8484613987565b6001600160a01b0316149392505050565b6000604051806080016040528060438152602001614906604391398051602091820120835184830151604080870151805190860120905161375d950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061378560065490565b60405161190160f01b602082015260228101919091526042810183905260620161375d565b60006137b5836139ab565b90506137c4600084838561382b565b610b975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b60006001600160a01b0384163b1561397f57836001600160a01b031663150b7a02613854612feb565b8786866040518563ffffffff1660e01b81526004016138769493929190614896565b602060405180830381600087803b15801561389057600080fd5b505af19250505080156138c0575060408051601f3d908101601f191682019092526138bd918101906148d2565b60015b613965573d8080156138ee576040519150601f19603f3d011682016040523d82523d6000602084013e6138f3565b606091505b50805161395d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c97565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ca6565b506001612ca6565b60008060006139968585613a84565b915091506139a381613af4565b509392505050565b60006001600160a01b038216613a035760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c97565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b600080825160411415613abb5760208301516040840151606085015160001a613aaf87828585613caf565b94509450505050613aed565b825160401415613ae55760208301516040840151613ada868383613d9c565b935093505050613aed565b506000905060025b9250929050565b6000816004811115613b0857613b086148ef565b1415613b115750565b6001816004811115613b2557613b256148ef565b1415613b735760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c97565b6002816004811115613b8757613b876148ef565b1415613bd55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c97565b6003816004811115613be957613be96148ef565b1415613c425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c97565b6004816004811115613c5657613c566148ef565b141561167b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610c97565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613ce65750600090506003613d93565b8460ff16601b14158015613cfe57508460ff16601c14155b15613d0f5750600090506004613d93565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613d63573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613d8c57600060019250925050613d93565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613dd687828885613caf565b935093505050935093915050565b828054613df09061454f565b90600052602060002090601f016020900481019282613e125760008555613e58565b82601f10613e2b57805160ff1916838001178555613e58565b82800160010185558215613e58579182015b82811115613e58578251825591602001919060010190613e3d565b50613e64929150613f19565b5090565b828054613e749061454f565b90600052602060002090601f016020900481019282613e965760008555613e58565b82601f10613ea75780548555613e58565b82800160010185558215613e5857600052602060002091601f016020900482015b82811115613e58578254825591600101919060010190613ec8565b508054613eef9061454f565b6000825580601f10613eff575050565b601f01602090049060005260206000209081019061167b91905b5b80821115613e645760008155600101613f1a565b6001600160e01b03198116811461167b57600080fd5b600060208284031215613f5657600080fd5b813561315f81613f2e565b60005b83811015613f7c578181015183820152602001613f64565b838111156123d05750506000910152565b60008151808452613fa5816020860160208601613f61565b601f01601f19169290920160200192915050565b60208152600061315f6020830184613f8d565b600060208284031215613fde57600080fd5b5035919050565b6001600160a01b038116811461167b57600080fd5b6000806040838503121561400d57600080fd5b823561401881613fe5565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261404d57600080fd5b813567ffffffffffffffff8082111561406857614068614026565b604051601f8301601f19908116603f0116810190828211818310171561409057614090614026565b816040528381528660208588010111156140a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156140e157600080fd5b85356140ec81613fe5565b9450602086013567ffffffffffffffff81111561410857600080fd5b6141148882890161403c565b9450506040860135925060608601359150608086013560ff8116811461413957600080fd5b809150509295509295909350565b60008060006060848603121561415c57600080fd5b833561416781613fe5565b9250602084013561417781613fe5565b929592945050506040919091013590565b60006020828403121561419a57600080fd5b813561315f81613fe5565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561421c57888303603f19018552815180518785526141f088860182613f8d565b91890151858303868b01529190506142088183613f8d565b9689019694505050908601906001016141cc565b509098975050505050505050565b6000806040838503121561423d57600080fd5b823567ffffffffffffffff8082111561425557600080fd5b6142618683870161403c565b9350602085013591508082111561427757600080fd5b506142848582860161403c565b9150509250929050565b8035600781900b81146142a057600080fd5b919050565b803580151581146142a057600080fd5b600080600080608085870312156142cb57600080fd5b843593506142db6020860161428e565b92506142e96040860161428e565b91506142f7606086016142a5565b905092959194509250565b6000806040838503121561431557600080fd5b823561432081613fe5565b915061432e602084016142a5565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156143785783516001600160a01b031683529284019291840191600101614353565b50909695505050505050565b6040815260006143976040830185613f8d565b82810360208401526143a98185613f8d565b95945050505050565b600080600080608085870312156143c857600080fd5b84356143d381613fe5565b935060208501356143e381613fe5565b925060408501359150606085013567ffffffffffffffff81111561440657600080fd5b6144128782880161403c565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156143785783518352928401929184019160010161443a565b60008060008060006080868803121561446e57600080fd5b85359450602086013567ffffffffffffffff8082111561448d57600080fd5b818801915088601f8301126144a157600080fd5b8135818111156144b057600080fd5b8960208285010111156144c257600080fd5b9699602092909201985095966040810135965060600135945092505050565b6000602082840312156144f357600080fd5b813567ffffffffffffffff81111561450a57600080fd5b612ca68482850161403c565b6000806040838503121561452957600080fd5b823561453481613fe5565b9150602083013561454481613fe5565b809150509250929050565b600181811c9082168061456357607f821691505b6020821081141561153857634e487b7160e01b600052602260045260246000fd5b60006001600160a01b038086168352808516602084015250606060408301526143a96060830184613f8d565b600083516145c2818460208801613f61565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600082516145f9818460208701613f61565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561462c5761462c614603565b500190565b600060001982141561464557614645614603565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60008282101561467457614674614603565b500390565b600081600019048311821515161561469357614693614603565b500290565b600083516146aa818460208801613f61565b602f60f81b90830190815283516146c8816001840160208801613f61565b642f6d65746160d81b60019290910191820152600601949350505050565b634e487b7160e01b600052603160045260246000fd5b8054600090600181811c908083168061471657607f831692505b602080841082141561473857634e487b7160e01b600052602260045260246000fd5b81801561474c576001811461475d5761478a565b60ff1986168952848901965061478a565b60008881526020902060005b868110156147825781548b820152908501908301614769565b505084890196505b50505050505092915050565b60006147a282856146fc565b6c2f6170692f70726f6a6563742f60981b815283516147c881600d840160208801613f61565b6517ba37b5b2b760d11b600d9290910191820152601301949350505050565b60006147f382856146fc565b6c2f6170692f70726f6a6563742f60981b8152835161481981600d840160208801613f61565b680bd8dbdb9d1c9858dd60ba1b600d9290910191820152601601949350505050565b60006020828403121561484d57600080fd5b815161315f81613fe5565b634e487b7160e01b600052601260045260246000fd5b60008261487d5761487d614858565b500490565b60008261489157614891614858565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148c86080830184613f8d565b9695505050505050565b6000602082840312156148e457600080fd5b815161315f81613f2e565b634e487b7160e01b600052602160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294c6976696e672074687265616473206f6620636f6c6f75722070756c6c6564206163726f737320616e20756e7365656e2063616e7661732c206372656174696e67206d6f6f6420616e642073706163652e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220ceef12aff52e3b159f4fdca52537426211104ea6174038e0ec31e538200815b564736f6c63430008090033

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

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000334000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000142ff8c89e94ed08d125f826460da0373bc6ae56515f6a8c2ec1d5a8559042f45a000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001070352d76312e342e302e6d696e2e6a7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d65596b4435614c386465395a4778567244484e316a773267704a654d7a574e3848767152577237554e444c5300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082829203d3e207b7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001768747470733a2f2f67656e65746963636861696e2e696f000000000000000000

-----Decoded View---------------
Arg [0] : lib (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : code_ (string): () => {}
Arg [2] : baseUri (string): https://geneticchain.io
Arg [3] : tokenMax (uint256[3]): 820,10,20
Arg [4] : seed (uint256): 21698266580103220570158835035658772387588555531333106648574205392317682218074
Arg [5] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000334
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [6] : 2ff8c89e94ed08d125f826460da0373bc6ae56515f6a8c2ec1d5a8559042f45a
Arg [7] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [11] : 70352d76312e342e302e6d696e2e6a7300000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [13] : 516d65596b4435614c386465395a4778567244484e316a773267704a654d7a57
Arg [14] : 4e3848767152577237554e444c53000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [16] : 2829203d3e207b7d000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [18] : 68747470733a2f2f67656e65746963636861696e2e696f000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

Next Gen NFT Platform.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.