ETH Price: $2,284.73 (-4.58%)

Contract

0x7b9Eebd2290F5f85820906F78CA1b721aBDAe608

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultEPendleArbi

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@shared/lib-contracts-v0.8/contracts/Dependencies/TransferHelper.sol";
import "../Interfaces/IBaseRewardPool.sol";
import "../Interfaces/ISmartConvertor.sol";
import "../Interfaces/Camelot/ICamelotRouter.sol";

contract VaultEPendleArbi is
    ERC20Upgradeable,
    AccessControlUpgradeable,
    ReentrancyGuardUpgradeable
{
    using SafeERC20 for IERC20;
    using TransferHelper for address;

    IERC20 public pendle;
    IERC20 public ependle;
    IERC20 public weth;
    IERC20 public eqb;
    IERC20 public xEqb;
    ICamelotRouter public camelotRouter;
    IBaseRewardPool public ePendleRewardPool;
    ISmartConvertor public smartConvertor;

    address public feeRecipient;
    address[] public rewardTokens;
    bool public userHarvest;
    uint256 public constant FEE_PRECISION = 1e6;
    uint256 public harvestFeeRate;
    uint256 public withdrawalFeeRate;

    event Deposited(address indexed _user, uint256 _amount);
    event Withdrawn(
        address indexed _user,
        uint256 _share,
        uint256 _amount,
        uint256 _withdrawalFee
    );
    event Harvested(
        address indexed _rewardToken,
        uint256 _amount,
        uint256 _harvestFee
    );
    event HarvestFeeRateUpdated(uint256 _feeRate);
    event WithdrawalFeeRateUpdated(uint256 _feeRate);
    event RewardTokenAdded(address indexed _rewardToken);
    event RewardAdded(address indexed _rewardToken, uint256 _reward);
    event RewardPaid(
        address indexed _user,
        address indexed _rewardToken,
        uint256 _reward
    );

    struct Reward {
        uint256 rewardPerTokenStored;
        uint256 queuedRewards;
    }

    struct UserReward {
        uint256 userRewardPerTokenPaid;
        uint256 rewards;
    }

    mapping(address => Reward) public rewards;
    mapping(address => bool) public isRewardToken;
    mapping(address => mapping(address => UserReward)) public userRewards;

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

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

    function initialize(
        string memory _name,
        string memory _symbol
    ) public initializer {
        __AccessControl_init();
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        __ReentrancyGuard_init_unchained();
        __ERC20_init_unchained(_name, _symbol);
    }

    function setParams(
        address _pendle,
        address _ependle,
        address _ePendleRewardPool,
        address _feeRecipient,
        address _wethAddr,
        address _camelotRouter,
        address _smartConvertor,
        address _eqb,
        address _xEqb
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_pendle != address(0), "invalid _pendle!");
        require(_ependle != address(0), "invalid _ependle!");
        require(_wethAddr != address(0), "invalid _wethAddr!");
        require(_eqb != address(0), "invalid _eqb!");
        require(_xEqb != address(0), "invalid _xEqb!");
        require(_camelotRouter != address(0), "invalid _camelotRouter!");
        require(_smartConvertor != address(0), "invalid _smartConvertor!");
        require(
            _ePendleRewardPool != address(0),
            "invalid _ePendleRewardPool!"
        );
        require(_feeRecipient != address(0), "invalid _feeRecipient!");

        pendle = IERC20(_pendle);
        ependle = IERC20(_ependle);
        weth = IERC20(_wethAddr);
        eqb = IERC20(_eqb);
        xEqb = IERC20(_xEqb);
        camelotRouter = ICamelotRouter(_camelotRouter);
        ePendleRewardPool = IBaseRewardPool(_ePendleRewardPool);
        feeRecipient = _feeRecipient;

        smartConvertor = ISmartConvertor(_smartConvertor);
        userHarvest = true;

        pendle.safeApprove(_smartConvertor, type(uint256).max);
        ependle.safeApprove(_ePendleRewardPool, type(uint256).max);
    }

    function depositAll() external returns (uint256) {
        return deposit(ependle.balanceOf(msg.sender));
    }

    function deposit(
        uint256 _amount
    )
        public
        nonReentrant
        updateReward(msg.sender, userHarvest)
        returns (uint256)
    {
        require(
            _amount > 0,
            "VaultEPendle deposit: amount must be greater than zero"
        );
        uint256 balanceBefore = balance();
        ependle.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 shares = 0;
        if (totalSupply() == 0) {
            shares = _amount;
        } else {
            shares = (_amount * totalSupply()) / balanceBefore;
        }
        _mint(msg.sender, shares);
        ePendleRewardPool.stake(_amount);
        emit Deposited(msg.sender, _amount);

        return shares;
    }

    function withdrawAll() external returns (uint256) {
        uint256 withdrawShare = balanceOf(msg.sender);
        uint256 withdrawAmount = 0;
        if (withdrawShare > 0) {
            withdrawAmount = withdraw(withdrawShare);
        }
        getReward(msg.sender);
        return withdrawAmount;
    }

    function withdraw(
        uint256 _shares
    )
        public
        nonReentrant
        updateReward(msg.sender, userHarvest)
        returns (uint256)
    {
        require(
            _shares > 0,
            "VaultEPendle withdraw: amount must be greater than zero"
        );
        uint256 r = (balance() * _shares) / totalSupply();
        _burn(msg.sender, _shares);

        uint256 ependleBal = ependle.balanceOf(address(this));
        //if not sufficient, get reward from ependle reward pool
        if (ependleBal < r) {
            ePendleRewardPool.withdraw(r - ependleBal);
        }

        uint256 withdrawalFee = (r * withdrawalFeeRate) / FEE_PRECISION;
        ependle.safeTransfer(feeRecipient, withdrawalFee);
        ependle.safeTransfer(msg.sender, r - withdrawalFee);
        emit Withdrawn(msg.sender, _shares, r - withdrawalFee, withdrawalFee);

        return r - withdrawalFee;
    }

    function harvest() public {
        address[] memory rewardTokensFromPool = ePendleRewardPool
            .getRewardTokens();
        if (rewardTokensFromPool.length == 0) {
            return;
        }
        address[] memory ePendleRewardTokens = new address[](
            rewardTokensFromPool.length + 2
        );
        ePendleRewardTokens[0] = address(eqb);
        ePendleRewardTokens[1] = address(xEqb);
        for (uint256 i = 0; i < rewardTokensFromPool.length; i++) {
            if (
                rewardTokensFromPool[i] != address(eqb) &&
                rewardTokensFromPool[i] != address(xEqb)
            ) {
                ePendleRewardTokens[i + 2] = rewardTokensFromPool[i];
            }
        }

        uint256[] memory beforeBals = new uint256[](ePendleRewardTokens.length);
        uint256[] memory afterBals = new uint256[](ePendleRewardTokens.length);

        for (uint256 i = 0; i < ePendleRewardTokens.length; i++) {
            if (ePendleRewardTokens[i] != address(0)) {
                beforeBals[i] = ePendleRewardTokens[i].balanceOf(address(this));
            }
        }

        ePendleRewardPool.getReward(address(this));
        for (uint256 i = 0; i < ePendleRewardTokens.length; i++) {
            if (ePendleRewardTokens[i] != address(0)) {
                afterBals[i] = ePendleRewardTokens[i].balanceOf(address(this));
            }
        }

        for (uint256 i = 0; i < ePendleRewardTokens.length; i++) {
            if (ePendleRewardTokens[i] == address(0)) {
                continue;
            }
            //charge fees
            uint256 harvestAmount = afterBals[i] - beforeBals[i];
            if (harvestAmount <= 0) {
                emit Harvested(ePendleRewardTokens[i], 0, 0);
                continue;
            }
            uint256 harvestFee = (harvestAmount * harvestFeeRate) /
                FEE_PRECISION;
            ePendleRewardTokens[i].safeTransferToken(feeRecipient, harvestFee);
            uint256 rewardTokenAmount = harvestAmount - harvestFee;

            if (
                address(weth) != ePendleRewardTokens[i] &&
                address(pendle) != ePendleRewardTokens[i] &&
                address(ependle) != ePendleRewardTokens[i]
            ) {
                //queue reward if reward is not weth or pendle or ependle
                _queueNewRewards(ePendleRewardTokens[i], rewardTokenAmount);
            }

            emit Harvested(
                ePendleRewardTokens[i],
                rewardTokenAmount,
                harvestFee
            );
        }

        _swapWETH2Pendle(weth.balanceOf(address(this)));
        uint256 pendleAmount = pendle.balanceOf(address(this));
        if (pendleAmount > 0) {
            smartConvertor.deposit(pendleAmount);
        }
        uint256 ePendleAmount = ependle.balanceOf(address(this));
        if (ePendleAmount > 0) {
            // reinvest
            ePendleRewardPool.stake(ePendleAmount);
        }
    }

    function queueNewRewards(
        address _rewardToken,
        uint256 _rewards
    ) external onlyRole(ADMIN_ROLE) {
        _queueNewRewards(_rewardToken, _rewards);
    }

    function _queueNewRewards(address _rewardToken, uint256 _rewards) internal {
        _addRewardToken(_rewardToken);

        Reward storage rewardInfo = rewards[_rewardToken];

        if (totalSupply() == 0) {
            rewardInfo.queuedRewards = rewardInfo.queuedRewards + _rewards;
            return;
        }

        _rewards = _rewards + rewardInfo.queuedRewards;
        rewardInfo.queuedRewards = 0;
        rewardInfo.rewardPerTokenStored =
            rewardInfo.rewardPerTokenStored +
            ((_rewards * 1e18) / totalSupply());

        emit RewardAdded(_rewardToken, _rewards);
    }

    function getReward(
        address _account
    ) public nonReentrant updateReward(_account, false) {
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            address rewardToken = rewardTokens[i];
            uint256 reward = userRewards[_account][rewardToken].rewards;
            if (reward > 0) {
                userRewards[_account][rewardToken].rewards = 0;
                rewardToken.safeTransferToken(_account, reward);
                emit RewardPaid(_account, rewardToken, reward);
            }
        }
    }

    modifier updateReward(address _account, bool needHarvest) {
        if (needHarvest) {
            harvest();
        }

        for (uint256 i = 0; i < rewardTokens.length; i++) {
            address rewardToken = rewardTokens[i];
            UserReward storage userReward = userRewards[_account][rewardToken];
            userReward.rewards = earned(_account, rewardToken);
            userReward.userRewardPerTokenPaid = rewards[rewardToken]
                .rewardPerTokenStored;
        }

        _;
    }

    function earned(
        address _account,
        address _rewardToken
    ) public view returns (uint256) {
        Reward memory reward = rewards[_rewardToken];
        UserReward memory userReward = userRewards[_account][_rewardToken];
        return
            ((balanceOf(_account) *
                (reward.rewardPerTokenStored -
                    userReward.userRewardPerTokenPaid)) / 1e18) +
            userReward.rewards;
    }

    function _addRewardToken(address _rewardToken) internal {
        require(_rewardToken != address(0), "invalid _rewardToken!");
        if (isRewardToken[_rewardToken]) {
            return;
        }
        rewardTokens.push(_rewardToken);
        isRewardToken[_rewardToken] = true;

        emit RewardTokenAdded(_rewardToken);
    }

    function _swapWETH2Pendle(uint256 _amount) internal {
        if (_amount == 0) {
            return;
        }
        weth.safeIncreaseAllowance(address(camelotRouter), _amount);
        address[] memory path = new address[](2);
        path[0] = address(weth);
        path[1] = address(pendle);
        camelotRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            _amount,
            0,
            path,
            address(this),
            address(0),
            block.timestamp
        );
    }

    function inCaseTokensGetStuck(
        address _token
    ) external onlyRole(ADMIN_ROLE) {
        require(_token != address(ependle), "!token");

        uint256 amount = IERC20(_token).balanceOf(address(this));
        IERC20(_token).safeTransfer(msg.sender, amount);
    }

    function setUserHarvest(bool _userHarvest) external onlyRole(ADMIN_ROLE) {
        userHarvest = _userHarvest;
    }

    function setHarvestFeeRate(uint256 _feeRate) external onlyRole(ADMIN_ROLE) {
        require(_feeRate <= (FEE_PRECISION * 30) / 100, "!cap");

        harvestFeeRate = _feeRate;
        emit HarvestFeeRateUpdated(_feeRate);
    }

    function setWithdrawalFeeRate(
        uint256 _feeRate
    ) external onlyRole(ADMIN_ROLE) {
        require(_feeRate <= (FEE_PRECISION * 5) / 100, "!cap");

        withdrawalFeeRate = _feeRate;
        emit WithdrawalFeeRateUpdated(_feeRate);
    }

    function balance() public view returns (uint256) {
        return
            ependle.balanceOf(address(this)) +
            ePendleRewardPool.balanceOf(address(this));
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256
    ) internal pure override {
        if (from != address(0) && to != address(0)) {
            revert("VaultEPendle: transfer not allowed");
        }
    }

    receive() external payable {}
}

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

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    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(IAccessControlUpgradeable).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 ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.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());
        }
    }

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

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

pragma solidity ^0.8.2;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

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

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

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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

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

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

    uint256 private _status;

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

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

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20Upgradeable.sol";
import "./extensions/IERC20MetadataUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC20_init_unchained(name_, symbol_);
    }

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

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

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

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

library AddressLib {
    address public constant PLATFORM_TOKEN_ADDRESS =
        0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf;

    function isPlatformToken(address addr) internal pure returns (bool) {
        return addr == PLATFORM_TOKEN_ADDRESS;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

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

import "./AddressLib.sol";

library TransferHelper {

    using AddressLib for address;

    function safeTransferToken(
        address token,
        address to,
        uint value
    ) internal {
        if (token.isPlatformToken()) {
            safeTransferETH(to, value);
        } else {
            safeTransfer(IERC20(token), to, value);
        }
    }

    function safeTransferETH(
        address to,
        uint value
    ) internal {
        (bool success, ) = address(to).call{value: value}("");
        require(success, "TransferHelper: Sending ETH failed");
    }

    function balanceOf(address token, address addr) internal view returns (uint) {
        if (token.isPlatformToken()) {
            return addr.balance;
        } else {
            return IERC20(token).balanceOf(addr);
        }
    }

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)'))) -> 0xa9059cbb
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))) -> 0x23b872dd
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransferFrom: transfer failed'
        );
    }
}

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

interface ICamelotRouter {
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        address referrer,
        uint deadline
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol";

import "./IRewards.sol";

interface IBaseRewardPool is IRewards, IAccessControlUpgradeable {
    function setParams(
        uint256 _pid,
        address _stakingToken,
        address _rewardToken
    ) external;

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function stake(uint256) external;

    function stakeAll() external;

    function stakeFor(address, uint256) external;

    function withdraw(uint256) external;

    function withdrawAll() external;

    function donate(address, uint256) external payable;

    function earned(address, address) external view returns (uint256);

    function getUserAmountTime(address) external view returns (uint256);

    function getRewardTokens() external view returns (address[] memory);

    function getRewardTokensLength() external view returns (uint256);

    function getReward(address) external;

    function withdrawFor(address _account, uint256 _amount) external;

    event BoosterUpdated(address _booster);
    event RewardTokenAdded(address indexed _rewardToken);
    event Staked(address indexed _user, uint256 _amount);
    event Withdrawn(address indexed _user, uint256 _amount);
    event EmergencyWithdrawn(address indexed _user, uint256 _amount);
    event RewardPaid(
        address indexed _user,
        address indexed _rewardToken,
        uint256 _reward
    );
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IRewards {
    function queueNewRewards(address, uint256) external payable;

    event RewardAdded(address indexed _rewardToken, uint256 _reward);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface ISmartConvertor {
    function estimateTotalConversion(
        uint256 _amount
    ) external returns (uint256 amountOut);

    function previewAmountOut(
        address _tokenIn,
        uint256 _amount
    ) external view returns (uint256);

    function deposit(uint256 _amount) external returns (uint256 obtainedAmount);

    function depositFor(
        uint256 _amount,
        address _for
    ) external returns (uint256 obtainedAmount);

    function swapEPendleForPendle(
        uint256 _amount,
        uint256 _amountOutMinimum,
        address _receiver
    ) external returns (uint256 pendleReceived);

    event EPendleObtained(
        address indexed _user,
        uint256 _depositedPendle,
        uint256 _obtainedFromDexAmount,
        uint256 _obtainedFromDepositAmount
    );

    event TokenSwapped(
        address indexed _tokenIn,
        address indexed _tokenOut,
        uint256 _amountIn,
        uint256 _amountOutMinimum,
        address indexed _receiver,
        uint256 _amountOut
    );

    event SwapThresholdChanged(uint256 _swapThreshold);

    event MaxSwapAmountChanged(uint256 _maxSwapAmount);

    event BuyPercentChanged(uint256 _buyPercent);

    event MaverickPendleEpendlePoolChanged(address _maverickPendleEpendlePool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_feeRate","type":"uint256"}],"name":"HarvestFeeRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_harvestFee","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"}],"name":"RewardTokenAdded","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_feeRate","type":"uint256"}],"name":"WithdrawalFeeRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_withdrawalFee","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"camelotRouter","outputs":[{"internalType":"contract ICamelotRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ePendleRewardPool","outputs":[{"internalType":"contract IBaseRewardPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ependle","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eqb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isRewardToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendle","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewards","type":"uint256"}],"name":"queueNewRewards","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"},{"internalType":"uint256","name":"queuedRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRate","type":"uint256"}],"name":"setHarvestFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendle","type":"address"},{"internalType":"address","name":"_ependle","type":"address"},{"internalType":"address","name":"_ePendleRewardPool","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"_wethAddr","type":"address"},{"internalType":"address","name":"_camelotRouter","type":"address"},{"internalType":"address","name":"_smartConvertor","type":"address"},{"internalType":"address","name":"_eqb","type":"address"},{"internalType":"address","name":"_xEqb","type":"address"}],"name":"setParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_userHarvest","type":"bool"}],"name":"setUserHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRate","type":"uint256"}],"name":"setWithdrawalFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smartConvertor","outputs":[{"internalType":"contract ISmartConvertor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userHarvest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewards","outputs":[{"internalType":"uint256","name":"userRewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xEqb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61481c80620000f46000396000f3fe6080604052600436106103385760003560e01c80637bb7bed1116101b0578063b69ef8a8116100ec578063db3015e611610095578063def68a9c1161006f578063def68a9c146109db578063e5700fd4146109fb578063e63a391f14610a1c578063e8f6fd7f14610a3357600080fd5b8063db3015e614610969578063dd62ed3e14610980578063de5f6268146109c657600080fd5b8063c772c9ad116100c6578063c772c9ad1461090d578063d547741f14610928578063d8e0cf071461094857600080fd5b8063b69ef8a8146108b8578063b6b55f25146108cd578063c00007b0146108ed57600080fd5b8063a217fddf11610159578063a457c2d711610133578063a457c2d714610807578063a9059cbb14610827578063a980356a14610847578063b5fd73f81461088757600080fd5b8063a217fddf146107bb578063a223f821146107d0578063a2c530da146107e757600080fd5b806393d484b01161018a57806393d484b01461076657806395d89b41146107865780639d5b9f651461079b57600080fd5b80637bb7bed1146106eb578063853828b61461070b57806391d148541461072057600080fd5b806336568abe1161027f578063507c6d7211610228578063646fcdd211610202578063646fcdd21461064157806370a0823114610661578063747947cc1461069757806375b238fc146106b757600080fd5b8063507c6d72146105e05780635293388a1461060057806355d4c2441461062057600080fd5b80634641257d116102595780634641257d1461058a578063469048401461059f5780634cd88b76146105c057600080fd5b806336568abe1461051257806339509351146105325780633fc8cef31461055257600080fd5b8063211dc32d116102e15780632e1a7d4d116102bb5780632e1a7d4d146104b65780632f2ff15d146104d6578063313ce567146104f657600080fd5b8063211dc32d1461044657806323b872dd14610466578063248a9ca31461048657600080fd5b80630700037d116103125780630700037d146103bd578063095ea7b31461040757806318160ddd1461042757600080fd5b806301ffc9a71461034457806304d0c2c51461037957806306fdde031461039b57600080fd5b3661033f57005b600080fd5b34801561035057600080fd5b5061036461035f366004614054565b610a53565b60405190151581526020015b60405180910390f35b34801561038557600080fd5b50610399610394366004614093565b610abc565b005b3480156103a757600080fd5b506103b0610af5565b60405161037091906140e3565b3480156103c957600080fd5b506103f26103d8366004614116565b610108602052600090815260409020805460019091015482565b60408051928352602083019190915201610370565b34801561041357600080fd5b50610364610422366004614093565b610b87565b34801561043357600080fd5b506035545b604051908152602001610370565b34801561045257600080fd5b50610438610461366004614133565b610b9f565b34801561047257600080fd5b5061036461048136600461416c565b610c57565b34801561049257600080fd5b506104386104a13660046141ad565b60009081526097602052604090206001015490565b3480156104c257600080fd5b506104386104d13660046141ad565b610c7d565b3480156104e257600080fd5b506103996104f13660046141c6565b610fde565b34801561050257600080fd5b5060405160128152602001610370565b34801561051e57600080fd5b5061039961052d3660046141c6565b611003565b34801561053e57600080fd5b5061036461054d366004614093565b61108f565b34801561055e57600080fd5b5060fd54610572906001600160a01b031681565b6040516001600160a01b039091168152602001610370565b34801561059657600080fd5b506103996110ce565b3480156105ab57600080fd5b5061010354610572906001600160a01b031681565b3480156105cc57600080fd5b506103996105db3660046142a2565b611a55565b3480156105ec57600080fd5b506103996105fb366004614314565b611b93565b34801561060c57600080fd5b5060fc54610572906001600160a01b031681565b34801561062c57600080fd5b5061010154610572906001600160a01b031681565b34801561064d57600080fd5b5060fe54610572906001600160a01b031681565b34801561066d57600080fd5b5061043861067c366004614116565b6001600160a01b031660009081526033602052604090205490565b3480156106a357600080fd5b506103996106b2366004614331565b611bd2565b3480156106c357600080fd5b506104387fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156106f757600080fd5b506105726107063660046141ad565b611fad565b34801561071757600080fd5b50610438611fd8565b34801561072c57600080fd5b5061036461073b3660046141c6565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561077257600080fd5b5060ff54610572906001600160a01b031681565b34801561079257600080fd5b506103b0612005565b3480156107a757600080fd5b506103996107b63660046141ad565b612014565b3480156107c757600080fd5b50610438600081565b3480156107dc57600080fd5b506104386101075481565b3480156107f357600080fd5b5060fb54610572906001600160a01b031681565b34801561081357600080fd5b50610364610822366004614093565b6120ce565b34801561083357600080fd5b50610364610842366004614093565b612183565b34801561085357600080fd5b506103f2610862366004614133565b61010a6020908152600092835260408084209091529082529020805460019091015482565b34801561089357600080fd5b506103646108a2366004614116565b6101096020526000908152604090205460ff1681565b3480156108c457600080fd5b50610438612191565b3480156108d957600080fd5b506104386108e83660046141ad565b61227a565b3480156108f957600080fd5b50610399610908366004614116565b612502565b34801561091957600080fd5b50610105546103649060ff1681565b34801561093457600080fd5b506103996109433660046141c6565b6126fa565b34801561095457600080fd5b5061010254610572906001600160a01b031681565b34801561097557600080fd5b506104386101065481565b34801561098c57600080fd5b5061043861099b366004614133565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156109d257600080fd5b5061043861271f565b3480156109e757600080fd5b506103996109f6366004614116565b612792565b348015610a0757600080fd5b5061010054610572906001600160a01b031681565b348015610a2857600080fd5b50610438620f424081565b348015610a3f57600080fd5b50610399610a4e3660046141ad565b61289b565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610ab657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610ae68161294d565b610af0838361295a565b505050565b606060368054610b04906143ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610b30906143ed565b8015610b7d5780601f10610b5257610100808354040283529160200191610b7d565b820191906000526020600020905b815481529060010190602001808311610b6057829003601f168201915b5050505050905090565b600033610b95818585612a2e565b5060019392505050565b6001600160a01b03808216600081815261010860209081526040808320815180830183528154815260019182015481850152958816845261010a83528184209484529382528083208151808301909252805480835294015491810182905284519294939092670de0b6b3a764000091610c179161443d565b6001600160a01b038816600090815260336020526040902054610c3a9190614450565b610c449190614467565b610c4e9190614489565b95945050505050565b600033610c65858285612b86565b610c70858585612c18565b60019150505b9392505050565b6000600260c95403610cd65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260c95561010554339060ff168015610cf257610cf26110ce565b60005b61010454811015610d885760006101048281548110610d1657610d1661449c565b60009182526020808320909101546001600160a01b03878116845261010a83526040808520919092168085529252909120909150610d548583610b9f565b60018201556001600160a01b0390911660009081526101086020526040902054905580610d80816144b2565b915050610cf5565b5060008411610dff5760405162461bcd60e51b815260206004820152603760248201527f5661756c744550656e646c652077697468647261773a20616d6f756e74206d7560448201527f73742062652067726561746572207468616e207a65726f0000000000000000006064820152608401610ccd565b6000610e0a60355490565b85610e13612191565b610e1d9190614450565b610e279190614467565b9050610e333386612e3a565b60fc546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea091906144cb565b905081811015610f1757610101546001600160a01b0316632e1a7d4d610ec6838561443d565b6040518263ffffffff1660e01b8152600401610ee491815260200190565b600060405180830381600087803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b505050505b6000620f42406101075484610f2c9190614450565b610f369190614467565b6101035460fc54919250610f57916001600160a01b03908116911683612fcb565b610f7833610f65838661443d565b60fc546001600160a01b03169190612fcb565b337f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a2188610fa5848761443d565b604080519283526020830191909152810184905260600160405180910390a2610fce818461443d565b600160c955979650505050505050565b600082815260976020526040902060010154610ff98161294d565b610af08383613043565b6001600160a01b03811633146110815760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ccd565b61108b82826130e5565b5050565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190610b9590829086906110c9908790614489565b612a2e565b61010154604080517fc4f59f9b00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163c4f59f9b91600480830192869291908290030181865afa158015611131573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261115991908101906144e4565b905080516000036111675750565b6000815160026111779190614489565b67ffffffffffffffff81111561118f5761118f6141eb565b6040519080825280602002602001820160405280156111b8578160200160208202803683370190505b5060fe5481519192506001600160a01b03169082906000906111dc576111dc61449c565b6001600160a01b03928316602091820292909201015260ff5482519116908290600190811061120d5761120d61449c565b60200260200101906001600160a01b031690816001600160a01b03168152505060005b825181101561131d5760fe5483516001600160a01b039091169084908390811061125c5761125c61449c565b60200260200101516001600160a01b0316141580156112ad575060ff5483516001600160a01b03909116908490839081106112995761129961449c565b60200260200101516001600160a01b031614155b1561130b578281815181106112c4576112c461449c565b6020026020010151828260026112da9190614489565b815181106112ea576112ea61449c565b60200260200101906001600160a01b031690816001600160a01b0316815250505b80611315816144b2565b915050611230565b506000815167ffffffffffffffff81111561133a5761133a6141eb565b604051908082528060200260200182016040528015611363578160200160208202803683370190505b5090506000825167ffffffffffffffff811115611382576113826141eb565b6040519080825280602002602001820160405280156113ab578160200160208202803683370190505b50905060005b83518110156114535760006001600160a01b03168482815181106113d7576113d761449c565b60200260200101516001600160a01b03161461144157611422308583815181106114035761140361449c565b60200260200101516001600160a01b031661316890919063ffffffff16565b8382815181106114345761143461449c565b6020026020010181815250505b8061144b816144b2565b9150506113b1565b50610101546040517fc00007b00000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b039091169063c00007b090602401600060405180830381600087803b1580156114b357600080fd5b505af11580156114c7573d6000803e3d6000fd5b5050505060005b83518110156115515760006001600160a01b03168482815181106114f4576114f461449c565b60200260200101516001600160a01b03161461153f57611520308583815181106114035761140361449c565b8282815181106115325761153261449c565b6020026020010181815250505b80611549816144b2565b9150506114ce565b5060005b83518110156118045760006001600160a01b031684828151811061157b5761157b61449c565b60200260200101516001600160a01b031603156117f25760008382815181106115a6576115a661449c565b60200260200101518383815181106115c0576115c061449c565b60200260200101516115d2919061443d565b905060008111611648578482815181106115ee576115ee61449c565b60200260200101516001600160a01b03167f81ca9b2c230070eaa84787556b1aaf18bf1e2f07ea5d3dae4819db77a1a5b22460008060405161163a929190918252602082015260400190565b60405180910390a2506117f2565b6000620f4240610106548361165d9190614450565b6116679190614467565b90506116b661010360009054906101000a90046001600160a01b0316828886815181106116965761169661449c565b60200260200101516001600160a01b03166132109092919063ffffffff16565b60006116c2828461443d565b90508684815181106116d6576116d661449c565b602090810291909101015160fd546001600160a01b0390811691161480159061172a575086848151811061170c5761170c61449c565b602090810291909101015160fb546001600160a01b03908116911614155b801561176157508684815181106117435761174361449c565b602090810291909101015160fc546001600160a01b03908116911614155b156117895761178987858151811061177b5761177b61449c565b60200260200101518261295a565b86848151811061179b5761179b61449c565b60200260200101516001600160a01b03167f81ca9b2c230070eaa84787556b1aaf18bf1e2f07ea5d3dae4819db77a1a5b22482846040516117e6929190918252602082015260400190565b60405180910390a25050505b806117fc816144b2565b915050611555565b5060fd546040516370a0823160e01b8152306004820152611878916001600160a01b0316906370a0823190602401602060405180830381865afa15801561184f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187391906144cb565b613249565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e591906144cb565b9050801561197857610102546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f25906024016020604051808303816000875af1158015611952573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197691906144cb565b505b60fc546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156119c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e591906144cb565b90508015611a4d576101015460405163534a7e1d60e11b8152600481018390526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b158015611a3457600080fd5b505af1158015611a48573d6000803e3d6000fd5b505050505b505050505050565b600054610100900460ff1615808015611a755750600054600160ff909116105b80611a8f5750303b158015611a8f575060005460ff166001145b611b015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610ccd565b6000805460ff191660011790558015611b24576000805461ff0019166101001790555b611b2c613374565b611b37600033613043565b611b3f6133e1565b611b498383613453565b8015610af0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611bbd8161294d565b50610105805460ff1916911515919091179055565b6000611bdd8161294d565b6001600160a01b038a16611c335760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964205f70656e646c6521000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038916611c895760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964205f6570656e646c65210000000000000000000000000000006044820152606401610ccd565b6001600160a01b038616611cdf5760405162461bcd60e51b815260206004820152601260248201527f696e76616c6964205f77657468416464722100000000000000000000000000006044820152606401610ccd565b6001600160a01b038316611d355760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964205f65716221000000000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038216611d8b5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f78457162210000000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038516611de15760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205f63616d656c6f74526f75746572210000000000000000006044820152606401610ccd565b6001600160a01b038416611e375760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964205f736d617274436f6e766572746f722100000000000000006044820152606401610ccd565b6001600160a01b038816611e8d5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964205f6550656e646c65526577617264506f6f6c2100000000006044820152606401610ccd565b6001600160a01b038716611ee35760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964205f666565526563697069656e7421000000000000000000006044820152606401610ccd565b60fb805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b038d811691821790935560fc805483168d851617905560fd805483168a851617905560fe8054831687851617905560ff8054831686851617905561010080548316898516179055610101805483168c8516179055610103805483168b85161790556101028054909216928716929092179055610105805460ff19166001179055611f9490856000196134d7565b60fc54611a48906001600160a01b0316896000196134d7565b6101048181548110611fbe57600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526033602052604081205460008115611ffc57611ff982610c7d565b90505b610ab633612502565b606060378054610b04906143ed565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561203e8161294d565b606461204e620f42406005614450565b6120589190614467565b8211156120905760405162461bcd60e51b8152600401610ccd906020808252600490820152630216361760e41b604082015260600190565b6101078290556040518281527f5ad5a5610bf17c59c7c6c81db49613989fb650e74d98d24827244e8f146bff81906020015b60405180910390a15050565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091908381101561216b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6121788286868403612a2e565b506001949350505050565b600033610b95818585612c18565b610101546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ff91906144cb565b60fc546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b91906144cb565b6122759190614489565b905090565b6000600260c954036122ce5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccd565b600260c95561010554339060ff1680156122ea576122ea6110ce565b60005b61010454811015612380576000610104828154811061230e5761230e61449c565b60009182526020808320909101546001600160a01b03878116845261010a8352604080852091909216808552925290912090915061234c8583610b9f565b60018201556001600160a01b0390911660009081526101086020526040902054905580612378816144b2565b9150506122ed565b50600084116123f75760405162461bcd60e51b815260206004820152603660248201527f5661756c744550656e646c65206465706f7369743a20616d6f756e74206d757360448201527f742062652067726561746572207468616e207a65726f000000000000000000006064820152608401610ccd565b6000612401612191565b60fc5490915061241c906001600160a01b03163330886135f3565b600061242760355490565b600003612435575084612456565b8161243f60355490565b6124499088614450565b6124539190614467565b90505b6124603382613644565b6101015460405163534a7e1d60e11b8152600481018890526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b50506040518881523392507f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4915060200160405180910390a2600160c95595945050505050565b600260c954036125545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccd565b600260c955806000805b610104548110156125f1576000610104828154811061257f5761257f61449c565b60009182526020808320909101546001600160a01b03878116845261010a835260408085209190921680855292529091209091506125bd8583610b9f565b60018201556001600160a01b03909116600090815261010860205260409020549055806125e9816144b2565b91505061255e565b5060005b610104548110156126ef57600061010482815481106126165761261661449c565b60009182526020808320909101546001600160a01b03888116845261010a835260408085209190921680855292529091206001015490915080156126da576001600160a01b03808716600090815261010a602090815260408083209386168084529390915281206001015561268c908783613210565b816001600160a01b0316866001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e836040516126d191815260200190565b60405180910390a35b505080806126e7906144b2565b9150506125f5565b5050600160c9555050565b6000828152609760205260409020600101546127158161294d565b610af083836130e5565b60fc546040516370a0823160e01b8152336004820152600091612275916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561276e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e891906144cb565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756127bc8161294d565b60fc546001600160a01b039081169083160361281a5760405162461bcd60e51b815260206004820152600660248201527f21746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610ccd565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906144cb565b9050610af06001600160a01b0384163383612fcb565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756128c58161294d565b60646128d5620f4240601e614450565b6128df9190614467565b8211156129175760405162461bcd60e51b8152600401610ccd906020808252600490820152630216361760e41b604082015260600190565b6101068290556040518281527fbb38c661e58966e6bf8e850f06f5e0693e52fbfea191953c2d7a77617d73ef54906020016120c2565b612957813361372f565b50565b612963826137af565b6001600160a01b0382166000908152610108602052604090206035546000036129a0578181600101546129969190614489565b6001909101555050565b60018101546129af9083614489565b6000600183015591506129c160355490565b6129d383670de0b6b3a7640000614450565b6129dd9190614467565b81546129e99190614489565b81556040518281526001600160a01b038416907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a2505050565b6001600160a01b038316612aa95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b038216612b255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603460209081526040808320938616835292905220546000198114612c125781811015612c055760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610ccd565b612c128484848403612a2e565b50505050565b6001600160a01b038316612c945760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b038216612d105760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b612d1b8383836138c8565b6001600160a01b03831660009081526033602052604090205481811015612daa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290612de1908490614489565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612e2d91815260200190565b60405180910390a3612c12565b6001600160a01b038216612eb65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b612ec2826000836138c8565b6001600160a01b03821660009081526033602052604090205481811015612f515760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0383166000908152603360205260408120838303905560358054849290612f8090849061443d565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610af090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152613940565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff1661108b5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130a13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff161561108b5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600073efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361319f57506001600160a01b03811631610ab6565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320991906144cb565b9050610ab6565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361323e57610af08282613a25565b610af0838383613ad3565b806000036132545750565b6101005460fd54613272916001600160a01b03918216911683613c29565b604080516002808252606082018352600092602083019080368337505060fd5482519293506001600160a01b0316918391506000906132b3576132b361449c565b6001600160a01b03928316602091820292909201015260fb548251911690829060019081106132e4576132e461449c565b6001600160a01b039283166020918202929092010152610100546040517fac3893ba00000000000000000000000000000000000000000000000000000000815291169063ac3893ba906133469085906000908690309083904290600401614596565b600060405180830381600087803b15801561336057600080fd5b505af1158015611a4d573d6000803e3d6000fd5b600054610100900460ff166133df5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b565b600054610100900460ff1661344c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b600160c955565b600054610100900460ff166134be5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b60366134ca8382614655565b506037610af08282614655565b8015806135515750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561352b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354f91906144cb565b155b6135c35760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610ccd565b6040516001600160a01b038316602482015260448101829052610af090849063095ea7b360e01b90606401612ff7565b6040516001600160a01b0380851660248301528316604482015260648101829052612c129085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612ff7565b6001600160a01b03821661369a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ccd565b6136a6600083836138c8565b80603560008282546136b89190614489565b90915550506001600160a01b038216600090815260336020526040812080548392906136e5908490614489565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff1661108b5761376d816001600160a01b03166014613cdb565b613778836020613cdb565b604051602001613789929190614715565b60408051601f198184030181529082905262461bcd60e51b8252610ccd916004016140e3565b6001600160a01b0381166138055760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f726577617264546f6b656e2100000000000000000000006044820152606401610ccd565b6001600160a01b0381166000908152610109602052604090205460ff161561382a5750565b610104805460018082019092557f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915560008181526101096020526040808220805460ff1916909417909355915190917ff3e4c2c64e71e6ba2eaab9a599bced62f9eb91d2cda610bf41aa8c80ff2cf82691a250565b6001600160a01b038316158015906138e857506001600160a01b03821615155b15610af05760405162461bcd60e51b815260206004820152602260248201527f5661756c744550656e646c653a207472616e73666572206e6f7420616c6c6f77604482015261195960f21b6064820152608401610ccd565b6000613995826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ebc9092919063ffffffff16565b805190915015610af057808060200190518101906139b39190614796565b610af05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610ccd565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613a72576040519150601f19603f3d011682016040523d82523d6000602084013e613a77565b606091505b5050905080610af05760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657248656c7065723a2053656e64696e6720455448206661696c604482015261195960f21b6064820152608401610ccd565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790529151600092839290871691613b4491906147b3565b6000604051808303816000865af19150503d8060008114613b81576040519150601f19603f3d011682016040523d82523d6000602084013e613b86565b606091505b5091509150818015613bb0575080511580613bb0575080806020019051810190613bb09190614796565b613c225760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c6564000000000000000000000000000000000000006064820152608401610ccd565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015613c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c9e91906144cb565b613ca89190614489565b6040516001600160a01b038516602482015260448101829052909150612c1290859063095ea7b360e01b90606401612ff7565b60606000613cea836002614450565b613cf5906002614489565b67ffffffffffffffff811115613d0d57613d0d6141eb565b6040519080825280601f01601f191660200182016040528015613d37576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613d6e57613d6e61449c565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613db957613db961449c565b60200101906001600160f81b031916908160001a9053506000613ddd846002614450565b613de8906001614489565b90505b6001811115613e6d577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613e2957613e2961449c565b1a60f81b828281518110613e3f57613e3f61449c565b60200101906001600160f81b031916908160001a90535060049490941c93613e66816147cf565b9050613deb565b508315610c765760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ccd565b6060613ecb8484600085613ed3565b949350505050565b606082471015613f4b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0385163b613fa25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ccd565b600080866001600160a01b03168587604051613fbe91906147b3565b60006040518083038185875af1925050503d8060008114613ffb576040519150601f19603f3d011682016040523d82523d6000602084013e614000565b606091505b509150915061401082828661401b565b979650505050505050565b6060831561402a575081610c76565b82511561403a5782518084602001fd5b8160405162461bcd60e51b8152600401610ccd91906140e3565b60006020828403121561406657600080fd5b81356001600160e01b031981168114610c7657600080fd5b6001600160a01b038116811461295757600080fd5b600080604083850312156140a657600080fd5b82356140b18161407e565b946020939093013593505050565b60005b838110156140da5781810151838201526020016140c2565b50506000910152565b60208152600082518060208401526141028160408501602087016140bf565b601f01601f19169190910160400192915050565b60006020828403121561412857600080fd5b8135610c768161407e565b6000806040838503121561414657600080fd5b82356141518161407e565b915060208301356141618161407e565b809150509250929050565b60008060006060848603121561418157600080fd5b833561418c8161407e565b9250602084013561419c8161407e565b929592945050506040919091013590565b6000602082840312156141bf57600080fd5b5035919050565b600080604083850312156141d957600080fd5b8235915060208301356141618161407e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561422a5761422a6141eb565b604052919050565b600082601f83011261424357600080fd5b813567ffffffffffffffff81111561425d5761425d6141eb565b614270601f8201601f1916602001614201565b81815284602083860101111561428557600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156142b557600080fd5b823567ffffffffffffffff808211156142cd57600080fd5b6142d986838701614232565b935060208501359150808211156142ef57600080fd5b506142fc85828601614232565b9150509250929050565b801515811461295757600080fd5b60006020828403121561432657600080fd5b8135610c7681614306565b60008060008060008060008060006101208a8c03121561435057600080fd5b893561435b8161407e565b985060208a013561436b8161407e565b975060408a013561437b8161407e565b965060608a013561438b8161407e565b955060808a013561439b8161407e565b945060a08a01356143ab8161407e565b935060c08a01356143bb8161407e565b925060e08a01356143cb8161407e565b91506101008a01356143dc8161407e565b809150509295985092959850929598565b600181811c9082168061440157607f821691505b60208210810361442157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ab657610ab6614427565b8082028115828204841417610ab657610ab6614427565b60008261448457634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610ab657610ab6614427565b634e487b7160e01b600052603260045260246000fd5b6000600182016144c4576144c4614427565b5060010190565b6000602082840312156144dd57600080fd5b5051919050565b600060208083850312156144f757600080fd5b825167ffffffffffffffff8082111561450f57600080fd5b818501915085601f83011261452357600080fd5b815181811115614535576145356141eb565b8060051b9150614546848301614201565b818152918301840191848101908884111561456057600080fd5b938501935b8385101561458a578451925061457a8361407e565b8282529385019390850190614565565b98975050505050505050565b600060c082018883526020888185015260c0604085015281885180845260e086019150828a01935060005b818110156145e65784516001600160a01b0316835293830193918301916001016145c1565b50506001600160a01b039788166060860152959096166080840152505060a00152949350505050565b601f821115610af057600081815260208120601f850160051c810160208610156146365750805b601f850160051c820191505b81811015611a4d57828155600101614642565b815167ffffffffffffffff81111561466f5761466f6141eb565b6146838161467d84546143ed565b8461460f565b602080601f8311600181146146b857600084156146a05750858301515b600019600386901b1c1916600185901b178555611a4d565b600085815260208120601f198616915b828110156146e7578886015182559484019460019091019084016146c8565b50858210156147055787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161474d8160178501602088016140bf565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161478a8160288401602088016140bf565b01602801949350505050565b6000602082840312156147a857600080fd5b8151610c7681614306565b600082516147c58184602087016140bf565b9190910192915050565b6000816147de576147de614427565b50600019019056fea2646970667358221220b028784301f0029abb95b8d426e3f1b098cbd51898a52edcf0a876732a7238ff64736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103385760003560e01c80637bb7bed1116101b0578063b69ef8a8116100ec578063db3015e611610095578063def68a9c1161006f578063def68a9c146109db578063e5700fd4146109fb578063e63a391f14610a1c578063e8f6fd7f14610a3357600080fd5b8063db3015e614610969578063dd62ed3e14610980578063de5f6268146109c657600080fd5b8063c772c9ad116100c6578063c772c9ad1461090d578063d547741f14610928578063d8e0cf071461094857600080fd5b8063b69ef8a8146108b8578063b6b55f25146108cd578063c00007b0146108ed57600080fd5b8063a217fddf11610159578063a457c2d711610133578063a457c2d714610807578063a9059cbb14610827578063a980356a14610847578063b5fd73f81461088757600080fd5b8063a217fddf146107bb578063a223f821146107d0578063a2c530da146107e757600080fd5b806393d484b01161018a57806393d484b01461076657806395d89b41146107865780639d5b9f651461079b57600080fd5b80637bb7bed1146106eb578063853828b61461070b57806391d148541461072057600080fd5b806336568abe1161027f578063507c6d7211610228578063646fcdd211610202578063646fcdd21461064157806370a0823114610661578063747947cc1461069757806375b238fc146106b757600080fd5b8063507c6d72146105e05780635293388a1461060057806355d4c2441461062057600080fd5b80634641257d116102595780634641257d1461058a578063469048401461059f5780634cd88b76146105c057600080fd5b806336568abe1461051257806339509351146105325780633fc8cef31461055257600080fd5b8063211dc32d116102e15780632e1a7d4d116102bb5780632e1a7d4d146104b65780632f2ff15d146104d6578063313ce567146104f657600080fd5b8063211dc32d1461044657806323b872dd14610466578063248a9ca31461048657600080fd5b80630700037d116103125780630700037d146103bd578063095ea7b31461040757806318160ddd1461042757600080fd5b806301ffc9a71461034457806304d0c2c51461037957806306fdde031461039b57600080fd5b3661033f57005b600080fd5b34801561035057600080fd5b5061036461035f366004614054565b610a53565b60405190151581526020015b60405180910390f35b34801561038557600080fd5b50610399610394366004614093565b610abc565b005b3480156103a757600080fd5b506103b0610af5565b60405161037091906140e3565b3480156103c957600080fd5b506103f26103d8366004614116565b610108602052600090815260409020805460019091015482565b60408051928352602083019190915201610370565b34801561041357600080fd5b50610364610422366004614093565b610b87565b34801561043357600080fd5b506035545b604051908152602001610370565b34801561045257600080fd5b50610438610461366004614133565b610b9f565b34801561047257600080fd5b5061036461048136600461416c565b610c57565b34801561049257600080fd5b506104386104a13660046141ad565b60009081526097602052604090206001015490565b3480156104c257600080fd5b506104386104d13660046141ad565b610c7d565b3480156104e257600080fd5b506103996104f13660046141c6565b610fde565b34801561050257600080fd5b5060405160128152602001610370565b34801561051e57600080fd5b5061039961052d3660046141c6565b611003565b34801561053e57600080fd5b5061036461054d366004614093565b61108f565b34801561055e57600080fd5b5060fd54610572906001600160a01b031681565b6040516001600160a01b039091168152602001610370565b34801561059657600080fd5b506103996110ce565b3480156105ab57600080fd5b5061010354610572906001600160a01b031681565b3480156105cc57600080fd5b506103996105db3660046142a2565b611a55565b3480156105ec57600080fd5b506103996105fb366004614314565b611b93565b34801561060c57600080fd5b5060fc54610572906001600160a01b031681565b34801561062c57600080fd5b5061010154610572906001600160a01b031681565b34801561064d57600080fd5b5060fe54610572906001600160a01b031681565b34801561066d57600080fd5b5061043861067c366004614116565b6001600160a01b031660009081526033602052604090205490565b3480156106a357600080fd5b506103996106b2366004614331565b611bd2565b3480156106c357600080fd5b506104387fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156106f757600080fd5b506105726107063660046141ad565b611fad565b34801561071757600080fd5b50610438611fd8565b34801561072c57600080fd5b5061036461073b3660046141c6565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561077257600080fd5b5060ff54610572906001600160a01b031681565b34801561079257600080fd5b506103b0612005565b3480156107a757600080fd5b506103996107b63660046141ad565b612014565b3480156107c757600080fd5b50610438600081565b3480156107dc57600080fd5b506104386101075481565b3480156107f357600080fd5b5060fb54610572906001600160a01b031681565b34801561081357600080fd5b50610364610822366004614093565b6120ce565b34801561083357600080fd5b50610364610842366004614093565b612183565b34801561085357600080fd5b506103f2610862366004614133565b61010a6020908152600092835260408084209091529082529020805460019091015482565b34801561089357600080fd5b506103646108a2366004614116565b6101096020526000908152604090205460ff1681565b3480156108c457600080fd5b50610438612191565b3480156108d957600080fd5b506104386108e83660046141ad565b61227a565b3480156108f957600080fd5b50610399610908366004614116565b612502565b34801561091957600080fd5b50610105546103649060ff1681565b34801561093457600080fd5b506103996109433660046141c6565b6126fa565b34801561095457600080fd5b5061010254610572906001600160a01b031681565b34801561097557600080fd5b506104386101065481565b34801561098c57600080fd5b5061043861099b366004614133565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156109d257600080fd5b5061043861271f565b3480156109e757600080fd5b506103996109f6366004614116565b612792565b348015610a0757600080fd5b5061010054610572906001600160a01b031681565b348015610a2857600080fd5b50610438620f424081565b348015610a3f57600080fd5b50610399610a4e3660046141ad565b61289b565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610ab657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610ae68161294d565b610af0838361295a565b505050565b606060368054610b04906143ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610b30906143ed565b8015610b7d5780601f10610b5257610100808354040283529160200191610b7d565b820191906000526020600020905b815481529060010190602001808311610b6057829003601f168201915b5050505050905090565b600033610b95818585612a2e565b5060019392505050565b6001600160a01b03808216600081815261010860209081526040808320815180830183528154815260019182015481850152958816845261010a83528184209484529382528083208151808301909252805480835294015491810182905284519294939092670de0b6b3a764000091610c179161443d565b6001600160a01b038816600090815260336020526040902054610c3a9190614450565b610c449190614467565b610c4e9190614489565b95945050505050565b600033610c65858285612b86565b610c70858585612c18565b60019150505b9392505050565b6000600260c95403610cd65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260c95561010554339060ff168015610cf257610cf26110ce565b60005b61010454811015610d885760006101048281548110610d1657610d1661449c565b60009182526020808320909101546001600160a01b03878116845261010a83526040808520919092168085529252909120909150610d548583610b9f565b60018201556001600160a01b0390911660009081526101086020526040902054905580610d80816144b2565b915050610cf5565b5060008411610dff5760405162461bcd60e51b815260206004820152603760248201527f5661756c744550656e646c652077697468647261773a20616d6f756e74206d7560448201527f73742062652067726561746572207468616e207a65726f0000000000000000006064820152608401610ccd565b6000610e0a60355490565b85610e13612191565b610e1d9190614450565b610e279190614467565b9050610e333386612e3a565b60fc546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea091906144cb565b905081811015610f1757610101546001600160a01b0316632e1a7d4d610ec6838561443d565b6040518263ffffffff1660e01b8152600401610ee491815260200190565b600060405180830381600087803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b505050505b6000620f42406101075484610f2c9190614450565b610f369190614467565b6101035460fc54919250610f57916001600160a01b03908116911683612fcb565b610f7833610f65838661443d565b60fc546001600160a01b03169190612fcb565b337f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a2188610fa5848761443d565b604080519283526020830191909152810184905260600160405180910390a2610fce818461443d565b600160c955979650505050505050565b600082815260976020526040902060010154610ff98161294d565b610af08383613043565b6001600160a01b03811633146110815760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ccd565b61108b82826130e5565b5050565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190610b9590829086906110c9908790614489565b612a2e565b61010154604080517fc4f59f9b00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163c4f59f9b91600480830192869291908290030181865afa158015611131573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261115991908101906144e4565b905080516000036111675750565b6000815160026111779190614489565b67ffffffffffffffff81111561118f5761118f6141eb565b6040519080825280602002602001820160405280156111b8578160200160208202803683370190505b5060fe5481519192506001600160a01b03169082906000906111dc576111dc61449c565b6001600160a01b03928316602091820292909201015260ff5482519116908290600190811061120d5761120d61449c565b60200260200101906001600160a01b031690816001600160a01b03168152505060005b825181101561131d5760fe5483516001600160a01b039091169084908390811061125c5761125c61449c565b60200260200101516001600160a01b0316141580156112ad575060ff5483516001600160a01b03909116908490839081106112995761129961449c565b60200260200101516001600160a01b031614155b1561130b578281815181106112c4576112c461449c565b6020026020010151828260026112da9190614489565b815181106112ea576112ea61449c565b60200260200101906001600160a01b031690816001600160a01b0316815250505b80611315816144b2565b915050611230565b506000815167ffffffffffffffff81111561133a5761133a6141eb565b604051908082528060200260200182016040528015611363578160200160208202803683370190505b5090506000825167ffffffffffffffff811115611382576113826141eb565b6040519080825280602002602001820160405280156113ab578160200160208202803683370190505b50905060005b83518110156114535760006001600160a01b03168482815181106113d7576113d761449c565b60200260200101516001600160a01b03161461144157611422308583815181106114035761140361449c565b60200260200101516001600160a01b031661316890919063ffffffff16565b8382815181106114345761143461449c565b6020026020010181815250505b8061144b816144b2565b9150506113b1565b50610101546040517fc00007b00000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b039091169063c00007b090602401600060405180830381600087803b1580156114b357600080fd5b505af11580156114c7573d6000803e3d6000fd5b5050505060005b83518110156115515760006001600160a01b03168482815181106114f4576114f461449c565b60200260200101516001600160a01b03161461153f57611520308583815181106114035761140361449c565b8282815181106115325761153261449c565b6020026020010181815250505b80611549816144b2565b9150506114ce565b5060005b83518110156118045760006001600160a01b031684828151811061157b5761157b61449c565b60200260200101516001600160a01b031603156117f25760008382815181106115a6576115a661449c565b60200260200101518383815181106115c0576115c061449c565b60200260200101516115d2919061443d565b905060008111611648578482815181106115ee576115ee61449c565b60200260200101516001600160a01b03167f81ca9b2c230070eaa84787556b1aaf18bf1e2f07ea5d3dae4819db77a1a5b22460008060405161163a929190918252602082015260400190565b60405180910390a2506117f2565b6000620f4240610106548361165d9190614450565b6116679190614467565b90506116b661010360009054906101000a90046001600160a01b0316828886815181106116965761169661449c565b60200260200101516001600160a01b03166132109092919063ffffffff16565b60006116c2828461443d565b90508684815181106116d6576116d661449c565b602090810291909101015160fd546001600160a01b0390811691161480159061172a575086848151811061170c5761170c61449c565b602090810291909101015160fb546001600160a01b03908116911614155b801561176157508684815181106117435761174361449c565b602090810291909101015160fc546001600160a01b03908116911614155b156117895761178987858151811061177b5761177b61449c565b60200260200101518261295a565b86848151811061179b5761179b61449c565b60200260200101516001600160a01b03167f81ca9b2c230070eaa84787556b1aaf18bf1e2f07ea5d3dae4819db77a1a5b22482846040516117e6929190918252602082015260400190565b60405180910390a25050505b806117fc816144b2565b915050611555565b5060fd546040516370a0823160e01b8152306004820152611878916001600160a01b0316906370a0823190602401602060405180830381865afa15801561184f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187391906144cb565b613249565b60fb546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156118c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e591906144cb565b9050801561197857610102546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f25906024016020604051808303816000875af1158015611952573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197691906144cb565b505b60fc546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156119c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e591906144cb565b90508015611a4d576101015460405163534a7e1d60e11b8152600481018390526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b158015611a3457600080fd5b505af1158015611a48573d6000803e3d6000fd5b505050505b505050505050565b600054610100900460ff1615808015611a755750600054600160ff909116105b80611a8f5750303b158015611a8f575060005460ff166001145b611b015760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610ccd565b6000805460ff191660011790558015611b24576000805461ff0019166101001790555b611b2c613374565b611b37600033613043565b611b3f6133e1565b611b498383613453565b8015610af0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611bbd8161294d565b50610105805460ff1916911515919091179055565b6000611bdd8161294d565b6001600160a01b038a16611c335760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964205f70656e646c6521000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038916611c895760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964205f6570656e646c65210000000000000000000000000000006044820152606401610ccd565b6001600160a01b038616611cdf5760405162461bcd60e51b815260206004820152601260248201527f696e76616c6964205f77657468416464722100000000000000000000000000006044820152606401610ccd565b6001600160a01b038316611d355760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964205f65716221000000000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038216611d8b5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964205f78457162210000000000000000000000000000000000006044820152606401610ccd565b6001600160a01b038516611de15760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964205f63616d656c6f74526f75746572210000000000000000006044820152606401610ccd565b6001600160a01b038416611e375760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964205f736d617274436f6e766572746f722100000000000000006044820152606401610ccd565b6001600160a01b038816611e8d5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964205f6550656e646c65526577617264506f6f6c2100000000006044820152606401610ccd565b6001600160a01b038716611ee35760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964205f666565526563697069656e7421000000000000000000006044820152606401610ccd565b60fb805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b038d811691821790935560fc805483168d851617905560fd805483168a851617905560fe8054831687851617905560ff8054831686851617905561010080548316898516179055610101805483168c8516179055610103805483168b85161790556101028054909216928716929092179055610105805460ff19166001179055611f9490856000196134d7565b60fc54611a48906001600160a01b0316896000196134d7565b6101048181548110611fbe57600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526033602052604081205460008115611ffc57611ff982610c7d565b90505b610ab633612502565b606060378054610b04906143ed565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561203e8161294d565b606461204e620f42406005614450565b6120589190614467565b8211156120905760405162461bcd60e51b8152600401610ccd906020808252600490820152630216361760e41b604082015260600190565b6101078290556040518281527f5ad5a5610bf17c59c7c6c81db49613989fb650e74d98d24827244e8f146bff81906020015b60405180910390a15050565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091908381101561216b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6121788286868403612a2e565b506001949350505050565b600033610b95818585612c18565b610101546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ff91906144cb565b60fc546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b91906144cb565b6122759190614489565b905090565b6000600260c954036122ce5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccd565b600260c95561010554339060ff1680156122ea576122ea6110ce565b60005b61010454811015612380576000610104828154811061230e5761230e61449c565b60009182526020808320909101546001600160a01b03878116845261010a8352604080852091909216808552925290912090915061234c8583610b9f565b60018201556001600160a01b0390911660009081526101086020526040902054905580612378816144b2565b9150506122ed565b50600084116123f75760405162461bcd60e51b815260206004820152603660248201527f5661756c744550656e646c65206465706f7369743a20616d6f756e74206d757360448201527f742062652067726561746572207468616e207a65726f000000000000000000006064820152608401610ccd565b6000612401612191565b60fc5490915061241c906001600160a01b03163330886135f3565b600061242760355490565b600003612435575084612456565b8161243f60355490565b6124499088614450565b6124539190614467565b90505b6124603382613644565b6101015460405163534a7e1d60e11b8152600481018890526001600160a01b039091169063a694fc3a90602401600060405180830381600087803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b50506040518881523392507f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4915060200160405180910390a2600160c95595945050505050565b600260c954036125545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccd565b600260c955806000805b610104548110156125f1576000610104828154811061257f5761257f61449c565b60009182526020808320909101546001600160a01b03878116845261010a835260408085209190921680855292529091209091506125bd8583610b9f565b60018201556001600160a01b03909116600090815261010860205260409020549055806125e9816144b2565b91505061255e565b5060005b610104548110156126ef57600061010482815481106126165761261661449c565b60009182526020808320909101546001600160a01b03888116845261010a835260408085209190921680855292529091206001015490915080156126da576001600160a01b03808716600090815261010a602090815260408083209386168084529390915281206001015561268c908783613210565b816001600160a01b0316866001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e836040516126d191815260200190565b60405180910390a35b505080806126e7906144b2565b9150506125f5565b5050600160c9555050565b6000828152609760205260409020600101546127158161294d565b610af083836130e5565b60fc546040516370a0823160e01b8152336004820152600091612275916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561276e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e891906144cb565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756127bc8161294d565b60fc546001600160a01b039081169083160361281a5760405162461bcd60e51b815260206004820152600660248201527f21746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610ccd565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906144cb565b9050610af06001600160a01b0384163383612fcb565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756128c58161294d565b60646128d5620f4240601e614450565b6128df9190614467565b8211156129175760405162461bcd60e51b8152600401610ccd906020808252600490820152630216361760e41b604082015260600190565b6101068290556040518281527fbb38c661e58966e6bf8e850f06f5e0693e52fbfea191953c2d7a77617d73ef54906020016120c2565b612957813361372f565b50565b612963826137af565b6001600160a01b0382166000908152610108602052604090206035546000036129a0578181600101546129969190614489565b6001909101555050565b60018101546129af9083614489565b6000600183015591506129c160355490565b6129d383670de0b6b3a7640000614450565b6129dd9190614467565b81546129e99190614489565b81556040518281526001600160a01b038416907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a2505050565b6001600160a01b038316612aa95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b038216612b255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603460209081526040808320938616835292905220546000198114612c125781811015612c055760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610ccd565b612c128484848403612a2e565b50505050565b6001600160a01b038316612c945760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b038216612d105760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b612d1b8383836138c8565b6001600160a01b03831660009081526033602052604090205481811015612daa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290612de1908490614489565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612e2d91815260200190565b60405180910390a3612c12565b6001600160a01b038216612eb65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b612ec2826000836138c8565b6001600160a01b03821660009081526033602052604090205481811015612f515760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0383166000908152603360205260408120838303905560358054849290612f8090849061443d565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6040516001600160a01b038316602482015260448101829052610af090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152613940565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff1661108b5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130a13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff161561108b5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600073efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361319f57506001600160a01b03811631610ab6565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320991906144cb565b9050610ab6565b73efefefefefefefefefefefefefefefefefefefef6001600160a01b0384160361323e57610af08282613a25565b610af0838383613ad3565b806000036132545750565b6101005460fd54613272916001600160a01b03918216911683613c29565b604080516002808252606082018352600092602083019080368337505060fd5482519293506001600160a01b0316918391506000906132b3576132b361449c565b6001600160a01b03928316602091820292909201015260fb548251911690829060019081106132e4576132e461449c565b6001600160a01b039283166020918202929092010152610100546040517fac3893ba00000000000000000000000000000000000000000000000000000000815291169063ac3893ba906133469085906000908690309083904290600401614596565b600060405180830381600087803b15801561336057600080fd5b505af1158015611a4d573d6000803e3d6000fd5b600054610100900460ff166133df5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b565b600054610100900460ff1661344c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b600160c955565b600054610100900460ff166134be5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ccd565b60366134ca8382614655565b506037610af08282614655565b8015806135515750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561352b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354f91906144cb565b155b6135c35760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610ccd565b6040516001600160a01b038316602482015260448101829052610af090849063095ea7b360e01b90606401612ff7565b6040516001600160a01b0380851660248301528316604482015260648101829052612c129085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612ff7565b6001600160a01b03821661369a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ccd565b6136a6600083836138c8565b80603560008282546136b89190614489565b90915550506001600160a01b038216600090815260336020526040812080548392906136e5908490614489565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008281526097602090815260408083206001600160a01b038516845290915290205460ff1661108b5761376d816001600160a01b03166014613cdb565b613778836020613cdb565b604051602001613789929190614715565b60408051601f198184030181529082905262461bcd60e51b8252610ccd916004016140e3565b6001600160a01b0381166138055760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964205f726577617264546f6b656e2100000000000000000000006044820152606401610ccd565b6001600160a01b0381166000908152610109602052604090205460ff161561382a5750565b610104805460018082019092557f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915560008181526101096020526040808220805460ff1916909417909355915190917ff3e4c2c64e71e6ba2eaab9a599bced62f9eb91d2cda610bf41aa8c80ff2cf82691a250565b6001600160a01b038316158015906138e857506001600160a01b03821615155b15610af05760405162461bcd60e51b815260206004820152602260248201527f5661756c744550656e646c653a207472616e73666572206e6f7420616c6c6f77604482015261195960f21b6064820152608401610ccd565b6000613995826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ebc9092919063ffffffff16565b805190915015610af057808060200190518101906139b39190614796565b610af05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610ccd565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613a72576040519150601f19603f3d011682016040523d82523d6000602084013e613a77565b606091505b5050905080610af05760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657248656c7065723a2053656e64696e6720455448206661696c604482015261195960f21b6064820152608401610ccd565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790529151600092839290871691613b4491906147b3565b6000604051808303816000865af19150503d8060008114613b81576040519150601f19603f3d011682016040523d82523d6000602084013e613b86565b606091505b5091509150818015613bb0575080511580613bb0575080806020019051810190613bb09190614796565b613c225760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c6564000000000000000000000000000000000000006064820152608401610ccd565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015613c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c9e91906144cb565b613ca89190614489565b6040516001600160a01b038516602482015260448101829052909150612c1290859063095ea7b360e01b90606401612ff7565b60606000613cea836002614450565b613cf5906002614489565b67ffffffffffffffff811115613d0d57613d0d6141eb565b6040519080825280601f01601f191660200182016040528015613d37576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613d6e57613d6e61449c565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613db957613db961449c565b60200101906001600160f81b031916908160001a9053506000613ddd846002614450565b613de8906001614489565b90505b6001811115613e6d577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613e2957613e2961449c565b1a60f81b828281518110613e3f57613e3f61449c565b60200101906001600160f81b031916908160001a90535060049490941c93613e66816147cf565b9050613deb565b508315610c765760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ccd565b6060613ecb8484600085613ed3565b949350505050565b606082471015613f4b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610ccd565b6001600160a01b0385163b613fa25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ccd565b600080866001600160a01b03168587604051613fbe91906147b3565b60006040518083038185875af1925050503d8060008114613ffb576040519150601f19603f3d011682016040523d82523d6000602084013e614000565b606091505b509150915061401082828661401b565b979650505050505050565b6060831561402a575081610c76565b82511561403a5782518084602001fd5b8160405162461bcd60e51b8152600401610ccd91906140e3565b60006020828403121561406657600080fd5b81356001600160e01b031981168114610c7657600080fd5b6001600160a01b038116811461295757600080fd5b600080604083850312156140a657600080fd5b82356140b18161407e565b946020939093013593505050565b60005b838110156140da5781810151838201526020016140c2565b50506000910152565b60208152600082518060208401526141028160408501602087016140bf565b601f01601f19169190910160400192915050565b60006020828403121561412857600080fd5b8135610c768161407e565b6000806040838503121561414657600080fd5b82356141518161407e565b915060208301356141618161407e565b809150509250929050565b60008060006060848603121561418157600080fd5b833561418c8161407e565b9250602084013561419c8161407e565b929592945050506040919091013590565b6000602082840312156141bf57600080fd5b5035919050565b600080604083850312156141d957600080fd5b8235915060208301356141618161407e565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561422a5761422a6141eb565b604052919050565b600082601f83011261424357600080fd5b813567ffffffffffffffff81111561425d5761425d6141eb565b614270601f8201601f1916602001614201565b81815284602083860101111561428557600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156142b557600080fd5b823567ffffffffffffffff808211156142cd57600080fd5b6142d986838701614232565b935060208501359150808211156142ef57600080fd5b506142fc85828601614232565b9150509250929050565b801515811461295757600080fd5b60006020828403121561432657600080fd5b8135610c7681614306565b60008060008060008060008060006101208a8c03121561435057600080fd5b893561435b8161407e565b985060208a013561436b8161407e565b975060408a013561437b8161407e565b965060608a013561438b8161407e565b955060808a013561439b8161407e565b945060a08a01356143ab8161407e565b935060c08a01356143bb8161407e565b925060e08a01356143cb8161407e565b91506101008a01356143dc8161407e565b809150509295985092959850929598565b600181811c9082168061440157607f821691505b60208210810361442157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ab657610ab6614427565b8082028115828204841417610ab657610ab6614427565b60008261448457634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610ab657610ab6614427565b634e487b7160e01b600052603260045260246000fd5b6000600182016144c4576144c4614427565b5060010190565b6000602082840312156144dd57600080fd5b5051919050565b600060208083850312156144f757600080fd5b825167ffffffffffffffff8082111561450f57600080fd5b818501915085601f83011261452357600080fd5b815181811115614535576145356141eb565b8060051b9150614546848301614201565b818152918301840191848101908884111561456057600080fd5b938501935b8385101561458a578451925061457a8361407e565b8282529385019390850190614565565b98975050505050505050565b600060c082018883526020888185015260c0604085015281885180845260e086019150828a01935060005b818110156145e65784516001600160a01b0316835293830193918301916001016145c1565b50506001600160a01b039788166060860152959096166080840152505060a00152949350505050565b601f821115610af057600081815260208120601f850160051c810160208610156146365750805b601f850160051c820191505b81811015611a4d57828155600101614642565b815167ffffffffffffffff81111561466f5761466f6141eb565b6146838161467d84546143ed565b8461460f565b602080601f8311600181146146b857600084156146a05750858301515b600019600386901b1c1916600185901b178555611a4d565b600085815260208120601f198616915b828110156146e7578886015182559484019460019091019084016146c8565b50858210156147055787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161474d8160178501602088016140bf565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161478a8160288401602088016140bf565b01602801949350505050565b6000602082840312156147a857600080fd5b8151610c7681614306565b600082516147c58184602087016140bf565b9190910192915050565b6000816147de576147de614427565b50600019019056fea2646970667358221220b028784301f0029abb95b8d426e3f1b098cbd51898a52edcf0a876732a7238ff64736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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