ETH Price: $2,972.74 (+2.48%)
Gas: 1 Gwei

Contract

0xB751c1bEb924bEd1c7DDe8B673583cF8D36765Fd
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Create202447202024-07-06 3:15:112 hrs ago1720235711IN
0xB751c1bE...8D36765Fd
0 ETH0.000292841.91660727
Withdraw202447022024-07-06 3:11:352 hrs ago1720235495IN
0xB751c1bE...8D36765Fd
0 ETH0.00024651.96546041
Create202433802024-07-05 22:45:597 hrs ago1720219559IN
0xB751c1bE...8D36765Fd
0 ETH0.000358742.64351794
Create202428942024-07-05 21:08:238 hrs ago1720213703IN
0xB751c1bE...8D36765Fd
0 ETH0.000379582.48403661
Withdraw202428922024-07-05 21:07:598 hrs ago1720213679IN
0xB751c1bE...8D36765Fd
0 ETH0.000213122.0045795
Withdraw202394222024-07-05 9:31:1120 hrs ago1720171871IN
0xB751c1bE...8D36765Fd
0 ETH0.0013270210.58088827
Withdraw202393842024-07-05 9:23:2320 hrs ago1720171403IN
0xB751c1bE...8D36765Fd
0 ETH0.0013293110.59912531
Create202354012024-07-04 20:01:5933 hrs ago1720123319IN
0xB751c1bE...8D36765Fd
0 ETH0.001235518.08539724
Withdraw202353952024-07-04 20:00:4733 hrs ago1720123247IN
0xB751c1bE...8D36765Fd
0 ETH0.000825817.767455
Create202284452024-07-03 20:42:472 days ago1720039367IN
0xB751c1bE...8D36765Fd
0 ETH0.0013921910.25877335
Create202273442024-07-03 17:02:232 days ago1720026143IN
0xB751c1bE...8D36765Fd
0 ETH0.0029540219.33159868
Withdraw202273422024-07-03 17:01:592 days ago1720026119IN
0xB751c1bE...8D36765Fd
0 ETH0.0019997718.80959018
Withdraw202246602024-07-03 8:01:592 days ago1719993719IN
0xB751c1bE...8D36765Fd
0 ETH0.000475783.79364643
Withdraw202246442024-07-03 7:58:472 days ago1719993527IN
0xB751c1bE...8D36765Fd
0 ETH0.000723025.76497243
Withdraw202246332024-07-03 7:56:352 days ago1719993395IN
0xB751c1bE...8D36765Fd
0 ETH0.000452483.60781628
Create202222862024-07-03 0:04:473 days ago1719965087IN
0xB751c1bE...8D36765Fd
0 ETH0.000469512.97192685
Withdraw202222822024-07-03 0:03:593 days ago1719965039IN
0xB751c1bE...8D36765Fd
0 ETH0.000311522.93017433
Withdraw202158892024-07-02 2:35:474 days ago1719887747IN
0xB751c1bE...8D36765Fd
0 ETH0.000207971.65824953
Create202150202024-07-01 23:41:354 days ago1719877295IN
0xB751c1bE...8D36765Fd
0 ETH0.000418322.73757236
Withdraw202150182024-07-01 23:41:114 days ago1719877271IN
0xB751c1bE...8D36765Fd
0 ETH0.000291552.74232451
Create202056062024-06-30 16:10:115 days ago1719763811IN
0xB751c1bE...8D36765Fd
0 ETH0.00061144.0011055
Withdraw202056032024-06-30 16:09:355 days ago1719763775IN
0xB751c1bE...8D36765Fd
0 ETH0.000467874.40073895
Create201979052024-06-29 14:22:116 days ago1719670931IN
0xB751c1bE...8D36765Fd
0 ETH0.000814265.32867742
Withdraw201979032024-06-29 14:21:476 days ago1719670907IN
0xB751c1bE...8D36765Fd
0 ETH0.000543515.11224095
Withdraw201957712024-06-29 7:11:476 days ago1719645107IN
0xB751c1bE...8D36765Fd
0 ETH0.000327112.60820604
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrongXNodeManager

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : StrongXNodeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./interfaces/IStrongXNodeManager.sol";
import "./interfaces/IStrongXNFT.sol";
import "./interfaces/IStrongX.sol";

