ETH Price: $1,971.83 (-5.23%)

Contract

0xD5dA0F2bf1029c64460e4e1CE1fA0f88E7E39800
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Clone153697242022-08-19 6:14:441295 days ago1660889684IN
0xD5dA0F2b...8E7E39800
0 ETH0.001944518.52831486
Clone153263442022-08-12 9:55:131302 days ago1660298113IN
0xD5dA0F2b...8E7E39800
0 ETH0.0025500511.17529131
Clone152955392022-08-07 13:59:101307 days ago1659880750IN
0xD5dA0F2b...8E7E39800
0 ETH0.0022946410.05283315
Clone152222252022-07-27 3:54:141318 days ago1658894054IN
0xD5dA0F2b...8E7E39800
0 ETH0.0031758113.92270332
Clone151283162022-07-12 14:21:481333 days ago1657635708IN
0xD5dA0F2b...8E7E39800
0 ETH0.0047734420.9179268
Clone150275172022-06-26 5:52:231349 days ago1656222743IN
0xD5dA0F2b...8E7E39800
0 ETH0.0066024328.95107517
Clone150002412022-06-21 3:33:431354 days ago1655782423IN
0xD5dA0F2b...8E7E39800
0 ETH0.0120147552.65587009
Clone149214582022-06-07 14:54:441368 days ago1654613684IN
0xD5dA0F2b...8E7E39800
0 ETH0.0110072448.26318974
Clone149098902022-06-05 15:31:381370 days ago1654443098IN
0xD5dA0F2b...8E7E39800
0 ETH0.0130678157.24392842
Clone144204092022-03-20 1:48:491447 days ago1647740929IN
0xD5dA0F2b...8E7E39800
0 ETH0.0046913620.57121451
Clone143384112022-03-07 7:27:451460 days ago1646638065IN
0xD5dA0F2b...8E7E39800
0 ETH0.0064133928.10733281
Implementations ...143327272022-03-06 10:12:071461 days ago1646561527IN
0xD5dA0F2b...8E7E39800
0 ETH0.0010894517.58967778
Implementations ...143326992022-03-06 10:06:511461 days ago1646561211IN
0xD5dA0F2b...8E7E39800
0 ETH0.0014835518.69232192
Template Set143326962022-03-06 10:06:141461 days ago1646561174IN
0xD5dA0F2b...8E7E39800
0 ETH0.0011242619.7652129

Latest 12 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x3d602d80153697242022-08-19 6:14:441295 days ago1660889684
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
0x3d602d80153263442022-08-12 9:55:131302 days ago1660298113
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
0x3d602d80152955392022-08-07 13:59:101307 days ago1659880750
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
0x3d602d80152222252022-07-27 3:54:141318 days ago1658894054
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
0x3d602d80151283162022-07-12 14:21:481333 days ago1657635708
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
0x3d602d80150275172022-06-26 5:52:231349 days ago1656222743
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-150002412022-06-21 3:33:431354 days ago1655782423
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-149214582022-06-07 14:54:441368 days ago1654613684
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-149098902022-06-05 15:31:381370 days ago1654443098
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-144204092022-03-20 1:48:491447 days ago1647740929
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-143384112022-03-07 7:27:451460 days ago1646638065
0xD5dA0F2b...8E7E39800
 Contract Creation0 ETH
-143326912022-03-06 10:05:391461 days ago1646561139  Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFTsFactoryV2

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "../deployed/interfaces/IOpenNFTsV2.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./CloneFactoryV2.sol";
import "./interfaces/INFTsFactoryV2.sol";
import "./interfaces/IOpenNFTs.sol";
import "../erc/interfaces/IERC173.sol";

