ETH Price: $2,925.78 (-1.05%)

Contract

0xEa0D148400feF5fECe539f126ca667b73AD15221

Overview

ETH Balance

Taiko Alethia LogoTaiko Alethia LogoTaiko Alethia Logo0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingERC20

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import {ProtocolEvents} from "./interfaces/ProtocolEvents.sol";
import {BareVaultUpgradable} from "./BareVaultUpgradable.sol";
import {LockupUpgradable} from "./LockupUpgradable.sol";
import {IPauser} from "./interfaces/IPauser.sol";

contract StakingERC20 is ProtocolEvents, BareVaultUpgradable, LockupUpgradable, ReentrancyGuardUpgradeable {
    // errors
    error AddressZeroNotExpected();
    error InsufficientWithdrawableBalance();
    error DepositOverBond();
    error Cooldown();
    error Paused();
    error DepositAmountTooSmall(address receiver, uint256 amount, uint256 minStake);

    // event
    event DepositWithDuration(address indexed owner, uint256 lockStart, uint256 amount, uint256 duration);

    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableMap for EnumerableMap.AddressToUintMap;

    // ------- LOGICS ------- //
    /// cooldown, minStake, maxStake
    bytes32 public constant STAKING_OPERATOR_ROLE = keccak256("STAKING_OPERATOR_ROLE");

    mapping(address => uint256) internal _userStakeCooldown;

    // The contract for indicating if staking is paused.
    IPauser public pauser;

    // the address of allocator register
    address public allocator;

    /// @notice Stake cooldown, not allowed to unstake when still in cool down duration
    /// This is to prevent high frequency reward sniping; or other borrow / flashloan to stake exploits.
    uint256 public cooldown;

    /// @notice stake min limit, limit on every staking
    uint256 public minStake;

    /// @notice stake max limit, limit on total supply
    uint256 public maxStakeSupply;

    receive() external payable override { revert("Not Allowed"); }
    fallback() external payable { revert("Not Allowed"); }

    // --------- Initialize ---------- //
    /// @notice Init params
    struct Init {
        address admin;
        address operator;
        address pauser;
        address asset;
        uint256 cooldown;
        uint256 minStake;
        uint256 maxStakeSupply;
        address allocator;
    }

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    function initialize(Init calldata init) external initializer {
        __BareVault_init(init.asset);
        __ReentrancyGuard_init();

        // set admin roles
        _setRoleAdmin(STAKING_OPERATOR_ROLE, DEFAULT_ADMIN_ROLE);

        // grant admin roles
        _grantRole(DEFAULT_ADMIN_ROLE, init.admin);

        // grant sub roles
        _grantRole(STAKING_OPERATOR_ROLE, init.operator);

        // set slot
        cooldown = init.cooldown;
        minStake = init.minStake;
        maxStakeSupply = init.maxStakeSupply;
        allocator = init.allocator;
        pauser = IPauser(init.pauser);
        // initial durations
        acceptedDurations.add(60 days);
        acceptedDurations.add(91 days);
        acceptedDurations.add(182 days);
        acceptedDurations.add(365 days);
    }

    function deposit(uint256) public payable override nonReentrant returns (uint256) {
        revert("Not Allowed");
    }

    function deposit(uint256 assets, uint256 duration) public nonReentrant returns (uint256) {
        // only for param checking
        if (pauser.isStakingPaused()) {
            revert Paused();
        }
        uint256 maxAssets = maxDeposit(_msgSender());
        if (assets > maxAssets) {
            revert ExceededMaxDeposit(_msgSender(), assets, maxAssets);
        }
        if (assets < minStake) {
            revert DepositAmountTooSmall(_msgSender(), assets, minStake);
        }
        if (maxStakeSupply != 0 && assets + totalDeposit() > maxStakeSupply) {
            revert DepositOverBond();
        }

        _insertLockUp(_msgSender(), assets, duration * 24 * 3600);
        _updateLockUp(_msgSender());

        _userStakeCooldown[_msgSender()] = block.timestamp;
        _deposit(_msgSender(), assets);
        emit DepositWithDuration(_msgSender(), block.timestamp, assets, duration * 24 * 3600);

        return assets;
    }

    function withdraw(uint256 assets, address receiver) public override nonReentrant returns (uint256) {
        (bool inCooldown,) = this.userStakeCooldown(_msgSender());
        if (inCooldown) {
            revert Cooldown();
        }
        if (pauser.isStakingPaused()) {
            revert Paused();
        }
        _updateLockUp(_msgSender());
        UserLockStorage storage userLock = _getUserLockStorage();
        (,uint256 userLocked) = userLock._userLocked.tryGet(_msgSender());
        uint256 deposited_ = deposited(_msgSender());
        if (deposited_ - userLocked < assets) {
            revert InsufficientWithdrawableBalance();
        }
        return super.withdraw(assets, receiver);
    }

    function userStakeCooldown(address depositor) public view returns (bool, uint256) {
        if (depositor == address(0)) {
            revert AddressZeroNotExpected();
        }
        if (_userStakeCooldown[depositor] == 0) {
            return (false, 0);
        }

        if (block.timestamp < _userStakeCooldown[depositor]) {
            // unexpected time, won't happen
            return (true, 0);
        }
        if (block.timestamp >= _userStakeCooldown[depositor] + cooldown) {
            return (false, 0);
        }

        uint256 cooldown_ = cooldown - (block.timestamp - _userStakeCooldown[depositor]);
        return (true, cooldown_);
    }

    function setCooldown(uint256 newCooldown) external onlyRole(STAKING_OPERATOR_ROLE) {
        cooldown = newCooldown;
        emit ProtocolConfigChanged(this.setCooldown.selector, "setCooldown(uint256)", abi.encode(newCooldown));
    }

    function setMinStake(uint256 newMinStake) external onlyRole(STAKING_OPERATOR_ROLE) {
        minStake = newMinStake;
        emit ProtocolConfigChanged(this.setMinStake.selector, "setMinStake(uint256)", abi.encode(newMinStake));
    }

    function setMaxStakeSupply(uint256 newMaxStakeSupply) external onlyRole(STAKING_OPERATOR_ROLE) {
        maxStakeSupply = newMaxStakeSupply;
        emit ProtocolConfigChanged(this.setMaxStakeSupply.selector, "setMaxStakeSupply(uint256)", abi.encode(newMaxStakeSupply));
    }

    // emergency unlock in advance
    function unlockLockups(address[] memory users, uint256[] memory amounts) external onlyRole(STAKING_OPERATOR_ROLE) {
        require(users.length == amounts.length, "length must be equal");
        uint256 unlockAmount;
        for (uint256 i; i < users.length; i++) {
            _updateLockUp(users[i]);
            uint256 lockAmount = getUserLockUps(users[i]);
            if (lockAmount >= amounts[i]) {
                unlockAmount = _unlock(users[i], amounts[i]);
            }
        }
    }

    function addLockDuration(uint256 duration) external onlyRole(STAKING_OPERATOR_ROLE) returns (bool) {
        emit ProtocolConfigChanged(this.addLockDuration.selector, "addLockDuration(uint256)", abi.encode(duration));
        return _addLockDuration(duration);
    }

    function removeLockDuration(uint256 duration) external onlyRole(STAKING_OPERATOR_ROLE) returns (bool) {
        emit ProtocolConfigChanged(this.removeLockDuration.selector, "removeLockDuration(uint256)", abi.encode(duration));
        return _removeLockDuration(duration);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

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

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;


    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
    struct AccessControlStorage {
        mapping(bytes32 role => RoleData) _roles;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;

    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
        assembly {
            $.slot := AccessControlStorageLocation
        }
    }

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    function __AccessControl_init() internal onlyInitializing {
    }

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

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

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

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

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

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

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

        _revokeRole(role, callerConfirmation);
    }

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

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (!hasRole(role, account)) {
            $._roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (hasRole(role, account)) {
            $._roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol)

pragma solidity ^0.8.20;

import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol";
import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable {
    using EnumerableSet for EnumerableSet.AddressSet;

    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable
    struct AccessControlEnumerableStorage {
        mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000;

    function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) {
        assembly {
            $.slot := AccessControlEnumerableStorageLocation
        }
    }

    function __AccessControlEnumerable_init() internal onlyInitializing {
    }

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].length();
    }

    /**
     * @dev Overload {AccessControl-_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool granted = super._grantRole(role, account);
        if (granted) {
            $._roleMembers[role].add(account);
        }
        return granted;
    }

    /**
     * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool revoked = super._revokeRole(role, account);
        if (revoked) {
            $._roleMembers[role].remove(account);
        }
        return revoked;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @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]
 * ```solidity
 * 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 Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._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 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._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() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @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 {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

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

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

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../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);
 * }
 * ```
 */
abstract contract ERC165Upgradeable is Initializable, IERC165 {
    function __ERC165_init() internal onlyInitializing {
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../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;

    /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
    struct ReentrancyGuardStorage {
        uint256 _status;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;

    function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
        assembly {
            $.slot := ReentrancyGuardStorageLocation
        }
    }

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

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

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        $._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 {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if ($._status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        $._status = ENTERED;
    }

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
        return $._status == ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @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].
     *
     * CAUTION: See Security Considerations above.
     */
    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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.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 SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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(IERC20 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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 15 of 20 : EnumerableMap.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableMap.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js.

pragma solidity ^0.8.20;

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

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * The following map types are supported:
 *
 * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
 * - `address -> uint256` (`AddressToUintMap`) since v4.6.0
 * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
 * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
 * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableMap.
 * ====
 */
library EnumerableMap {
    using EnumerableSet for EnumerableSet.Bytes32Set;

    // To implement this library for multiple types with as little code repetition as possible, we write it in
    // terms of a generic Map type with bytes32 keys and values. The Map implementation uses private functions,
    // and user-facing implementations such as `UintToAddressMap` are just wrappers around the underlying Map.
    // This means that we can only create new EnumerableMaps for types that fit in bytes32.

    /**
     * @dev Query for a nonexistent map key.
     */
    error EnumerableMapNonexistentKey(bytes32 key);

    struct Bytes32ToBytes32Map {
        // Storage of keys
        EnumerableSet.Bytes32Set _keys;
        mapping(bytes32 key => bytes32) _values;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) {
        map._values[key] = value;
        return map._keys.add(key);
    }

    /**
     * @dev Removes a key-value pair from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) {
        delete map._values[key];
        return map._keys.remove(key);
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) {
        return map._keys.contains(key);
    }

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) {
        return map._keys.length();
    }

    /**
     * @dev Returns the key-value pair stored at position `index` in the map. O(1).
     *
     * Note that there are no guarantees on the ordering of entries inside the
     * array, and it may change when more entries are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) {
        bytes32 key = map._keys.at(index);
        return (key, map._values[key]);
    }

    /**
     * @dev Tries to returns the value associated with `key`. O(1).
     * Does not revert if `key` is not in the map.
     */
    function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) {
        bytes32 value = map._values[key];
        if (value == bytes32(0)) {
            return (contains(map, key), bytes32(0));
        } else {
            return (true, value);
        }
    }

    /**
     * @dev Returns the value associated with `key`. O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) {
        bytes32 value = map._values[key];
        if (value == 0 && !contains(map, key)) {
            revert EnumerableMapNonexistentKey(key);
        }
        return value;
    }

    /**
     * @dev Return the an array containing all the keys
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) {
        return map._keys.values();
    }

    // UintToUintMap

    struct UintToUintMap {
        Bytes32ToBytes32Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) {
        return set(map._inner, bytes32(key), bytes32(value));
    }

    /**
     * @dev Removes a value from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(UintToUintMap storage map, uint256 key) internal returns (bool) {
        return remove(map._inner, bytes32(key));
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) {
        return contains(map._inner, bytes32(key));
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(UintToUintMap storage map) internal view returns (uint256) {
        return length(map._inner);
    }

    /**
     * @dev Returns the element stored at position `index` in the map. O(1).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) {
        (bytes32 key, bytes32 value) = at(map._inner, index);
        return (uint256(key), uint256(value));
    }

    /**
     * @dev Tries to returns the value associated with `key`. O(1).
     * Does not revert if `key` is not in the map.
     */
    function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) {
        (bool success, bytes32 value) = tryGet(map._inner, bytes32(key));
        return (success, uint256(value));
    }

    /**
     * @dev Returns the value associated with `key`. O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) {
        return uint256(get(map._inner, bytes32(key)));
    }

    /**
     * @dev Return the an array containing all the keys
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function keys(UintToUintMap storage map) internal view returns (uint256[] memory) {
        bytes32[] memory store = keys(map._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintToAddressMap

    struct UintToAddressMap {
        Bytes32ToBytes32Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
        return set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
        return remove(map._inner, bytes32(key));
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
        return contains(map._inner, bytes32(key));
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(UintToAddressMap storage map) internal view returns (uint256) {
        return length(map._inner);
    }

    /**
     * @dev Returns the element stored at position `index` in the map. O(1).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
        (bytes32 key, bytes32 value) = at(map._inner, index);
        return (uint256(key), address(uint160(uint256(value))));
    }

    /**
     * @dev Tries to returns the value associated with `key`. O(1).
     * Does not revert if `key` is not in the map.
     */
    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
        (bool success, bytes32 value) = tryGet(map._inner, bytes32(key));
        return (success, address(uint160(uint256(value))));
    }

    /**
     * @dev Returns the value associated with `key`. O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
        return address(uint160(uint256(get(map._inner, bytes32(key)))));
    }

    /**
     * @dev Return the an array containing all the keys
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) {
        bytes32[] memory store = keys(map._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressToUintMap

    struct AddressToUintMap {
        Bytes32ToBytes32Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) {
        return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value));
    }

    /**
     * @dev Removes a value from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(AddressToUintMap storage map, address key) internal returns (bool) {
        return remove(map._inner, bytes32(uint256(uint160(key))));
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(AddressToUintMap storage map, address key) internal view returns (bool) {
        return contains(map._inner, bytes32(uint256(uint160(key))));
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(AddressToUintMap storage map) internal view returns (uint256) {
        return length(map._inner);
    }

    /**
     * @dev Returns the element stored at position `index` in the map. O(1).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) {
        (bytes32 key, bytes32 value) = at(map._inner, index);
        return (address(uint160(uint256(key))), uint256(value));
    }

    /**
     * @dev Tries to returns the value associated with `key`. O(1).
     * Does not revert if `key` is not in the map.
     */
    function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) {
        (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key))));
        return (success, uint256(value));
    }

    /**
     * @dev Returns the value associated with `key`. O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(AddressToUintMap storage map, address key) internal view returns (uint256) {
        return uint256(get(map._inner, bytes32(uint256(uint160(key)))));
    }

    /**
     * @dev Return the an array containing all the keys
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function keys(AddressToUintMap storage map) internal view returns (address[] memory) {
        bytes32[] memory store = keys(map._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // Bytes32ToUintMap

    struct Bytes32ToUintMap {
        Bytes32ToBytes32Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) {
        return set(map._inner, key, bytes32(value));
    }

    /**
     * @dev Removes a value from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) {
        return remove(map._inner, key);
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) {
        return contains(map._inner, key);
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(Bytes32ToUintMap storage map) internal view returns (uint256) {
        return length(map._inner);
    }

    /**
     * @dev Returns the element stored at position `index` in the map. O(1).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) {
        (bytes32 key, bytes32 value) = at(map._inner, index);
        return (key, uint256(value));
    }

    /**
     * @dev Tries to returns the value associated with `key`. O(1).
     * Does not revert if `key` is not in the map.
     */
    function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) {
        (bool success, bytes32 value) = tryGet(map._inner, key);
        return (success, uint256(value));
    }

    /**
     * @dev Returns the value associated with `key`. O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) {
        return uint256(get(map._inner, key));
    }

    /**
     * @dev Return the an array containing all the keys
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) {
        bytes32[] memory store = keys(map._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import {AccessControlEnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol";

// inspired by
// openzeppelin-contracts/contracts/finance/VestingWallet.sol
// openzeppelin-contracts/contracts/finance/PaymentSplitter.sol
// openzeppelin-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol
abstract contract BareVaultUpgradable is ContextUpgradeable, AccessControlEnumerableUpgradeable {
    // errors
    /**
     * @dev Attempted to deposit more assets than the max amount for `receiver`.
     */
    error ExceededMaxDeposit(address receiver, uint256 assets, uint256 max);

    /**
     * @dev Attempted to withdraw more assets than the max amount for `receiver`.
     */
    error ExceededMaxWithdraw(address owner, uint256 assets, uint256 max);

    error ExceededWithdrawal(address owner, uint256 assets, uint256 max);

    event Deposit(address indexed sender, uint256 assets);

    event Withdraw(address indexed sender, address indexed receiver, uint256 assets);

    using EnumerableMap for EnumerableMap.AddressToUintMap;

    /// @custom:storage-location erc7201:storage.BareVault
    struct BareVaultStorage {
        uint256 _totalDeposit;
        EnumerableMap.AddressToUintMap _deposit;
        address _asset; // ERC20
    }

    // keccak256(abi.encode(uint256(keccak256("storage.BareVault")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant BareVaultStorageLocation = 0x1777a80db1c6a9865545ecb5d27383880a1e667f2012bc238aba256783d9c400;

    function _getBareVaultStorage() internal pure returns (BareVaultStorage storage vault) {
        assembly {
            vault.slot := BareVaultStorageLocation
        }
    }

    /**
     * @dev Sets the sender as the initial owner, the beneficiary as the pending owner, the start timestamp and the
     * vesting duration of the vesting wallet.
     */
    function __BareVault_init(address _asset) internal onlyInitializing {
        __AccessControlEnumerable_init();
        __Context_init();
        __BareVault_init_unchained(_asset);
    }

    function __BareVault_init_unchained(address _asset) internal onlyInitializing {
        BareVaultStorage storage vault = _getBareVaultStorage();
        vault._asset = _asset;
    }

    /**
     * @dev The contract should be able to receive Native Token.
     */
    receive() external payable virtual {}

    /**
     * @dev Getter for the beneficiary address.
     */
    function asset() public view virtual returns (address) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        return vault._asset;
    }

    /**
     * @dev Total amount of token already deposited
     */
    function totalDeposit() public view virtual returns (uint256) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        return vault._totalDeposit;
    }

    /**
     * @dev Total amount of token already deposited
     */
    function totalParticipants() public view virtual returns (uint256) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        return vault._deposit.length();
    }

    /**
     * @dev Amount of token already deposited
     */
    function deposited(address account) public view virtual returns (uint256) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        (,uint256 amount) = vault._deposit.tryGet(account);
        return amount;
    }

    /** @dev See {IERC4626-deposit}. */
    function deposit(uint256 assets) public payable virtual returns (uint256) {
        uint256 maxAssets = maxDeposit(_msgSender());
        if (assets > maxAssets) {
            revert ExceededMaxDeposit(_msgSender(), assets, maxAssets);
        }

        _deposit(_msgSender(), assets);

        return assets;
    }

    /** @dev See {IERC4626-withdraw}. */
    function withdraw(uint256 assets, address receiver) public virtual returns (uint256) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        uint256 maxAssets = maxWithdraw(_msgSender());
        if (assets > maxAssets) {
            revert ExceededMaxWithdraw(_msgSender(), assets, maxAssets);
        }
        (,uint256 _asset) = vault._deposit.tryGet(_msgSender());
        if (assets > _asset) {
            revert ExceededWithdrawal(_msgSender(), assets, _asset);
        }

        _withdraw(_msgSender(), receiver, assets);

        return assets;
    }

    /** @dev See {IERC4626-maxDeposit}. */
    function maxDeposit(address) public view virtual returns (uint256) {
        return type(uint256).max;
    }

    /** @dev See {IERC4626-maxWithdraw}. */
    function maxWithdraw(address owner) public view virtual returns (uint256) {
        BareVaultStorage storage vault = _getBareVaultStorage();
        (,uint256 amount) = vault._deposit.tryGet(owner);
        return amount;
    }

    /**
     * @dev Deposit/mint common workflow.
     */
    function _deposit(address caller, uint256 assets) internal virtual {
        BareVaultStorage storage vault = _getBareVaultStorage();
        // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the
        // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,
        // calls the vault, which is assumed not malicious.
        //
        // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the
        // assets are transferred and before the shares are minted, which is a valid state.
        // slither-disable-next-line reentrancy-no-eth
        SafeERC20.safeTransferFrom(IERC20(vault._asset), caller, address(this), assets);
        (,uint256 _asset) = vault._deposit.tryGet(caller);
        vault._deposit.set(caller, _asset + assets);
        vault._totalDeposit += assets;

        emit Deposit(caller, assets);
    }

    /**
     * @dev Withdraw/redeem common workflow.
     */
    function _withdraw(
        address caller,
        address receiver,
        uint256 assets
    ) internal virtual {
        BareVaultStorage storage vault = _getBareVaultStorage();
        // safe to use get on _withdraw
        vault._deposit.set(caller, vault._deposit.get(caller) - assets);
        vault._totalDeposit -= assets;

        if (vault._deposit.get(caller) == 0) {
            vault._deposit.remove(caller);
        }

        SafeERC20.safeTransfer(IERC20(vault._asset), receiver, assets);
        emit Withdraw(caller, receiver, assets);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IPauserRead {
    /// @notice Flag indicating if staking is paused.
    function isStakingPaused() external view returns (bool);

    /// @notice Flag indicating if allocation is paused.
    function isAllocationPaused() external view returns (bool);

    /// @notice Flag indicating if claim is paused.
    function isClaimPaused() external view returns (bool);
}

interface IPauserWrite {
    /// @notice Pauses all actions.
    function pauseAll() external;

    /// @notice unPauses all actions.
    function unpauseAll() external;
}

interface IPauser is IPauserRead, IPauserWrite {}

File 19 of 20 : ProtocolEvents.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface ProtocolEvents {
    /// @notice Emitted when a protocol configuration has been updated.
    /// @param setterSelector The selector of the function that updated the configuration.
    /// @param setterSignature The signature of the function that updated the configuration.
    /// @param value The abi-encoded data passed to the function that updated the configuration. Since this event will
    /// only be emitted by setters, this data corresponds to the updated values in the protocol configuration.
    event ProtocolConfigChanged(bytes4 indexed setterSelector, string setterSignature, bytes value);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

abstract contract LockupUpgradable {
    // errors
    /**
     * @dev Attempted to deposit more assets than the max amount for `receiver`.
     */
    error DurationNotExpected();

    /**
     * @dev Attempted to withdraw more assets than the max amount for `receiver`.
     */
    event UserLockUpdated(address indexed owner, uint256 lockedAmount);
    event UserUnlocked(address indexed owner, uint256 requestUnlock, uint256 unlockAmount);

    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableMap for EnumerableMap.AddressToUintMap;

    modifier checkDuration(uint256 duration) {
        if (!acceptedDurations.contains(duration)) {
            revert DurationNotExpected();
        }
        _;
    }

    // user lockups
    struct LockInfos {
        uint256[] lockStarts;
        uint256[] amounts;
        uint256[] durations;
    }

    struct UserLockStorage {
        EnumerableMap.AddressToUintMap _userLocked;
        mapping(address => LockInfos) _lockUps;
    }

    EnumerableSet.UintSet internal acceptedDurations;

    // keccak256(abi.encode(uint256(keccak256("storage.UserLockStorage")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant UserLockStorageLocation = 0x0ce81d75b936ea44989fc6dc3b015771ad68444f0aa2b557b82bc8a876676600;

    function _getUserLockStorage() internal pure returns (UserLockStorage storage userLock) {
        assembly {
            userLock.slot := UserLockStorageLocation
        }
    }

    function _insertLockUp(address owner, uint256 amount, uint256 duration) checkDuration(duration) internal {
        UserLockStorage storage userLock = _getUserLockStorage();
        userLock._lockUps[owner].lockStarts.push(block.timestamp);
        userLock._lockUps[owner].amounts.push(amount);
        userLock._lockUps[owner].durations.push(duration);
        (,uint256 locked) = userLock._userLocked.tryGet(owner);
        userLock._userLocked.set(owner, locked + amount);
    }

    function _updateLockUp(address owner) internal {
        UserLockStorage storage userLock = _getUserLockStorage();
        (,uint256 amount) = userLock._userLocked.tryGet(owner);
        if (userLock._lockUps[owner].amounts.length == 0) {
            return;
        }
        // [1-,2,3,4-] => [1-,2,3] => [3,2];
        uint256 currentLen;
        uint256 currentAmount;
        for (uint256 i = userLock._lockUps[owner].amounts.length; i > 0; i--) {
            if (userLock._lockUps[owner].lockStarts[i-1] + userLock._lockUps[owner].durations[i-1] <= block.timestamp) {
                currentLen = userLock._lockUps[owner].lockStarts.length;
                currentAmount = userLock._lockUps[owner].amounts[i-1];
                if (i == currentLen) {
                    // if element is the last on; skip swap
                } else {
                    userLock._lockUps[owner].lockStarts[i-1] = userLock._lockUps[owner].lockStarts[currentLen-1];
                    userLock._lockUps[owner].amounts[i-1] = userLock._lockUps[owner].amounts[currentLen-1];
                    userLock._lockUps[owner].durations[i-1] = userLock._lockUps[owner].durations[currentLen-1];
                }
                amount -= currentAmount;
                userLock._lockUps[owner].lockStarts.pop();
                userLock._lockUps[owner].amounts.pop();
                userLock._lockUps[owner].durations.pop();
            }
        }
        userLock._userLocked.set(owner, amount);
        emit UserLockUpdated(owner, amount);
    }

    // @return unlocked amount
    function _unlock(address owner, uint256 amount) internal returns (uint256) {
        UserLockStorage storage userLock = _getUserLockStorage();
        (,uint256 lockedAmount) = userLock._userLocked.tryGet(owner);
        if (userLock._lockUps[owner].amounts.length == 0) {
            return 0;
        }
        uint256 currentLen;
        uint256 unlockAmount;
        for (uint256 i = userLock._lockUps[owner].amounts.length; i > 0; i--) {
            if (userLock._lockUps[owner].lockStarts[i-1] + userLock._lockUps[owner].durations[i-1] > block.timestamp) {
                currentLen = userLock._lockUps[owner].lockStarts.length;
                unlockAmount += userLock._lockUps[owner].amounts[i-1];
                userLock._lockUps[owner].lockStarts.pop();
                userLock._lockUps[owner].amounts.pop();
                userLock._lockUps[owner].durations.pop();
                if (unlockAmount >= amount) {
                    break;
                }
            }
        }
        userLock._userLocked.set(owner, lockedAmount - unlockAmount);
        emit UserUnlocked(owner, amount, unlockAmount);
        return unlockAmount;
    }

    function getUserLockUps(address owner) public virtual view returns (uint256) {
        UserLockStorage storage userLock = _getUserLockStorage();
        (,uint256 amount) = userLock._userLocked.tryGet(owner);
        if (userLock._lockUps[owner].amounts.length == 0) {
            return 0;
        }
        for (uint256 i = userLock._lockUps[owner].amounts.length; i > 0; i--) {
            if (userLock._lockUps[owner].lockStarts[i-1] + userLock._lockUps[owner].durations[i-1] <= block.timestamp) {
                amount -= userLock._lockUps[owner].amounts[i-1];
            }
        }

        return amount;
    }

    function getUserLockUpArrays(address owner) public virtual view returns (uint256[] memory, uint256[] memory, uint256[] memory) {
        UserLockStorage storage userLock = _getUserLockStorage();
        return (userLock._lockUps[owner].lockStarts, userLock._lockUps[owner].amounts, userLock._lockUps[owner].durations);
    }

    // for testing purpose
    function updateLockUps(address owner) external {
        require(msg.sender == address(this), "sender forbidden");
        return _updateLockUp(owner);
    }

    function durations() external virtual view returns (uint256[] memory) {
        return acceptedDurations.values();
    }

    function _addLockDuration(uint256 duration) internal virtual returns (bool) {
        return acceptedDurations.add(duration);
    }

    function _removeLockDuration(uint256 duration) internal virtual returns (bool) {
        return acceptedDurations.remove(duration);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AddressZeroNotExpected","type":"error"},{"inputs":[],"name":"Cooldown","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minStake","type":"uint256"}],"name":"DepositAmountTooSmall","type":"error"},{"inputs":[],"name":"DepositOverBond","type":"error"},{"inputs":[],"name":"DurationNotExpected","type":"error"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"EnumerableMapNonexistentKey","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ExceededMaxDeposit","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ExceededMaxWithdraw","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ExceededWithdrawal","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InsufficientWithdrawableBalance","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockStart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"DepositWithDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"setterSelector","type":"bytes4"},{"indexed":false,"internalType":"string","name":"setterSignature","type":"string"},{"indexed":false,"internalType":"bytes","name":"value","type":"bytes"}],"name":"ProtocolConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockedAmount","type":"uint256"}],"name":"UserLockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestUnlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockAmount","type":"uint256"}],"name":"UserUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"}],"name":"Withdraw","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"addLockDuration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"durations","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getUserLockUpArrays","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getUserLockUps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"pauser","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"cooldown","type":"uint256"},{"internalType":"uint256","name":"minStake","type":"uint256"},{"internalType":"uint256","name":"maxStakeSupply","type":"uint256"},{"internalType":"address","name":"allocator","type":"address"}],"internalType":"struct StakingERC20.Init","name":"init","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxStakeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauser","outputs":[{"internalType":"contract IPauser","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"removeLockDuration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCooldown","type":"uint256"}],"name":"setCooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxStakeSupply","type":"uint256"}],"name":"setMaxStakeSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMinStake","type":"uint256"}],"name":"setMinStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalParticipants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"unlockLockups","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"updateLockUps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"userStakeCooldown","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50620000226200002860201b60201c565b6200019c565b60006200003a6200013260201b60201c565b90508060000160089054906101000a900460ff161562000086576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80168160000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff16146200012f5767ffffffffffffffff8160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff6040516200012691906200017f565b60405180910390a15b50565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b600067ffffffffffffffff82169050919050565b62000179816200015a565b82525050565b60006020820190506200019660008301846200016e565b92915050565b61539a80620001ac6000396000f3fe6080604052600436106102125760003560e01c806391d1485411610118578063c64db12e116100a0578063d547741f1161006f578063d547741f146108a6578063e2bbb158146108cf578063eca197361461090c578063ef9beeee14610935578063f6153ccd1461097257610252565b8063c64db12e146107c6578063ca15c873146107ef578063cb13cddb1461082c578063ce96cb771461086957610252565b8063a217fddf116100e7578063a217fddf146106ec578063a26dbf2614610717578063aa5dcecc14610742578063b6b55f251461076d578063ba61ecae1461079d57610252565b806391d148541461061b57806397e3b7f4146106585780639fd0506d14610683578063a0edb2df146106ae57610252565b8063402d267d1161019b57806374e71acb1161016a57806374e71acb14610522578063787a08a61461054d5780638c80fd90146105785780639010d07c146105a15780639163b7eb146105de57610252565b8063402d267d146104525780634a41d89d1461048f5780634fc3f41a146104ba5780635f019d51146104e357610252565b8063248a9ca3116101e2578063248a9ca31461036d5780632f2ff15d146103aa57806336568abe146103d3578063375b3c0a146103fc57806338d52e0f1461042757610252565b8062f714ce1461028d57806301ffc9a7146102ca5780630689ef2814610307578063242210161461034457610252565b36610252576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610249906142e1565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610284906142e1565b60405180910390fd5b34801561029957600080fd5b506102b460048036038101906102af91906143a9565b61099d565b6040516102c191906143f8565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec919061446b565b610be1565b6040516102fe91906144b3565b60405180910390f35b34801561031357600080fd5b5061032e600480360381019061032991906144ce565b610c5b565b60405161033b91906143f8565b60405180910390f35b34801561035057600080fd5b5061036b600480360381019061036691906144fb565b610eb7565b005b34801561037957600080fd5b50610394600480360381019061038f919061455e565b610f69565b6040516103a1919061459a565b60405180910390f35b3480156103b657600080fd5b506103d160048036038101906103cc91906145b5565b610f97565b005b3480156103df57600080fd5b506103fa60048036038101906103f591906145b5565b610fb9565b005b34801561040857600080fd5b50610411611034565b60405161041e91906143f8565b60405180910390f35b34801561043357600080fd5b5061043c61103a565b6040516104499190614604565b60405180910390f35b34801561045e57600080fd5b50610479600480360381019061047491906144ce565b611072565b60405161048691906143f8565b60405180910390f35b34801561049b57600080fd5b506104a461109c565b6040516104b191906146dd565b60405180910390f35b3480156104c657600080fd5b506104e160048036038101906104dc91906144fb565b6110ad565b005b3480156104ef57600080fd5b5061050a600480360381019061050591906144ce565b61115f565b604051610519939291906146ff565b60405180910390f35b34801561052e57600080fd5b50610537611340565b60405161054491906143f8565b60405180910390f35b34801561055957600080fd5b50610562611346565b60405161056f91906143f8565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a91906144fb565b61134c565b005b3480156105ad57600080fd5b506105c860048036038101906105c3919061474b565b6113fe565b6040516105d59190614604565b60405180910390f35b3480156105ea57600080fd5b50610605600480360381019061060091906144fb565b61143b565b60405161061291906144b3565b60405180910390f35b34801561062757600080fd5b50610642600480360381019061063d91906145b5565b6114f5565b60405161064f91906144b3565b60405180910390f35b34801561066457600080fd5b5061066d61156e565b60405161067a919061459a565b60405180910390f35b34801561068f57600080fd5b50610698611592565b6040516106a591906147ea565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d091906144ce565b6115b8565b6040516106e3929190614805565b60405180910390f35b3480156106f857600080fd5b50610701611791565b60405161070e919061459a565b60405180910390f35b34801561072357600080fd5b5061072c611798565b60405161073991906143f8565b60405180910390f35b34801561074e57600080fd5b506107576117b7565b6040516107649190614604565b60405180910390f35b610787600480360381019061078291906144fb565b6117dd565b60405161079491906143f8565b60405180910390f35b3480156107a957600080fd5b506107c460048036038101906107bf9190614a4a565b611822565b005b3480156107d257600080fd5b506107ed60048036038101906107e891906144ce565b611964565b005b3480156107fb57600080fd5b506108166004803603810190610811919061455e565b6119de565b60405161082391906143f8565b60405180910390f35b34801561083857600080fd5b50610853600480360381019061084e91906144ce565b611a10565b60405161086091906143f8565b60405180910390f35b34801561087557600080fd5b50610890600480360381019061088b91906144ce565b611a42565b60405161089d91906143f8565b60405180910390f35b3480156108b257600080fd5b506108cd60048036038101906108c891906145b5565b611a74565b005b3480156108db57600080fd5b506108f660048036038101906108f19190614ac2565b611a96565b60405161090391906143f8565b60405180910390f35b34801561091857600080fd5b50610933600480360381019061092e9190614b27565b611d98565b005b34801561094157600080fd5b5061095c600480360381019061095791906144fb565b6120f3565b60405161096991906144b3565b60405180910390f35b34801561097e57600080fd5b506109876121ad565b60405161099491906143f8565b60405180910390f35b60006109a76121c5565b60003073ffffffffffffffffffffffffffffffffffffffff1663a0edb2df6109cd61221c565b6040518263ffffffff1660e01b81526004016109e99190614604565b6040805180830381865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190614b96565b5090508015610a64576040517fb0782df700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ea7ca896040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af59190614bd6565b15610b2c576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b3c610b3761221c565b612224565b6000610b4661290d565b90506000610b67610b5561221c565b8360000161293590919063ffffffff16565b9150506000610b7c610b7761221c565b611a10565b9050868282610b8b9190614c32565b1015610bc3576040517f0b1bd51c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bcd8787612977565b945050505050610bdb612a78565b92915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c545750610c5382612a91565b5b9050919050565b600080610c6661290d565b90506000610c80848360000161293590919063ffffffff16565b91505060008260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905003610cdd57600092505050610eb2565b60008260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b6000811115610eab57428360030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600183610d859190614c32565b81548110610d9657610d95614c66565b5b90600052602060002001548460030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600184610df29190614c32565b81548110610e0357610e02614c66565b5b9060005260206000200154610e189190614c95565b11610e98578260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600182610e6e9190614c32565b81548110610e7f57610e7e614c66565b5b906000526020600020015482610e959190614c32565b91505b8080610ea390614cc9565b915050610d2a565b5080925050505b919050565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb610ee181612b0b565b81600781905550632422101660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e7483604051602001610f4191906143f8565b604051602081830303815290604052604051610f5d9190614dbd565b60405180910390a25050565b600080610f74612b1f565b905080600001600084815260200190815260200160002060010154915050919050565b610fa082610f69565b610fa981612b0b565b610fb38383612b47565b50505050565b610fc161221c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611025576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61102f8282612b9c565b505050565b60065481565b600080611045612bf1565b90508060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050919050565b60606110a86000612c19565b905090565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb6110d781612b0b565b81600581905550634fc3f41a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e748360405160200161113791906143f8565b6040516020818303038152906040526040516111539190614e3e565b60405180910390a25050565b6060806060600061116e61290d565b90508060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018160030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018260030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018280548060200260200160405190810160405280929190818152602001828054801561128757602002820191906000526020600020905b815481526020019060010190808311611273575b50505050509250818054806020026020016040519081016040528092919081815260200182805480156112d957602002820191906000526020600020905b8154815260200190600101908083116112c5575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561132b57602002820191906000526020600020905b815481526020019060010190808311611317575b50505050509050935093509350509193909250565b60075481565b60055481565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61137681612b0b565b81600681905550638c80fd9060e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e74836040516020016113d691906143f8565b6040516020818303038152906040526040516113f29190614ebf565b60405180910390a25050565b600080611409612c3a565b905061143283826000016000878152602001908152602001600020612c6290919063ffffffff16565b91505092915050565b60007f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61146781612b0b565b639163b7eb60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e74846040516020016114c091906143f8565b6040516020818303038152906040526040516114dc9190614f40565b60405180910390a26114ed83612c7c565b915050919050565b600080611500612b1f565b905080600001600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611621576040517fa4377c6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403611674576000809150915061178c565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544210156116c857600160009150915061178c565b600554600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117159190614c95565b4210611727576000809150915061178c565b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054426117749190614c32565b6005546117819190614c32565b905060018192509250505b915091565b6000801b81565b6000806117a3612bf1565b90506117b181600101612c99565b91505090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006117e76121c5565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611819906142e1565b60405180910390fd5b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61184c81612b0b565b8151835114611890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188790614fc1565b60405180910390fd5b6000805b845181101561195d576118c08582815181106118b3576118b2614c66565b5b6020026020010151612224565b60006118e58683815181106118d8576118d7614c66565b5b6020026020010151610c5b565b90508482815181106118fa576118f9614c66565b5b602002602001015181106119495761194686838151811061191e5761191d614c66565b5b602002602001015186848151811061193957611938614c66565b5b6020026020010151612cae565b92505b50808061195590614fe1565b915050611894565b5050505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c990615075565b60405180910390fd5b6119db81612224565b50565b6000806119e9612c3a565b9050611a08816000016000858152602001908152602001600020613115565b915050919050565b600080611a1b612bf1565b90506000611a35848360010161293590919063ffffffff16565b9150508092505050919050565b600080611a4d612bf1565b90506000611a67848360010161293590919063ffffffff16565b9150508092505050919050565b611a7d82610f69565b611a8681612b0b565b611a908383612b9c565b50505050565b6000611aa06121c5565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ea7ca896040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b319190614bd6565b15611b68576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b7a611b7561221c565b611072565b905080841115611bcc57611b8c61221c565b84826040517f88db76aa000000000000000000000000000000000000000000000000000000008152600401611bc393929190615095565b60405180910390fd5b600654841015611c2057611bde61221c565b846006546040517f75eb5dd1000000000000000000000000000000000000000000000000000000008152600401611c1793929190615095565b60405180910390fd5b600060075414158015611c465750600754611c396121ad565b85611c449190614c95565b115b15611c7d576040517f950b856e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ca8611c8861221c565b85610e10601887611c9991906150cc565b611ca391906150cc565b61312a565b611cb8611cb361221c565b612224565b4260026000611cc561221c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d14611d0e61221c565b85613309565b611d1c61221c565b73ffffffffffffffffffffffffffffffffffffffff167f71a810dd86885cd9fea6e9b97fe8287ec71dd6475db601e9b925679c9f3ec3d14286610e10601888611d6591906150cc565b611d6f91906150cc565b604051611d7e9392919061510e565b60405180910390a283915050611d92612a78565b92915050565b6000611da26133f3565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff16148015611df05750825b9050600060018367ffffffffffffffff16148015611e25575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015611e33575080155b15611e6a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315611eba5760018560000160086101000a81548160ff0219169083151502179055505b611ed5866060016020810190611ed091906144ce565b61341b565b611edd61343f565b611f0a7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb6000801b613451565b611f296000801b876000016020810190611f2491906144ce565b612b47565b50611f667f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb876020016020810190611f6191906144ce565b612b47565b5085608001356005819055508560a001356006819055508560c001356007819055508560e0016020810190611f9b91906144ce565b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550856040016020810190611fee91906144ce565b600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612045624f1a0060006134bc90919063ffffffff16565b5061205d6277f88060006134bc90919063ffffffff16565b5061207562eff10060006134bc90919063ffffffff16565b5061208e6301e1338060006134bc90919063ffffffff16565b5083156120eb5760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516120e29190615194565b60405180910390a15b505050505050565b60007f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61211f81612b0b565b63ef9beeee60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e748460405160200161217891906143f8565b60405160208183030381529060405260405161219491906151fb565b60405180910390a26121a5836134d6565b915050919050565b6000806121b8612bf1565b9050806000015491505090565b60006121cf6134f3565b9050600281600001540361220f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816000018190555050565b600033905090565b600061222e61290d565b90506000612248838360000161293590919063ffffffff16565b91505060008260030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050036122a157505061290a565b60008060008460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b600081111561289d57428560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160018361234c9190614c32565b8154811061235d5761235c614c66565b5b90600052602060002001548660030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001846123b99190614c32565b815481106123ca576123c9614c66565b5b90600052602060002001546123df9190614c95565b1161288a578460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905092508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160018261247f9190614c32565b815481106124905761248f614c66565b5b906000526020600020015491508281031561273d578460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001846124f69190614c32565b8154811061250757612506614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001836125639190614c32565b8154811061257457612573614c66565b5b90600052602060002001819055508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001846125d39190614c32565b815481106125e4576125e3614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001836126409190614c32565b8154811061265157612650614c66565b5b90600052602060002001819055508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016001846126b09190614c32565b815481106126c1576126c0614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160018361271d9190614c32565b8154811061272e5761272d614c66565b5b90600052602060002001819055505b81846127499190614c32565b93508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548061279f5761279e615230565b5b600190038181906000526020600020016000905590558460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548061280957612808615230565b5b600190038181906000526020600020016000905590558460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020180548061287357612872615230565b5b600190038181906000526020600020016000905590555b808061289590614cc9565b9150506122f1565b506128b685848660000161351b9092919063ffffffff16565b508473ffffffffffffffffffffffffffffffffffffffff167f9e819531b9f4f6660e839d7b1ddb93441f1a62e8248416d7807881afecfa2498846040516128fd91906143f8565b60405180910390a2505050505b50565b60007f0ce81d75b936ea44989fc6dc3b015771ad68444f0aa2b557b82bc8a876676600905090565b600080600080612961866000018673ffffffffffffffffffffffffffffffffffffffff1660001b613550565b91509150818160001c9350935050509250929050565b600080612982612bf1565b9050600061299661299161221c565b611a42565b9050808511156129e8576129a861221c565b85826040517fd929e4430000000000000000000000000000000000000000000000000000000081526004016129df93929190615095565b60405180910390fd5b6000612a076129f561221c565b8460010161293590919063ffffffff16565b91505080861115612a5a57612a1a61221c565b86826040517f4b68b1b9000000000000000000000000000000000000000000000000000000008152600401612a5193929190615095565b60405180910390fd5b612a6c612a6561221c565b868861359f565b85935050505092915050565b6000612a826134f3565b90506001816000018190555050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612b045750612b03826136ce565b5b9050919050565b612b1c81612b1761221c565b613738565b50565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800905090565b600080612b52612c3a565b90506000612b608585613789565b90508015612b9157612b8f8483600001600088815260200190815260200160002061388a90919063ffffffff16565b505b809250505092915050565b600080612ba7612c3a565b90506000612bb585856138ba565b90508015612be657612be4848360000160008881526020019081526020016000206139bc90919063ffffffff16565b505b809250505092915050565b60007f1777a80db1c6a9865545ecb5d27383880a1e667f2012bc238aba256783d9c400905090565b60606000612c29836000016139ec565b905060608190508092505050919050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000905090565b6000612c718360000183613a48565b60001c905092915050565b6000612c92826000613a7390919063ffffffff16565b9050919050565b6000612ca782600001613a8d565b9050919050565b600080612cb961290d565b90506000612cd3858360000161293590919063ffffffff16565b91505060008260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905003612d305760009250505061310f565b60008060008460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b600081111561309257428560030160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600183612ddb9190614c32565b81548110612dec57612deb614c66565b5b90600052602060002001548660030160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600184612e489190614c32565b81548110612e5957612e58614c66565b5b9060005260206000200154612e6e9190614c95565b111561307f578460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905092508460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600182612f0f9190614c32565b81548110612f2057612f1f614c66565b5b906000526020600020015482612f369190614c95565b91508460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480612f8c57612f8b615230565b5b600190038181906000526020600020016000905590558460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480612ff657612ff5615230565b5b600190038181906000526020600020016000905590558460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018054806130605761305f615230565b5b6001900381819060005260206000200160009055905586821015613092575b808061308a90614cc9565b915050612d80565b506130b68782856130a39190614c32565b8660000161351b9092919063ffffffff16565b508673ffffffffffffffffffffffffffffffffffffffff167f8334525b087bd40a461fad9f34d3dd47831c2639f0ff68c8013c0e88c08f311787836040516130ff92919061525f565b60405180910390a2809450505050505b92915050565b600061312382600001613aa2565b9050919050565b8061313f816000613ab390919063ffffffff16565b613175576040517fbd066f3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061317f61290d565b90508060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000014290806001815401808255809150506001900390600052602060002001600090919091909150558060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018490806001815401808255809150506001900390600052602060002001600090919091909150558060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020183908060018154018082558091505060019003906000526020600020016000909190919091505560006132da868360000161293590919063ffffffff16565b9150506133008686836132ed9190614c95565b8460000161351b9092919063ffffffff16565b50505050505050565b6000613313612bf1565b90506133458160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16843085613acd565b600061335d848360010161293590919063ffffffff16565b9150506133838484836133709190614c95565b8460010161351b9092919063ffffffff16565b50828260000160008282546133989190614c95565b925050819055508373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c846040516133e591906143f8565b60405180910390a250505050565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b613423613b4f565b61342b613b8f565b613433613b99565b61343c81613ba3565b50565b613447613b4f565b61344f613bfe565b565b600061345b612b1f565b9050600061346884610f69565b905082826000016000868152602001908152602001600020600101819055508281857fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff60405160405180910390a450505050565b60006134ce836000018360001b613c1f565b905092915050565b60006134ec8260006134bc90919063ffffffff16565b9050919050565b60007f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00905090565b6000613547846000018473ffffffffffffffffffffffffffffffffffffffff1660001b8460001b613c8f565b90509392505050565b60008060008460020160008581526020019081526020016000205490506000801b810361358f576135818585613cca565b6000801b9250925050613598565b60018192509250505b9250929050565b60006135a9612bf1565b90506135e384836135c68785600101613cea90919063ffffffff16565b6135d09190614c32565b8360010161351b9092919063ffffffff16565b50818160000160008282546135f89190614c32565b9250508190555060006136178583600101613cea90919063ffffffff16565b03613634576136328482600101613d1d90919063ffffffff16565b505b6136638160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168484613d4d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb846040516136c091906143f8565b60405180910390a350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61374282826114f5565b6137855780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161377c929190615288565b60405180910390fd5b5050565b600080613794612b1f565b90506137a084846114f5565b61387e57600181600001600086815260200190815260200160002060000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061381a61221c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050613884565b60009150505b92915050565b60006138b2836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613c1f565b905092915050565b6000806138c5612b1f565b90506138d184846114f5565b156139b057600081600001600086815260200190815260200160002060000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061394c61221c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019150506139b6565b60009150505b92915050565b60006139e4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613dcc565b905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613a3c57602002820191906000526020600020905b815481526020019060010190808311613a28575b50505050509050919050565b6000826000018281548110613a6057613a5f614c66565b5b9060005260206000200154905092915050565b6000613a85836000018360001b613dcc565b905092915050565b6000613a9b82600001613ee0565b9050919050565b600081600001805490509050919050565b6000613ac5836000018360001b613ef5565b905092915050565b613b49848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401613b02939291906152b1565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613f18565b50505050565b613b57613faf565b613b8d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b613b97613b4f565b565b613ba1613b4f565b565b613bab613b4f565b6000613bb5612bf1565b9050818160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b613c06613b4f565b6000613c106134f3565b90506001816000018190555050565b6000613c2b8383613ef5565b613c84578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613c89565b600090505b92915050565b60008184600201600085815260200190815260200160002081905550613cc18385600001613fcf90919063ffffffff16565b90509392505050565b6000613ce28284600001613fe690919063ffffffff16565b905092915050565b6000613d12836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613ffd565b60001c905092915050565b6000613d45836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61407d565b905092915050565b613dc7838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401613d809291906152e8565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613f18565b505050565b60008083600101600084815260200190815260200160002054905060008114613ed4576000600182613dfe9190614c32565b9050600060018660000180549050613e169190614c32565b9050808214613e85576000866000018281548110613e3757613e36614c66565b5b9060005260206000200154905080876000018481548110613e5b57613e5a614c66565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480613e9957613e98615230565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613eda565b60009150505b92915050565b6000613eee82600001613aa2565b9050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6000613f43828473ffffffffffffffffffffffffffffffffffffffff166140b690919063ffffffff16565b90506000815114158015613f68575080806020019051810190613f669190614bd6565b155b15613faa57826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401613fa19190614604565b60405180910390fd5b505050565b6000613fb96133f3565b60000160089054906101000a900460ff16905090565b6000613fde8360000183613c1f565b905092915050565b6000613ff58360000183613ef5565b905092915050565b6000808360020160008481526020019081526020016000205490506000801b81148015614031575061402f8484613cca565b155b1561407357826040517f02b5668600000000000000000000000000000000000000000000000000000000815260040161406a919061459a565b60405180910390fd5b8091505092915050565b6000826002016000838152602001908152602001600020600090556140ae82846000016140cc90919063ffffffff16565b905092915050565b60606140c4838360006140e3565b905092915050565b60006140db8360000183613dcc565b905092915050565b60608147101561412a57306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016141219190614604565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051614153919061534d565b60006040518083038185875af1925050503d8060008114614190576040519150601f19603f3d011682016040523d82523d6000602084013e614195565b606091505b50915091506141a58683836141b0565b925050509392505050565b6060826141c5576141c08261423f565b614237565b600082511480156141ed575060008473ffffffffffffffffffffffffffffffffffffffff163b145b1561422f57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016142269190614604565b60405180910390fd5b819050614238565b5b9392505050565b6000815111156142525780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082825260208201905092915050565b7f4e6f7420416c6c6f776564000000000000000000000000000000000000000000600082015250565b60006142cb600b83614284565b91506142d682614295565b602082019050919050565b600060208201905081810360008301526142fa816142be565b9050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61432881614315565b811461433357600080fd5b50565b6000813590506143458161431f565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006143768261434b565b9050919050565b6143868161436b565b811461439157600080fd5b50565b6000813590506143a38161437d565b92915050565b600080604083850312156143c0576143bf61430b565b5b60006143ce85828601614336565b92505060206143df85828601614394565b9150509250929050565b6143f281614315565b82525050565b600060208201905061440d60008301846143e9565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61444881614413565b811461445357600080fd5b50565b6000813590506144658161443f565b92915050565b6000602082840312156144815761448061430b565b5b600061448f84828501614456565b91505092915050565b60008115159050919050565b6144ad81614498565b82525050565b60006020820190506144c860008301846144a4565b92915050565b6000602082840312156144e4576144e361430b565b5b60006144f284828501614394565b91505092915050565b6000602082840312156145115761451061430b565b5b600061451f84828501614336565b91505092915050565b6000819050919050565b61453b81614528565b811461454657600080fd5b50565b60008135905061455881614532565b92915050565b6000602082840312156145745761457361430b565b5b600061458284828501614549565b91505092915050565b61459481614528565b82525050565b60006020820190506145af600083018461458b565b92915050565b600080604083850312156145cc576145cb61430b565b5b60006145da85828601614549565b92505060206145eb85828601614394565b9150509250929050565b6145fe8161436b565b82525050565b600060208201905061461960008301846145f5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61465481614315565b82525050565b6000614666838361464b565b60208301905092915050565b6000602082019050919050565b600061468a8261461f565b614694818561462a565b935061469f8361463b565b8060005b838110156146d05781516146b7888261465a565b97506146c283614672565b9250506001810190506146a3565b5085935050505092915050565b600060208201905081810360008301526146f7818461467f565b905092915050565b60006060820190508181036000830152614719818661467f565b9050818103602083015261472d818561467f565b90508181036040830152614741818461467f565b9050949350505050565b600080604083850312156147625761476161430b565b5b600061477085828601614549565b925050602061478185828601614336565b9150509250929050565b6000819050919050565b60006147b06147ab6147a68461434b565b61478b565b61434b565b9050919050565b60006147c282614795565b9050919050565b60006147d4826147b7565b9050919050565b6147e4816147c9565b82525050565b60006020820190506147ff60008301846147db565b92915050565b600060408201905061481a60008301856144a4565b61482760208301846143e9565b9392505050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61487c82614833565b810181811067ffffffffffffffff8211171561489b5761489a614844565b5b80604052505050565b60006148ae614301565b90506148ba8282614873565b919050565b600067ffffffffffffffff8211156148da576148d9614844565b5b602082029050602081019050919050565b600080fd5b60006149036148fe846148bf565b6148a4565b90508083825260208201905060208402830185811115614926576149256148eb565b5b835b8181101561494f578061493b8882614394565b845260208401935050602081019050614928565b5050509392505050565b600082601f83011261496e5761496d61482e565b5b813561497e8482602086016148f0565b91505092915050565b600067ffffffffffffffff8211156149a2576149a1614844565b5b602082029050602081019050919050565b60006149c66149c184614987565b6148a4565b905080838252602082019050602084028301858111156149e9576149e86148eb565b5b835b81811015614a1257806149fe8882614336565b8452602084019350506020810190506149eb565b5050509392505050565b600082601f830112614a3157614a3061482e565b5b8135614a418482602086016149b3565b91505092915050565b60008060408385031215614a6157614a6061430b565b5b600083013567ffffffffffffffff811115614a7f57614a7e614310565b5b614a8b85828601614959565b925050602083013567ffffffffffffffff811115614aac57614aab614310565b5b614ab885828601614a1c565b9150509250929050565b60008060408385031215614ad957614ad861430b565b5b6000614ae785828601614336565b9250506020614af885828601614336565b9150509250929050565b600080fd5b60006101008284031215614b1e57614b1d614b02565b5b81905092915050565b60006101008284031215614b3e57614b3d61430b565b5b6000614b4c84828501614b07565b91505092915050565b614b5e81614498565b8114614b6957600080fd5b50565b600081519050614b7b81614b55565b92915050565b600081519050614b908161431f565b92915050565b60008060408385031215614bad57614bac61430b565b5b6000614bbb85828601614b6c565b9250506020614bcc85828601614b81565b9150509250929050565b600060208284031215614bec57614beb61430b565b5b6000614bfa84828501614b6c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c3d82614315565b9150614c4883614315565b9250828203905081811115614c6057614c5f614c03565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614ca082614315565b9150614cab83614315565b9250828201905080821115614cc357614cc2614c03565b5b92915050565b6000614cd482614315565b915060008203614ce757614ce6614c03565b5b600182039050919050565b7f7365744d61785374616b65537570706c792875696e7432353629000000000000600082015250565b6000614d28601a83614284565b9150614d3382614cf2565b602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614d78578082015181840152602081019050614d5d565b60008484015250505050565b6000614d8f82614d3e565b614d998185614d49565b9350614da9818560208601614d5a565b614db281614833565b840191505092915050565b60006040820190508181036000830152614dd681614d1b565b90508181036020830152614dea8184614d84565b905092915050565b7f736574436f6f6c646f776e2875696e7432353629000000000000000000000000600082015250565b6000614e28601483614284565b9150614e3382614df2565b602082019050919050565b60006040820190508181036000830152614e5781614e1b565b90508181036020830152614e6b8184614d84565b905092915050565b7f7365744d696e5374616b652875696e7432353629000000000000000000000000600082015250565b6000614ea9601483614284565b9150614eb482614e73565b602082019050919050565b60006040820190508181036000830152614ed881614e9c565b90508181036020830152614eec8184614d84565b905092915050565b7f72656d6f76654c6f636b4475726174696f6e2875696e74323536290000000000600082015250565b6000614f2a601b83614284565b9150614f3582614ef4565b602082019050919050565b60006040820190508181036000830152614f5981614f1d565b90508181036020830152614f6d8184614d84565b905092915050565b7f6c656e677468206d75737420626520657175616c000000000000000000000000600082015250565b6000614fab601483614284565b9150614fb682614f75565b602082019050919050565b60006020820190508181036000830152614fda81614f9e565b9050919050565b6000614fec82614315565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361501e5761501d614c03565b5b600182019050919050565b7f73656e64657220666f7262696464656e00000000000000000000000000000000600082015250565b600061505f601083614284565b915061506a82615029565b602082019050919050565b6000602082019050818103600083015261508e81615052565b9050919050565b60006060820190506150aa60008301866145f5565b6150b760208301856143e9565b6150c460408301846143e9565b949350505050565b60006150d782614315565b91506150e283614315565b92508282026150f081614315565b9150828204841483151761510757615106614c03565b5b5092915050565b600060608201905061512360008301866143e9565b61513060208301856143e9565b61513d60408301846143e9565b949350505050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600061517e61517961517484615145565b61478b565b61514f565b9050919050565b61518e81615163565b82525050565b60006020820190506151a96000830184615185565b92915050565b7f6164644c6f636b4475726174696f6e2875696e74323536290000000000000000600082015250565b60006151e5601883614284565b91506151f0826151af565b602082019050919050565b60006040820190508181036000830152615214816151d8565b905081810360208301526152288184614d84565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408201905061527460008301856143e9565b61528160208301846143e9565b9392505050565b600060408201905061529d60008301856145f5565b6152aa602083018461458b565b9392505050565b60006060820190506152c660008301866145f5565b6152d360208301856145f5565b6152e060408301846143e9565b949350505050565b60006040820190506152fd60008301856145f5565b61530a60208301846143e9565b9392505050565b600081905092915050565b600061532782614d3e565b6153318185615311565b9350615341818560208601614d5a565b80840191505092915050565b6000615359828461531c565b91508190509291505056fea2646970667358221220740d94e37cb9a239b91a1b08d2fb48c0b70b9305339190b2fc7357dd21fa6e2c64736f6c63430008140033

Deployed Bytecode

0x6080604052600436106102125760003560e01c806391d1485411610118578063c64db12e116100a0578063d547741f1161006f578063d547741f146108a6578063e2bbb158146108cf578063eca197361461090c578063ef9beeee14610935578063f6153ccd1461097257610252565b8063c64db12e146107c6578063ca15c873146107ef578063cb13cddb1461082c578063ce96cb771461086957610252565b8063a217fddf116100e7578063a217fddf146106ec578063a26dbf2614610717578063aa5dcecc14610742578063b6b55f251461076d578063ba61ecae1461079d57610252565b806391d148541461061b57806397e3b7f4146106585780639fd0506d14610683578063a0edb2df146106ae57610252565b8063402d267d1161019b57806374e71acb1161016a57806374e71acb14610522578063787a08a61461054d5780638c80fd90146105785780639010d07c146105a15780639163b7eb146105de57610252565b8063402d267d146104525780634a41d89d1461048f5780634fc3f41a146104ba5780635f019d51146104e357610252565b8063248a9ca3116101e2578063248a9ca31461036d5780632f2ff15d146103aa57806336568abe146103d3578063375b3c0a146103fc57806338d52e0f1461042757610252565b8062f714ce1461028d57806301ffc9a7146102ca5780630689ef2814610307578063242210161461034457610252565b36610252576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610249906142e1565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610284906142e1565b60405180910390fd5b34801561029957600080fd5b506102b460048036038101906102af91906143a9565b61099d565b6040516102c191906143f8565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec919061446b565b610be1565b6040516102fe91906144b3565b60405180910390f35b34801561031357600080fd5b5061032e600480360381019061032991906144ce565b610c5b565b60405161033b91906143f8565b60405180910390f35b34801561035057600080fd5b5061036b600480360381019061036691906144fb565b610eb7565b005b34801561037957600080fd5b50610394600480360381019061038f919061455e565b610f69565b6040516103a1919061459a565b60405180910390f35b3480156103b657600080fd5b506103d160048036038101906103cc91906145b5565b610f97565b005b3480156103df57600080fd5b506103fa60048036038101906103f591906145b5565b610fb9565b005b34801561040857600080fd5b50610411611034565b60405161041e91906143f8565b60405180910390f35b34801561043357600080fd5b5061043c61103a565b6040516104499190614604565b60405180910390f35b34801561045e57600080fd5b50610479600480360381019061047491906144ce565b611072565b60405161048691906143f8565b60405180910390f35b34801561049b57600080fd5b506104a461109c565b6040516104b191906146dd565b60405180910390f35b3480156104c657600080fd5b506104e160048036038101906104dc91906144fb565b6110ad565b005b3480156104ef57600080fd5b5061050a600480360381019061050591906144ce565b61115f565b604051610519939291906146ff565b60405180910390f35b34801561052e57600080fd5b50610537611340565b60405161054491906143f8565b60405180910390f35b34801561055957600080fd5b50610562611346565b60405161056f91906143f8565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a91906144fb565b61134c565b005b3480156105ad57600080fd5b506105c860048036038101906105c3919061474b565b6113fe565b6040516105d59190614604565b60405180910390f35b3480156105ea57600080fd5b50610605600480360381019061060091906144fb565b61143b565b60405161061291906144b3565b60405180910390f35b34801561062757600080fd5b50610642600480360381019061063d91906145b5565b6114f5565b60405161064f91906144b3565b60405180910390f35b34801561066457600080fd5b5061066d61156e565b60405161067a919061459a565b60405180910390f35b34801561068f57600080fd5b50610698611592565b6040516106a591906147ea565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d091906144ce565b6115b8565b6040516106e3929190614805565b60405180910390f35b3480156106f857600080fd5b50610701611791565b60405161070e919061459a565b60405180910390f35b34801561072357600080fd5b5061072c611798565b60405161073991906143f8565b60405180910390f35b34801561074e57600080fd5b506107576117b7565b6040516107649190614604565b60405180910390f35b610787600480360381019061078291906144fb565b6117dd565b60405161079491906143f8565b60405180910390f35b3480156107a957600080fd5b506107c460048036038101906107bf9190614a4a565b611822565b005b3480156107d257600080fd5b506107ed60048036038101906107e891906144ce565b611964565b005b3480156107fb57600080fd5b506108166004803603810190610811919061455e565b6119de565b60405161082391906143f8565b60405180910390f35b34801561083857600080fd5b50610853600480360381019061084e91906144ce565b611a10565b60405161086091906143f8565b60405180910390f35b34801561087557600080fd5b50610890600480360381019061088b91906144ce565b611a42565b60405161089d91906143f8565b60405180910390f35b3480156108b257600080fd5b506108cd60048036038101906108c891906145b5565b611a74565b005b3480156108db57600080fd5b506108f660048036038101906108f19190614ac2565b611a96565b60405161090391906143f8565b60405180910390f35b34801561091857600080fd5b50610933600480360381019061092e9190614b27565b611d98565b005b34801561094157600080fd5b5061095c600480360381019061095791906144fb565b6120f3565b60405161096991906144b3565b60405180910390f35b34801561097e57600080fd5b506109876121ad565b60405161099491906143f8565b60405180910390f35b60006109a76121c5565b60003073ffffffffffffffffffffffffffffffffffffffff1663a0edb2df6109cd61221c565b6040518263ffffffff1660e01b81526004016109e99190614604565b6040805180830381865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190614b96565b5090508015610a64576040517fb0782df700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ea7ca896040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af59190614bd6565b15610b2c576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b3c610b3761221c565b612224565b6000610b4661290d565b90506000610b67610b5561221c565b8360000161293590919063ffffffff16565b9150506000610b7c610b7761221c565b611a10565b9050868282610b8b9190614c32565b1015610bc3576040517f0b1bd51c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bcd8787612977565b945050505050610bdb612a78565b92915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c545750610c5382612a91565b5b9050919050565b600080610c6661290d565b90506000610c80848360000161293590919063ffffffff16565b91505060008260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905003610cdd57600092505050610eb2565b60008260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b6000811115610eab57428360030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600183610d859190614c32565b81548110610d9657610d95614c66565b5b90600052602060002001548460030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600184610df29190614c32565b81548110610e0357610e02614c66565b5b9060005260206000200154610e189190614c95565b11610e98578260030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600182610e6e9190614c32565b81548110610e7f57610e7e614c66565b5b906000526020600020015482610e959190614c32565b91505b8080610ea390614cc9565b915050610d2a565b5080925050505b919050565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb610ee181612b0b565b81600781905550632422101660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e7483604051602001610f4191906143f8565b604051602081830303815290604052604051610f5d9190614dbd565b60405180910390a25050565b600080610f74612b1f565b905080600001600084815260200190815260200160002060010154915050919050565b610fa082610f69565b610fa981612b0b565b610fb38383612b47565b50505050565b610fc161221c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611025576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61102f8282612b9c565b505050565b60065481565b600080611045612bf1565b90508060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050919050565b60606110a86000612c19565b905090565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb6110d781612b0b565b81600581905550634fc3f41a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e748360405160200161113791906143f8565b6040516020818303038152906040526040516111539190614e3e565b60405180910390a25050565b6060806060600061116e61290d565b90508060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018160030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018260030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018280548060200260200160405190810160405280929190818152602001828054801561128757602002820191906000526020600020905b815481526020019060010190808311611273575b50505050509250818054806020026020016040519081016040528092919081815260200182805480156112d957602002820191906000526020600020905b8154815260200190600101908083116112c5575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561132b57602002820191906000526020600020905b815481526020019060010190808311611317575b50505050509050935093509350509193909250565b60075481565b60055481565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61137681612b0b565b81600681905550638c80fd9060e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e74836040516020016113d691906143f8565b6040516020818303038152906040526040516113f29190614ebf565b60405180910390a25050565b600080611409612c3a565b905061143283826000016000878152602001908152602001600020612c6290919063ffffffff16565b91505092915050565b60007f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61146781612b0b565b639163b7eb60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e74846040516020016114c091906143f8565b6040516020818303038152906040526040516114dc9190614f40565b60405180910390a26114ed83612c7c565b915050919050565b600080611500612b1f565b905080600001600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611621576040517fa4377c6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403611674576000809150915061178c565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544210156116c857600160009150915061178c565b600554600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117159190614c95565b4210611727576000809150915061178c565b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054426117749190614c32565b6005546117819190614c32565b905060018192509250505b915091565b6000801b81565b6000806117a3612bf1565b90506117b181600101612c99565b91505090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006117e76121c5565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611819906142e1565b60405180910390fd5b7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61184c81612b0b565b8151835114611890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188790614fc1565b60405180910390fd5b6000805b845181101561195d576118c08582815181106118b3576118b2614c66565b5b6020026020010151612224565b60006118e58683815181106118d8576118d7614c66565b5b6020026020010151610c5b565b90508482815181106118fa576118f9614c66565b5b602002602001015181106119495761194686838151811061191e5761191d614c66565b5b602002602001015186848151811061193957611938614c66565b5b6020026020010151612cae565b92505b50808061195590614fe1565b915050611894565b5050505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c990615075565b60405180910390fd5b6119db81612224565b50565b6000806119e9612c3a565b9050611a08816000016000858152602001908152602001600020613115565b915050919050565b600080611a1b612bf1565b90506000611a35848360010161293590919063ffffffff16565b9150508092505050919050565b600080611a4d612bf1565b90506000611a67848360010161293590919063ffffffff16565b9150508092505050919050565b611a7d82610f69565b611a8681612b0b565b611a908383612b9c565b50505050565b6000611aa06121c5565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ea7ca896040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b319190614bd6565b15611b68576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b7a611b7561221c565b611072565b905080841115611bcc57611b8c61221c565b84826040517f88db76aa000000000000000000000000000000000000000000000000000000008152600401611bc393929190615095565b60405180910390fd5b600654841015611c2057611bde61221c565b846006546040517f75eb5dd1000000000000000000000000000000000000000000000000000000008152600401611c1793929190615095565b60405180910390fd5b600060075414158015611c465750600754611c396121ad565b85611c449190614c95565b115b15611c7d576040517f950b856e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ca8611c8861221c565b85610e10601887611c9991906150cc565b611ca391906150cc565b61312a565b611cb8611cb361221c565b612224565b4260026000611cc561221c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d14611d0e61221c565b85613309565b611d1c61221c565b73ffffffffffffffffffffffffffffffffffffffff167f71a810dd86885cd9fea6e9b97fe8287ec71dd6475db601e9b925679c9f3ec3d14286610e10601888611d6591906150cc565b611d6f91906150cc565b604051611d7e9392919061510e565b60405180910390a283915050611d92612a78565b92915050565b6000611da26133f3565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff16148015611df05750825b9050600060018367ffffffffffffffff16148015611e25575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015611e33575080155b15611e6a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315611eba5760018560000160086101000a81548160ff0219169083151502179055505b611ed5866060016020810190611ed091906144ce565b61341b565b611edd61343f565b611f0a7f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb6000801b613451565b611f296000801b876000016020810190611f2491906144ce565b612b47565b50611f667f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb876020016020810190611f6191906144ce565b612b47565b5085608001356005819055508560a001356006819055508560c001356007819055508560e0016020810190611f9b91906144ce565b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550856040016020810190611fee91906144ce565b600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612045624f1a0060006134bc90919063ffffffff16565b5061205d6277f88060006134bc90919063ffffffff16565b5061207562eff10060006134bc90919063ffffffff16565b5061208e6301e1338060006134bc90919063ffffffff16565b5083156120eb5760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516120e29190615194565b60405180910390a15b505050505050565b60007f695baaec64dcea9b360cf4afad33a0f77fe653c0db7609569fc416ae7343b5fb61211f81612b0b565b63ef9beeee60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01d854e8dde9402801a4c6f2840193465752abfad61e0bb7c4258d526ae42e748460405160200161217891906143f8565b60405160208183030381529060405260405161219491906151fb565b60405180910390a26121a5836134d6565b915050919050565b6000806121b8612bf1565b9050806000015491505090565b60006121cf6134f3565b9050600281600001540361220f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816000018190555050565b600033905090565b600061222e61290d565b90506000612248838360000161293590919063ffffffff16565b91505060008260030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050036122a157505061290a565b60008060008460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b600081111561289d57428560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160018361234c9190614c32565b8154811061235d5761235c614c66565b5b90600052602060002001548660030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001846123b99190614c32565b815481106123ca576123c9614c66565b5b90600052602060002001546123df9190614c95565b1161288a578460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905092508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160018261247f9190614c32565b815481106124905761248f614c66565b5b906000526020600020015491508281031561273d578460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001846124f69190614c32565b8154811061250757612506614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016001836125639190614c32565b8154811061257457612573614c66565b5b90600052602060002001819055508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001846125d39190614c32565b815481106125e4576125e3614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001836126409190614c32565b8154811061265157612650614c66565b5b90600052602060002001819055508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016001846126b09190614c32565b815481106126c1576126c0614c66565b5b90600052602060002001548560030160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160018361271d9190614c32565b8154811061272e5761272d614c66565b5b90600052602060002001819055505b81846127499190614c32565b93508460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548061279f5761279e615230565b5b600190038181906000526020600020016000905590558460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548061280957612808615230565b5b600190038181906000526020600020016000905590558460030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020180548061287357612872615230565b5b600190038181906000526020600020016000905590555b808061289590614cc9565b9150506122f1565b506128b685848660000161351b9092919063ffffffff16565b508473ffffffffffffffffffffffffffffffffffffffff167f9e819531b9f4f6660e839d7b1ddb93441f1a62e8248416d7807881afecfa2498846040516128fd91906143f8565b60405180910390a2505050505b50565b60007f0ce81d75b936ea44989fc6dc3b015771ad68444f0aa2b557b82bc8a876676600905090565b600080600080612961866000018673ffffffffffffffffffffffffffffffffffffffff1660001b613550565b91509150818160001c9350935050509250929050565b600080612982612bf1565b9050600061299661299161221c565b611a42565b9050808511156129e8576129a861221c565b85826040517fd929e4430000000000000000000000000000000000000000000000000000000081526004016129df93929190615095565b60405180910390fd5b6000612a076129f561221c565b8460010161293590919063ffffffff16565b91505080861115612a5a57612a1a61221c565b86826040517f4b68b1b9000000000000000000000000000000000000000000000000000000008152600401612a5193929190615095565b60405180910390fd5b612a6c612a6561221c565b868861359f565b85935050505092915050565b6000612a826134f3565b90506001816000018190555050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612b045750612b03826136ce565b5b9050919050565b612b1c81612b1761221c565b613738565b50565b60007f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800905090565b600080612b52612c3a565b90506000612b608585613789565b90508015612b9157612b8f8483600001600088815260200190815260200160002061388a90919063ffffffff16565b505b809250505092915050565b600080612ba7612c3a565b90506000612bb585856138ba565b90508015612be657612be4848360000160008881526020019081526020016000206139bc90919063ffffffff16565b505b809250505092915050565b60007f1777a80db1c6a9865545ecb5d27383880a1e667f2012bc238aba256783d9c400905090565b60606000612c29836000016139ec565b905060608190508092505050919050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000905090565b6000612c718360000183613a48565b60001c905092915050565b6000612c92826000613a7390919063ffffffff16565b9050919050565b6000612ca782600001613a8d565b9050919050565b600080612cb961290d565b90506000612cd3858360000161293590919063ffffffff16565b91505060008260030160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905003612d305760009250505061310f565b60008060008460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090505b600081111561309257428560030160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600183612ddb9190614c32565b81548110612dec57612deb614c66565b5b90600052602060002001548660030160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600184612e489190614c32565b81548110612e5957612e58614c66565b5b9060005260206000200154612e6e9190614c95565b111561307f578460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905092508460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600182612f0f9190614c32565b81548110612f2057612f1f614c66565b5b906000526020600020015482612f369190614c95565b91508460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480612f8c57612f8b615230565b5b600190038181906000526020600020016000905590558460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480612ff657612ff5615230565b5b600190038181906000526020600020016000905590558460030160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018054806130605761305f615230565b5b6001900381819060005260206000200160009055905586821015613092575b808061308a90614cc9565b915050612d80565b506130b68782856130a39190614c32565b8660000161351b9092919063ffffffff16565b508673ffffffffffffffffffffffffffffffffffffffff167f8334525b087bd40a461fad9f34d3dd47831c2639f0ff68c8013c0e88c08f311787836040516130ff92919061525f565b60405180910390a2809450505050505b92915050565b600061312382600001613aa2565b9050919050565b8061313f816000613ab390919063ffffffff16565b613175576040517fbd066f3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061317f61290d565b90508060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000014290806001815401808255809150506001900390600052602060002001600090919091909150558060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018490806001815401808255809150506001900390600052602060002001600090919091909150558060030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020183908060018154018082558091505060019003906000526020600020016000909190919091505560006132da868360000161293590919063ffffffff16565b9150506133008686836132ed9190614c95565b8460000161351b9092919063ffffffff16565b50505050505050565b6000613313612bf1565b90506133458160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16843085613acd565b600061335d848360010161293590919063ffffffff16565b9150506133838484836133709190614c95565b8460010161351b9092919063ffffffff16565b50828260000160008282546133989190614c95565b925050819055508373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c846040516133e591906143f8565b60405180910390a250505050565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b613423613b4f565b61342b613b8f565b613433613b99565b61343c81613ba3565b50565b613447613b4f565b61344f613bfe565b565b600061345b612b1f565b9050600061346884610f69565b905082826000016000868152602001908152602001600020600101819055508281857fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff60405160405180910390a450505050565b60006134ce836000018360001b613c1f565b905092915050565b60006134ec8260006134bc90919063ffffffff16565b9050919050565b60007f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00905090565b6000613547846000018473ffffffffffffffffffffffffffffffffffffffff1660001b8460001b613c8f565b90509392505050565b60008060008460020160008581526020019081526020016000205490506000801b810361358f576135818585613cca565b6000801b9250925050613598565b60018192509250505b9250929050565b60006135a9612bf1565b90506135e384836135c68785600101613cea90919063ffffffff16565b6135d09190614c32565b8360010161351b9092919063ffffffff16565b50818160000160008282546135f89190614c32565b9250508190555060006136178583600101613cea90919063ffffffff16565b03613634576136328482600101613d1d90919063ffffffff16565b505b6136638160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168484613d4d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb846040516136c091906143f8565b60405180910390a350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61374282826114f5565b6137855780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161377c929190615288565b60405180910390fd5b5050565b600080613794612b1f565b90506137a084846114f5565b61387e57600181600001600086815260200190815260200160002060000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061381a61221c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050613884565b60009150505b92915050565b60006138b2836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613c1f565b905092915050565b6000806138c5612b1f565b90506138d184846114f5565b156139b057600081600001600086815260200190815260200160002060000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061394c61221c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019150506139b6565b60009150505b92915050565b60006139e4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613dcc565b905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015613a3c57602002820191906000526020600020905b815481526020019060010190808311613a28575b50505050509050919050565b6000826000018281548110613a6057613a5f614c66565b5b9060005260206000200154905092915050565b6000613a85836000018360001b613dcc565b905092915050565b6000613a9b82600001613ee0565b9050919050565b600081600001805490509050919050565b6000613ac5836000018360001b613ef5565b905092915050565b613b49848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401613b02939291906152b1565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613f18565b50505050565b613b57613faf565b613b8d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b613b97613b4f565b565b613ba1613b4f565b565b613bab613b4f565b6000613bb5612bf1565b9050818160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b613c06613b4f565b6000613c106134f3565b90506001816000018190555050565b6000613c2b8383613ef5565b613c84578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613c89565b600090505b92915050565b60008184600201600085815260200190815260200160002081905550613cc18385600001613fcf90919063ffffffff16565b90509392505050565b6000613ce28284600001613fe690919063ffffffff16565b905092915050565b6000613d12836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613ffd565b60001c905092915050565b6000613d45836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61407d565b905092915050565b613dc7838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401613d809291906152e8565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613f18565b505050565b60008083600101600084815260200190815260200160002054905060008114613ed4576000600182613dfe9190614c32565b9050600060018660000180549050613e169190614c32565b9050808214613e85576000866000018281548110613e3757613e36614c66565b5b9060005260206000200154905080876000018481548110613e5b57613e5a614c66565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480613e9957613e98615230565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613eda565b60009150505b92915050565b6000613eee82600001613aa2565b9050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6000613f43828473ffffffffffffffffffffffffffffffffffffffff166140b690919063ffffffff16565b90506000815114158015613f68575080806020019051810190613f669190614bd6565b155b15613faa57826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401613fa19190614604565b60405180910390fd5b505050565b6000613fb96133f3565b60000160089054906101000a900460ff16905090565b6000613fde8360000183613c1f565b905092915050565b6000613ff58360000183613ef5565b905092915050565b6000808360020160008481526020019081526020016000205490506000801b81148015614031575061402f8484613cca565b155b1561407357826040517f02b5668600000000000000000000000000000000000000000000000000000000815260040161406a919061459a565b60405180910390fd5b8091505092915050565b6000826002016000838152602001908152602001600020600090556140ae82846000016140cc90919063ffffffff16565b905092915050565b60606140c4838360006140e3565b905092915050565b60006140db8360000183613dcc565b905092915050565b60608147101561412a57306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016141219190614604565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051614153919061534d565b60006040518083038185875af1925050503d8060008114614190576040519150601f19603f3d011682016040523d82523d6000602084013e614195565b606091505b50915091506141a58683836141b0565b925050509392505050565b6060826141c5576141c08261423f565b614237565b600082511480156141ed575060008473ffffffffffffffffffffffffffffffffffffffff163b145b1561422f57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016142269190614604565b60405180910390fd5b819050614238565b5b9392505050565b6000815111156142525780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082825260208201905092915050565b7f4e6f7420416c6c6f776564000000000000000000000000000000000000000000600082015250565b60006142cb600b83614284565b91506142d682614295565b602082019050919050565b600060208201905081810360008301526142fa816142be565b9050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61432881614315565b811461433357600080fd5b50565b6000813590506143458161431f565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006143768261434b565b9050919050565b6143868161436b565b811461439157600080fd5b50565b6000813590506143a38161437d565b92915050565b600080604083850312156143c0576143bf61430b565b5b60006143ce85828601614336565b92505060206143df85828601614394565b9150509250929050565b6143f281614315565b82525050565b600060208201905061440d60008301846143e9565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61444881614413565b811461445357600080fd5b50565b6000813590506144658161443f565b92915050565b6000602082840312156144815761448061430b565b5b600061448f84828501614456565b91505092915050565b60008115159050919050565b6144ad81614498565b82525050565b60006020820190506144c860008301846144a4565b92915050565b6000602082840312156144e4576144e361430b565b5b60006144f284828501614394565b91505092915050565b6000602082840312156145115761451061430b565b5b600061451f84828501614336565b91505092915050565b6000819050919050565b61453b81614528565b811461454657600080fd5b50565b60008135905061455881614532565b92915050565b6000602082840312156145745761457361430b565b5b600061458284828501614549565b91505092915050565b61459481614528565b82525050565b60006020820190506145af600083018461458b565b92915050565b600080604083850312156145cc576145cb61430b565b5b60006145da85828601614549565b92505060206145eb85828601614394565b9150509250929050565b6145fe8161436b565b82525050565b600060208201905061461960008301846145f5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61465481614315565b82525050565b6000614666838361464b565b60208301905092915050565b6000602082019050919050565b600061468a8261461f565b614694818561462a565b935061469f8361463b565b8060005b838110156146d05781516146b7888261465a565b97506146c283614672565b9250506001810190506146a3565b5085935050505092915050565b600060208201905081810360008301526146f7818461467f565b905092915050565b60006060820190508181036000830152614719818661467f565b9050818103602083015261472d818561467f565b90508181036040830152614741818461467f565b9050949350505050565b600080604083850312156147625761476161430b565b5b600061477085828601614549565b925050602061478185828601614336565b9150509250929050565b6000819050919050565b60006147b06147ab6147a68461434b565b61478b565b61434b565b9050919050565b60006147c282614795565b9050919050565b60006147d4826147b7565b9050919050565b6147e4816147c9565b82525050565b60006020820190506147ff60008301846147db565b92915050565b600060408201905061481a60008301856144a4565b61482760208301846143e9565b9392505050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61487c82614833565b810181811067ffffffffffffffff8211171561489b5761489a614844565b5b80604052505050565b60006148ae614301565b90506148ba8282614873565b919050565b600067ffffffffffffffff8211156148da576148d9614844565b5b602082029050602081019050919050565b600080fd5b60006149036148fe846148bf565b6148a4565b90508083825260208201905060208402830185811115614926576149256148eb565b5b835b8181101561494f578061493b8882614394565b845260208401935050602081019050614928565b5050509392505050565b600082601f83011261496e5761496d61482e565b5b813561497e8482602086016148f0565b91505092915050565b600067ffffffffffffffff8211156149a2576149a1614844565b5b602082029050602081019050919050565b60006149c66149c184614987565b6148a4565b905080838252602082019050602084028301858111156149e9576149e86148eb565b5b835b81811015614a1257806149fe8882614336565b8452602084019350506020810190506149eb565b5050509392505050565b600082601f830112614a3157614a3061482e565b5b8135614a418482602086016149b3565b91505092915050565b60008060408385031215614a6157614a6061430b565b5b600083013567ffffffffffffffff811115614a7f57614a7e614310565b5b614a8b85828601614959565b925050602083013567ffffffffffffffff811115614aac57614aab614310565b5b614ab885828601614a1c565b9150509250929050565b60008060408385031215614ad957614ad861430b565b5b6000614ae785828601614336565b9250506020614af885828601614336565b9150509250929050565b600080fd5b60006101008284031215614b1e57614b1d614b02565b5b81905092915050565b60006101008284031215614b3e57614b3d61430b565b5b6000614b4c84828501614b07565b91505092915050565b614b5e81614498565b8114614b6957600080fd5b50565b600081519050614b7b81614b55565b92915050565b600081519050614b908161431f565b92915050565b60008060408385031215614bad57614bac61430b565b5b6000614bbb85828601614b6c565b9250506020614bcc85828601614b81565b9150509250929050565b600060208284031215614bec57614beb61430b565b5b6000614bfa84828501614b6c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c3d82614315565b9150614c4883614315565b9250828203905081811115614c6057614c5f614c03565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614ca082614315565b9150614cab83614315565b9250828201905080821115614cc357614cc2614c03565b5b92915050565b6000614cd482614315565b915060008203614ce757614ce6614c03565b5b600182039050919050565b7f7365744d61785374616b65537570706c792875696e7432353629000000000000600082015250565b6000614d28601a83614284565b9150614d3382614cf2565b602082019050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614d78578082015181840152602081019050614d5d565b60008484015250505050565b6000614d8f82614d3e565b614d998185614d49565b9350614da9818560208601614d5a565b614db281614833565b840191505092915050565b60006040820190508181036000830152614dd681614d1b565b90508181036020830152614dea8184614d84565b905092915050565b7f736574436f6f6c646f776e2875696e7432353629000000000000000000000000600082015250565b6000614e28601483614284565b9150614e3382614df2565b602082019050919050565b60006040820190508181036000830152614e5781614e1b565b90508181036020830152614e6b8184614d84565b905092915050565b7f7365744d696e5374616b652875696e7432353629000000000000000000000000600082015250565b6000614ea9601483614284565b9150614eb482614e73565b602082019050919050565b60006040820190508181036000830152614ed881614e9c565b90508181036020830152614eec8184614d84565b905092915050565b7f72656d6f76654c6f636b4475726174696f6e2875696e74323536290000000000600082015250565b6000614f2a601b83614284565b9150614f3582614ef4565b602082019050919050565b60006040820190508181036000830152614f5981614f1d565b90508181036020830152614f6d8184614d84565b905092915050565b7f6c656e677468206d75737420626520657175616c000000000000000000000000600082015250565b6000614fab601483614284565b9150614fb682614f75565b602082019050919050565b60006020820190508181036000830152614fda81614f9e565b9050919050565b6000614fec82614315565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361501e5761501d614c03565b5b600182019050919050565b7f73656e64657220666f7262696464656e00000000000000000000000000000000600082015250565b600061505f601083614284565b915061506a82615029565b602082019050919050565b6000602082019050818103600083015261508e81615052565b9050919050565b60006060820190506150aa60008301866145f5565b6150b760208301856143e9565b6150c460408301846143e9565b949350505050565b60006150d782614315565b91506150e283614315565b92508282026150f081614315565b9150828204841483151761510757615106614c03565b5b5092915050565b600060608201905061512360008301866143e9565b61513060208301856143e9565b61513d60408301846143e9565b949350505050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600061517e61517961517484615145565b61478b565b61514f565b9050919050565b61518e81615163565b82525050565b60006020820190506151a96000830184615185565b92915050565b7f6164644c6f636b4475726174696f6e2875696e74323536290000000000000000600082015250565b60006151e5601883614284565b91506151f0826151af565b602082019050919050565b60006040820190508181036000830152615214816151d8565b905081810360208301526152288184614d84565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408201905061527460008301856143e9565b61528160208301846143e9565b9392505050565b600060408201905061529d60008301856145f5565b6152aa602083018461458b565b9392505050565b60006060820190506152c660008301866145f5565b6152d360208301856145f5565b6152e060408301846143e9565b949350505050565b60006040820190506152fd60008301856145f5565b61530a60208301846143e9565b9392505050565b600081905092915050565b600061532782614d3e565b6153318185615311565b9350615341818560208601614d5a565b80840191505092915050565b6000615359828461531c565b91508190509291505056fea2646970667358221220740d94e37cb9a239b91a1b08d2fb48c0b70b9305339190b2fc7357dd21fa6e2c64736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks sequenced

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