contract StrongXNodeManager is AccessControl, ReentrancyGuard {
    using Address for address payable;
    using SafeMath for uint;

    bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

    struct User {
        bool exists;
        uint quantity;
        uint lastClaim;
        uint totalClaimed;
        uint totalUsedSlots;
    }

    struct UserBoost {
        uint bronzeNftAmount;
        uint bronzeSlotsUsed;
        uint silverNftAmount;
        uint silverSlotsUsed;
        uint goldNftAmount;
        uint goldSlotsUsed;
        uint platinumNftAmount;
        uint platinumSlotsUsed;
    }

    struct Boost {
        uint boostPerSecond;
        uint slots;
        uint tokenId;
    }

    mapping (address => User) public users;
    mapping (address => UserBoost) public userBoosts;
    IStrongX public immutable token;
    IStrongXNFT public immutable nft;
    Boost public bronzeBoost = Boost(145000000000, 1, 1);
    Boost public silverBoost = Boost(347000000000, 2, 2);
    Boost public goldBoost = Boost(463000000000, 5, 3);
    Boost public platinumBoost = Boost(579000000000, 10, 4);
    uint public costPerNode = 10 * 1e18;
    uint public rewardPerSecond = 1100000000000; // 0.095 / 86400
    uint public totalNodes;
    uint public totalParticipants;
    uint public totalRewarded;

    mapping (address => uint) private claimableRewards;
    address private immutable admin;

    event Created(
        address indexed account,
        uint quantity
    );

    event Withdrawn(
        address indexed account,
        uint amount
    );

    event Attached(
        address indexed account,
        uint id,
        uint amount
    );

    event Detached(
        address indexed account,
        uint id,
        uint amount
    );

    constructor(
        address _token,
        address _nft
    ) {
        token = IStrongX(_token);
        nft = IStrongXNFT(_nft);

        admin = _msgSender();

        _grantRole(DEFAULT_ADMIN_ROLE, admin);
        _grantRole(MANAGER_ROLE, admin);
    }

    function create(uint quantity) external nonReentrant {
        require(quantity > 0, "Quantity must be more than zero");

        User storage user = users[_msgSender()];
        if (!user.exists) {
            user.exists = true;
            totalParticipants++;
        }

        _claimPendingRewards(_msgSender());
        user.quantity = user.quantity.add(quantity);
        totalNodes = totalNodes.add(quantity);

        uint amount = quantity.mul(costPerNode);
        token.transferFrom(_msgSender(), address(this), amount);
        token.burn(amount);

        emit Created(_msgSender(), quantity);
    }

    function withdraw() external nonReentrant {
        User storage user = users[_msgSender()];
        require(user.exists, "User does not exist");

        uint rewards = getRewards(_msgSender());
        require(rewards > 0, "No rewards to claim");

        user.totalClaimed = user.totalClaimed.add(rewards);
        totalRewarded = totalRewarded.add(rewards);
        claimableRewards[_msgSender()] = 0;
        user.lastClaim = block.timestamp;

        token.mint(_msgSender(), rewards);

        emit Withdrawn(_msgSender(), rewards);
    }

    function claim(address beneficiary, uint quantity) external nonReentrant onlyRole(MANAGER_ROLE) {
        require(quantity > 0, "Quantity must be more than zero");

        User storage user = users[beneficiary];
        if (!user.exists) {
            user.exists = true;
            totalParticipants++;
        }

        _claimPendingRewards(beneficiary);
        user.quantity = user.quantity.add(quantity);
        totalNodes = totalNodes.add(quantity);

        emit Created(beneficiary, quantity);
    }

    function attach(uint id, uint amount) external nonReentrant {
        require(id > 0 && id <= 4, "Invalid token id");
        require(amount > 0, "Amount must be more than zero");

        User storage user = users[_msgSender()];
        require(user.exists, "User does not exist");

        uint neededSlots;
        if (id == 1) neededSlots = 1;
        else if (id == 2) neededSlots = 2;
        else if (id == 3) neededSlots = 5;
        else neededSlots = 10;
        
        neededSlots = neededSlots.mul(amount);

        require(
            user.totalUsedSlots.add(neededSlots) <= user.quantity, 
            "You do not have enough nodes for this boost"
        );

        _claimPendingRewards(_msgSender());
        _applyBoost(_msgSender(), id, amount, neededSlots);
        user.totalUsedSlots = user.totalUsedSlots.add(neededSlots);

        nft.burn(_msgSender(), id, amount);

        emit Attached(_msgSender(), id, amount);
    }

    function detach(uint id, uint amount) external nonReentrant {
        require(id > 0 && id <= 4, "Invalid token id");
        require(amount > 0, "Amount must be more than zero");

        User storage user = users[_msgSender()];
        require(user.exists, "User does not exist");

        uint freedSlots;
        if (id == 1) freedSlots = 1;
        else if (id == 2) freedSlots = 2;
        else if (id == 3) freedSlots = 5;
        else freedSlots = 10;
        
        freedSlots = freedSlots.mul(amount);

        require(
            user.totalUsedSlots >= freedSlots,
            "Not enough used slots to detach"
        );

        _claimPendingRewards(_msgSender());
        _detachBoost(_msgSender(), id, amount, freedSlots);
        user.totalUsedSlots = user.totalUsedSlots.sub(freedSlots);

        nft.mint(_msgSender(), id, amount, "");

        emit Detached(_msgSender(), id, amount);
    }

    /** VIEW FUNCTIONS */

    function getRewards(address account) public view returns (uint rewards) {
        return claimableRewards[account].add(_getPendingRewards(account));
    }

    function getRewardRatePerDay(address account) public view returns (uint rewardRatePerDay) {
        rewardRatePerDay = _getRewardRate(account).mul(1 days);
    }

    /** INTERNAL FUNCTIONS */

    function _claimPendingRewards(address account) internal returns (bool) {
        User storage user = users[account];
        require(user.exists, "User does not exist");

        claimableRewards[account] = claimableRewards[account].add(_getPendingRewards(account));
        user.lastClaim = block.timestamp;
        return true;
    }

    function _getPendingRewards(address account) internal view returns (uint pendingRewards) {
        User memory user = users[account];
        uint rewardPeriod = block.timestamp.sub(user.lastClaim);

        pendingRewards = _getRewardRate(account).mul(rewardPeriod);
    }

    function _getRewardRate(address account) internal view returns (uint rewardRate) {
        User memory user = users[account];

        uint baseRate = user.quantity.mul(rewardPerSecond);
        uint additionalRate;

        for (uint i = 1; i <= 4; i++) {
            additionalRate = additionalRate.add(_getBoostRewardRate(account, i));
        }

        rewardRate = baseRate.add(additionalRate);
    }

    function _getBoostRewardRate(address account, uint tokenId) internal view returns (uint) {
        UserBoost memory userBoost = userBoosts[account];

        uint slots;
        uint boostPerSecond;

        if (tokenId == 1) {
            // bronze boost
            slots = userBoost.bronzeSlotsUsed;
            boostPerSecond = bronzeBoost.boostPerSecond;
        } else if (tokenId == 2) {
            // silver boost
            slots = userBoost.silverSlotsUsed;
            boostPerSecond = silverBoost.boostPerSecond;
        } else if (tokenId == 3) {
            // gold boost
            slots = userBoost.goldSlotsUsed;
            boostPerSecond = goldBoost.boostPerSecond;
        } else {
            // platinum boost
            slots = userBoost.platinumSlotsUsed;
            boostPerSecond = platinumBoost.boostPerSecond;
        }

        return slots.mul(boostPerSecond);
    }

    function _applyBoost(address account, uint tokenId, uint amount, uint slots) internal {
        UserBoost storage userBoost = userBoosts[account];

        if (tokenId == 1) {
            userBoost.bronzeNftAmount = userBoost.bronzeNftAmount.add(amount);
            userBoost.bronzeSlotsUsed = userBoost.bronzeSlotsUsed.add(slots);
        } else if (tokenId == 2) {
            userBoost.silverNftAmount = userBoost.silverNftAmount.add(amount);
            userBoost.silverSlotsUsed = userBoost.silverSlotsUsed.add(slots);
        } else if (tokenId == 3) {
            userBoost.goldNftAmount = userBoost.goldNftAmount.add(amount);
            userBoost.goldSlotsUsed = userBoost.goldSlotsUsed.add(slots);
        } else {
            userBoost.platinumNftAmount = userBoost.platinumNftAmount.add(amount);
            userBoost.platinumSlotsUsed = userBoost.platinumSlotsUsed.add(slots);
        }
    }

    function _detachBoost(address account, uint tokenId, uint amount, uint slots) internal {
        UserBoost storage userBoost = userBoosts[account];

        if (tokenId == 1) {
            require(
                userBoost.bronzeNftAmount >= amount &&
                userBoost.bronzeSlotsUsed >= slots,
                "Can not detach more slots than used"
            );
            userBoost.bronzeNftAmount = userBoost.bronzeNftAmount.sub(amount);
            userBoost.bronzeSlotsUsed = userBoost.bronzeSlotsUsed.sub(slots);
        } else if (tokenId == 2) {
            require(
                userBoost.silverNftAmount >= amount &&
                userBoost.silverSlotsUsed >= slots,
                "Can not detach more slots than used"
            );
            userBoost.silverNftAmount = userBoost.silverNftAmount.sub(amount);
            userBoost.silverSlotsUsed = userBoost.silverSlotsUsed.sub(slots);
        } else if (tokenId == 3) {
            require(
                userBoost.goldNftAmount >= amount &&
                userBoost.goldSlotsUsed >= slots,
                "Can not detach more slots than used"
            );
            userBoost.goldNftAmount = userBoost.goldNftAmount.sub(amount);
            userBoost.goldSlotsUsed = userBoost.goldSlotsUsed.sub(slots);
        } else {
            require(
                userBoost.platinumNftAmount >= amount &&
                userBoost.platinumSlotsUsed >= slots,
                "Can not detach more slots than used"
            );
            userBoost.platinumNftAmount = userBoost.platinumNftAmount.sub(amount);
            userBoost.platinumSlotsUsed = userBoost.platinumSlotsUsed.sub(slots);
        }
    }

    /** RESTRICTED FUNCTIONS */

    function setRewardPerSecond(uint _rewardPerSecond) external onlyRole(MANAGER_ROLE) {
        require(
            _rewardPerSecond > 0 && _rewardPerSecond < 1 ether,
            "Reward per second not within bounds"
        );

        rewardPerSecond = _rewardPerSecond;
    }

    function setBoostProperties(uint id, uint boostRewardPerSecond, uint boostSlots) external onlyRole(MANAGER_ROLE) {
        require(id > 0 && id <= 4, "Invalid token id");

        if (id == 1) bronzeBoost = Boost(boostRewardPerSecond, boostSlots, bronzeBoost.tokenId);
        if (id == 2) silverBoost = Boost(boostRewardPerSecond, boostSlots, silverBoost.tokenId);
        if (id == 3) goldBoost = Boost(boostRewardPerSecond, boostSlots, goldBoost.tokenId);
        else platinumBoost = Boost(boostRewardPerSecond, boostSlots, platinumBoost.tokenId);
    }

    function recoverTokens(address _token) external onlyRole(DEFAULT_ADMIN_ROLE) {
        IERC20(_token).transfer(admin, IERC20(_token).balanceOf(address(this)));
    }
}

File 2 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```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 AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

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

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

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

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @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 ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

    /**
     * @dev 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) {
        return _status == _ENTERED;
    }
}

File 5 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 6 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.0;

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

File 10 of 16 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 12 of 16 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 13 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

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

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

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

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 14 of 16 : IStrongX.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStrongX is IERC20 {
    function uniswapV2Router() external returns (address);
    function uniswapV2Pair() external returns (address);
    function WETH() external returns (address);

    function mint(address to, uint amount) external;
    function burn(uint amount) external;
}

File 15 of 16 : IStrongXNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStrongXNFT {
    function mint(address to, uint id, uint amount, bytes calldata data) external;
    function burn(address from, uint id, uint amount) external;
}

File 16 of 16 : IStrongXNodeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStrongXNodeManager {
    function claim(address beneficiary, uint nodeAmount) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_nft","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Attached","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Detached","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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"attach","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bronzeBoost","outputs":[{"internalType":"uint256","name":"boostPerSecond","type":"uint256"},{"internalType":"uint256","name":"slots","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"costPerNode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"create","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"detach","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRewardRatePerDay","outputs":[{"internalType":"uint256","name":"rewardRatePerDay","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRewards","outputs":[{"internalType":"uint256","name":"rewards","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":[],"name":"goldBoost","outputs":[{"internalType":"uint256","name":"boostPerSecond","type":"uint256"},{"internalType":"uint256","name":"slots","type":"uint256"},{"internalType":"uint256","name":"tokenId","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":[],"name":"nft","outputs":[{"internalType":"contract IStrongXNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platinumBoost","outputs":[{"internalType":"uint256","name":"boostPerSecond","type":"uint256"},{"internalType":"uint256","name":"slots","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","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":[],"name":"rewardPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"boostRewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"boostSlots","type":"uint256"}],"name":"setBoostProperties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"}],"name":"setRewardPerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"silverBoost","outputs":[{"internalType":"uint256","name":"boostPerSecond","type":"uint256"},{"internalType":"uint256","name":"slots","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IStrongX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNodes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalParticipants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewarded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBoosts","outputs":[{"internalType":"uint256","name":"bronzeNftAmount","type":"uint256"},{"internalType":"uint256","name":"bronzeSlotsUsed","type":"uint256"},{"internalType":"uint256","name":"silverNftAmount","type":"uint256"},{"internalType":"uint256","name":"silverSlotsUsed","type":"uint256"},{"internalType":"uint256","name":"goldNftAmount","type":"uint256"},{"internalType":"uint256","name":"goldSlotsUsed","type":"uint256"},{"internalType":"uint256","name":"platinumNftAmount","type":"uint256"},{"internalType":"uint256","name":"platinumSlotsUsed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"users","outputs":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"lastClaim","type":"uint256"},{"internalType":"uint256","name":"totalClaimed","type":"uint256"},{"internalType":"uint256","name":"totalUsedSlots","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e060405260405180606001604052806421c2ac6a0081526020016001815260200160018152506004600082015181600001556020820151816001015560408201518160020155505060405180606001604052806450cacfce008152602001600281526020016002815250600760008201518160000155602082015181600101556040820151816002015550506040518060600160405280646bccf356008152602001600581526020016003815250600a600082015181600001556020820151816001015560408201518160020155505060405180606001604052806486cf16de008152602001600a81526020016004815250600d6000820151816000015560208201518160010155604082015181600201555050678ac7230489e800006010556501001d1bf8006011553480156200013757600080fd5b5060405162003de638038062003de683398181016040528101906200015d91906200042f565b600180819055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050620001dc6200026260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050620002266000801b60c0516200026a60201b60201c565b6200025a7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0860c0516200026a60201b60201c565b505062000476565b600033905090565b6200027c82826200035b60201b60201c565b6200035757600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620002fc6200026260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003f782620003ca565b9050919050565b6200040981620003ea565b81146200041557600080fd5b50565b6000815190506200042981620003fe565b92915050565b60008060408385031215620004495762000448620003c5565b5b6000620004598582860162000418565b92505060206200046c8582860162000418565b9150509250929050565b60805160a05160c05161391d620004c9600039600061069a015260008181610b4a015281816111770152611721015260008181610a5501528181610d5601528181610dfe0152611a2b015261391d6000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80638f10369a1161010f578063bfb7b2e9116100a2578063d6c5064611610071578063d6c506461461057b578063df27716c14610599578063ec87621c146105b9578063fc0c546a146105d7576101e5565b8063bfb7b2e914610507578063c55e0ec514610527578063d547741f14610543578063d5cbbd821461055f576101e5565b8063a26dbf26116100de578063a26dbf261461047b578063a87430ba14610499578063aad3ec96146104cd578063aed29d07146104e9576101e5565b80638f10369a146103f157806391d148541461040f5780639592d4241461043f578063a217fddf1461045d576101e5565b80633ccfd60b11610187578063780900dc11610156578063780900dc1461036957806379c162b71461038557806379ee54f7146103a557806384730842146103d5576101e5565b80633ccfd60b1461030557806347ccca021461030f5780635f7f34b11461032d57806366da58151461034d576101e5565b806322ee9c94116101c357806322ee9c941461026d578063248a9ca31461029d5780632f2ff15d146102cd57806336568abe146102e9576101e5565b806301ffc9a7146101ea57806316114acd1461021a5780631958433d14610236575b600080fd5b61020460048036038101906101ff91906128f8565b6105f5565b6040516102119190612940565b60405180910390f35b610234600480360381019061022f91906129b9565b61066f565b005b610250600480360381019061024b91906129b9565b610798565b6040516102649897969594939291906129ff565b60405180910390f35b610287600480360381019061028291906129b9565b6107e0565b6040516102949190612a7d565b60405180910390f35b6102b760048036038101906102b29190612ace565b610807565b6040516102c49190612b0a565b60405180910390f35b6102e760048036038101906102e29190612b25565b610826565b005b61030360048036038101906102fe9190612b25565b610847565b005b61030d6108ca565b005b610317610b48565b6040516103249190612bc4565b60405180910390f35b610335610b6c565b60405161034493929190612bdf565b60405180910390f35b61036760048036038101906103629190612c42565b610b84565b005b610383600480360381019061037e9190612c42565b610c0f565b005b61038d610ee9565b60405161039c93929190612bdf565b60405180910390f35b6103bf60048036038101906103ba91906129b9565b610f01565b6040516103cc9190612a7d565b60405180910390f35b6103ef60048036038101906103ea9190612c6f565b610f64565b005b6103f9611270565b6040516104069190612a7d565b60405180910390f35b61042960048036038101906104249190612b25565b611276565b6040516104369190612940565b60405180910390f35b6104476112e0565b6040516104549190612a7d565b60405180910390f35b6104656112e6565b6040516104729190612b0a565b60405180910390f35b6104836112ed565b6040516104909190612a7d565b60405180910390f35b6104b360048036038101906104ae91906129b9565b6112f3565b6040516104c4959493929190612caf565b60405180910390f35b6104e760048036038101906104e29190612d02565b611336565b005b6104f16114da565b6040516104fe9190612a7d565b60405180910390f35b61050f6114e0565b60405161051e93929190612bdf565b60405180910390f35b610541600480360381019061053c9190612c6f565b6114f8565b005b61055d60048036038101906105589190612b25565b61181a565b005b61057960048036038101906105749190612d42565b61183b565b005b6105836119e7565b6040516105909190612a7d565b60405180910390f35b6105a16119ed565b6040516105b093929190612bdf565b60405180910390f35b6105c1611a05565b6040516105ce9190612b0a565b60405180910390f35b6105df611a29565b6040516105ec9190612db6565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610668575061066782611a4d565b5b9050919050565b6000801b61067c81611ab7565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f00000000000000000000000000000000000000000000000000000000000000008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f29190612de0565b602060405180830381865afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107339190612e10565b6040518363ffffffff1660e01b8152600401610750929190612e3d565b6020604051808303816000875af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107939190612e92565b505050565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154905088565b6000610800620151806107f284611acb565b611bd990919063ffffffff16565b9050919050565b6000806000838152602001908152602001600020600101549050919050565b61082f82610807565b61083881611ab7565b6108428383611bef565b505050565b61084f611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390612f42565b60405180910390fd5b6108c68282611cd7565b5050565b6108d2611db8565b6000600260006108e0611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490612fae565b60405180910390fd5b600061097f61097a611ccf565b610f01565b9050600081116109c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bb9061301a565b60405180910390fd5b6109db818360030154611e0790919063ffffffff16565b82600301819055506109f881601454611e0790919063ffffffff16565b601481905550600060156000610a0c611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055504282600201819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340c10f19610a97611ccf565b836040518363ffffffff1660e01b8152600401610ab5929190612e3d565b600060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b50505050610aef611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d582604051610b349190612a7d565b60405180910390a25050610b46611e1d565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b600d8060000154908060010154908060020154905083565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610bae81611ab7565b600082118015610bc55750670de0b6b3a764000082105b610c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfb906130ac565b60405180910390fd5b816011819055505050565b610c17611db8565b60008111610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613118565b60405180910390fd5b600060026000610c68611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16610cf05760018160000160006101000a81548160ff02191690831515021790555060136000815480929190610cea90613167565b91905055505b610d00610cfb611ccf565b611e26565b50610d18828260010154611e0790919063ffffffff16565b8160010181905550610d3582601254611e0790919063ffffffff16565b6012819055506000610d5260105484611bd990919063ffffffff16565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd610d98611ccf565b30846040518463ffffffff1660e01b8152600401610db8939291906131af565b6020604051808303816000875af1158015610dd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfb9190612e92565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401610e559190612a7d565b600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b50505050610e8f611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b84604051610ed49190612a7d565b60405180910390a25050610ee6611e1d565b50565b60078060000154908060010154908060020154905083565b6000610f5d610f0f83611f6b565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0790919063ffffffff16565b9050919050565b610f6c611db8565b600082118015610f7d575060048211155b610fbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb390613232565b60405180910390fd5b60008111610fff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff69061329e565b60405180910390fd5b60006002600061100d611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109190612fae565b60405180910390fd5b6000600184036110ad57600190506110d6565b600284036110be57600290506110d5565b600384036110cf57600590506110d4565b600a90505b5b5b6110e98382611bd990919063ffffffff16565b90508082600401541015611132576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111299061330a565b60405180910390fd5b61114261113d611ccf565b611e26565b5061115661114e611ccf565b85858461203c565b61116d81836004015461230490919063ffffffff16565b82600401819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663731133e96111b9611ccf565b86866040518463ffffffff1660e01b81526004016111d993929190613361565b600060405180830381600087803b1580156111f357600080fd5b505af1158015611207573d6000803e3d6000fd5b50505050611213611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f1d142f59b83c37614d90fa1b63f144d06c187872b473dafcbccaa345efceeb0e858560405161125a9291906133ab565b60405180910390a2505061126c611e1d565b5050565b60115481565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60125481565b6000801b81565b60135481565b60026020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154908060040154905085565b61133e611db8565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861136881611ab7565b600082116113ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a290613118565b60405180910390fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661143a5760018160000160006101000a81548160ff0219169083151502179055506013600081548092919061143490613167565b91905055505b61144384611e26565b5061145b838260010154611e0790919063ffffffff16565b816001018190555061147883601254611e0790919063ffffffff16565b6012819055508373ffffffffffffffffffffffffffffffffffffffff167f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b846040516114c49190612a7d565b60405180910390a250506114d6611e1d565b5050565b60145481565b600a8060000154908060010154908060020154905083565b611500611db8565b600082118015611511575060048211155b611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154790613232565b60405180910390fd5b60008111611593576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158a9061329e565b60405180910390fd5b6000600260006115a1611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661162e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162590612fae565b60405180910390fd5b600060018403611641576001905061166a565b600284036116525760029050611669565b600384036116635760059050611668565b600a90505b5b5b61167d8382611bd990919063ffffffff16565b9050816001015461169b828460040154611e0790919063ffffffff16565b11156116dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d390613446565b60405180910390fd5b6116ec6116e7611ccf565b611e26565b506117006116f8611ccf565b85858461231a565b611717818360040154611e0790919063ffffffff16565b82600401819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f5298aca611763611ccf565b86866040518463ffffffff1660e01b815260040161178393929190613466565b600060405180830381600087803b15801561179d57600080fd5b505af11580156117b1573d6000803e3d6000fd5b505050506117bd611ccf565b73ffffffffffffffffffffffffffffffffffffffff167fdf61ea4f74a3d370903d2726e6cd7f3b34f9dc5c337d18e8a8b60addb57a409f85856040516118049291906133ab565b60405180910390a25050611816611e1d565b5050565b61182382610807565b61182c81611ab7565b6118368383611cd7565b505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861186581611ab7565b600084118015611876575060048411155b6118b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ac90613232565b60405180910390fd5b6001840361190157604051806060016040528084815260200183815260200160046002015481525060046000820151816000015560208201518160010155604082015181600201559050505b6002840361194d57604051806060016040528084815260200183815260200160076002015481525060076000820151816000015560208201518160010155604082015181600201559050505b6003840361199d576040518060600160405280848152602001838152602001600a60020154815250600a6000820151816000015560208201518160010155604082015181600201559050506119e1565b6040518060600160405280848152602001838152602001600d60020154815250600d6000820151816000015560208201518160010155604082015181600201559050505b50505050565b60105481565b60048060000154908060010154908060020154905083565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ac881611ac3611ccf565b612486565b50565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900460ff1615151515815260200160018201548152602001600282015481526020016003820154815260200160048201548152505090506000611b786011548360200151611bd990919063ffffffff16565b9050600080600190505b60048111611bbb57611ba6611b97878361250b565b83611e0790919063ffffffff16565b91508080611bb390613167565b915050611b82565b50611bcf8183611e0790919063ffffffff16565b9350505050919050565b60008183611be7919061349d565b905092915050565b611bf98282611276565b611ccb57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611c70611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611ce18282611276565b15611db457600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611d59611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600260015403611dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df49061352b565b60405180910390fd5b6002600181905550565b60008183611e15919061354b565b905092915050565b60018081905550565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16611ebb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb290612fae565b60405180910390fd5b611f15611ec784611f6b565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0790919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055504281600201819055506001915050919050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900460ff161515151581526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050600061201682604001514261230490919063ffffffff16565b90506120338161202586611acb565b611bd990919063ffffffff16565b92505050919050565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018403612121578281600001541015801561209f575081816001015410155b6120de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d5906135f1565b60405180910390fd5b6120f583826000015461230490919063ffffffff16565b816000018190555061211482826001015461230490919063ffffffff16565b81600101819055506122fd565b600284036121c35782816002015410158015612141575081816003015410155b612180576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612177906135f1565b60405180910390fd5b61219783826002015461230490919063ffffffff16565b81600201819055506121b682826003015461230490919063ffffffff16565b81600301819055506122fc565b6003840361226557828160040154101580156121e3575081816005015410155b612222576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612219906135f1565b60405180910390fd5b61223983826004015461230490919063ffffffff16565b816004018190555061225882826005015461230490919063ffffffff16565b81600501819055506122fb565b8281600601541015801561227d575081816007015410155b6122bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b3906135f1565b60405180910390fd5b6122d383826006015461230490919063ffffffff16565b81600601819055506122f282826007015461230490919063ffffffff16565b81600701819055505b5b5b5050505050565b600081836123129190613611565b905092915050565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600184036123a85761237c838260000154611e0790919063ffffffff16565b816000018190555061239b828260010154611e0790919063ffffffff16565b816001018190555061247f565b600284036123f3576123c7838260020154611e0790919063ffffffff16565b81600201819055506123e6828260030154611e0790919063ffffffff16565b816003018190555061247e565b6003840361243e57612412838260040154611e0790919063ffffffff16565b8160040181905550612431828260050154611e0790919063ffffffff16565b816005018190555061247d565b612455838260060154611e0790919063ffffffff16565b8160060181905550612474828260070154611e0790919063ffffffff16565b81600701819055505b5b5b5050505050565b6124908282611276565b6125075761249d81612632565b6124ab8360001c602061265f565b6040516020016124bc92919061374e565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fe91906137d2565b60405180910390fd5b5050565b600080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180610100016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815250509050600080600185036125ca57826020015191506004600001549050612614565b600285036125e657826060015191506007600001549050612613565b60038503612602578260a001519150600a600001549050612612565b8260e001519150600d6000015490505b5b5b6126278183611bd990919063ffffffff16565b935050505092915050565b60606126588273ffffffffffffffffffffffffffffffffffffffff16601460ff1661265f565b9050919050565b606060006002836002612672919061349d565b61267c919061354b565b67ffffffffffffffff811115612695576126946137f4565b5b6040519080825280601f01601f1916602001820160405280156126c75781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106126ff576126fe613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061276357612762613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026127a3919061349d565b6127ad919061354b565b90505b600181111561284d577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106127ef576127ee613823565b5b1a60f81b82828151811061280657612805613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061284690613852565b90506127b0565b5060008414612891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612888906138c7565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6128d5816128a0565b81146128e057600080fd5b50565b6000813590506128f2816128cc565b92915050565b60006020828403121561290e5761290d61289b565b5b600061291c848285016128e3565b91505092915050565b60008115159050919050565b61293a81612925565b82525050565b60006020820190506129556000830184612931565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006129868261295b565b9050919050565b6129968161297b565b81146129a157600080fd5b50565b6000813590506129b38161298d565b92915050565b6000602082840312156129cf576129ce61289b565b5b60006129dd848285016129a4565b91505092915050565b6000819050919050565b6129f9816129e6565b82525050565b600061010082019050612a15600083018b6129f0565b612a22602083018a6129f0565b612a2f60408301896129f0565b612a3c60608301886129f0565b612a4960808301876129f0565b612a5660a08301866129f0565b612a6360c08301856129f0565b612a7060e08301846129f0565b9998505050505050505050565b6000602082019050612a9260008301846129f0565b92915050565b6000819050919050565b612aab81612a98565b8114612ab657600080fd5b50565b600081359050612ac881612aa2565b92915050565b600060208284031215612ae457612ae361289b565b5b6000612af284828501612ab9565b91505092915050565b612b0481612a98565b82525050565b6000602082019050612b1f6000830184612afb565b92915050565b60008060408385031215612b3c57612b3b61289b565b5b6000612b4a85828601612ab9565b9250506020612b5b858286016129a4565b9150509250929050565b6000819050919050565b6000612b8a612b85612b808461295b565b612b65565b61295b565b9050919050565b6000612b9c82612b6f565b9050919050565b6000612bae82612b91565b9050919050565b612bbe81612ba3565b82525050565b6000602082019050612bd96000830184612bb5565b92915050565b6000606082019050612bf460008301866129f0565b612c0160208301856129f0565b612c0e60408301846129f0565b949350505050565b612c1f816129e6565b8114612c2a57600080fd5b50565b600081359050612c3c81612c16565b92915050565b600060208284031215612c5857612c5761289b565b5b6000612c6684828501612c2d565b91505092915050565b60008060408385031215612c8657612c8561289b565b5b6000612c9485828601612c2d565b9250506020612ca585828601612c2d565b9150509250929050565b600060a082019050612cc46000830188612931565b612cd160208301876129f0565b612cde60408301866129f0565b612ceb60608301856129f0565b612cf860808301846129f0565b9695505050505050565b60008060408385031215612d1957612d1861289b565b5b6000612d27858286016129a4565b9250506020612d3885828601612c2d565b9150509250929050565b600080600060608486031215612d5b57612d5a61289b565b5b6000612d6986828701612c2d565b9350506020612d7a86828701612c2d565b9250506040612d8b86828701612c2d565b9150509250925092565b6000612da082612b91565b9050919050565b612db081612d95565b82525050565b6000602082019050612dcb6000830184612da7565b92915050565b612dda8161297b565b82525050565b6000602082019050612df56000830184612dd1565b92915050565b600081519050612e0a81612c16565b92915050565b600060208284031215612e2657612e2561289b565b5b6000612e3484828501612dfb565b91505092915050565b6000604082019050612e526000830185612dd1565b612e5f60208301846129f0565b9392505050565b612e6f81612925565b8114612e7a57600080fd5b50565b600081519050612e8c81612e66565b92915050565b600060208284031215612ea857612ea761289b565b5b6000612eb684828501612e7d565b91505092915050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612f2c602f83612ebf565b9150612f3782612ed0565b604082019050919050565b60006020820190508181036000830152612f5b81612f1f565b9050919050565b7f5573657220646f6573206e6f7420657869737400000000000000000000000000600082015250565b6000612f98601383612ebf565b9150612fa382612f62565b602082019050919050565b60006020820190508181036000830152612fc781612f8b565b9050919050565b7f4e6f207265776172647320746f20636c61696d00000000000000000000000000600082015250565b6000613004601383612ebf565b915061300f82612fce565b602082019050919050565b6000602082019050818103600083015261303381612ff7565b9050919050565b7f52657761726420706572207365636f6e64206e6f742077697468696e20626f7560008201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b6000613096602383612ebf565b91506130a18261303a565b604082019050919050565b600060208201905081810360008301526130c581613089565b9050919050565b7f5175616e74697479206d757374206265206d6f7265207468616e207a65726f00600082015250565b6000613102601f83612ebf565b915061310d826130cc565b602082019050919050565b60006020820190508181036000830152613131816130f5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613172826129e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131a4576131a3613138565b5b600182019050919050565b60006060820190506131c46000830186612dd1565b6131d16020830185612dd1565b6131de60408301846129f0565b949350505050565b7f496e76616c696420746f6b656e20696400000000000000000000000000000000600082015250565b600061321c601083612ebf565b9150613227826131e6565b602082019050919050565b6000602082019050818103600083015261324b8161320f565b9050919050565b7f416d6f756e74206d757374206265206d6f7265207468616e207a65726f000000600082015250565b6000613288601d83612ebf565b915061329382613252565b602082019050919050565b600060208201905081810360008301526132b78161327b565b9050919050565b7f4e6f7420656e6f756768207573656420736c6f747320746f2064657461636800600082015250565b60006132f4601f83612ebf565b91506132ff826132be565b602082019050919050565b60006020820190508181036000830152613323816132e7565b9050919050565b600082825260208201905092915050565b50565b600061334b60008361332a565b91506133568261333b565b600082019050919050565b60006080820190506133766000830186612dd1565b61338360208301856129f0565b61339060408301846129f0565b81810360608301526133a18161333e565b9050949350505050565b60006040820190506133c060008301856129f0565b6133cd60208301846129f0565b9392505050565b7f596f7520646f206e6f74206861766520656e6f756768206e6f64657320666f7260008201527f207468697320626f6f7374000000000000000000000000000000000000000000602082015250565b6000613430602b83612ebf565b915061343b826133d4565b604082019050919050565b6000602082019050818103600083015261345f81613423565b9050919050565b600060608201905061347b6000830186612dd1565b61348860208301856129f0565b61349560408301846129f0565b949350505050565b60006134a8826129e6565b91506134b3836129e6565b92508282026134c1816129e6565b915082820484148315176134d8576134d7613138565b5b5092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613515601f83612ebf565b9150613520826134df565b602082019050919050565b6000602082019050818103600083015261354481613508565b9050919050565b6000613556826129e6565b9150613561836129e6565b925082820190508082111561357957613578613138565b5b92915050565b7f43616e206e6f7420646574616368206d6f726520736c6f7473207468616e207560008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b60006135db602383612ebf565b91506135e68261357f565b604082019050919050565b6000602082019050818103600083015261360a816135ce565b9050919050565b600061361c826129e6565b9150613627836129e6565b925082820390508181111561363f5761363e613138565b5b92915050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000613686601783613645565b915061369182613650565b601782019050919050565b600081519050919050565b60005b838110156136c55780820151818401526020810190506136aa565b60008484015250505050565b60006136dc8261369c565b6136e68185613645565b93506136f68185602086016136a7565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000613738601183613645565b915061374382613702565b601182019050919050565b600061375982613679565b915061376582856136d1565b91506137708261372b565b915061377c82846136d1565b91508190509392505050565b6000601f19601f8301169050919050565b60006137a48261369c565b6137ae8185612ebf565b93506137be8185602086016136a7565b6137c781613788565b840191505092915050565b600060208201905081810360008301526137ec8184613799565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061385d826129e6565b9150600082036138705761386f613138565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006138b1602083612ebf565b91506138bc8261387b565b602082019050919050565b600060208201905081810360008301526138e0816138a4565b905091905056fea264697066735822122008ebdd071f2a5501ff7c9bcfd2d6fedc67876462a43223a05edf05237a6eba5764736f6c63430008130033000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80638f10369a1161010f578063bfb7b2e9116100a2578063d6c5064611610071578063d6c506461461057b578063df27716c14610599578063ec87621c146105b9578063fc0c546a146105d7576101e5565b8063bfb7b2e914610507578063c55e0ec514610527578063d547741f14610543578063d5cbbd821461055f576101e5565b8063a26dbf26116100de578063a26dbf261461047b578063a87430ba14610499578063aad3ec96146104cd578063aed29d07146104e9576101e5565b80638f10369a146103f157806391d148541461040f5780639592d4241461043f578063a217fddf1461045d576101e5565b80633ccfd60b11610187578063780900dc11610156578063780900dc1461036957806379c162b71461038557806379ee54f7146103a557806384730842146103d5576101e5565b80633ccfd60b1461030557806347ccca021461030f5780635f7f34b11461032d57806366da58151461034d576101e5565b806322ee9c94116101c357806322ee9c941461026d578063248a9ca31461029d5780632f2ff15d146102cd57806336568abe146102e9576101e5565b806301ffc9a7146101ea57806316114acd1461021a5780631958433d14610236575b600080fd5b61020460048036038101906101ff91906128f8565b6105f5565b6040516102119190612940565b60405180910390f35b610234600480360381019061022f91906129b9565b61066f565b005b610250600480360381019061024b91906129b9565b610798565b6040516102649897969594939291906129ff565b60405180910390f35b610287600480360381019061028291906129b9565b6107e0565b6040516102949190612a7d565b60405180910390f35b6102b760048036038101906102b29190612ace565b610807565b6040516102c49190612b0a565b60405180910390f35b6102e760048036038101906102e29190612b25565b610826565b005b61030360048036038101906102fe9190612b25565b610847565b005b61030d6108ca565b005b610317610b48565b6040516103249190612bc4565b60405180910390f35b610335610b6c565b60405161034493929190612bdf565b60405180910390f35b61036760048036038101906103629190612c42565b610b84565b005b610383600480360381019061037e9190612c42565b610c0f565b005b61038d610ee9565b60405161039c93929190612bdf565b60405180910390f35b6103bf60048036038101906103ba91906129b9565b610f01565b6040516103cc9190612a7d565b60405180910390f35b6103ef60048036038101906103ea9190612c6f565b610f64565b005b6103f9611270565b6040516104069190612a7d565b60405180910390f35b61042960048036038101906104249190612b25565b611276565b6040516104369190612940565b60405180910390f35b6104476112e0565b6040516104549190612a7d565b60405180910390f35b6104656112e6565b6040516104729190612b0a565b60405180910390f35b6104836112ed565b6040516104909190612a7d565b60405180910390f35b6104b360048036038101906104ae91906129b9565b6112f3565b6040516104c4959493929190612caf565b60405180910390f35b6104e760048036038101906104e29190612d02565b611336565b005b6104f16114da565b6040516104fe9190612a7d565b60405180910390f35b61050f6114e0565b60405161051e93929190612bdf565b60405180910390f35b610541600480360381019061053c9190612c6f565b6114f8565b005b61055d60048036038101906105589190612b25565b61181a565b005b61057960048036038101906105749190612d42565b61183b565b005b6105836119e7565b6040516105909190612a7d565b60405180910390f35b6105a16119ed565b6040516105b093929190612bdf565b60405180910390f35b6105c1611a05565b6040516105ce9190612b0a565b60405180910390f35b6105df611a29565b6040516105ec9190612db6565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610668575061066782611a4d565b5b9050919050565b6000801b61067c81611ab7565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f00000000000000000000000008db17df7aea5d8eecf049bc0fc906e8e0928f1c8473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106f29190612de0565b602060405180830381865afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107339190612e10565b6040518363ffffffff1660e01b8152600401610750929190612e3d565b6020604051808303816000875af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107939190612e92565b505050565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154905088565b6000610800620151806107f284611acb565b611bd990919063ffffffff16565b9050919050565b6000806000838152602001908152602001600020600101549050919050565b61082f82610807565b61083881611ab7565b6108428383611bef565b505050565b61084f611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390612f42565b60405180910390fd5b6108c68282611cd7565b5050565b6108d2611db8565b6000600260006108e0611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490612fae565b60405180910390fd5b600061097f61097a611ccf565b610f01565b9050600081116109c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bb9061301a565b60405180910390fd5b6109db818360030154611e0790919063ffffffff16565b82600301819055506109f881601454611e0790919063ffffffff16565b601481905550600060156000610a0c611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055504282600201819055507f000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e73ffffffffffffffffffffffffffffffffffffffff166340c10f19610a97611ccf565b836040518363ffffffff1660e01b8152600401610ab5929190612e3d565b600060405180830381600087803b158015610acf57600080fd5b505af1158015610ae3573d6000803e3d6000fd5b50505050610aef611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d582604051610b349190612a7d565b60405180910390a25050610b46611e1d565b565b7f000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b81565b600d8060000154908060010154908060020154905083565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08610bae81611ab7565b600082118015610bc55750670de0b6b3a764000082105b610c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfb906130ac565b60405180910390fd5b816011819055505050565b610c17611db8565b60008111610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613118565b60405180910390fd5b600060026000610c68611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16610cf05760018160000160006101000a81548160ff02191690831515021790555060136000815480929190610cea90613167565b91905055505b610d00610cfb611ccf565b611e26565b50610d18828260010154611e0790919063ffffffff16565b8160010181905550610d3582601254611e0790919063ffffffff16565b6012819055506000610d5260105484611bd990919063ffffffff16565b90507f000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e73ffffffffffffffffffffffffffffffffffffffff166323b872dd610d98611ccf565b30846040518463ffffffff1660e01b8152600401610db8939291906131af565b6020604051808303816000875af1158015610dd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfb9190612e92565b507f000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e73ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401610e559190612a7d565b600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b50505050610e8f611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b84604051610ed49190612a7d565b60405180910390a25050610ee6611e1d565b50565b60078060000154908060010154908060020154905083565b6000610f5d610f0f83611f6b565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0790919063ffffffff16565b9050919050565b610f6c611db8565b600082118015610f7d575060048211155b610fbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb390613232565b60405180910390fd5b60008111610fff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff69061329e565b60405180910390fd5b60006002600061100d611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109190612fae565b60405180910390fd5b6000600184036110ad57600190506110d6565b600284036110be57600290506110d5565b600384036110cf57600590506110d4565b600a90505b5b5b6110e98382611bd990919063ffffffff16565b90508082600401541015611132576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111299061330a565b60405180910390fd5b61114261113d611ccf565b611e26565b5061115661114e611ccf565b85858461203c565b61116d81836004015461230490919063ffffffff16565b82600401819055507f000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b73ffffffffffffffffffffffffffffffffffffffff1663731133e96111b9611ccf565b86866040518463ffffffff1660e01b81526004016111d993929190613361565b600060405180830381600087803b1580156111f357600080fd5b505af1158015611207573d6000803e3d6000fd5b50505050611213611ccf565b73ffffffffffffffffffffffffffffffffffffffff167f1d142f59b83c37614d90fa1b63f144d06c187872b473dafcbccaa345efceeb0e858560405161125a9291906133ab565b60405180910390a2505061126c611e1d565b5050565b60115481565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60125481565b6000801b81565b60135481565b60026020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020154908060030154908060040154905085565b61133e611db8565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861136881611ab7565b600082116113ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a290613118565b60405180910390fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661143a5760018160000160006101000a81548160ff0219169083151502179055506013600081548092919061143490613167565b91905055505b61144384611e26565b5061145b838260010154611e0790919063ffffffff16565b816001018190555061147883601254611e0790919063ffffffff16565b6012819055508373ffffffffffffffffffffffffffffffffffffffff167f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b846040516114c49190612a7d565b60405180910390a250506114d6611e1d565b5050565b60145481565b600a8060000154908060010154908060020154905083565b611500611db8565b600082118015611511575060048211155b611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154790613232565b60405180910390fd5b60008111611593576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158a9061329e565b60405180910390fd5b6000600260006115a1611ccf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1661162e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162590612fae565b60405180910390fd5b600060018403611641576001905061166a565b600284036116525760029050611669565b600384036116635760059050611668565b600a90505b5b5b61167d8382611bd990919063ffffffff16565b9050816001015461169b828460040154611e0790919063ffffffff16565b11156116dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d390613446565b60405180910390fd5b6116ec6116e7611ccf565b611e26565b506117006116f8611ccf565b85858461231a565b611717818360040154611e0790919063ffffffff16565b82600401819055507f000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b73ffffffffffffffffffffffffffffffffffffffff1663f5298aca611763611ccf565b86866040518463ffffffff1660e01b815260040161178393929190613466565b600060405180830381600087803b15801561179d57600080fd5b505af11580156117b1573d6000803e3d6000fd5b505050506117bd611ccf565b73ffffffffffffffffffffffffffffffffffffffff167fdf61ea4f74a3d370903d2726e6cd7f3b34f9dc5c337d18e8a8b60addb57a409f85856040516118049291906133ab565b60405180910390a25050611816611e1d565b5050565b61182382610807565b61182c81611ab7565b6118368383611cd7565b505050565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0861186581611ab7565b600084118015611876575060048411155b6118b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ac90613232565b60405180910390fd5b6001840361190157604051806060016040528084815260200183815260200160046002015481525060046000820151816000015560208201518160010155604082015181600201559050505b6002840361194d57604051806060016040528084815260200183815260200160076002015481525060076000820151816000015560208201518160010155604082015181600201559050505b6003840361199d576040518060600160405280848152602001838152602001600a60020154815250600a6000820151816000015560208201518160010155604082015181600201559050506119e1565b6040518060600160405280848152602001838152602001600d60020154815250600d6000820151816000015560208201518160010155604082015181600201559050505b50505050565b60105481565b60048060000154908060010154908060020154905083565b7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b7f000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e81565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ac881611ac3611ccf565b612486565b50565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900460ff1615151515815260200160018201548152602001600282015481526020016003820154815260200160048201548152505090506000611b786011548360200151611bd990919063ffffffff16565b9050600080600190505b60048111611bbb57611ba6611b97878361250b565b83611e0790919063ffffffff16565b91508080611bb390613167565b915050611b82565b50611bcf8183611e0790919063ffffffff16565b9350505050919050565b60008183611be7919061349d565b905092915050565b611bf98282611276565b611ccb57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611c70611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611ce18282611276565b15611db457600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611d59611ccf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600260015403611dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df49061352b565b60405180910390fd5b6002600181905550565b60008183611e15919061354b565b905092915050565b60018081905550565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff16611ebb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb290612fae565b60405180910390fd5b611f15611ec784611f6b565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e0790919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055504281600201819055506001915050919050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900460ff161515151581526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050600061201682604001514261230490919063ffffffff16565b90506120338161202586611acb565b611bd990919063ffffffff16565b92505050919050565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018403612121578281600001541015801561209f575081816001015410155b6120de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d5906135f1565b60405180910390fd5b6120f583826000015461230490919063ffffffff16565b816000018190555061211482826001015461230490919063ffffffff16565b81600101819055506122fd565b600284036121c35782816002015410158015612141575081816003015410155b612180576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612177906135f1565b60405180910390fd5b61219783826002015461230490919063ffffffff16565b81600201819055506121b682826003015461230490919063ffffffff16565b81600301819055506122fc565b6003840361226557828160040154101580156121e3575081816005015410155b612222576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612219906135f1565b60405180910390fd5b61223983826004015461230490919063ffffffff16565b816004018190555061225882826005015461230490919063ffffffff16565b81600501819055506122fb565b8281600601541015801561227d575081816007015410155b6122bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b3906135f1565b60405180910390fd5b6122d383826006015461230490919063ffffffff16565b81600601819055506122f282826007015461230490919063ffffffff16565b81600701819055505b5b5b5050505050565b600081836123129190613611565b905092915050565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600184036123a85761237c838260000154611e0790919063ffffffff16565b816000018190555061239b828260010154611e0790919063ffffffff16565b816001018190555061247f565b600284036123f3576123c7838260020154611e0790919063ffffffff16565b81600201819055506123e6828260030154611e0790919063ffffffff16565b816003018190555061247e565b6003840361243e57612412838260040154611e0790919063ffffffff16565b8160040181905550612431828260050154611e0790919063ffffffff16565b816005018190555061247d565b612455838260060154611e0790919063ffffffff16565b8160060181905550612474828260070154611e0790919063ffffffff16565b81600701819055505b5b5b5050505050565b6124908282611276565b6125075761249d81612632565b6124ab8360001c602061265f565b6040516020016124bc92919061374e565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fe91906137d2565b60405180910390fd5b5050565b600080600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180610100016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815250509050600080600185036125ca57826020015191506004600001549050612614565b600285036125e657826060015191506007600001549050612613565b60038503612602578260a001519150600a600001549050612612565b8260e001519150600d6000015490505b5b5b6126278183611bd990919063ffffffff16565b935050505092915050565b60606126588273ffffffffffffffffffffffffffffffffffffffff16601460ff1661265f565b9050919050565b606060006002836002612672919061349d565b61267c919061354b565b67ffffffffffffffff811115612695576126946137f4565b5b6040519080825280601f01601f1916602001820160405280156126c75781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106126ff576126fe613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061276357612762613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026127a3919061349d565b6127ad919061354b565b90505b600181111561284d577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106127ef576127ee613823565b5b1a60f81b82828151811061280657612805613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061284690613852565b90506127b0565b5060008414612891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612888906138c7565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6128d5816128a0565b81146128e057600080fd5b50565b6000813590506128f2816128cc565b92915050565b60006020828403121561290e5761290d61289b565b5b600061291c848285016128e3565b91505092915050565b60008115159050919050565b61293a81612925565b82525050565b60006020820190506129556000830184612931565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006129868261295b565b9050919050565b6129968161297b565b81146129a157600080fd5b50565b6000813590506129b38161298d565b92915050565b6000602082840312156129cf576129ce61289b565b5b60006129dd848285016129a4565b91505092915050565b6000819050919050565b6129f9816129e6565b82525050565b600061010082019050612a15600083018b6129f0565b612a22602083018a6129f0565b612a2f60408301896129f0565b612a3c60608301886129f0565b612a4960808301876129f0565b612a5660a08301866129f0565b612a6360c08301856129f0565b612a7060e08301846129f0565b9998505050505050505050565b6000602082019050612a9260008301846129f0565b92915050565b6000819050919050565b612aab81612a98565b8114612ab657600080fd5b50565b600081359050612ac881612aa2565b92915050565b600060208284031215612ae457612ae361289b565b5b6000612af284828501612ab9565b91505092915050565b612b0481612a98565b82525050565b6000602082019050612b1f6000830184612afb565b92915050565b60008060408385031215612b3c57612b3b61289b565b5b6000612b4a85828601612ab9565b9250506020612b5b858286016129a4565b9150509250929050565b6000819050919050565b6000612b8a612b85612b808461295b565b612b65565b61295b565b9050919050565b6000612b9c82612b6f565b9050919050565b6000612bae82612b91565b9050919050565b612bbe81612ba3565b82525050565b6000602082019050612bd96000830184612bb5565b92915050565b6000606082019050612bf460008301866129f0565b612c0160208301856129f0565b612c0e60408301846129f0565b949350505050565b612c1f816129e6565b8114612c2a57600080fd5b50565b600081359050612c3c81612c16565b92915050565b600060208284031215612c5857612c5761289b565b5b6000612c6684828501612c2d565b91505092915050565b60008060408385031215612c8657612c8561289b565b5b6000612c9485828601612c2d565b9250506020612ca585828601612c2d565b9150509250929050565b600060a082019050612cc46000830188612931565b612cd160208301876129f0565b612cde60408301866129f0565b612ceb60608301856129f0565b612cf860808301846129f0565b9695505050505050565b60008060408385031215612d1957612d1861289b565b5b6000612d27858286016129a4565b9250506020612d3885828601612c2d565b9150509250929050565b600080600060608486031215612d5b57612d5a61289b565b5b6000612d6986828701612c2d565b9350506020612d7a86828701612c2d565b9250506040612d8b86828701612c2d565b9150509250925092565b6000612da082612b91565b9050919050565b612db081612d95565b82525050565b6000602082019050612dcb6000830184612da7565b92915050565b612dda8161297b565b82525050565b6000602082019050612df56000830184612dd1565b92915050565b600081519050612e0a81612c16565b92915050565b600060208284031215612e2657612e2561289b565b5b6000612e3484828501612dfb565b91505092915050565b6000604082019050612e526000830185612dd1565b612e5f60208301846129f0565b9392505050565b612e6f81612925565b8114612e7a57600080fd5b50565b600081519050612e8c81612e66565b92915050565b600060208284031215612ea857612ea761289b565b5b6000612eb684828501612e7d565b91505092915050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612f2c602f83612ebf565b9150612f3782612ed0565b604082019050919050565b60006020820190508181036000830152612f5b81612f1f565b9050919050565b7f5573657220646f6573206e6f7420657869737400000000000000000000000000600082015250565b6000612f98601383612ebf565b9150612fa382612f62565b602082019050919050565b60006020820190508181036000830152612fc781612f8b565b9050919050565b7f4e6f207265776172647320746f20636c61696d00000000000000000000000000600082015250565b6000613004601383612ebf565b915061300f82612fce565b602082019050919050565b6000602082019050818103600083015261303381612ff7565b9050919050565b7f52657761726420706572207365636f6e64206e6f742077697468696e20626f7560008201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b6000613096602383612ebf565b91506130a18261303a565b604082019050919050565b600060208201905081810360008301526130c581613089565b9050919050565b7f5175616e74697479206d757374206265206d6f7265207468616e207a65726f00600082015250565b6000613102601f83612ebf565b915061310d826130cc565b602082019050919050565b60006020820190508181036000830152613131816130f5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613172826129e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131a4576131a3613138565b5b600182019050919050565b60006060820190506131c46000830186612dd1565b6131d16020830185612dd1565b6131de60408301846129f0565b949350505050565b7f496e76616c696420746f6b656e20696400000000000000000000000000000000600082015250565b600061321c601083612ebf565b9150613227826131e6565b602082019050919050565b6000602082019050818103600083015261324b8161320f565b9050919050565b7f416d6f756e74206d757374206265206d6f7265207468616e207a65726f000000600082015250565b6000613288601d83612ebf565b915061329382613252565b602082019050919050565b600060208201905081810360008301526132b78161327b565b9050919050565b7f4e6f7420656e6f756768207573656420736c6f747320746f2064657461636800600082015250565b60006132f4601f83612ebf565b91506132ff826132be565b602082019050919050565b60006020820190508181036000830152613323816132e7565b9050919050565b600082825260208201905092915050565b50565b600061334b60008361332a565b91506133568261333b565b600082019050919050565b60006080820190506133766000830186612dd1565b61338360208301856129f0565b61339060408301846129f0565b81810360608301526133a18161333e565b9050949350505050565b60006040820190506133c060008301856129f0565b6133cd60208301846129f0565b9392505050565b7f596f7520646f206e6f74206861766520656e6f756768206e6f64657320666f7260008201527f207468697320626f6f7374000000000000000000000000000000000000000000602082015250565b6000613430602b83612ebf565b915061343b826133d4565b604082019050919050565b6000602082019050818103600083015261345f81613423565b9050919050565b600060608201905061347b6000830186612dd1565b61348860208301856129f0565b61349560408301846129f0565b949350505050565b60006134a8826129e6565b91506134b3836129e6565b92508282026134c1816129e6565b915082820484148315176134d8576134d7613138565b5b5092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613515601f83612ebf565b9150613520826134df565b602082019050919050565b6000602082019050818103600083015261354481613508565b9050919050565b6000613556826129e6565b9150613561836129e6565b925082820190508082111561357957613578613138565b5b92915050565b7f43616e206e6f7420646574616368206d6f726520736c6f7473207468616e207560008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b60006135db602383612ebf565b91506135e68261357f565b604082019050919050565b6000602082019050818103600083015261360a816135ce565b9050919050565b600061361c826129e6565b9150613627836129e6565b925082820390508181111561363f5761363e613138565b5b92915050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000613686601783613645565b915061369182613650565b601782019050919050565b600081519050919050565b60005b838110156136c55780820151818401526020810190506136aa565b60008484015250505050565b60006136dc8261369c565b6136e68185613645565b93506136f68185602086016136a7565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000613738601183613645565b915061374382613702565b601182019050919050565b600061375982613679565b915061376582856136d1565b91506137708261372b565b915061377c82846136d1565b91508190509392505050565b6000601f19601f8301169050919050565b60006137a48261369c565b6137ae8185612ebf565b93506137be8185602086016136a7565b6137c781613788565b840191505092915050565b600060208201905081810360008301526137ec8184613799565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061385d826129e6565b9150600082036138705761386f613138565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006138b1602083612ebf565b91506138bc8261387b565b602082019050919050565b600060208201905081810360008301526138e0816138a4565b905091905056fea264697066735822122008ebdd071f2a5501ff7c9bcfd2d6fedc67876462a43223a05edf05237a6eba5764736f6c63430008130033

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

000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b

-----Decoded View---------------
Arg [0] : _token (address): 0x900f92677679B1008A2A9b25DcA19E2669e6961e
Arg [1] : _nft (address): 0x605f91B38084b85c36B6E15bB3E54D9D3BD5e32b

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000900f92677679b1008a2a9b25dca19e2669e6961e
Arg [1] : 000000000000000000000000605f91b38084b85c36b6e15bb3e54d9d3bd5e32b


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.