ETH Price: $3,572.35 (-1.10%)

Contract

0x2435B188efe1b6733B1c96aD6a420DbEa92bFE6F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LiveArtMemberV3

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : LiveArtMemberV3.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./LiveArtMemberV2.sol";

//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.  %@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,  &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%     /@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,   #@@@@@@@@@@@@@@@@@@@@@@@@@@@@(       .@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,    /@@@@@@@@@@@@@@@@@@@@@@@@@@*          @@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,     ,@@@@@@@@@@@@@@@@@@@@@@@@.            &@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,       &@@@@@@@@@@@@@@@@@@@@&               (@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,        #@@@@@@@@@@@@@@@@@@(                 ,@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,         /@@@@@@@@@@@@@@@@.                    &@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,          ,@@@@@@@@@@@@@@                       %@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,            @@@@@@@@@@@@                         (@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,             #@@@@@@@@#                           *@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,              *@@@@@@*                              @@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,               .@@@@.                                %@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,                 @&                                   (@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//

contract LiveArtMemberV3 is LiveArtMemberV2 {
    address public membershipContractV2;

    /**
     * @dev Destroys `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */

    function burnMembership(uint256 tokenId) external nonReentrant {
        require(
            _exists(tokenId),
            "LiveArtMember: operator query for nonexistent token"
        );

        require(
            ownerOf(tokenId) == msg.sender ||
                msg.sender == membershipContractV2,
            "LiveArtMember: not owner or membershipContractV2"
        );

        _burn(tokenId);
    }

    /**
     * @dev sets membershipContractV2 address.
     *
     * Requirements:
     *
     * - `msg.sender` must be owner.
     *
     */
    function setMembershipContractV2(
        address _membershipContractV2
    ) external onlyOwner {
        membershipContractV2 = _membershipContractV2;
    }

    function getMembershipLevelById(
        uint256 tokenId
    ) external view returns (uint256) {
        Member storage membership = tokenExtend[tokenId];
        return membership.level;
    }
}