/// @title NFTsFactory smartcontract
/// @dev is CloneFactory
/// @notice Templates are OPEN_NFTS contracts
/// @notice Implementations are ERC721 contracts (including OPEN_NFTS clones)
/// @notice Factory can clone OPEN_NFTs templates to implementations
/// @notice Factory can also add ERC721 contracts to implementations
contract NFTsFactoryV2 is CloneFactoryV2, INFTsFactoryV2 {
    using ERC165Checker for address;

    uint8 internal constant _IERC721 = 0;
    uint8 internal constant _IERC721_METADATA = 1;
    uint8 internal constant _IERC721_ENUMERABLE = 2;
    uint8 internal constant _IERC173 = 3;
    uint8 internal constant _IOPEN_NFTS = 4;

    bytes4 internal constant _IERC721_SIG = bytes4(0x80ac58cd);
    bytes4 internal constant _IERC721_METADATA_SIG = bytes4(0x780e9d63);
    bytes4 internal constant _IERC721_ENUMERABLE_SIG = (0x780e9d63);
    bytes4 internal constant _IERC173_SIG = bytes4(0x7f5828d0);
    bytes4 internal constant _IOPEN_NFTS_SIG = type(IOpenNFTs).interfaceId;

    constructor(address initialOwner) {
        _transferOwnership(initialOwner);
    }

    /// @notice clone template
    /// @param name name of Clone collection
    /// @param symbol symbol of Clone collection
    /// @return clone_ Address of Clone collection
    function clone(
        string memory name,
        string memory symbol,
        string memory templateName,
        bool[] memory options
    ) external override(INFTsFactoryV2) returns (address clone_) {
        clone_ = _clone(templateName);
        IOpenNFTs(clone_).initialize(name, symbol, _msgSender(), options);
    }

    /// @notice balancesOf address for each implementations
    /// @param addr  address of account
    /// @return nftData Array of nftData balances
    function balancesOf(address addr) external view override(INFTsFactoryV2) returns (NftData[] memory nftData) {
        nftData = new NftData[](implementations.length);
        for (uint256 i = 0; i < implementations.length; i += 1) {
            nftData[i] = _balanceOf(implementations[i], addr);
        }
    }

    /// @notice Set Template, overrides generic CloneFactory
    /// @param templateName Name of the template
    /// @param template Address of the template
    function templateSet(string calldata templateName, address template) public override(CloneFactoryV2) onlyOwner {
        require(template.supportsInterface(_IOPEN_NFTS_SIG), "Not valid OpenNFTs Template");

        super.templateSet(templateName, template);
    }

    /// @notice New Implementation internal, overrides generic CloneFactory
    /// @param  implementation : implementation address
    function _implementationNew(address implementation) internal override(CloneFactoryV2) {
        require(implementation.supportsInterface(_IERC721_SIG), "Not ERC721");

        super._implementationNew(implementation);
    }

    /// @notice _balanceOf
    /// @param nft nft address of NFT collection
    /// @param owner address of account
    /// @return nftData nftData balances
    function _balanceOf(address nft, address owner) internal view returns (NftData memory nftData) {
        bytes4[] memory iface = new bytes4[](5);
        iface[_IERC721] = _IERC721_SIG;
        iface[_IERC721_METADATA] = _IERC721_METADATA_SIG;
        iface[_IERC721_ENUMERABLE] = _IERC721_ENUMERABLE_SIG;
        iface[_IERC173] = _IERC173_SIG;

        bool[] memory supportInterface = nft.getSupportedInterfaces(iface);

        if (supportInterface[_IERC721]) {
            nftData.nft = nft;
            nftData.balanceOf = IERC721(nft).balanceOf(owner);

            if (supportInterface[_IERC721_METADATA]) {
                nftData.name = IERC721Metadata(nft).name();
                nftData.symbol = IERC721Metadata(nft).symbol();
            }

            if (supportInterface[_IERC721_ENUMERABLE]) {
                nftData.totalSupply = IERC721Enumerable(nft).totalSupply();
            }

            if (supportInterface[_IERC173]) {
                nftData.owner = IERC173(nft).owner();
            }
        }
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 3 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
        if (result.length < 32) return false;
        return success && abi.decode(result, (bool));
    }
}

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

pragma solidity ^0.8.0;

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

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

interface IOpenNFTsV2 {
    function transferOwnership(address newOwner) external;

    function initialize(string memory name, string memory symbol) external;

    function mintNFT(address minter, string memory jsonURI) external returns (uint256 tokenID);

    function owner() external view returns (address owner);
}

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

/// @title ERC-173 Contract Ownership Standard
///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
/* is ERC165 */
interface IERC173 {
    /// @dev This emits when ownership of a contract changes.
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice Set the address of the new owner of the contract
    /// @dev Set newOwner to address(0) to renounce any ownership.
    /// @param newOwner The address of the new owner of the contract
    function transferOwnership(address newOwner) external;

    /// @notice Get the address of the owner
    /// @return currentOwner The address of the owner.
    function owner() external view returns (address currentOwner);
}

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./interfaces/ICloneFactoryV2.sol";

/// @title Abstract Clone Factory V2
/// @notice Generic Clone Factory to clone Templates
/// @dev CloneFactory is ICloneFactory and Ownable
abstract contract CloneFactoryV2 is ICloneFactoryV2, Ownable {
    /// @notice Implementations addresses
    address[] public implementations;

    /// @notice Named Templates
    mapping(string => address) public templates;

    /// @notice Add Implementations, public onlyOwner
    /// @param  implementationsToAdd : new implementations addresses
    function implementationsAdd(address[] calldata implementationsToAdd) external override(ICloneFactoryV2) onlyOwner {
        for (uint256 i = 0; i < implementationsToAdd.length; i += 1) {
            _implementationNew(implementationsToAdd[i]);
        }
    }

    /// @notice Implementations count
    /// @return count : number of implementations
    function implementationsCount() external view override(ICloneFactoryV2) returns (uint256) {
        return implementations.length;
    }

    /// @notice Set Template by Name
    /// @param templateName Name of the template
    /// @param template Address of the template
    function templateSet(string calldata templateName, address template)
        public
        virtual
        override(ICloneFactoryV2)
        onlyOwner
    {
        templates[templateName] = template;

        /// @notice emit event ImplementationNew
        emit TemplateSet(templateName, template);
    }

    /// @notice New Implementation
    /// @param  implementation : implementation address
    function _implementationNew(address implementation) internal virtual {
        implementations.push(implementation);

        emit ImplementationNew(implementation, _msgSender(), implementations.length - 1);
    }

    /// @notice Clone Template
    /// @param  templateName : template name
    /// @return clone_ : clone address
    function _clone(string memory templateName) internal returns (address clone_) {
        /// @notice clone template and get clone address
        clone_ = Clones.clone(_template(templateName));

        /// @notice register clone as new implementation
        _implementationNew(clone_);
    }

    /// @notice Get Template
    /// @param  templateName : template name
    /// @return  template : template address
    function _template(string memory templateName) internal view virtual returns (address template) {
        require(templates[templateName] != address(0), "Bad Template");

        template = templates[templateName];
    }
}

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

interface ICloneFactoryV2 {
    /// @notice New Implementation Event
    /// @param implementation Address of the implementation
    /// @param creator Address of the creator
    /// @return index Index inside implementations array (starts at 0)
    event ImplementationNew(address indexed implementation, address indexed creator, uint256 index);

    /// @notice Set Template Event
    /// @param templateName Name of the template
    /// @param template Address of the template
    event TemplateSet(string indexed templateName, address indexed template);

    /// @notice Set Template
    /// @param templateName Name of the template
    /// @param template Address of the template
    function templateSet(string calldata templateName, address template) external;

    /// @notice Add Implementation
    /// @param implementationToAdd Addresses of implementations to add
    function implementationsAdd(address[] calldata implementationToAdd) external;

    /// @notice Get Template
    /// @param templateName Name of the template
    /// @param template Address of the template
    function templates(string calldata templateName) external view returns (address template);

    /// @notice Count Implementations
    /// @return count Number of implementations
    function implementationsCount() external view returns (uint256 count);

    /// @notice Get Implementation from Implementations array
    /// @param index Index of implementation
    /// @return implementation Address of implementation
    function implementations(uint256 index) external view returns (address implementation);
}

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

interface INFTsFactoryV2 {
    struct NftData {
        address nft;
        uint256 balanceOf;
        address owner;
        string name;
        string symbol;
        uint256 totalSupply;
    }

    function clone(
        string memory name,
        string memory symbol,
        string memory templateName,
        bool[] memory options
    ) external returns (address);

    function balancesOf(address owner) external view returns (NftData[] memory);
}

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

interface IOpenNFTs {
    function initialize(
        string memory name,
        string memory symbol,
        address owner,
        bool[] memory options
    ) external;

    function mintOpenNFT(address minter, string memory jsonURI) external returns (uint256 tokenID);

    function burnOpenNFT(uint256 tokenID) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"ImplementationNew","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":"string","name":"templateName","type":"string"},{"indexed":true,"internalType":"address","name":"template","type":"address"}],"name":"TemplateSet","type":"event"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"balancesOf","outputs":[{"components":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"balanceOf","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"internalType":"struct INFTsFactoryV2.NftData[]","name":"nftData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"templateName","type":"string"},{"internalType":"bool[]","name":"options","type":"bool[]"}],"name":"clone","outputs":[{"internalType":"address","name":"clone_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"implementations","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"implementationsToAdd","type":"address[]"}],"name":"implementationsAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementationsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"templateName","type":"string"},{"internalType":"address","name":"template","type":"address"}],"name":"templateSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"templates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051620016673803806200166783398101604081905261003191610099565b61003a33610049565b61004381610049565b506100c9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ab57600080fd5b81516001600160a01b03811681146100c257600080fd5b9392505050565b61158e80620000d96000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b14610123578063b22beeda14610134578063ba6da05014610168578063c17bae4f1461017b578063f2fde38b1461018c57600080fd5b80631b6740dd146100a35780636392a51f146100d3578063715018a6146100f357806382a1db39146100fd578063845affc814610110575b600080fd5b6100b66100b1366004610f84565b61019f565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e66100e13660046110b4565b610219565b6040516100ca919061112d565b6100fb6102e6565b005b6100fb61010b3660046111ee565b610325565b6100b661011e366004611263565b6103a0565b6000546001600160a01b03166100b6565b6100b661014236600461127c565b80516020818301810180516002825292820191909301209152546001600160a01b031681565b6100fb6101763660046112b9565b6103ca565b6001546040519081526020016100ca565b6100fb61019a3660046110b4565b610464565b60006101aa836104ff565b604051630a9c216960e31b81529091506001600160a01b038216906354e10b48906101df90889088903390889060040161133c565b600060405180830381600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b50505050949350505050565b60015460609067ffffffffffffffff81111561023757610237610eb1565b60405190808252806020026020018201604052801561027057816020015b61025d610e69565b8152602001906001900390816102555790505b50905060005b6001548110156102e0576102b160018281548110610296576102966113b7565b6000918252602090912001546001600160a01b031684610522565b8282815181106102c3576102c36113b7565b60209081029190910101526102d96001826113e3565b9050610276565b50919050565b6000546001600160a01b031633146103195760405162461bcd60e51b8152600401610310906113fb565b60405180910390fd5b6103236000610942565b565b6000546001600160a01b0316331461034f5760405162461bcd60e51b8152600401610310906113fb565b60005b8181101561039b5761038983838381811061036f5761036f6113b7565b905060200201602081019061038491906110b4565b610992565b6103946001826113e3565b9050610352565b505050565b600181815481106103b057600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146103f45760405162461bcd60e51b8152600401610310906113fb565b61040d6001600160a01b03821662f7235960e21b6109ee565b6104595760405162461bcd60e51b815260206004820152601b60248201527f4e6f742076616c6964204f70656e4e4654732054656d706c61746500000000006044820152606401610310565b61039b838383610a13565b6000546001600160a01b0316331461048e5760405162461bcd60e51b8152600401610310906113fb565b6001600160a01b0381166104f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610310565b6104fc81610942565b50565b600061051261050d83610ac1565b610b62565b905061051d81610992565b919050565b61052a610e69565b60408051600580825260c082019092526000916020820160a080368337505081519192506380ac58cd60e01b91839150600090610569576105696113b7565b6001600160e01b031990921660209283029190910190910152805163780e9d6360e01b90829060019081106105a0576105a06113b7565b6001600160e01b031990921660209283029190910190910152805163780e9d6360e01b90829060029081106105d7576105d76113b7565b6001600160e01b03199092166020928302919091019091015280516307f5828d60e41b908290600390811061060e5761060e6113b7565b6001600160e01b031990921660209283029190910190910152600061063c6001600160a01b03861683610bfa565b905080600060ff1681518110610654576106546113b7565b60200260200101511561093a576001600160a01b038581168085526040516370a0823160e01b81529186166004830152906370a082319060240160206040518083038186803b1580156106a657600080fd5b505afa1580156106ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106de9190611430565b60208401528051819060019081106106f8576106f86113b7565b6020026020010151156107fd57846001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561073e57600080fd5b505afa158015610752573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261077a9190810190611449565b8360600181905250846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107f79190810190611449565b60808401525b80600260ff1681518110610813576108136113b7565b60200260200101511561089757846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561085957600080fd5b505afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190611430565b60a08401525b80600360ff16815181106108ad576108ad6113b7565b60200260200101511561093a57846001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b91906114c0565b6001600160a01b031660408401525b505092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109ac6001600160a01b0382166380ac58cd60e01b6109ee565b6109e55760405162461bcd60e51b815260206004820152600a6024820152694e6f742045524337323160b01b6044820152606401610310565b6104fc81610cbd565b60006109f983610d4d565b8015610a0a5750610a0a8383610d80565b90505b92915050565b6000546001600160a01b03163314610a3d5760405162461bcd60e51b8152600401610310906113fb565b8060028484604051610a509291906114dd565b90815260405190819003602001812080546001600160a01b039384166001600160a01b031990911617905590821690610a8c90859085906114dd565b604051908190038120907f2e5d1f3ab97987d0ad3ab02a382994c388a94ba99ecd499e395c29e20775ab6690600090a3505050565b6000806001600160a01b0316600283604051610add91906114ed565b908152604051908190036020019020546001600160a01b03161415610b335760405162461bcd60e51b815260206004820152600c60248201526b4261642054656d706c61746560a01b6044820152606401610310565b600282604051610b4391906114ed565b908152604051908190036020019020546001600160a01b031692915050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661051d5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610310565b60606000825167ffffffffffffffff811115610c1857610c18610eb1565b604051908082528060200260200182016040528015610c41578160200160208202803683370190505b509050610c4d84610d4d565b15610a0a5760005b8351811015610cb557610c8185858381518110610c7457610c746113b7565b6020026020010151610d80565b828281518110610c9357610c936113b7565b9115156020928302919091019091015280610cad81611509565b915050610c55565b509392505050565b60018054808201825560008290527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b038416908117909155815433927fe1fd48e37080a338bebd722213e17521b8a454ab4f0ef1b1a487025d5191e7a191610d399190611524565b60405190815260200160405180910390a350565b6000610d60826301ffc9a760e01b610d80565b8015610a0d5750610d79826001600160e01b0319610d80565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090610de79086906114ed565b6000604051808303818686fa925050503d8060008114610e23576040519150601f19603f3d011682016040523d82523d6000602084013e610e28565b606091505b5091509150602081511015610e435760009350505050610a0d565b818015610e5f575080806020019051810190610e5f919061153b565b9695505050505050565b6040518060c0016040528060006001600160a01b031681526020016000815260200160006001600160a01b031681526020016060815260200160608152602001600081525090565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ef057610ef0610eb1565b604052919050565b600067ffffffffffffffff821115610f1257610f12610eb1565b50601f01601f191660200190565b600082601f830112610f3157600080fd5b8135610f44610f3f82610ef8565b610ec7565b818152846020838601011115610f5957600080fd5b816020850160208301376000918101602001919091529392505050565b80151581146104fc57600080fd5b60008060008060808587031215610f9a57600080fd5b843567ffffffffffffffff80821115610fb257600080fd5b610fbe88838901610f20565b9550602091508187013581811115610fd557600080fd5b610fe189828a01610f20565b955050604087013581811115610ff657600080fd5b61100289828a01610f20565b94505060608701358181111561101757600080fd5b8701601f8101891361102857600080fd5b80358281111561103a5761103a610eb1565b8060051b925061104b848401610ec7565b818152928201840192848101908b85111561106557600080fd5b928501925b8484101561108f578335925061107f83610f76565b828252928501929085019061106a565b989b979a50959850505050505050565b6001600160a01b03811681146104fc57600080fd5b6000602082840312156110c657600080fd5b8135610a0a8161109f565b60005b838110156110ec5781810151838201526020016110d4565b838111156110fb576000848401525b50505050565b600081518084526111198160208601602086016110d1565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156111e057888303603f19018552815180516001600160a01b039081168552888201518986015287820151168785015260608082015160c082870181905291906111a383880182611101565b92505050608080830151868303828801526111be8382611101565b60a0948501519790940196909652505094870194925090860190600101611154565b509098975050505050505050565b6000806020838503121561120157600080fd5b823567ffffffffffffffff8082111561121957600080fd5b818501915085601f83011261122d57600080fd5b81358181111561123c57600080fd5b8660208260051b850101111561125157600080fd5b60209290920196919550909350505050565b60006020828403121561127557600080fd5b5035919050565b60006020828403121561128e57600080fd5b813567ffffffffffffffff8111156112a557600080fd5b6112b184828501610f20565b949350505050565b6000806000604084860312156112ce57600080fd5b833567ffffffffffffffff808211156112e657600080fd5b818601915086601f8301126112fa57600080fd5b81358181111561130957600080fd5b87602082850101111561131b57600080fd5b602092830195509350508401356113318161109f565b809150509250925092565b60808152600061134f6080830187611101565b6020838203818501526113628288611101565b6001600160a01b03871660408601528481036060860152855180825282870193509082019060005b818110156113a857845115158352938301939183019160010161138a565b50909998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156113f6576113f66113cd565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561144257600080fd5b5051919050565b60006020828403121561145b57600080fd5b815167ffffffffffffffff81111561147257600080fd5b8201601f8101841361148357600080fd5b8051611491610f3f82610ef8565b8181528560208385010111156114a657600080fd5b6114b78260208301602086016110d1565b95945050505050565b6000602082840312156114d257600080fd5b8151610a0a8161109f565b8183823760009101908152919050565b600082516114ff8184602087016110d1565b9190910192915050565b600060001982141561151d5761151d6113cd565b5060010190565b600082821015611536576115366113cd565b500390565b60006020828403121561154d57600080fd5b8151610a0a81610f7656fea26469706673582212203177af4428a9f8f29faea101f2791580af12925906c409befef7d0193c3fe0c164736f6c634300080900330000000000000000000000006eebae27d69fa80f0e4c0e973a2fed218a56880c

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b14610123578063b22beeda14610134578063ba6da05014610168578063c17bae4f1461017b578063f2fde38b1461018c57600080fd5b80631b6740dd146100a35780636392a51f146100d3578063715018a6146100f357806382a1db39146100fd578063845affc814610110575b600080fd5b6100b66100b1366004610f84565b61019f565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e66100e13660046110b4565b610219565b6040516100ca919061112d565b6100fb6102e6565b005b6100fb61010b3660046111ee565b610325565b6100b661011e366004611263565b6103a0565b6000546001600160a01b03166100b6565b6100b661014236600461127c565b80516020818301810180516002825292820191909301209152546001600160a01b031681565b6100fb6101763660046112b9565b6103ca565b6001546040519081526020016100ca565b6100fb61019a3660046110b4565b610464565b60006101aa836104ff565b604051630a9c216960e31b81529091506001600160a01b038216906354e10b48906101df90889088903390889060040161133c565b600060405180830381600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b50505050949350505050565b60015460609067ffffffffffffffff81111561023757610237610eb1565b60405190808252806020026020018201604052801561027057816020015b61025d610e69565b8152602001906001900390816102555790505b50905060005b6001548110156102e0576102b160018281548110610296576102966113b7565b6000918252602090912001546001600160a01b031684610522565b8282815181106102c3576102c36113b7565b60209081029190910101526102d96001826113e3565b9050610276565b50919050565b6000546001600160a01b031633146103195760405162461bcd60e51b8152600401610310906113fb565b60405180910390fd5b6103236000610942565b565b6000546001600160a01b0316331461034f5760405162461bcd60e51b8152600401610310906113fb565b60005b8181101561039b5761038983838381811061036f5761036f6113b7565b905060200201602081019061038491906110b4565b610992565b6103946001826113e3565b9050610352565b505050565b600181815481106103b057600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146103f45760405162461bcd60e51b8152600401610310906113fb565b61040d6001600160a01b03821662f7235960e21b6109ee565b6104595760405162461bcd60e51b815260206004820152601b60248201527f4e6f742076616c6964204f70656e4e4654732054656d706c61746500000000006044820152606401610310565b61039b838383610a13565b6000546001600160a01b0316331461048e5760405162461bcd60e51b8152600401610310906113fb565b6001600160a01b0381166104f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610310565b6104fc81610942565b50565b600061051261050d83610ac1565b610b62565b905061051d81610992565b919050565b61052a610e69565b60408051600580825260c082019092526000916020820160a080368337505081519192506380ac58cd60e01b91839150600090610569576105696113b7565b6001600160e01b031990921660209283029190910190910152805163780e9d6360e01b90829060019081106105a0576105a06113b7565b6001600160e01b031990921660209283029190910190910152805163780e9d6360e01b90829060029081106105d7576105d76113b7565b6001600160e01b03199092166020928302919091019091015280516307f5828d60e41b908290600390811061060e5761060e6113b7565b6001600160e01b031990921660209283029190910190910152600061063c6001600160a01b03861683610bfa565b905080600060ff1681518110610654576106546113b7565b60200260200101511561093a576001600160a01b038581168085526040516370a0823160e01b81529186166004830152906370a082319060240160206040518083038186803b1580156106a657600080fd5b505afa1580156106ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106de9190611430565b60208401528051819060019081106106f8576106f86113b7565b6020026020010151156107fd57846001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561073e57600080fd5b505afa158015610752573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261077a9190810190611449565b8360600181905250846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107f79190810190611449565b60808401525b80600260ff1681518110610813576108136113b7565b60200260200101511561089757846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561085957600080fd5b505afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190611430565b60a08401525b80600360ff16815181106108ad576108ad6113b7565b60200260200101511561093a57846001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b91906114c0565b6001600160a01b031660408401525b505092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109ac6001600160a01b0382166380ac58cd60e01b6109ee565b6109e55760405162461bcd60e51b815260206004820152600a6024820152694e6f742045524337323160b01b6044820152606401610310565b6104fc81610cbd565b60006109f983610d4d565b8015610a0a5750610a0a8383610d80565b90505b92915050565b6000546001600160a01b03163314610a3d5760405162461bcd60e51b8152600401610310906113fb565b8060028484604051610a509291906114dd565b90815260405190819003602001812080546001600160a01b039384166001600160a01b031990911617905590821690610a8c90859085906114dd565b604051908190038120907f2e5d1f3ab97987d0ad3ab02a382994c388a94ba99ecd499e395c29e20775ab6690600090a3505050565b6000806001600160a01b0316600283604051610add91906114ed565b908152604051908190036020019020546001600160a01b03161415610b335760405162461bcd60e51b815260206004820152600c60248201526b4261642054656d706c61746560a01b6044820152606401610310565b600282604051610b4391906114ed565b908152604051908190036020019020546001600160a01b031692915050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b03811661051d5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610310565b60606000825167ffffffffffffffff811115610c1857610c18610eb1565b604051908082528060200260200182016040528015610c41578160200160208202803683370190505b509050610c4d84610d4d565b15610a0a5760005b8351811015610cb557610c8185858381518110610c7457610c746113b7565b6020026020010151610d80565b828281518110610c9357610c936113b7565b9115156020928302919091019091015280610cad81611509565b915050610c55565b509392505050565b60018054808201825560008290527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b038416908117909155815433927fe1fd48e37080a338bebd722213e17521b8a454ab4f0ef1b1a487025d5191e7a191610d399190611524565b60405190815260200160405180910390a350565b6000610d60826301ffc9a760e01b610d80565b8015610a0d5750610d79826001600160e01b0319610d80565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090610de79086906114ed565b6000604051808303818686fa925050503d8060008114610e23576040519150601f19603f3d011682016040523d82523d6000602084013e610e28565b606091505b5091509150602081511015610e435760009350505050610a0d565b818015610e5f575080806020019051810190610e5f919061153b565b9695505050505050565b6040518060c0016040528060006001600160a01b031681526020016000815260200160006001600160a01b031681526020016060815260200160608152602001600081525090565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ef057610ef0610eb1565b604052919050565b600067ffffffffffffffff821115610f1257610f12610eb1565b50601f01601f191660200190565b600082601f830112610f3157600080fd5b8135610f44610f3f82610ef8565b610ec7565b818152846020838601011115610f5957600080fd5b816020850160208301376000918101602001919091529392505050565b80151581146104fc57600080fd5b60008060008060808587031215610f9a57600080fd5b843567ffffffffffffffff80821115610fb257600080fd5b610fbe88838901610f20565b9550602091508187013581811115610fd557600080fd5b610fe189828a01610f20565b955050604087013581811115610ff657600080fd5b61100289828a01610f20565b94505060608701358181111561101757600080fd5b8701601f8101891361102857600080fd5b80358281111561103a5761103a610eb1565b8060051b925061104b848401610ec7565b818152928201840192848101908b85111561106557600080fd5b928501925b8484101561108f578335925061107f83610f76565b828252928501929085019061106a565b989b979a50959850505050505050565b6001600160a01b03811681146104fc57600080fd5b6000602082840312156110c657600080fd5b8135610a0a8161109f565b60005b838110156110ec5781810151838201526020016110d4565b838111156110fb576000848401525b50505050565b600081518084526111198160208601602086016110d1565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156111e057888303603f19018552815180516001600160a01b039081168552888201518986015287820151168785015260608082015160c082870181905291906111a383880182611101565b92505050608080830151868303828801526111be8382611101565b60a0948501519790940196909652505094870194925090860190600101611154565b509098975050505050505050565b6000806020838503121561120157600080fd5b823567ffffffffffffffff8082111561121957600080fd5b818501915085601f83011261122d57600080fd5b81358181111561123c57600080fd5b8660208260051b850101111561125157600080fd5b60209290920196919550909350505050565b60006020828403121561127557600080fd5b5035919050565b60006020828403121561128e57600080fd5b813567ffffffffffffffff8111156112a557600080fd5b6112b184828501610f20565b949350505050565b6000806000604084860312156112ce57600080fd5b833567ffffffffffffffff808211156112e657600080fd5b818601915086601f8301126112fa57600080fd5b81358181111561130957600080fd5b87602082850101111561131b57600080fd5b602092830195509350508401356113318161109f565b809150509250925092565b60808152600061134f6080830187611101565b6020838203818501526113628288611101565b6001600160a01b03871660408601528481036060860152855180825282870193509082019060005b818110156113a857845115158352938301939183019160010161138a565b50909998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156113f6576113f66113cd565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561144257600080fd5b5051919050565b60006020828403121561145b57600080fd5b815167ffffffffffffffff81111561147257600080fd5b8201601f8101841361148357600080fd5b8051611491610f3f82610ef8565b8181528560208385010111156114a657600080fd5b6114b78260208301602086016110d1565b95945050505050565b6000602082840312156114d257600080fd5b8151610a0a8161109f565b8183823760009101908152919050565b600082516114ff8184602087016110d1565b9190910192915050565b600060001982141561151d5761151d6113cd565b5060010190565b600082821015611536576115366113cd565b500390565b60006020828403121561154d57600080fd5b8151610a0a81610f7656fea26469706673582212203177af4428a9f8f29faea101f2791580af12925906c409befef7d0193c3fe0c164736f6c63430008090033

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

0000000000000000000000006eebae27d69fa80f0e4c0e973a2fed218a56880c

-----Decoded View---------------
Arg [0] : initialOwner (address): 0x6eebAe27d69fa80f0E4C0E973A2Fed218A56880c

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006eebae27d69fa80f0e4c0e973a2fed218a56880c


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.