Contract 0x93cf51e87a13d38c394e4adbb7ddf000319d5996 1

Contract Overview

Balance:
0 BNB
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa9fe82475e872469e47b81c0bbc696e5e78b801e20aebe7cd4fe7ae96f2dfc520x60806040106909932021-07-18 5:59:08132 days 5 mins ago0xbee397129374d0b4db7bf1654936951e5bdfe5a6 IN  Contract Creation0 BNB0.01617725
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x36fa094635ca8f4b602c8923646ba9dd66dc1cecab8a10f172f803a89c2654b1139894422021-11-10 10:40:0216 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x36fa094635ca8f4b602c8923646ba9dd66dc1cecab8a10f172f803a89c2654b1139894422021-11-10 10:40:0216 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x3a68a1ac07b41976d8711c444f1c934d97b8eb8e485c64d5eee6105ab31fb79a139894132021-11-10 10:38:3516 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x3a68a1ac07b41976d8711c444f1c934d97b8eb8e485c64d5eee6105ab31fb79a139894132021-11-10 10:38:3516 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xad99e7a18b69c423a21658ea3d55b7f365c40160ea6ffa9bc80c71117c0fbea9139893832021-11-10 10:37:0516 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xad99e7a18b69c423a21658ea3d55b7f365c40160ea6ffa9bc80c71117c0fbea9139893832021-11-10 10:37:0516 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x9dd604f726a7383c4c730bf366e05b8ba4b3c55452b8f7afe7c87b0d132057b2139893582021-11-10 10:35:5016 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x9dd604f726a7383c4c730bf366e05b8ba4b3c55452b8f7afe7c87b0d132057b2139893582021-11-10 10:35:5016 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xcef7a16d0172e1f1c5d94500e4df3f34471a43d5a4dddc91dc99b1b9da8deebf139892652021-11-10 10:31:1116 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xcef7a16d0172e1f1c5d94500e4df3f34471a43d5a4dddc91dc99b1b9da8deebf139892652021-11-10 10:31:1116 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x91d1509ceaedb3ef496a29d73dbdb7abe570e202c319d123212dc16ab1e3abd3139892512021-11-10 10:30:2916 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x91d1509ceaedb3ef496a29d73dbdb7abe570e202c319d123212dc16ab1e3abd3139892512021-11-10 10:30:2916 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x3948a17e06fcbcacd41d884e85792fe1fc9eaf0feb807e2c6bfcf225efd4926c139316312021-11-08 10:26:1018 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x3948a17e06fcbcacd41d884e85792fe1fc9eaf0feb807e2c6bfcf225efd4926c139316312021-11-08 10:26:1018 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xa935c6e1d9aec3e7cd1149819db7d1bca6f40369666c26a120a25c1c553e0ba2139316122021-11-08 10:25:1318 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xa935c6e1d9aec3e7cd1149819db7d1bca6f40369666c26a120a25c1c553e0ba2139316122021-11-08 10:25:1318 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xa80e74ece9d06b1c50385c99027e8df8a07808b3b0ee60ad1af276ab3c76fa4a139315982021-11-08 10:24:3118 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xa80e74ece9d06b1c50385c99027e8df8a07808b3b0ee60ad1af276ab3c76fa4a139315982021-11-08 10:24:3118 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x2e34748e15af6977688079a34a983fc4efadeb0870827d7d906bc4754afa539f139315752021-11-08 10:23:2218 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x2e34748e15af6977688079a34a983fc4efadeb0870827d7d906bc4754afa539f139315752021-11-08 10:23:2218 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xd438593a7683a9f646bcc659184d4e7174bd82e2085782f643cb8baf7edc3494139315302021-11-08 10:21:0718 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0xd438593a7683a9f646bcc659184d4e7174bd82e2085782f643cb8baf7edc3494139315302021-11-08 10:21:0718 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x557c8c7c97dd9d682798848b6d696e2d4eeabece06b95336aa23a3004eed6a49139314602021-11-08 10:17:3718 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x557c8c7c97dd9d682798848b6d696e2d4eeabece06b95336aa23a3004eed6a49139314602021-11-08 10:17:3718 days 19 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
0x7dd4dc602e359073cafc24b9118d492d2427ad9da2de1692d713c046ac34e615136614932021-10-29 23:33:2528 days 6 hrs ago 0xea34f39df510eaffb789d575c9aa800d61476256 0x93cf51e87a13d38c394e4adbb7ddf000319d59960 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
QubitLocker

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : QubitLocker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/*
      ___       ___       ___       ___       ___
     /\  \     /\__\     /\  \     /\  \     /\  \
    /::\  \   /:/ _/_   /::\  \   _\:\  \    \:\  \
    \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\   /::\__\
     \::/  / \:\/:/  / \:\::/  / \::/\/__/  /:/\/__/
     /:/  /   \::/  /   \::/  /   \:\__\    \/__/
     \/__/     \/__/     \/__/     \/__/

*
* MIT License
* ===========
*
* Copyright (c) 2021 QubitFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

import "@openzeppelin/contracts/math/Math.sol";
import "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";

import "../interfaces/IQubitLocker.sol";
import "../library/WhitelistUpgradeable.sol";
import "../library/SafeToken.sol";


contract QubitLocker is IQubitLocker, WhitelistUpgradeable, ReentrancyGuardUpgradeable {
    using SafeMath for uint;
    using SafeToken for address;

    /* ========== CONSTANTS ============= */

    address public constant QBT = 0xF523e4478d909968090a232eB380E2dd6f802518;

    uint public constant LOCK_UNIT_BASE = 7 days;
    uint public constant LOCK_UNIT_MAX = 2 * 365 days;

    /* ========== STATE VARIABLES ========== */

    mapping(address => uint) public balances;
    mapping(address => uint) public expires;

    uint public override totalBalance;

    uint private _lastTotalScore;
    uint private _lastSlope;
    uint private _lastTimestamp;
    mapping(uint => uint) private _slopeChanges;

    /* ========== INITIALIZER ========== */

    function initialize() external initializer {
        __WhitelistUpgradeable_init();
        __ReentrancyGuard_init();
        _lastTimestamp = block.timestamp;
    }

    /* ========== VIEWS ========== */

    function balanceOf(address account) external view override returns (uint) {
        return balances[account];
    }

    function expiryOf(address account) external view override returns (uint) {
        return expires[account];
    }

    function availableOf(address account) external view override returns (uint) {
        return expires[account] < block.timestamp ? balances[account] : 0;
    }

    function balanceExpiryOf(address account) external view override returns (uint balance, uint expiry) {
        return (balances[account], expires[account]);
    }

    function totalScore() public view override returns (uint score, uint slope) {
        score = _lastTotalScore;
        slope = _lastSlope;

        uint prevTimestamp = _lastTimestamp;
        uint nextTimestamp = truncateExpiry(_lastTimestamp).add(LOCK_UNIT_BASE);
        while (nextTimestamp < block.timestamp) {
            uint deltaScore = nextTimestamp.sub(prevTimestamp).mul(slope);
            score = score < deltaScore ? 0 : score.sub(deltaScore);
            slope = slope.sub(_slopeChanges[nextTimestamp]);

            prevTimestamp = nextTimestamp;
            nextTimestamp = nextTimestamp.add(LOCK_UNIT_BASE);
        }

        uint deltaScore = block.timestamp > prevTimestamp ? block.timestamp.sub(prevTimestamp).mul(slope) : 0;
        score = score > deltaScore ? score.sub(deltaScore) : 0;
    }

    /**
     * @notice Calculate time-weighted balance of account
     * @param account Account of which the balance will be calculated
     */
    function scoreOf(address account) external view override returns (uint) {
        if (expires[account] < block.timestamp) return 0;
        return expires[account].sub(block.timestamp).mul(balances[account].div(LOCK_UNIT_MAX));
    }

    function truncateExpiry(uint time) public pure returns (uint) {
        return time.div(LOCK_UNIT_BASE).mul(LOCK_UNIT_BASE);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function deposit(uint amount, uint expiry) external override nonReentrant {
        require(amount > 0, 'QubitLocker: invalid amount');

        expiry = balances[msg.sender] == 0 ? truncateExpiry(expiry) : expires[msg.sender];
        require(block.timestamp < expiry && expiry <= block.timestamp + LOCK_UNIT_MAX, 'QubitLocker: invalid expiry');

        _slopeChanges[expiry] = _slopeChanges[expiry].add(amount.div(LOCK_UNIT_MAX));
        _updateTotalScore(amount, expiry);

        QBT.safeTransferFrom(msg.sender, address(this), amount);
        totalBalance = totalBalance.add(amount);

        balances[msg.sender] = balances[msg.sender].add(amount);
        expires[msg.sender] = expiry;
    }

    function extendLock(uint nextExpiry) external override nonReentrant {
        uint amount = balances[msg.sender];
        require(amount > 0, "QubitLocker: zero balance");

        uint prevExpiry = expires[msg.sender];
        nextExpiry = truncateExpiry(nextExpiry);
        require(Math.max(prevExpiry, block.timestamp) < nextExpiry && nextExpiry <= block.timestamp + LOCK_UNIT_MAX, 'QubitLocker: invalid expiry time');

        uint slopeChange = (_slopeChanges[prevExpiry] < amount.div(LOCK_UNIT_MAX)) ? _slopeChanges[prevExpiry] : amount.div(LOCK_UNIT_MAX);
        _slopeChanges[prevExpiry] = _slopeChanges[prevExpiry].sub(slopeChange);
        _slopeChanges[nextExpiry] = _slopeChanges[nextExpiry].add(slopeChange);
        _updateTotalScoreExtendingLock(amount, prevExpiry, nextExpiry);
        expires[msg.sender] = nextExpiry;
    }

    /**
     * @notice Withdraw all tokens for `msg.sender`
     * @dev Only possible if the lock has expired
     */
    function withdraw() external override nonReentrant {
        require(balances[msg.sender] > 0 && block.timestamp >= expires[msg.sender], "QubitLocker: invalid state");
        _updateTotalScore(0, 0);

        uint amount = balances[msg.sender];
        totalBalance = totalBalance.sub(amount);
        delete balances[msg.sender];
        delete expires[msg.sender];
        QBT.safeTransfer(msg.sender, amount);
    }

    function depositBehalf(address account, uint amount, uint expiry) external override onlyWhitelisted nonReentrant {
        require(amount > 0, 'QubitLocker: invalid amount');

        expiry = balances[account] == 0 ? truncateExpiry(expiry) : expires[account];
        require(block.timestamp < expiry && expiry <= block.timestamp + LOCK_UNIT_MAX, 'QubitLocker: invalid expiry');

        _slopeChanges[expiry] = _slopeChanges[expiry].add(amount.div(LOCK_UNIT_MAX));
        _updateTotalScore(amount, expiry);

        QBT.safeTransferFrom(msg.sender, address(this), amount);
        totalBalance = totalBalance.add(amount);

        balances[account] = balances[account].add(amount);
        expires[account] = expiry;
    }

    function withdrawBehalf(address account) external override onlyWhitelisted nonReentrant {
        require(balances[account] > 0 && block.timestamp >= expires[account], "QubitLocker: invalid state");
        _updateTotalScore(0, 0);

        uint amount = balances[account];
        totalBalance = totalBalance.sub(amount);
        delete balances[account];
        delete expires[account];
        QBT.safeTransfer(account, amount);
    }

    /* ========== PRIVATE FUNCTIONS ========== */

    function _updateTotalScore(uint newAmount, uint nextExpiry) private {
        (uint score, uint slope) = totalScore();

        if (newAmount > 0) {
            uint slopeChange = newAmount.div(LOCK_UNIT_MAX);
            uint newAmountDeltaScore = nextExpiry.sub(block.timestamp).mul(slopeChange);

            slope = slope.add(slopeChange);
            score = score.add(newAmountDeltaScore);
        }

        _lastTotalScore = score;
        _lastSlope = slope;
        _lastTimestamp = block.timestamp;
    }

    function _updateTotalScoreExtendingLock(uint amount, uint prevExpiry, uint nextExpiry) private {
        (uint score, uint slope) = totalScore();

        uint deltaScore = nextExpiry.sub(prevExpiry).mul(amount.div(LOCK_UNIT_MAX));
        score = score.add(deltaScore);

        _lastTotalScore = score;
        _lastSlope = slope;
        _lastTimestamp = block.timestamp;
    }
}