File 2 of 23 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

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

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

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

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

    /**
     * @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 23 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * 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 prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 4 of 23 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

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

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @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 5 of 23 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 23 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

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

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

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

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

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

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

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

        _owners[tokenId] = to;

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

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

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

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

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

        // Clear approvals
        delete _tokenApprovals[tokenId];

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

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

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

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

        emit Transfer(from, to, tokenId);

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

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

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

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }

    /**
     * @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[44] private __gap;
}

File 9 of 23 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {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.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal onlyInitializing {
    }

    function __ERC721Enumerable_init_unchained() internal onlyInitializing {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721Upgradeable.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }

    /**
     * @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[46] private __gap;
}

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

File 13 of 23 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 14 of 23 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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 functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 15 of 23 : ContextUpgradeable.sol
// 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;
}

File 16 of 23 : MerkleProofUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProofUpgradeable {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

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

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

pragma solidity ^0.8.0;

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

File 19 of 23 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 20 of 23 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 SafeMathUpgradeable {
    /**
     * @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 subtraction 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 21 of 23 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";

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

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

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

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

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

File 22 of 23 : LiveArtMember.sol
pragma solidity ^0.8.2;
// SPDX-License-Identifier: MIT

import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";

//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.  %@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,  &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%     /@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,   #@@@@@@@@@@@@@@@@@@@@@@@@@@@@(       .@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,    /@@@@@@@@@@@@@@@@@@@@@@@@@@*          @@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,     ,@@@@@@@@@@@@@@@@@@@@@@@@.            &@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,       &@@@@@@@@@@@@@@@@@@@@&               (@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,        #@@@@@@@@@@@@@@@@@@(                 ,@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,         /@@@@@@@@@@@@@@@@.                    &@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,          ,@@@@@@@@@@@@@@                       %@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,            @@@@@@@@@@@@                         (@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,             #@@@@@@@@#                           *@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,              *@@@@@@*                              @@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,               .@@@@.                                %@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,                 @&                                   (@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//

contract LiveArtMember is OwnableUpgradeable, ERC721EnumerableUpgradeable, ReentrancyGuardUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;
    using SafeMathUpgradeable for uint256;
    using StringsUpgradeable for uint256;

    bool internal tempRecursion;

    // Base URI
    string internal baseURI;

    struct Member {
        uint256 id;
        uint256 level;
        uint256 createdTime;
        uint256 lockTime;
        uint256 amount;
        bool decompose;
    }
    uint256 public unLockTimestamp;

    mapping(uint256 => Member) public tokenExtend;
    
    bytes32 public merkleRoot;
    
    // This is a packed array of booleans.
    mapping(uint256 => uint256) internal claimedBitMap;

    // claim start time
    uint256 public claimStartTime;

    // claim count
    mapping(uint256 => uint256) public claimCount;
    
    // total number of members
    uint256 public memberID;

    uint256[] public whitelistAmount;
    uint256[] public whitelistValue;
    uint256[] public levelProbability;
    
    uint256[] public retainMemberValue;

    IERC20Upgradeable public artToken;

    // sell start time
    uint256 public sellStartTime;

    // sell count
    mapping(uint256 => uint256) public soldCount;
    
    // self bought
    mapping(address => mapping(uint256 => bool)) public userBought;

    uint256[] public sellMemberAmount;
    uint256[] public sellMemberValue;
    uint256[] public sellMemberPrice;

    event ReceiveMember(
        address indexed owner, 
        uint256 indexed tokenId, 
        uint256 indexed level,
        uint256 lockTime,
        uint256 amount
    );

    event DecomposeMember(
        address indexed owner, 
        uint256 indexed tokenId,
        uint256 receiveAmount,
        bool retain
    );

    event eveWhitelistData(uint256 indexed startTime);
    event eveUnLockTimestamp(uint256 indexed timestamp);
    event eveSellData(uint256 indexed startTime);
    event eveSetMerkleRoot(bytes32 indexed merkleRoot);
    event eveARTToken(address indexed art);
    event eveWithdraw(uint256 indexed amount, address indexed addr);
    event eveSeize(address indexed token, address indexed addr, uint256 indexed amount);
    event eveURIPrefix(string indexed baseURI);

    // --- Init ---
      function initialize(
        
        bytes32 merkleRoot_,

        IERC20Upgradeable _artToken,

        uint256 _claimStartTime,
        
        uint256 _unLockTimestamp,

        uint256[] calldata _whitelistAmount,
        uint256[] calldata _whitelistValue,
        uint256[] calldata _levelProbability,
        uint256[] calldata _retainMemberValue
        ) external initializer {
          __Ownable_init();
          __ERC721_init("LiveArt.Memberships", "LIVEART.MEMBERSHIPS");
          __ReentrancyGuard_init();
        
        merkleRoot = merkleRoot_;

        artToken = _artToken;

        claimStartTime = _claimStartTime;
        unLockTimestamp = _unLockTimestamp;

        whitelistAmount = _whitelistAmount;
        whitelistValue = _whitelistValue;
        levelProbability = _levelProbability;
        retainMemberValue = _retainMemberValue;

        baseURI = "https://api.liveartx.com/v1/magic-box/";

        emit eveUnLockTimestamp(_unLockTimestamp);
    }

    function isClaimed(uint256 index) public view returns (bool) {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        uint256 claimedWord = claimedBitMap[claimedWordIndex];
        uint256 mask = (1 << claimedBitIndex);
        return claimedWord & mask == mask;
    }

    function _setClaimed(uint256 index) internal {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex);
    }

    function claim(
        uint256 index,
        uint256 amount,
        bytes32[] calldata merkleProof
    ) public nonReentrant virtual returns (uint256) {
        require(!AddressUpgradeable.isContract(msg.sender), "LiveArtMember: can't call");
        require(block.timestamp >= claimStartTime, "LiveArtMember: not start");
        // Verify the merkle proof. whitelists
        address account = msg.sender;
        bytes32 node = keccak256(abi.encodePacked(index, account, amount));
        require(MerkleProofUpgradeable.verify(merkleProof, merkleRoot, node), 'LiveArtMember: not whitelist');

        require(!isClaimed(index), 'LiveArtMember: already claimed.');

        memberID++;
        
        _mint(account, memberID);
    
        _setClaimed(index);

        uint256 lockTime = getLockTime();
        
        // level
        uint256 seed = computerSeed();
        uint256 _base = 1000;
        uint256 levelRandom = seed%_base;
        uint256 level = getLevel(levelRandom);
        
        claimCount[level]++;

        Member memory member;
        member.id = memberID;
        member.level = level;
        member.createdTime =  block.timestamp;
        member.lockTime = lockTime;
        member.amount = whitelistValue[level - 1];
        member.decompose = false;

        tokenExtend[memberID] = member;

        emit ReceiveMember(account, memberID, level, lockTime, member.amount);

        return memberID;
    }

    function buy(uint256 _level) external nonReentrant payable returns (uint256){
        require(!AddressUpgradeable.isContract(msg.sender), "LiveArtMember: can't call");
        require(_level > 0 && _level < 7, "LiveArtMember: level error");
        uint256 index = _level.sub(1);
        uint256 price = sellMemberPrice[index];
        address addr = msg.sender;
        require(block.timestamp >= sellStartTime, "LiveArtMember: not start");
        require(soldCount[index] < sellMemberAmount[index], "LiveArtMember: sold out");
        require(msg.value == price, "LiveArtMember: value error");
        require(userBought[addr][index] == false, "LiveArtMember: have bought");
        
        soldCount[index]++;
        userBought[addr][index] = true;

        memberID++;
        
        _mint(addr, memberID);

        uint256 lockTime = getLockTime();
        Member memory member;
        member.id = memberID;
        member.level = _level;
        member.createdTime = block.timestamp;
        member.lockTime = lockTime;
        member.amount = sellMemberValue[index];
        member.decompose = false;

        tokenExtend[memberID] = member;

        emit ReceiveMember(addr, memberID, _level, lockTime, member.amount);
        return memberID;
    }
    
    // _retain: 
    //  true => Retain membership
    //  false => burn
    function decomposeMember(uint256 tokenId, bool _retain) external nonReentrant {
        require(_exists(tokenId), "LiveArtMember: operator query for nonexistent token");
        Member storage member = tokenExtend[tokenId];
        uint256 lockTime = member.lockTime;
        require(block.timestamp >= lockTime.add(unLockTimestamp), "LiveArtMember: Lock");
        require(!member.decompose, "LiveArtMember: has decompose");

        uint256 amount_ = member.amount;
        require(ownerOf(tokenId) == msg.sender, "LiveArtMember: not owner");

        if (_retain) {
            uint256 retainValue = retainMemberValue[member.level-1];    
            member.amount = retainValue;
            member.decompose = true;
            amount_ = amount_.sub(retainValue);

        } else {
            _burn(tokenId);
        }
        artToken.safeTransfer(msg.sender, amount_);

        emit DecomposeMember(
            msg.sender, 
            tokenId,
            amount_,
            _retain
        );
    }

    function getLockTime() internal view returns (uint256){
        // random
        uint256 seed = computerSeed();
        uint256 _yearTime = 365;
        uint256 lockDays = seed%_yearTime; 
        uint256 lockTime = lockDays.mul(1 days).add(1 days);

        return lockTime;
    }

    function getLevel(uint256 v) internal returns (uint256){
        
        uint256 level = 1;
        for (uint256 index = 0; index < levelProbability.length; index++) {
            if (v <= levelProbability[index]) {
                level = index + 1;
                break;
            }
        }
        tempRecursion = false;
        return getCurrentLevel(level);
    }
    
    function getCurrentLevel(uint256 level) internal returns (uint256) {
        require(level > 0, "LiveArtMember: level over");
        require(level < 7, "LiveArtMember: have over");
        uint256 currentLevel = level;
        uint256 claimCount_ = claimCount[currentLevel];
        uint256 amount_ = whitelistAmount[currentLevel-1];
        if (claimCount_ < amount_) {
            return currentLevel;
        } else {
            if (currentLevel > 1 && tempRecursion == false) {
                currentLevel--;
            } else {
                tempRecursion = true;
                currentLevel++;
            }
            return getCurrentLevel(currentLevel);
        }
    }

    function computerSeed() internal view returns (uint256) {
        uint256 seed = uint256(keccak256(abi.encodePacked(
            (block.timestamp) +
            (block.difficulty) +
            ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (block.timestamp)) +
            (block.gaslimit)+
            ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (block.timestamp)) +
            (block.number)
            
        )));
        return seed;
    }

    function setWhitelistData(
        uint256 _claimStartTime,
        uint256[] calldata _whitelistAmount,
        uint256[] calldata _whitelistValue,  
        uint256[] calldata _levelProbability                       
    ) external onlyOwner {
        
        claimStartTime = _claimStartTime;
        whitelistAmount = _whitelistAmount;
        whitelistValue = _whitelistValue;
        levelProbability = _levelProbability;
        emit eveWhitelistData(_claimStartTime);
    }

    function setUnLockTimestamp(
        uint256 _unLockTimestamp
    ) external onlyOwner {
        unLockTimestamp = _unLockTimestamp;

        emit eveUnLockTimestamp(_unLockTimestamp);
    }

    function setSellData(
        uint256 _sellStartTime,
        uint256[] calldata _sellMemberAmount,
        uint256[] calldata _sellMemberValue,
        uint256[] calldata _sellMemberPrice
    ) external onlyOwner {
        sellStartTime = _sellStartTime;
        sellMemberAmount = _sellMemberAmount;
        sellMemberValue = _sellMemberValue;
        sellMemberPrice = _sellMemberPrice;

        emit eveSellData(_sellStartTime);
    }
    
    function setRetainValue(
        uint256[] calldata _retainMemberValue
    ) external onlyOwner {
        retainMemberValue = _retainMemberValue;
    }

    function setWhitelistMerkleRoot(bytes32 merkleRoot_) external onlyOwner {
        merkleRoot = merkleRoot_;
        emit eveSetMerkleRoot(merkleRoot_);
    }

    function setARTToken(IERC20Upgradeable _artToken) external onlyOwner {
        artToken = _artToken;

        emit eveARTToken(address(artToken));
    }
    
    function withdraw(uint256 amount, address payable addr) external onlyOwner {
        addr.transfer(amount);

        emit eveWithdraw(amount, addr);
    }

    function seize(IERC20Upgradeable token, address addr, uint256 amount) external onlyOwner {
        token.safeTransfer(addr, amount);
        emit eveSeize(address(token), addr, amount);
    }

    function setURIPrefix(string memory baseURI_) external onlyOwner {
        baseURI = baseURI_;
        emit eveURIPrefix(baseURI);
    }

    fallback() external {}
    
    receive() payable external {}
    
    function getMember(uint256 tokenId)
        external view
        returns (
            uint256 level,
            uint256 createdTime,
            uint256 lockTime,
            uint256 amount,
            bool decompose
        )
    {
        require(_exists(tokenId), "LiveArtMember: operator query for nonexistent token");
        Member memory member = tokenExtend[tokenId];
        require(member.id > 0, "LiveArtMember: nonexistent token");
        
        level = member.level;
        createdTime = member.createdTime;
        lockTime = member.lockTime;
        amount = member.amount;
        decompose = member.decompose;
    }

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

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

    /**
     * @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 override returns (string memory) {
        return baseURI;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "LiveArtMember: URI query for nonexistent token");
        string memory baseURI_ = _baseURI();
        
        return string(abi.encodePacked(baseURI_, tokenId.toString()));
    }
}

File 23 of 23 : LiveArtMemberV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./LiveArtMember.sol";

//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.  %@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,  &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%     /@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,   #@@@@@@@@@@@@@@@@@@@@@@@@@@@@(       .@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,    /@@@@@@@@@@@@@@@@@@@@@@@@@@*          @@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,     ,@@@@@@@@@@@@@@@@@@@@@@@@.            &@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,       &@@@@@@@@@@@@@@@@@@@@&               (@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,        #@@@@@@@@@@@@@@@@@@(                 ,@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,         /@@@@@@@@@@@@@@@@.                    &@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,          ,@@@@@@@@@@@@@@                       %@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,            @@@@@@@@@@@@                         (@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,             #@@@@@@@@#                           *@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,              *@@@@@@*                              @@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,               .@@@@.                                %@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@,                 @&                                   (@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\//                                                                                        //|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//
//|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\//

contract LiveArtMemberV2 is LiveArtMember {
    uint256 public claimEndDate;

    event SetClaimEndDate(uint256 indexed timestamp);

    function setEndDateTimestamp(uint256 _claimEndDate) external onlyOwner {
        claimEndDate = _claimEndDate;

        emit SetClaimEndDate(_claimEndDate);
    }

    function claim(
        uint256 index,
        uint256 amount,
        bytes32[] calldata merkleProof
    ) public override returns (uint256) {
        require(block.timestamp <= claimEndDate, "LiveArtMember: end");

        return super.claim(index, amount, merkleProof);
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"receiveAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"retain","type":"bool"}],"name":"DecomposeMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SetClaimEndDate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"art","type":"address"}],"name":"eveARTToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"eveSeize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"eveSellData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"eveSetMerkleRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"baseURI","type":"string"}],"name":"eveURIPrefix","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"eveUnLockTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"eveWhitelistData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"eveWithdraw","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_level","type":"uint256"}],"name":"buy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimEndDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"_retain","type":"bool"}],"name":"decomposeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMember","outputs":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"createdTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"decompose","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMembershipLevelById","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"contract IERC20Upgradeable","name":"_artToken","type":"address"},{"internalType":"uint256","name":"_claimStartTime","type":"uint256"},{"internalType":"uint256","name":"_unLockTimestamp","type":"uint256"},{"internalType":"uint256[]","name":"_whitelistAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_whitelistValue","type":"uint256[]"},{"internalType":"uint256[]","name":"_levelProbability","type":"uint256[]"},{"internalType":"uint256[]","name":"_retainMemberValue","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelProbability","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"membershipContractV2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"retainMemberValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sellMemberAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sellMemberPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sellMemberValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_artToken","type":"address"}],"name":"setARTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimEndDate","type":"uint256"}],"name":"setEndDateTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_membershipContractV2","type":"address"}],"name":"setMembershipContractV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_retainMemberValue","type":"uint256[]"}],"name":"setRetainValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sellStartTime","type":"uint256"},{"internalType":"uint256[]","name":"_sellMemberAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_sellMemberValue","type":"uint256[]"},{"internalType":"uint256[]","name":"_sellMemberPrice","type":"uint256[]"}],"name":"setSellData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_unLockTimestamp","type":"uint256"}],"name":"setUnLockTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimStartTime","type":"uint256"},{"internalType":"uint256[]","name":"_whitelistAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_whitelistValue","type":"uint256[]"},{"internalType":"uint256[]","name":"_levelProbability","type":"uint256[]"}],"name":"setWhitelistData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"soldCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenExtend","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"createdTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"decompose","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","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":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unLockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userBought","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"addr","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5061441b806100206000396000f3fe6080604052600436106103795760003560e01c80638da5cb5b116101d1578063bae1562a11610102578063cc70d866116100a0578063e82f71e21161006f578063e82f71e214610afd578063e985e9c514610b1d578063ed812a4514610b66578063f2fde38b14610ba257610380565b8063cc70d86614610a79578063d361bcca14610aaa578063d96a094a14610aca578063e596175414610add57610380565b8063c0fc3712116100dc578063c0fc371214610a02578063c87b56dd14610a22578063cb60f8b414610a42578063cc69a78a14610a5957610380565b8063bae1562a146109a1578063bd32fb66146109c1578063bd4cc0f5146109e157610380565b8063aa746f671161016f578063ae0b51df11610149578063ae0b51df14610921578063ae0be21014610941578063b2a02ff114610961578063b88d4fde1461098157610380565b8063aa746f67146108a0578063ab3545e5146108b7578063acbc2fd51461090157610380565b806395d89b41116101ab57806395d89b41146108125780639e34070f14610849578063a22cb46514610869578063a6a11bb11461088957610380565b80638da5cb5b146107bd578063908af772146107db57806391e8fcd2146107fb57610380565b8063484b02fb116102ab5780635b3b3515116102495780636bff2c24116102235780636bff2c241461073a57806370a082311461075a578063715018a61461077a5780637639a76b1461078f57610380565b80635b3b3515146106da5780636352211e146106fa5780636b3a6cd31461071a57610380565b80634f6ccce7116102855780634f6ccce71461064b57806354d596751461066b5780635618a6e9146106995780635b03b324146106ba57610380565b8063484b02fb146105eb5780634bd619bb1461060b5780634e90fe6a1461062b57610380565b80631dd7c0a5116103185780632eb4a7ab116102f25780632eb4a7ab146105745780632f745c591461058b578063353782f1146105ab57806342842e0e146105cb57610380565b80631dd7c0a5146104b157806323b872dd146105345780632c23b8b91461055457610380565b806306fdde031161035457806306fdde031461040b578063081812fc14610444578063095ea7b31461047c57806318160ddd1461049c57610380565b8062f714ce1461038f57806301ffc9a7146103b1578063068eb22f146103e657610380565b3661038057005b34801561038c57600080fd5b50005b34801561039b57600080fd5b506103af6103aa366004613e18565b610bc2565b005b3480156103bd57600080fd5b506103d16103cc366004613d9a565b610c3b565b60405190151581526020015b60405180910390f35b3480156103f257600080fd5b506103fd6101415481565b6040519081526020016103dd565b34801561041757600080fd5b50604080518082019091526007815266131a5d99505c9d60ca1b60208201525b6040516103dd91906140a0565b34801561045057600080fd5b5061046461045f366004613c79565b610c68565b6040516001600160a01b0390911681526020016103dd565b34801561048857600080fd5b506103af610497366004613bf2565b610c8f565b3480156104a857600080fd5b5060cb546103fd565b3480156104bd57600080fd5b506105056104cc366004613c79565b61013060205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016103dd565b34801561054057600080fd5b506103af61054f366004613b08565b610daa565b34801561056057600080fd5b506103fd61056f366004613c79565b610ddb565b34801561058057600080fd5b506103fd6101315481565b34801561059757600080fd5b506103fd6105a6366004613bf2565b610dfd565b3480156105b757600080fd5b506103af6105c6366004613e3c565b610e93565b3480156105d757600080fd5b506103af6105e6366004613b08565b610eff565b3480156105f757600080fd5b506103fd610606366004613c79565b610f1a565b34801561061757600080fd5b506103af610626366004613c79565b610f2b565b34801561063757600080fd5b506103fd610646366004613c79565b610f67565b34801561065757600080fd5b506103fd610666366004613c79565b610f78565b34801561067757600080fd5b506103fd610686366004613c79565b6101346020526000908152604090205481565b3480156106a557600080fd5b5061014254610464906001600160a01b031681565b3480156106c657600080fd5b506103af6106d5366004613c91565b611019565b3480156106e657600080fd5b506103fd6106f5366004613c79565b61125e565b34801561070657600080fd5b50610464610715366004613c79565b61126f565b34801561072657600080fd5b506103fd610735366004613c79565b6112cf565b34801561074657600080fd5b506103af610755366004613dd2565b6112e0565b34801561076657600080fd5b506103fd610775366004613ab4565b611340565b34801561078657600080fd5b506103af6113c6565b34801561079b57600080fd5b506103fd6107aa366004613c79565b61013c6020526000908152604090205481565b3480156107c957600080fd5b506033546001600160a01b0316610464565b3480156107e757600080fd5b506103af6107f6366004613c79565b6113da565b34801561080757600080fd5b506103fd6101355481565b34801561081e57600080fd5b5060408051808201909152600e81526d2634bb32a0b93a1726b2b6b132b960911b6020820152610437565b34801561085557600080fd5b506103d1610864366004613c79565b611416565b34801561087557600080fd5b506103af610884366004613bc5565b611458565b34801561089557600080fd5b506103fd6101335481565b3480156108ac57600080fd5b506103fd61012f5481565b3480156108c357600080fd5b506108d76108d2366004613c79565b611467565b6040805195865260208601949094529284019190915260608301521515608082015260a0016103dd565b34801561090d57600080fd5b506103af61091c366004613c1d565b611565565b34801561092d57600080fd5b506103fd61093c366004613f00565b61157a565b34801561094d57600080fd5b506103fd61095c366004613c79565b6115db565b34801561096d57600080fd5b506103af61097c366004613b08565b6115ec565b34801561098d57600080fd5b506103af61099c366004613b48565b61164e565b3480156109ad57600080fd5b506103af6109bc366004613ab4565b611686565b3480156109cd57600080fd5b506103af6109dc366004613c79565b6116df565b3480156109ed57600080fd5b5061013a54610464906001600160a01b031681565b348015610a0e57600080fd5b506103af610a1d366004613ab4565b61171b565b348015610a2e57600080fd5b50610437610a3d366004613c79565b611746565b348015610a4e57600080fd5b506103fd61013b5481565b348015610a6557600080fd5b506103fd610a74366004613c79565b6117f2565b348015610a8557600080fd5b506103fd610a94366004613c79565b6000908152610130602052604090206001015490565b348015610ab657600080fd5b506103af610ac5366004613e3c565b611803565b6103fd610ad8366004613c79565b61186f565b348015610ae957600080fd5b506103af610af8366004613c79565b611cc6565b348015610b0957600080fd5b506103af610b18366004613edc565b611d98565b348015610b2957600080fd5b506103d1610b38366004613ad0565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b348015610b7257600080fd5b506103d1610b81366004613bf2565b61013d60209081526000928352604080842090915290825290205460ff1681565b348015610bae57600080fd5b506103af610bbd366004613ab4565b611fc3565b610bca612039565b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610c00573d6000803e3d6000fd5b506040516001600160a01b0382169083907f036becee67bbe1c5cc0cd1ca3e94e0fa8fc3751900c53b98d8347133029754b690600090a35050565b60006001600160e01b0319821663780e9d6360e01b1480610c605750610c6082612093565b90505b919050565b6000610c73826120e3565b506000908152609b60205260409020546001600160a01b031690565b6000610c9a8261126f565b9050806001600160a01b0316836001600160a01b03161415610d0d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d295750610d298133610b38565b610d9b5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610d04565b610da58383612133565b505050565b610db433826121a1565b610dd05760405162461bcd60e51b8152600401610d04906140b3565b610da583838361221f565b6101408181548110610dec57600080fd5b600091825260209091200154905081565b6000610e0883611340565b8210610e6a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d04565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b610e9b612039565b61013b879055610eae61013e8787613916565b50610ebc61013f8585613916565b50610eca6101408383613916565b5060405187907f07ef928c1250a7ede48855c1a3624df01e73f5c7f88095cd1a25f3f8a68b6ae990600090a250505050505050565b610da58383836040518060200160405280600081525061164e565b6101378181548110610dec57600080fd5b610f33612039565b61012f81905560405181907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a250565b6101368181548110610dec57600080fd5b6000610f8360cb5490565b8210610fe65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d04565b60cb828154811061100757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600054610100900460ff16158080156110395750600054600160ff909116105b806110535750303b158015611053575060005460ff166001145b6110b65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d04565b6000805460ff1916600117905580156110d9576000805461ff0019166101001790555b6110e1612390565b611141604051806040016040528060138152602001724c6976654172742e4d656d626572736869707360681b815250604051806040016040528060138152602001724c4956454152542e4d454d424552534849505360681b8152506123bf565b6111496123f0565b6101318d905561013a80546001600160a01b0319166001600160a01b038e161790556101338b905561012f8a90556111846101368a8a613916565b506111926101378888613916565b506111a06101388686613916565b506111ae6101398484613916565b506040518060600160405280602681526020016143c06026913980516111dd9161012e91602090910190613961565b506040518a907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a2801561124f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b61013f8181548110610dec57600080fd5b6000818152609960205260408120546001600160a01b031680610c605760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d04565b6101398181548110610dec57600080fd5b6112e8612039565b80516112fc9061012e906020840190613961565b5061012e60405161130d9190613fc8565b604051908190038120907f2c6b1110182cf23cf4129aca9ea29e8f4c651348b38a67766fd67f5a6db1d05190600090a250565b60006001600160a01b0382166113aa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d04565b506001600160a01b03166000908152609a602052604090205490565b6113ce612039565b6113d8600061241f565b565b6113e2612039565b61014181905560405181907faae47912352a0850ff6bab3ba5a0247f68b84eddb54ce4f6a9a2f5b0f8d8060990600090a250565b6000806114256101008461424d565b9050600061143561010085614330565b6000928352610132602052604090922054600190921b9182169091149392505050565b611463338383612471565b5050565b600080600080600061147886612540565b6114945760405162461bcd60e51b8152600401610d0490614197565b60008681526101306020908152604091829020825160c081018452815480825260018301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a083015261153a5760405162461bcd60e51b815260206004820181905260248201527f4c6976654172744d656d6265723a206e6f6e6578697374656e7420746f6b656e6044820152606401610d04565b602081015160408201516060830151608084015160a090940151929a91995097509195509350915050565b61156d612039565b610da56101398383613916565b6000610141544211156115c45760405162461bcd60e51b8152602060048201526012602482015271131a5d99505c9d13595b58995c8e88195b9960721b6044820152606401610d04565b6115d08585858561255d565b90505b949350505050565b6101388181548110610dec57600080fd5b6115f4612039565b6116086001600160a01b0384168383612907565b80826001600160a01b0316846001600160a01b03167ff928cf0eb6cb0b006af7b8d3975408815f806f2e9110c53d00ea53dcae790ff060405160405180910390a4505050565b61165833836121a1565b6116745760405162461bcd60e51b8152600401610d04906140b3565b61168084848484612959565b50505050565b61168e612039565b61013a80546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f043853279d36e1b91a19a2d217f1e45cd4c244215ec0252db0ce996e93df080a90600090a250565b6116e7612039565b61013181905560405181907fedd3a5a3669c9a37c4f24f353abdae8a69450a26eb6de7caac9a39b8030f596a90600090a250565b611723612039565b61014280546001600160a01b0319166001600160a01b0392909216919091179055565b606061175182612540565b6117b45760405162461bcd60e51b815260206004820152602e60248201527f4c6976654172744d656d6265723a2055524920717565727920666f72206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610d04565b60006117be61298c565b9050806117ca84612a1f565b6040516020016117db929190613f99565b604051602081830303815290604052915050919050565b61013e8181548110610dec57600080fd5b61180b612039565b61013387905561181e6101368787613916565b5061182c6101378585613916565b5061183a6101388383613916565b5060405187907f529a4be08a16c9abc9dca8349da9b9228a4966a3c08bb385fb33348d1027869f90600090a250505050505050565b6000611879612aca565b333b156118c45760405162461bcd60e51b8152602060048201526019602482015278131a5d99505c9d13595b58995c8e8818d85b89dd0818d85b1b603a1b6044820152606401610d04565b6000821180156118d45750600782105b6119205760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a206c6576656c206572726f720000000000006044820152606401610d04565b600061192d836001612b24565b90506000610140828154811061195357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050600033905061013b544210156119b35760405162461bcd60e51b8152602060048201526018602482015277131a5d99505c9d13595b58995c8e881b9bdd081cdd185c9d60421b6044820152606401610d04565b61013e83815481106119d557634e487b7160e01b600052603260045260246000fd5b906000526020600020015461013c60008581526020019081526020016000205410611a425760405162461bcd60e51b815260206004820152601760248201527f4c6976654172744d656d6265723a20736f6c64206f75740000000000000000006044820152606401610d04565b813414611a915760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a2076616c7565206572726f720000000000006044820152606401610d04565b6001600160a01b038116600090815261013d6020908152604080832086845290915290205460ff1615611b065760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a206861766520626f756768740000000000006044820152606401610d04565b600083815261013c60205260408120805491611b2183614315565b90915550506001600160a01b038116600090815261013d602090815260408083208684529091528120805460ff19166001179055610135805491611b6483614315565b9190505550611b768161013554612b37565b6000611b80612cb3565b9050611bbd6040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b610135548152602081018790524260408201526060810182905261013f805486908110611bfa57634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610135805485526101308452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff1916931515939093179092559054835186815292830191909152899290916001600160a01b038716917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a46101355495505050505050610c63600160fb55565b611cce612aca565b611cd781612540565b611cf35760405162461bcd60e51b8152600401610d0490614197565b33611cfd8261126f565b6001600160a01b03161480611d1d5750610142546001600160a01b031633145b611d825760405162461bcd60e51b815260206004820152603060248201527f4c6976654172744d656d6265723a206e6f74206f776e6572206f72206d656d6260448201526f32b939b434b821b7b73a3930b1ba2b1960811b6064820152608401610d04565b611d8b81612cfa565b611d95600160fb55565b50565b611da0612aca565b611da982612540565b611dc55760405162461bcd60e51b8152600401610d0490614197565b600082815261013060205260409020600381015461012f54611de8908290612d9e565b421015611e2d5760405162461bcd60e51b81526020600482015260136024820152724c6976654172744d656d6265723a204c6f636b60681b6044820152606401610d04565b600582015460ff1615611e825760405162461bcd60e51b815260206004820152601c60248201527f4c6976654172744d656d6265723a20686173206465636f6d706f7365000000006044820152606401610d04565b600482015433611e918661126f565b6001600160a01b031614611ee75760405162461bcd60e51b815260206004820152601860248201527f4c6976654172744d656d6265723a206e6f74206f776e657200000000000000006044820152606401610d04565b8315611f5757600061013960018560010154611f039190614280565b81548110611f2157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546004850181905560058501805460ff191660011790559050611f4f8282612b24565b915050611f60565b611f6085612cfa565b61013a54611f78906001600160a01b03163383612907565b604080518281528515156020820152869133917f6777b3b80c2151c5d01a15c43d7a0acce9bcf3ed04384f06f347d3ce2dfea901910160405180910390a3505050611463600160fb55565b611fcb612039565b6001600160a01b0381166120305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d04565b611d958161241f565b6033546001600160a01b031633146113d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b60006001600160e01b031982166380ac58cd60e01b14806120c457506001600160e01b03198216635b5e139f60e01b145b80610c6057506301ffc9a760e01b6001600160e01b0319831614610c60565b6120ec81612540565b611d955760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d04565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121688261126f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806121ad8361126f565b9050806001600160a01b0316846001600160a01b031614806121f457506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806115d35750836001600160a01b031661220d84610c68565b6001600160a01b031614949350505050565b826001600160a01b03166122328261126f565b6001600160a01b0316146122585760405162461bcd60e51b8152600401610d0490614152565b6001600160a01b0382166122ba5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d04565b6122c78383836001612daa565b826001600160a01b03166122da8261126f565b6001600160a01b0316146123005760405162461bcd60e51b8152600401610d0490614152565b6000818152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652609a8552838620805460001901905590871680865283862080546001019055868652609990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610da5565b600054610100900460ff166123b75760405162461bcd60e51b8152600401610d04906141ea565b6113d8612ede565b600054610100900460ff166123e65760405162461bcd60e51b8152600401610d04906141ea565b6114638282612f0e565b600054610100900460ff166124175760405162461bcd60e51b8152600401610d04906141ea565b6113d8612f5c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156124d35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d04565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000908152609960205260409020546001600160a01b0316151590565b6000612567612aca565b333b156125b25760405162461bcd60e51b8152602060048201526019602482015278131a5d99505c9d13595b58995c8e8818d85b89dd0818d85b1b603a1b6044820152606401610d04565b610133544210156126005760405162461bcd60e51b8152602060048201526018602482015277131a5d99505c9d13595b58995c8e881b9bdd081cdd185c9d60421b6044820152606401610d04565b60405133906000906126389088908490899060200192835260609190911b6001600160601b0319166020830152603482015260540190565b60405160208183030381529060405280519060200120905061269285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610131549150849050612f83565b6126de5760405162461bcd60e51b815260206004820152601c60248201527f4c6976654172744d656d6265723a206e6f742077686974656c697374000000006044820152606401610d04565b6126e787611416565b156127345760405162461bcd60e51b815260206004820152601f60248201527f4c6976654172744d656d6265723a20616c726561647920636c61696d65642e006044820152606401610d04565b610135805490600061274583614315565b91905055506127578261013554612b37565b61276087612f99565b600061276a612cb3565b90506000612776612fd8565b90506103e860006127878284614330565b90506000612794826130bf565b6000818152610134602052604081208054929350906127b283614315565b91905055506127f26040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b610135548152602081018290524260408201526060810186905261013761281a600184614280565b8154811061283857634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610135805485526101308452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff191693151593909317909255905483518a815292830191909152849290916001600160a01b038c16917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a461013554985050505050505050506115d3600160fb55565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610da590849061313c565b61296484848461221f565b6129708484848461320e565b6116805760405162461bcd60e51b8152600401610d0490614100565b606061012e805461299c906142da565b80601f01602080910402602001604051908101604052809291908181526020018280546129c8906142da565b8015612a155780601f106129ea57610100808354040283529160200191612a15565b820191906000526020600020905b8154815290600101906020018083116129f857829003601f168201915b5050505050905090565b60606000612a2c83613318565b600101905060008167ffffffffffffffff811115612a5a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612a84576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612abd57612ac2565b612a8e565b509392505050565b600260fb541415612b1d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b600260fb55565b6000612b308284614280565b9392505050565b6001600160a01b038216612b8d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d04565b612b9681612540565b15612be35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b612bf1600083836001612daa565b612bfa81612540565b15612c475760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b6001600160a01b0382166000818152609a6020908152604080832080546001019055848352609990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611463565b600080612cbe612fd8565b905061016d6000612ccf8284614330565b90506000612cea62015180612ce484826133f0565b90612d9e565b94505050505090565b600160fb55565b6000612d058261126f565b9050612d15816000846001612daa565b612d1e8261126f565b6000838152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552609a845282852080546000190190558785526099909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4611463565b6000612b308284614235565b6001811115612e195760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610d04565b816001600160a01b038516612e7557612e708160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b612e98565b836001600160a01b0316856001600160a01b031614612e9857612e9885826133fc565b6001600160a01b038416612eb457612eaf81613499565b612ed7565b846001600160a01b0316846001600160a01b031614612ed757612ed78482613572565b5050505050565b600054610100900460ff16612f055760405162461bcd60e51b8152600401610d04906141ea565b6113d83361241f565b600054610100900460ff16612f355760405162461bcd60e51b8152600401610d04906141ea565b8151612f48906097906020850190613961565b508051610da5906098906020840190613961565b600054610100900460ff16612cf35760405162461bcd60e51b8152600401610d04906141ea565b600082612f9085846135b6565b14949350505050565b6000612fa76101008361424d565b90506000612fb761010084614330565b600092835261013260205260409092208054600190931b9092179091555050565b6040516001600160601b03193360601b1660208201526000908190439042906034016040516020818303038152906040528051906020012060001c61301d919061424d565b6040516001600160601b03194160601b166020820152459042906034016040516020818303038152906040528051906020012060001c61305d919061424d565b6130674442614235565b6130719190614235565b61307b9190614235565b6130859190614235565b61308f9190614235565b6040516020016130a191815260200190565b60408051601f19818403018152919052805160209091012091505090565b60006001815b610138548110156131275761013881815481106130f257634e487b7160e01b600052603260045260246000fd5b906000526020600020015484116131155761310e816001614235565b9150613127565b8061311f81614315565b9150506130c5565b5061012d805460ff19169055612b3081613609565b6000613191826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137629092919063ffffffff16565b805190915015610da557808060200190518101906131af9190613c5d565b610da55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d04565b60006001600160a01b0384163b1561331057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613252903390899088908890600401614063565b602060405180830381600087803b15801561326c57600080fd5b505af192505050801561329c575060408051601f3d908101601f1916820190925261329991810190613db6565b60015b6132f6573d8080156132ca576040519150601f19603f3d011682016040523d82523d6000602084013e6132cf565b606091505b5080516132ee5760405162461bcd60e51b8152600401610d0490614100565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115d3565b5060016115d3565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106133575772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613383576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106133a157662386f26fc10000830492506010015b6305f5e10083106133b9576305f5e100830492506008015b61271083106133cd57612710830492506004015b606483106133df576064830492506002015b600a8310610c605760010192915050565b6000612b308284614261565b6000600161340984611340565b6134139190614280565b600083815260ca6020526040902054909150808214613466576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb546000906134ab90600190614280565b600083815260cc602052604081205460cb80549394509092849081106134e157634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060cb838154811061351057634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb80548061355657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061357d83611340565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b600081815b8451811015612ac2576135f5828683815181106135e857634e487b7160e01b600052603260045260246000fd5b6020026020010151613771565b91508061360181614315565b9150506135bb565b600080821161365a5760405162461bcd60e51b815260206004820152601960248201527f4c6976654172744d656d6265723a206c6576656c206f766572000000000000006044820152606401610d04565b600782106136aa5760405162461bcd60e51b815260206004820152601860248201527f4c6976654172744d656d6265723a2068617665206f76657200000000000000006044820152606401610d04565b6000828152610134602052604081205483916101366136ca600185614280565b815481106136e857634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508082101561370857829350505050610c63565b60018311801561371c575061012d5460ff16155b15613733578261372b816142c3565b93505061374f565b61012d805460ff191660011790558261374b81614315565b9350505b61375883613609565b9350505050610c63565b60606115d384846000856137a0565b600081831061378d576000828152602084905260409020612b30565b6000838152602083905260409020612b30565b6060824710156138015760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d04565b600080866001600160a01b0316858760405161381d9190613f7d565b60006040518083038185875af1925050503d806000811461385a576040519150601f19603f3d011682016040523d82523d6000602084013e61385f565b606091505b50915091506138708783838761387b565b979650505050505050565b606083156138e75782516138e0576001600160a01b0385163b6138e05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d04565b50816115d3565b6115d383838151156138fc5781518083602001fd5b8060405162461bcd60e51b8152600401610d0491906140a0565b828054828255906000526020600020908101928215613951579160200282015b82811115613951578235825591602001919060010190613936565b5061395d9291506139d5565b5090565b82805461396d906142da565b90600052602060002090601f01602090048101928261398f5760008555613951565b82601f106139a857805160ff1916838001178555613951565b82800160010185558215613951579182015b828111156139515782518255916020019190600101906139ba565b5b8082111561395d57600081556001016139d6565b600067ffffffffffffffff80841115613a0557613a05614370565b604051601f8501601f19908116603f01168101908282118183101715613a2d57613a2d614370565b81604052809350858152868686011115613a4657600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112613a71578182fd5b50813567ffffffffffffffff811115613a88578182fd5b6020830191508360208083028501011115613aa257600080fd5b9250929050565b8035610c6381614386565b600060208284031215613ac5578081fd5b8135612b3081614386565b60008060408385031215613ae2578081fd5b8235613aed81614386565b91506020830135613afd81614386565b809150509250929050565b600080600060608486031215613b1c578081fd5b8335613b2781614386565b92506020840135613b3781614386565b929592945050506040919091013590565b60008060008060808587031215613b5d578081fd5b8435613b6881614386565b93506020850135613b7881614386565b925060408501359150606085013567ffffffffffffffff811115613b9a578182fd5b8501601f81018713613baa578182fd5b613bb9878235602084016139ea565b91505092959194509250565b60008060408385031215613bd7578182fd5b8235613be281614386565b91506020830135613afd8161439b565b60008060408385031215613c04578182fd5b8235613c0f81614386565b946020939093013593505050565b60008060208385031215613c2f578182fd5b823567ffffffffffffffff811115613c45578283fd5b613c5185828601613a60565b90969095509350505050565b600060208284031215613c6e578081fd5b8151612b308161439b565b600060208284031215613c8a578081fd5b5035919050565b6000806000806000806000806000806000806101008d8f031215613cb3578788fd5b8c359b50613cc360208e01613aa9565b9a5060408d0135995060608d0135985067ffffffffffffffff60808e01351115613ceb578788fd5b613cfb8e60808f01358f01613a60565b909850965067ffffffffffffffff60a08e01351115613d18578586fd5b613d288e60a08f01358f01613a60565b909650945067ffffffffffffffff60c08e01351115613d45578384fd5b613d558e60c08f01358f01613a60565b909450925067ffffffffffffffff60e08e01351115613d72578081fd5b613d828e60e08f01358f01613a60565b81935080925050509295989b509295989b509295989b565b600060208284031215613dab578081fd5b8135612b30816143a9565b600060208284031215613dc7578081fd5b8151612b30816143a9565b600060208284031215613de3578081fd5b813567ffffffffffffffff811115613df9578182fd5b8201601f81018413613e09578182fd5b6115d3848235602084016139ea565b60008060408385031215613e2a578182fd5b823591506020830135613afd81614386565b60008060008060008060006080888a031215613e56578081fd5b87359650602088013567ffffffffffffffff80821115613e74578283fd5b613e808b838c01613a60565b909850965060408a0135915080821115613e98578283fd5b613ea48b838c01613a60565b909650945060608a0135915080821115613ebc578283fd5b50613ec98a828b01613a60565b989b979a50959850939692959293505050565b60008060408385031215613eee578182fd5b823591506020830135613afd8161439b565b60008060008060608587031215613f15578182fd5b8435935060208501359250604085013567ffffffffffffffff811115613f39578283fd5b613f4587828801613a60565b95989497509550505050565b60008151808452613f69816020860160208601614297565b601f01601f19169290920160200192915050565b60008251613f8f818460208701614297565b9190910192915050565b60008351613fab818460208801614297565b835190830190613fbf818360208801614297565b01949350505050565b8154600090819060028104600180831680613fe457607f831692505b602080841082141561400457634e487b7160e01b87526022600452602487fd5b818015614018576001811461402957614055565b60ff19861689528489019650614055565b60008a815260209020885b8681101561404d5781548b820152908501908301614034565b505084890196505b509498975050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061409690830184613f51565b9695505050505050565b600060208252612b306020830184613f51565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526033908201527f4c6976654172744d656d6265723a206f70657261746f7220717565727920666f60408201527239103737b732bc34b9ba32b73a103a37b5b2b760691b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000821982111561424857614248614344565b500190565b60008261425c5761425c61435a565b500490565b600081600019048311821515161561427b5761427b614344565b500290565b60008282101561429257614292614344565b500390565b60005b838110156142b257818101518382015260200161429a565b838111156116805750506000910152565b6000816142d2576142d2614344565b506000190190565b6002810460018216806142ee57607f821691505b6020821081141561430f57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561432957614329614344565b5060010190565b60008261433f5761433f61435a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d9557600080fd5b8015158114611d9557600080fd5b6001600160e01b031981168114611d9557600080fdfe68747470733a2f2f6170692e6c697665617274782e636f6d2f76312f6d616769632d626f782fa26469706673582212208b70abb87b5b7b381462097818e39ef8e19bf543d9bb6224e5ae2e130d15c41264736f6c63430008020033

Deployed Bytecode

0x6080604052600436106103795760003560e01c80638da5cb5b116101d1578063bae1562a11610102578063cc70d866116100a0578063e82f71e21161006f578063e82f71e214610afd578063e985e9c514610b1d578063ed812a4514610b66578063f2fde38b14610ba257610380565b8063cc70d86614610a79578063d361bcca14610aaa578063d96a094a14610aca578063e596175414610add57610380565b8063c0fc3712116100dc578063c0fc371214610a02578063c87b56dd14610a22578063cb60f8b414610a42578063cc69a78a14610a5957610380565b8063bae1562a146109a1578063bd32fb66146109c1578063bd4cc0f5146109e157610380565b8063aa746f671161016f578063ae0b51df11610149578063ae0b51df14610921578063ae0be21014610941578063b2a02ff114610961578063b88d4fde1461098157610380565b8063aa746f67146108a0578063ab3545e5146108b7578063acbc2fd51461090157610380565b806395d89b41116101ab57806395d89b41146108125780639e34070f14610849578063a22cb46514610869578063a6a11bb11461088957610380565b80638da5cb5b146107bd578063908af772146107db57806391e8fcd2146107fb57610380565b8063484b02fb116102ab5780635b3b3515116102495780636bff2c24116102235780636bff2c241461073a57806370a082311461075a578063715018a61461077a5780637639a76b1461078f57610380565b80635b3b3515146106da5780636352211e146106fa5780636b3a6cd31461071a57610380565b80634f6ccce7116102855780634f6ccce71461064b57806354d596751461066b5780635618a6e9146106995780635b03b324146106ba57610380565b8063484b02fb146105eb5780634bd619bb1461060b5780634e90fe6a1461062b57610380565b80631dd7c0a5116103185780632eb4a7ab116102f25780632eb4a7ab146105745780632f745c591461058b578063353782f1146105ab57806342842e0e146105cb57610380565b80631dd7c0a5146104b157806323b872dd146105345780632c23b8b91461055457610380565b806306fdde031161035457806306fdde031461040b578063081812fc14610444578063095ea7b31461047c57806318160ddd1461049c57610380565b8062f714ce1461038f57806301ffc9a7146103b1578063068eb22f146103e657610380565b3661038057005b34801561038c57600080fd5b50005b34801561039b57600080fd5b506103af6103aa366004613e18565b610bc2565b005b3480156103bd57600080fd5b506103d16103cc366004613d9a565b610c3b565b60405190151581526020015b60405180910390f35b3480156103f257600080fd5b506103fd6101415481565b6040519081526020016103dd565b34801561041757600080fd5b50604080518082019091526007815266131a5d99505c9d60ca1b60208201525b6040516103dd91906140a0565b34801561045057600080fd5b5061046461045f366004613c79565b610c68565b6040516001600160a01b0390911681526020016103dd565b34801561048857600080fd5b506103af610497366004613bf2565b610c8f565b3480156104a857600080fd5b5060cb546103fd565b3480156104bd57600080fd5b506105056104cc366004613c79565b61013060205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016103dd565b34801561054057600080fd5b506103af61054f366004613b08565b610daa565b34801561056057600080fd5b506103fd61056f366004613c79565b610ddb565b34801561058057600080fd5b506103fd6101315481565b34801561059757600080fd5b506103fd6105a6366004613bf2565b610dfd565b3480156105b757600080fd5b506103af6105c6366004613e3c565b610e93565b3480156105d757600080fd5b506103af6105e6366004613b08565b610eff565b3480156105f757600080fd5b506103fd610606366004613c79565b610f1a565b34801561061757600080fd5b506103af610626366004613c79565b610f2b565b34801561063757600080fd5b506103fd610646366004613c79565b610f67565b34801561065757600080fd5b506103fd610666366004613c79565b610f78565b34801561067757600080fd5b506103fd610686366004613c79565b6101346020526000908152604090205481565b3480156106a557600080fd5b5061014254610464906001600160a01b031681565b3480156106c657600080fd5b506103af6106d5366004613c91565b611019565b3480156106e657600080fd5b506103fd6106f5366004613c79565b61125e565b34801561070657600080fd5b50610464610715366004613c79565b61126f565b34801561072657600080fd5b506103fd610735366004613c79565b6112cf565b34801561074657600080fd5b506103af610755366004613dd2565b6112e0565b34801561076657600080fd5b506103fd610775366004613ab4565b611340565b34801561078657600080fd5b506103af6113c6565b34801561079b57600080fd5b506103fd6107aa366004613c79565b61013c6020526000908152604090205481565b3480156107c957600080fd5b506033546001600160a01b0316610464565b3480156107e757600080fd5b506103af6107f6366004613c79565b6113da565b34801561080757600080fd5b506103fd6101355481565b34801561081e57600080fd5b5060408051808201909152600e81526d2634bb32a0b93a1726b2b6b132b960911b6020820152610437565b34801561085557600080fd5b506103d1610864366004613c79565b611416565b34801561087557600080fd5b506103af610884366004613bc5565b611458565b34801561089557600080fd5b506103fd6101335481565b3480156108ac57600080fd5b506103fd61012f5481565b3480156108c357600080fd5b506108d76108d2366004613c79565b611467565b6040805195865260208601949094529284019190915260608301521515608082015260a0016103dd565b34801561090d57600080fd5b506103af61091c366004613c1d565b611565565b34801561092d57600080fd5b506103fd61093c366004613f00565b61157a565b34801561094d57600080fd5b506103fd61095c366004613c79565b6115db565b34801561096d57600080fd5b506103af61097c366004613b08565b6115ec565b34801561098d57600080fd5b506103af61099c366004613b48565b61164e565b3480156109ad57600080fd5b506103af6109bc366004613ab4565b611686565b3480156109cd57600080fd5b506103af6109dc366004613c79565b6116df565b3480156109ed57600080fd5b5061013a54610464906001600160a01b031681565b348015610a0e57600080fd5b506103af610a1d366004613ab4565b61171b565b348015610a2e57600080fd5b50610437610a3d366004613c79565b611746565b348015610a4e57600080fd5b506103fd61013b5481565b348015610a6557600080fd5b506103fd610a74366004613c79565b6117f2565b348015610a8557600080fd5b506103fd610a94366004613c79565b6000908152610130602052604090206001015490565b348015610ab657600080fd5b506103af610ac5366004613e3c565b611803565b6103fd610ad8366004613c79565b61186f565b348015610ae957600080fd5b506103af610af8366004613c79565b611cc6565b348015610b0957600080fd5b506103af610b18366004613edc565b611d98565b348015610b2957600080fd5b506103d1610b38366004613ad0565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b348015610b7257600080fd5b506103d1610b81366004613bf2565b61013d60209081526000928352604080842090915290825290205460ff1681565b348015610bae57600080fd5b506103af610bbd366004613ab4565b611fc3565b610bca612039565b6040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610c00573d6000803e3d6000fd5b506040516001600160a01b0382169083907f036becee67bbe1c5cc0cd1ca3e94e0fa8fc3751900c53b98d8347133029754b690600090a35050565b60006001600160e01b0319821663780e9d6360e01b1480610c605750610c6082612093565b90505b919050565b6000610c73826120e3565b506000908152609b60205260409020546001600160a01b031690565b6000610c9a8261126f565b9050806001600160a01b0316836001600160a01b03161415610d0d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d295750610d298133610b38565b610d9b5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610d04565b610da58383612133565b505050565b610db433826121a1565b610dd05760405162461bcd60e51b8152600401610d04906140b3565b610da583838361221f565b6101408181548110610dec57600080fd5b600091825260209091200154905081565b6000610e0883611340565b8210610e6a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d04565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b610e9b612039565b61013b879055610eae61013e8787613916565b50610ebc61013f8585613916565b50610eca6101408383613916565b5060405187907f07ef928c1250a7ede48855c1a3624df01e73f5c7f88095cd1a25f3f8a68b6ae990600090a250505050505050565b610da58383836040518060200160405280600081525061164e565b6101378181548110610dec57600080fd5b610f33612039565b61012f81905560405181907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a250565b6101368181548110610dec57600080fd5b6000610f8360cb5490565b8210610fe65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d04565b60cb828154811061100757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600054610100900460ff16158080156110395750600054600160ff909116105b806110535750303b158015611053575060005460ff166001145b6110b65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d04565b6000805460ff1916600117905580156110d9576000805461ff0019166101001790555b6110e1612390565b611141604051806040016040528060138152602001724c6976654172742e4d656d626572736869707360681b815250604051806040016040528060138152602001724c4956454152542e4d454d424552534849505360681b8152506123bf565b6111496123f0565b6101318d905561013a80546001600160a01b0319166001600160a01b038e161790556101338b905561012f8a90556111846101368a8a613916565b506111926101378888613916565b506111a06101388686613916565b506111ae6101398484613916565b506040518060600160405280602681526020016143c06026913980516111dd9161012e91602090910190613961565b506040518a907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a2801561124f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b61013f8181548110610dec57600080fd5b6000818152609960205260408120546001600160a01b031680610c605760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d04565b6101398181548110610dec57600080fd5b6112e8612039565b80516112fc9061012e906020840190613961565b5061012e60405161130d9190613fc8565b604051908190038120907f2c6b1110182cf23cf4129aca9ea29e8f4c651348b38a67766fd67f5a6db1d05190600090a250565b60006001600160a01b0382166113aa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d04565b506001600160a01b03166000908152609a602052604090205490565b6113ce612039565b6113d8600061241f565b565b6113e2612039565b61014181905560405181907faae47912352a0850ff6bab3ba5a0247f68b84eddb54ce4f6a9a2f5b0f8d8060990600090a250565b6000806114256101008461424d565b9050600061143561010085614330565b6000928352610132602052604090922054600190921b9182169091149392505050565b611463338383612471565b5050565b600080600080600061147886612540565b6114945760405162461bcd60e51b8152600401610d0490614197565b60008681526101306020908152604091829020825160c081018452815480825260018301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a083015261153a5760405162461bcd60e51b815260206004820181905260248201527f4c6976654172744d656d6265723a206e6f6e6578697374656e7420746f6b656e6044820152606401610d04565b602081015160408201516060830151608084015160a090940151929a91995097509195509350915050565b61156d612039565b610da56101398383613916565b6000610141544211156115c45760405162461bcd60e51b8152602060048201526012602482015271131a5d99505c9d13595b58995c8e88195b9960721b6044820152606401610d04565b6115d08585858561255d565b90505b949350505050565b6101388181548110610dec57600080fd5b6115f4612039565b6116086001600160a01b0384168383612907565b80826001600160a01b0316846001600160a01b03167ff928cf0eb6cb0b006af7b8d3975408815f806f2e9110c53d00ea53dcae790ff060405160405180910390a4505050565b61165833836121a1565b6116745760405162461bcd60e51b8152600401610d04906140b3565b61168084848484612959565b50505050565b61168e612039565b61013a80546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f043853279d36e1b91a19a2d217f1e45cd4c244215ec0252db0ce996e93df080a90600090a250565b6116e7612039565b61013181905560405181907fedd3a5a3669c9a37c4f24f353abdae8a69450a26eb6de7caac9a39b8030f596a90600090a250565b611723612039565b61014280546001600160a01b0319166001600160a01b0392909216919091179055565b606061175182612540565b6117b45760405162461bcd60e51b815260206004820152602e60248201527f4c6976654172744d656d6265723a2055524920717565727920666f72206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610d04565b60006117be61298c565b9050806117ca84612a1f565b6040516020016117db929190613f99565b604051602081830303815290604052915050919050565b61013e8181548110610dec57600080fd5b61180b612039565b61013387905561181e6101368787613916565b5061182c6101378585613916565b5061183a6101388383613916565b5060405187907f529a4be08a16c9abc9dca8349da9b9228a4966a3c08bb385fb33348d1027869f90600090a250505050505050565b6000611879612aca565b333b156118c45760405162461bcd60e51b8152602060048201526019602482015278131a5d99505c9d13595b58995c8e8818d85b89dd0818d85b1b603a1b6044820152606401610d04565b6000821180156118d45750600782105b6119205760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a206c6576656c206572726f720000000000006044820152606401610d04565b600061192d836001612b24565b90506000610140828154811061195357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050600033905061013b544210156119b35760405162461bcd60e51b8152602060048201526018602482015277131a5d99505c9d13595b58995c8e881b9bdd081cdd185c9d60421b6044820152606401610d04565b61013e83815481106119d557634e487b7160e01b600052603260045260246000fd5b906000526020600020015461013c60008581526020019081526020016000205410611a425760405162461bcd60e51b815260206004820152601760248201527f4c6976654172744d656d6265723a20736f6c64206f75740000000000000000006044820152606401610d04565b813414611a915760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a2076616c7565206572726f720000000000006044820152606401610d04565b6001600160a01b038116600090815261013d6020908152604080832086845290915290205460ff1615611b065760405162461bcd60e51b815260206004820152601a60248201527f4c6976654172744d656d6265723a206861766520626f756768740000000000006044820152606401610d04565b600083815261013c60205260408120805491611b2183614315565b90915550506001600160a01b038116600090815261013d602090815260408083208684529091528120805460ff19166001179055610135805491611b6483614315565b9190505550611b768161013554612b37565b6000611b80612cb3565b9050611bbd6040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b610135548152602081018790524260408201526060810182905261013f805486908110611bfa57634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610135805485526101308452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff1916931515939093179092559054835186815292830191909152899290916001600160a01b038716917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a46101355495505050505050610c63600160fb55565b611cce612aca565b611cd781612540565b611cf35760405162461bcd60e51b8152600401610d0490614197565b33611cfd8261126f565b6001600160a01b03161480611d1d5750610142546001600160a01b031633145b611d825760405162461bcd60e51b815260206004820152603060248201527f4c6976654172744d656d6265723a206e6f74206f776e6572206f72206d656d6260448201526f32b939b434b821b7b73a3930b1ba2b1960811b6064820152608401610d04565b611d8b81612cfa565b611d95600160fb55565b50565b611da0612aca565b611da982612540565b611dc55760405162461bcd60e51b8152600401610d0490614197565b600082815261013060205260409020600381015461012f54611de8908290612d9e565b421015611e2d5760405162461bcd60e51b81526020600482015260136024820152724c6976654172744d656d6265723a204c6f636b60681b6044820152606401610d04565b600582015460ff1615611e825760405162461bcd60e51b815260206004820152601c60248201527f4c6976654172744d656d6265723a20686173206465636f6d706f7365000000006044820152606401610d04565b600482015433611e918661126f565b6001600160a01b031614611ee75760405162461bcd60e51b815260206004820152601860248201527f4c6976654172744d656d6265723a206e6f74206f776e657200000000000000006044820152606401610d04565b8315611f5757600061013960018560010154611f039190614280565b81548110611f2157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546004850181905560058501805460ff191660011790559050611f4f8282612b24565b915050611f60565b611f6085612cfa565b61013a54611f78906001600160a01b03163383612907565b604080518281528515156020820152869133917f6777b3b80c2151c5d01a15c43d7a0acce9bcf3ed04384f06f347d3ce2dfea901910160405180910390a3505050611463600160fb55565b611fcb612039565b6001600160a01b0381166120305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d04565b611d958161241f565b6033546001600160a01b031633146113d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d04565b60006001600160e01b031982166380ac58cd60e01b14806120c457506001600160e01b03198216635b5e139f60e01b145b80610c6057506301ffc9a760e01b6001600160e01b0319831614610c60565b6120ec81612540565b611d955760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d04565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121688261126f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806121ad8361126f565b9050806001600160a01b0316846001600160a01b031614806121f457506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806115d35750836001600160a01b031661220d84610c68565b6001600160a01b031614949350505050565b826001600160a01b03166122328261126f565b6001600160a01b0316146122585760405162461bcd60e51b8152600401610d0490614152565b6001600160a01b0382166122ba5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d04565b6122c78383836001612daa565b826001600160a01b03166122da8261126f565b6001600160a01b0316146123005760405162461bcd60e51b8152600401610d0490614152565b6000818152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652609a8552838620805460001901905590871680865283862080546001019055868652609990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610da5565b600054610100900460ff166123b75760405162461bcd60e51b8152600401610d04906141ea565b6113d8612ede565b600054610100900460ff166123e65760405162461bcd60e51b8152600401610d04906141ea565b6114638282612f0e565b600054610100900460ff166124175760405162461bcd60e51b8152600401610d04906141ea565b6113d8612f5c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156124d35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d04565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000908152609960205260409020546001600160a01b0316151590565b6000612567612aca565b333b156125b25760405162461bcd60e51b8152602060048201526019602482015278131a5d99505c9d13595b58995c8e8818d85b89dd0818d85b1b603a1b6044820152606401610d04565b610133544210156126005760405162461bcd60e51b8152602060048201526018602482015277131a5d99505c9d13595b58995c8e881b9bdd081cdd185c9d60421b6044820152606401610d04565b60405133906000906126389088908490899060200192835260609190911b6001600160601b0319166020830152603482015260540190565b60405160208183030381529060405280519060200120905061269285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610131549150849050612f83565b6126de5760405162461bcd60e51b815260206004820152601c60248201527f4c6976654172744d656d6265723a206e6f742077686974656c697374000000006044820152606401610d04565b6126e787611416565b156127345760405162461bcd60e51b815260206004820152601f60248201527f4c6976654172744d656d6265723a20616c726561647920636c61696d65642e006044820152606401610d04565b610135805490600061274583614315565b91905055506127578261013554612b37565b61276087612f99565b600061276a612cb3565b90506000612776612fd8565b90506103e860006127878284614330565b90506000612794826130bf565b6000818152610134602052604081208054929350906127b283614315565b91905055506127f26040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b610135548152602081018290524260408201526060810186905261013761281a600184614280565b8154811061283857634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610135805485526101308452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff191693151593909317909255905483518a815292830191909152849290916001600160a01b038c16917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a461013554985050505050505050506115d3600160fb55565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610da590849061313c565b61296484848461221f565b6129708484848461320e565b6116805760405162461bcd60e51b8152600401610d0490614100565b606061012e805461299c906142da565b80601f01602080910402602001604051908101604052809291908181526020018280546129c8906142da565b8015612a155780601f106129ea57610100808354040283529160200191612a15565b820191906000526020600020905b8154815290600101906020018083116129f857829003601f168201915b5050505050905090565b60606000612a2c83613318565b600101905060008167ffffffffffffffff811115612a5a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612a84576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612abd57612ac2565b612a8e565b509392505050565b600260fb541415612b1d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d04565b600260fb55565b6000612b308284614280565b9392505050565b6001600160a01b038216612b8d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d04565b612b9681612540565b15612be35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b612bf1600083836001612daa565b612bfa81612540565b15612c475760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d04565b6001600160a01b0382166000818152609a6020908152604080832080546001019055848352609990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611463565b600080612cbe612fd8565b905061016d6000612ccf8284614330565b90506000612cea62015180612ce484826133f0565b90612d9e565b94505050505090565b600160fb55565b6000612d058261126f565b9050612d15816000846001612daa565b612d1e8261126f565b6000838152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552609a845282852080546000190190558785526099909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4611463565b6000612b308284614235565b6001811115612e195760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610d04565b816001600160a01b038516612e7557612e708160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b612e98565b836001600160a01b0316856001600160a01b031614612e9857612e9885826133fc565b6001600160a01b038416612eb457612eaf81613499565b612ed7565b846001600160a01b0316846001600160a01b031614612ed757612ed78482613572565b5050505050565b600054610100900460ff16612f055760405162461bcd60e51b8152600401610d04906141ea565b6113d83361241f565b600054610100900460ff16612f355760405162461bcd60e51b8152600401610d04906141ea565b8151612f48906097906020850190613961565b508051610da5906098906020840190613961565b600054610100900460ff16612cf35760405162461bcd60e51b8152600401610d04906141ea565b600082612f9085846135b6565b14949350505050565b6000612fa76101008361424d565b90506000612fb761010084614330565b600092835261013260205260409092208054600190931b9092179091555050565b6040516001600160601b03193360601b1660208201526000908190439042906034016040516020818303038152906040528051906020012060001c61301d919061424d565b6040516001600160601b03194160601b166020820152459042906034016040516020818303038152906040528051906020012060001c61305d919061424d565b6130674442614235565b6130719190614235565b61307b9190614235565b6130859190614235565b61308f9190614235565b6040516020016130a191815260200190565b60408051601f19818403018152919052805160209091012091505090565b60006001815b610138548110156131275761013881815481106130f257634e487b7160e01b600052603260045260246000fd5b906000526020600020015484116131155761310e816001614235565b9150613127565b8061311f81614315565b9150506130c5565b5061012d805460ff19169055612b3081613609565b6000613191826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137629092919063ffffffff16565b805190915015610da557808060200190518101906131af9190613c5d565b610da55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d04565b60006001600160a01b0384163b1561331057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613252903390899088908890600401614063565b602060405180830381600087803b15801561326c57600080fd5b505af192505050801561329c575060408051601f3d908101601f1916820190925261329991810190613db6565b60015b6132f6573d8080156132ca576040519150601f19603f3d011682016040523d82523d6000602084013e6132cf565b606091505b5080516132ee5760405162461bcd60e51b8152600401610d0490614100565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115d3565b5060016115d3565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106133575772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613383576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106133a157662386f26fc10000830492506010015b6305f5e10083106133b9576305f5e100830492506008015b61271083106133cd57612710830492506004015b606483106133df576064830492506002015b600a8310610c605760010192915050565b6000612b308284614261565b6000600161340984611340565b6134139190614280565b600083815260ca6020526040902054909150808214613466576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb546000906134ab90600190614280565b600083815260cc602052604081205460cb80549394509092849081106134e157634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060cb838154811061351057634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb80548061355657634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061357d83611340565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b600081815b8451811015612ac2576135f5828683815181106135e857634e487b7160e01b600052603260045260246000fd5b6020026020010151613771565b91508061360181614315565b9150506135bb565b600080821161365a5760405162461bcd60e51b815260206004820152601960248201527f4c6976654172744d656d6265723a206c6576656c206f766572000000000000006044820152606401610d04565b600782106136aa5760405162461bcd60e51b815260206004820152601860248201527f4c6976654172744d656d6265723a2068617665206f76657200000000000000006044820152606401610d04565b6000828152610134602052604081205483916101366136ca600185614280565b815481106136e857634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508082101561370857829350505050610c63565b60018311801561371c575061012d5460ff16155b15613733578261372b816142c3565b93505061374f565b61012d805460ff191660011790558261374b81614315565b9350505b61375883613609565b9350505050610c63565b60606115d384846000856137a0565b600081831061378d576000828152602084905260409020612b30565b6000838152602083905260409020612b30565b6060824710156138015760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d04565b600080866001600160a01b0316858760405161381d9190613f7d565b60006040518083038185875af1925050503d806000811461385a576040519150601f19603f3d011682016040523d82523d6000602084013e61385f565b606091505b50915091506138708783838761387b565b979650505050505050565b606083156138e75782516138e0576001600160a01b0385163b6138e05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d04565b50816115d3565b6115d383838151156138fc5781518083602001fd5b8060405162461bcd60e51b8152600401610d0491906140a0565b828054828255906000526020600020908101928215613951579160200282015b82811115613951578235825591602001919060010190613936565b5061395d9291506139d5565b5090565b82805461396d906142da565b90600052602060002090601f01602090048101928261398f5760008555613951565b82601f106139a857805160ff1916838001178555613951565b82800160010185558215613951579182015b828111156139515782518255916020019190600101906139ba565b5b8082111561395d57600081556001016139d6565b600067ffffffffffffffff80841115613a0557613a05614370565b604051601f8501601f19908116603f01168101908282118183101715613a2d57613a2d614370565b81604052809350858152868686011115613a4657600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112613a71578182fd5b50813567ffffffffffffffff811115613a88578182fd5b6020830191508360208083028501011115613aa257600080fd5b9250929050565b8035610c6381614386565b600060208284031215613ac5578081fd5b8135612b3081614386565b60008060408385031215613ae2578081fd5b8235613aed81614386565b91506020830135613afd81614386565b809150509250929050565b600080600060608486031215613b1c578081fd5b8335613b2781614386565b92506020840135613b3781614386565b929592945050506040919091013590565b60008060008060808587031215613b5d578081fd5b8435613b6881614386565b93506020850135613b7881614386565b925060408501359150606085013567ffffffffffffffff811115613b9a578182fd5b8501601f81018713613baa578182fd5b613bb9878235602084016139ea565b91505092959194509250565b60008060408385031215613bd7578182fd5b8235613be281614386565b91506020830135613afd8161439b565b60008060408385031215613c04578182fd5b8235613c0f81614386565b946020939093013593505050565b60008060208385031215613c2f578182fd5b823567ffffffffffffffff811115613c45578283fd5b613c5185828601613a60565b90969095509350505050565b600060208284031215613c6e578081fd5b8151612b308161439b565b600060208284031215613c8a578081fd5b5035919050565b6000806000806000806000806000806000806101008d8f031215613cb3578788fd5b8c359b50613cc360208e01613aa9565b9a5060408d0135995060608d0135985067ffffffffffffffff60808e01351115613ceb578788fd5b613cfb8e60808f01358f01613a60565b909850965067ffffffffffffffff60a08e01351115613d18578586fd5b613d288e60a08f01358f01613a60565b909650945067ffffffffffffffff60c08e01351115613d45578384fd5b613d558e60c08f01358f01613a60565b909450925067ffffffffffffffff60e08e01351115613d72578081fd5b613d828e60e08f01358f01613a60565b81935080925050509295989b509295989b509295989b565b600060208284031215613dab578081fd5b8135612b30816143a9565b600060208284031215613dc7578081fd5b8151612b30816143a9565b600060208284031215613de3578081fd5b813567ffffffffffffffff811115613df9578182fd5b8201601f81018413613e09578182fd5b6115d3848235602084016139ea565b60008060408385031215613e2a578182fd5b823591506020830135613afd81614386565b60008060008060008060006080888a031215613e56578081fd5b87359650602088013567ffffffffffffffff80821115613e74578283fd5b613e808b838c01613a60565b909850965060408a0135915080821115613e98578283fd5b613ea48b838c01613a60565b909650945060608a0135915080821115613ebc578283fd5b50613ec98a828b01613a60565b989b979a50959850939692959293505050565b60008060408385031215613eee578182fd5b823591506020830135613afd8161439b565b60008060008060608587031215613f15578182fd5b8435935060208501359250604085013567ffffffffffffffff811115613f39578283fd5b613f4587828801613a60565b95989497509550505050565b60008151808452613f69816020860160208601614297565b601f01601f19169290920160200192915050565b60008251613f8f818460208701614297565b9190910192915050565b60008351613fab818460208801614297565b835190830190613fbf818360208801614297565b01949350505050565b8154600090819060028104600180831680613fe457607f831692505b602080841082141561400457634e487b7160e01b87526022600452602487fd5b818015614018576001811461402957614055565b60ff19861689528489019650614055565b60008a815260209020885b8681101561404d5781548b820152908501908301614034565b505084890196505b509498975050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061409690830184613f51565b9695505050505050565b600060208252612b306020830184613f51565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526033908201527f4c6976654172744d656d6265723a206f70657261746f7220717565727920666f60408201527239103737b732bc34b9ba32b73a103a37b5b2b760691b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000821982111561424857614248614344565b500190565b60008261425c5761425c61435a565b500490565b600081600019048311821515161561427b5761427b614344565b500290565b60008282101561429257614292614344565b500390565b60005b838110156142b257818101518382015260200161429a565b838111156116805750506000910152565b6000816142d2576142d2614344565b506000190190565b6002810460018216806142ee57607f821691505b6020821081141561430f57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561432957614329614344565b5060010190565b60008261433f5761433f61435a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d9557600080fd5b8015158114611d9557600080fd5b6001600160e01b031981168114611d9557600080fdfe68747470733a2f2f6170692e6c697665617274782e636f6d2f76312f6d616769632d626f782fa26469706673582212208b70abb87b5b7b381462097818e39ef8e19bf543d9bb6224e5ae2e130d15c41264736f6c63430008020033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.