File 2 of 14 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

File 3 of 14 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import './IBEP20.sol';
import '../../math/SafeMath.sol';
import '../../utils/Address.sol';

/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(
        IBEP20 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
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IBEP20 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'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            'SafeBEP20: approve from non-zero to non-zero allowance'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

    function safeDecreaseAllowance(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            'SafeBEP20: decreased allowance below zero'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @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(IBEP20 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, 'SafeBEP20: low-level call failed');
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed');
        }
    }
}

File 4 of 14 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/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 initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _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 make 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;
    }
    uint256[49] private __gap;
}

File 5 of 14 : IQubitLocker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/*
      ___       ___       ___       ___       ___
     /\  \     /\__\     /\  \     /\  \     /\  \
    /::\  \   /:/ _/_   /::\  \   _\:\  \    \:\  \
    \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\   /::\__\
     \::/  / \:\/:/  / \:\::/  / \::/\/__/  /:/\/__/
     /:/  /   \::/  /   \::/  /   \:\__\    \/__/
     \/__/     \/__/     \/__/     \/__/

*
* MIT License
* ===========
*
* Copyright (c) 2021 QubitFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

interface IQubitLocker {

    struct CheckPoint {
        uint totalWeightedBalance;
        uint slope;
        uint ts;
    }

    function totalBalance() external view returns (uint);
    function balanceOf(address account) external view returns (uint);
    function expiryOf(address account) external view returns (uint);
    function availableOf(address account) external view returns (uint);
    function balanceExpiryOf(address account) external view returns (uint balance, uint expiry);

    function totalScore() external view returns (uint score, uint slope);
    function scoreOf(address account) external view returns (uint);

    function deposit(uint amount, uint unlockTime) external;
    function extendLock(uint expiryTime) external;
    function withdraw() external;

    function depositBehalf(address account, uint amount, uint unlockTime) external;
    function withdrawBehalf(address account) external;
}

File 6 of 14 : WhitelistUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

/*
      ___       ___       ___       ___       ___
     /\  \     /\__\     /\  \     /\  \     /\  \
    /::\  \   /:/ _/_   /::\  \   _\:\  \    \:\  \
    \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\   /::\__\
     \::/  / \:\/:/  / \:\::/  / \::/\/__/  /:/\/__/
     /:/  /   \::/  /   \::/  /   \:\__\    \/__/
     \/__/     \/__/     \/__/     \/__/

*
* MIT License
* ===========
*
* Copyright (c) 2021 QubitFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

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


contract WhitelistUpgradeable is OwnableUpgradeable {
    mapping (address => bool) private _whitelist;
    bool private _disable;                      // default - false means whitelist feature is working on. if true no more use of whitelist

    event Whitelisted(address indexed _address, bool whitelist);
    event EnableWhitelist();
    event DisableWhitelist();

    modifier onlyWhitelisted {
        require(_disable || _whitelist[msg.sender], "Whitelist: caller is not on the whitelist");
        _;
    }

    function __WhitelistUpgradeable_init() internal initializer {
        __Ownable_init();
    }

    function isWhitelist(address _address) public view returns(bool) {
        return _whitelist[_address];
    }

    function setWhitelist(address _address, bool _on) external onlyOwner {
        _whitelist[_address] = _on;

        emit Whitelisted(_address, _on);
    }

    function disableWhitelist(bool disable) external onlyOwner {
        _disable = disable;
        if (disable) {
            emit DisableWhitelist();
        } else {
            emit EnableWhitelist();
        }
    }

    uint256[49] private __gap;
}

File 7 of 14 : SafeToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface ERC20Interface {
    function balanceOf(address user) external view returns (uint256);
}

library SafeToken {
    function myBalance(address token) internal view returns (uint256) {
        return ERC20Interface(token).balanceOf(address(this));
    }

    function balanceOf(address token, address user) internal view returns (uint256) {
        return ERC20Interface(token).balanceOf(user);
    }

    function safeApprove(address token, address to, uint256 value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "!safeApprove");
    }

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

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

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{ value: value }(new bytes(0));
        require(success, "!safeTransferETH");
    }
}

File 8 of 14 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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

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

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

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

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

File 9 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, 'SafeMath: addition overflow');

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, 'SafeMath: multiplication overflow');

        return c;
    }

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

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

        return c;
    }

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

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

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 10 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 14 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-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.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 12 of 14 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 14 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 14 of 14 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/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 GSN 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 initializer {
        __Context_init_unchained();
    }

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
    uint256[50] private __gap;
}

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

Contract ABI

[{"anonymous":false,"inputs":[],"name":"DisableWhitelist","type":"event"},{"anonymous":false,"inputs":[],"name":"EnableWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelist","type":"bool"}],"name":"Whitelisted","type":"event"},{"inputs":[],"name":"LOCK_UNIT_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_UNIT_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QBT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"availableOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceExpiryOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"expiry","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":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"depositBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"disable","type":"bool"}],"name":"disableWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"expiryOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nextExpiry","type":"uint256"}],"name":"extendLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"scoreOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_on","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalScore","outputs":[{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint256","name":"slope","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"truncateExpiry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611c50806100206000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637db75124116100de578063b51b1d2911610097578063d2d0b82811610071578063d2d0b828146102e4578063d546da90146102f7578063e2bbb1581461030a578063f2fde38b1461031d57610173565b8063b51b1d29146102a9578063c006719f146102bc578063c683630d146102c457610173565b80637db75124146102555780638129fc1c146102765780638497fab91461027e5780638da5cb5b14610291578063ad7a672f14610299578063b1868628146102a157610173565b806352275f3e1161013057806352275f3e146101f757806353d6fd591461020a5780636eea48201461021d57806370a0823114610232578063715018a61461024557806377bafa8e1461024d57610173565b8063133af4561461017857806327e235e3146101a157806332ad5e01146101b45780633ccfd60b146101c957806344ee3a1c146101d157806349ba1b49146101e4575b600080fd5b61018b610186366004611700565b610330565b6040516101989190611bc5565b60405180910390f35b61018b6101af366004611700565b6103b4565b6101c76101c2366004611700565b6103c6565b005b6101c7610510565b6101c76101df3660046117bd565b6105f1565b6101c76101f2366004611785565b610757565b61018b6102053660046117bd565b610808565b6101c761021836600461171b565b61081b565b6102256108ba565b6040516101989190611812565b61018b610240366004611700565b6108d2565b6101c76108ed565b61018b610976565b610268610263366004611700565b61097e565b604051610198929190611bce565b6101c76109a6565b61018b61028c366004611700565b610a3c565b610225610a57565b61018b610a66565b61018b610a6c565b6101c76102b7366004611752565b610a73565b610268610c32565b6102d76102d2366004611700565b610d03565b6040516101989190611863565b61018b6102f2366004611700565b610d21565b61018b610305366004611700565b610d33565b6101c76103183660046117d5565b610d75565b6101c761032b366004611700565b610eb8565b6001600160a01b038116600090815260cb6020526040812054421115610358575060006103af565b6001600160a01b038216600090815260ca60205260409020546103ac90610383906303c26700610f79565b6001600160a01b038416600090815260cb60205260409020546103a69042610fc4565b90611006565b90505b919050565b60ca6020526000908152604090205481565b60665460ff16806103e657503360009081526065602052604090205460ff165b61040b5760405162461bcd60e51b815260040161040290611a48565b60405180910390fd5b6002609854141561042e5760405162461bcd60e51b815260040161040290611b8e565b60026098556001600160a01b038116600090815260ca60205260409020541580159061047257506001600160a01b038116600090815260cb60205260409020544210155b61048e5760405162461bcd60e51b815260040161040290611a11565b610499600080611040565b6001600160a01b038116600090815260ca602052604090205460cc546104bf9082610fc4565b60cc556001600160a01b038216600090815260ca6020908152604080832083905560cb90915281205561050773f523e4478d909968090a232eb380e2dd6f80251883836110a6565b50506001609855565b600260985414156105335760405162461bcd60e51b815260040161040290611b8e565b600260985533600090815260ca602052604090205415801590610565575033600090815260cb60205260409020544210155b6105815760405162461bcd60e51b815260040161040290611a11565b61058c600080611040565b33600090815260ca602052604090205460cc546105a99082610fc4565b60cc5533600081815260ca6020908152604080832083905560cb9091528120556105e99073f523e4478d909968090a232eb380e2dd6f80251890836110a6565b506001609855565b600260985414156106145760405162461bcd60e51b815260040161040290611b8e565b600260985533600090815260ca6020526040902054806106465760405162461bcd60e51b81526004016104029061191e565b33600090815260cb602052604090205461065f83610808565b92508261066c8242611194565b10801561067f57506303c2670042018311155b61069b5760405162461bcd60e51b815260040161040290611b2e565b60006106ab836303c26700610f79565b600083815260d06020526040902054106106d2576106cd836303c26700610f79565b6106e2565b600082815260d060205260409020545b600083815260d060205260409020549091506106fe9082610fc4565b600083815260d0602052604080822092909255858152205461072090826111ab565b600085815260d0602052604090205561073a8383866111d0565b505033600090815260cb6020526040902091909155506001609855565b61075f61121a565b6001600160a01b0316610770610a57565b6001600160a01b0316146107965760405162461bcd60e51b815260040161040290611af9565b6066805460ff191682158015919091179091556107db576040517f508560e15717a4e9058b9a19d806cb679004a1bd953376f71fda71c141e5dc5390600090a1610805565b6040517fa2927d972f7cfc5ff8b7ad79f9adf0bdb885d0e569f40d0037df2e1299616ae090600090a15b50565b60006103ac62093a806103a68482610f79565b61082361121a565b6001600160a01b0316610834610a57565b6001600160a01b03161461085a5760405162461bcd60e51b815260040161040290611af9565b6001600160a01b03821660008181526065602052604090819020805460ff1916841515179055517fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440906108ae908490611863565b60405180910390a25050565b73f523e4478d909968090a232eb380e2dd6f80251881565b6001600160a01b0316600090815260ca602052604090205490565b6108f561121a565b6001600160a01b0316610906610a57565b6001600160a01b03161461092c5760405162461bcd60e51b815260040161040290611af9565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6303c2670081565b6001600160a01b0316600090815260ca602090815260408083205460cb909252909120549091565b600054610100900460ff16806109bf57506109bf61121e565b806109cd575060005460ff16155b6109e95760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff16158015610a14576000805460ff1961ff0019909116610100171660011790555b610a1c61122f565b610a246112b9565b4260cf558015610805576000805461ff001916905550565b6001600160a01b0316600090815260cb602052604090205490565b6033546001600160a01b031690565b60cc5481565b62093a8081565b60665460ff1680610a9357503360009081526065602052604090205460ff165b610aaf5760405162461bcd60e51b815260040161040290611a48565b60026098541415610ad25760405162461bcd60e51b815260040161040290611b8e565b600260985581610af45760405162461bcd60e51b81526004016104029061198c565b6001600160a01b038316600090815260ca602052604090205415610b30576001600160a01b038316600090815260cb6020526040902054610b39565b610b3981610808565b90508042108015610b5057506303c2670042018111155b610b6c5760405162461bcd60e51b815260040161040290611955565b610b92610b7d836303c26700610f79565b600083815260d06020526040902054906111ab565b600082815260d06020526040902055610bab8282611040565b610bcb73f523e4478d909968090a232eb380e2dd6f80251833308561132f565b60cc54610bd890836111ab565b60cc556001600160a01b038316600090815260ca6020526040902054610bfe90836111ab565b6001600160a01b03909316600090815260ca602090815260408083209590955560cb90529290922091909155506001609855565b60cd5460ce5460cf546000610c5362093a80610c4d84610808565b906111ab565b90505b42811015610cc2576000610c6e846103a68486610fc4565b9050808510610c8657610c818582610fc4565b610c89565b60005b600083815260d06020526040902054909550610ca6908590610fc4565b93509091508190610cba8262093a806111ab565b915050610c56565b6000824211610cd2576000610ce0565b610ce0846103a64286610fc4565b9050808511610cf0576000610cfa565b610cfa8582610fc4565b94505050509091565b6001600160a01b031660009081526065602052604090205460ff1690565b60cb6020526000908152604090205481565b6001600160a01b038116600090815260cb60205260408120544211610d595760006103ac565b506001600160a01b0316600090815260ca602052604090205490565b60026098541415610d985760405162461bcd60e51b815260040161040290611b8e565b600260985581610dba5760405162461bcd60e51b81526004016104029061198c565b33600090815260ca602052604090205415610de45733600090815260cb6020526040902054610ded565b610ded81610808565b90508042108015610e0457506303c2670042018111155b610e205760405162461bcd60e51b815260040161040290611955565b610e31610b7d836303c26700610f79565b600082815260d06020526040902055610e4a8282611040565b610e6a73f523e4478d909968090a232eb380e2dd6f80251833308561132f565b60cc54610e7790836111ab565b60cc5533600090815260ca6020526040902054610e9490836111ab565b33600090815260ca602090815260408083209390935560cb90522055506001609855565b610ec061121a565b6001600160a01b0316610ed1610a57565b6001600160a01b031614610ef75760405162461bcd60e51b815260040161040290611af9565b6001600160a01b038116610f1d5760405162461bcd60e51b8152600401610402906118a1565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610fbb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611420565b90505b92915050565b6000610fbb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611457565b60008261101557506000610fbe565b8282028284828161102257fe5b0414610fbb5760405162461bcd60e51b815260040161040290611a91565b60008061104b610c32565b90925090508315611095576000611066856303c26700610f79565b90506000611078826103a68742610fc4565b905061108483836111ab565b925061109084826111ab565b935050505b60cd9190915560ce5550504260cf55565b60006060846001600160a01b031663a9059cbb85856040516024016110cc92919061184a565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161110591906117f6565b6000604051808303816000865af19150503d8060008114611142576040519150601f19603f3d011682016040523d82523d6000602084013e611147565b606091505b509150915081801561117157508051158061117157508080602001905181019061117191906117a1565b61118d5760405162461bcd60e51b815260040161040290611ad2565b5050505050565b6000818310156111a45781610fbb565b5090919050565b600082820183811015610fbb5760405162461bcd60e51b8152600401610402906118e7565b6000806111db610c32565b909250905060006111fd6111f3876303c26700610f79565b6103a68688610fc4565b905061120983826111ab565b60cd555060ce5550504260cf555050565b3390565b600061122930611483565b15905090565b600054610100900460ff1680611248575061124861121e565b80611256575060005460ff16155b6112725760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff1615801561129d576000805460ff1961ff0019909116610100171660011790555b6112a5611489565b8015610805576000805461ff001916905550565b600054610100900460ff16806112d257506112d261121e565b806112e0575060005460ff16155b6112fc5760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff16158015611327576000805460ff1961ff0019909116610100171660011790555b6112a5611507565b60006060856001600160a01b03166323b872dd86868660405160240161135793929190611826565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161139091906117f6565b6000604051808303816000865af19150503d80600081146113cd576040519150601f19603f3d011682016040523d82523d6000602084013e6113d2565b606091505b50915091508180156113fc5750805115806113fc5750808060200190518101906113fc91906117a1565b6114185760405162461bcd60e51b815260040161040290611b63565b505050505050565b600081836114415760405162461bcd60e51b8152600401610402919061186e565b50600083858161144d57fe5b0495945050505050565b6000818484111561147b5760405162461bcd60e51b8152600401610402919061186e565b505050900390565b3b151590565b600054610100900460ff16806114a257506114a261121e565b806114b0575060005460ff16155b6114cc5760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff161580156114f7576000805460ff1961ff0019909116610100171660011790555b6114ff61158e565b6112a561160f565b600054610100900460ff1680611520575061152061121e565b8061152e575060005460ff16155b61154a5760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff16158015611575576000805460ff1961ff0019909116610100171660011790555b60016098558015610805576000805461ff001916905550565b600054610100900460ff16806115a757506115a761121e565b806115b5575060005460ff16155b6115d15760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff161580156112a5576000805460ff1961ff0019909116610100171660011790558015610805576000805461ff001916905550565b600054610100900460ff1680611628575061162861121e565b80611636575060005460ff16155b6116525760405162461bcd60e51b8152600401610402906119c3565b600054610100900460ff1615801561167d576000805460ff1961ff0019909116610100171660011790555b600061168761121a565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610805576000805461ff001916905550565b80356001600160a01b0381168114610fbe57600080fd5b600060208284031215611711578081fd5b610fbb83836116e9565b6000806040838503121561172d578081fd5b61173784846116e9565b9150602083013561174781611c0c565b809150509250929050565b600080600060608486031215611766578081fd5b61177085856116e9565b95602085013595506040909401359392505050565b600060208284031215611796578081fd5b8135610fbb81611c0c565b6000602082840312156117b2578081fd5b8151610fbb81611c0c565b6000602082840312156117ce578081fd5b5035919050565b600080604083850312156117e7578182fd5b50508035926020909101359150565b60008251611808818460208701611bdc565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261188d816040850160208701611bdc565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526019908201527f51756269744c6f636b65723a207a65726f2062616c616e636500000000000000604082015260600190565b6020808252601b908201527f51756269744c6f636b65723a20696e76616c6964206578706972790000000000604082015260600190565b6020808252601b908201527f51756269744c6f636b65723a20696e76616c696420616d6f756e740000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601a908201527f51756269744c6f636b65723a20696e76616c6964207374617465000000000000604082015260600190565b60208082526029908201527f57686974656c6973743a2063616c6c6572206973206e6f74206f6e20746865206040820152681dda1a5d195b1a5cdd60ba1b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c10b9b0b332aa3930b739b332b960991b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252818101527f51756269744c6f636b65723a20696e76616c6964206578706972792074696d65604082015260600190565b60208082526011908201527021736166655472616e7366657246726f6d60781b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b918252602082015260400190565b60005b83811015611bf7578181015183820152602001611bdf565b83811115611c06576000848401525b50505050565b801515811461080557600080fdfea264697066735822122085c3d1ce95d233a8343be222e16bb771e454e7dd4d53ae67b84f6fad146e6f3464736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading