Contract 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f8

Contract Overview

Balance:
0 BNB
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc3990e3b4342fe42d448576bbb37f399884efaf7a03cc2d36512f70fbf1247df0x60806040114058532021-08-12 4:57:3674 days 9 hrs ago0xbee397129374d0b4db7bf1654936951e5bdfe5a6 IN  Contract Creation0 BNB0.04435184
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd48b5f62ccf77b05a34b8cf3f0e631f14bb8f12833f1e8df1558abff9dfffe81134859282021-10-23 20:55:071 day 17 hrs ago 0x80d1486ef600cc56d4df9ed33baf53c60d5a629b 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xd48b5f62ccf77b05a34b8cf3f0e631f14bb8f12833f1e8df1558abff9dfffe81134859282021-10-23 20:55:071 day 17 hrs ago 0x80d1486ef600cc56d4df9ed33baf53c60d5a629b 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xd48b5f62ccf77b05a34b8cf3f0e631f14bb8f12833f1e8df1558abff9dfffe81134859282021-10-23 20:55:071 day 17 hrs ago 0x80d1486ef600cc56d4df9ed33baf53c60d5a629b 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xd48b5f62ccf77b05a34b8cf3f0e631f14bb8f12833f1e8df1558abff9dfffe81134859282021-10-23 20:55:071 day 17 hrs ago 0x80d1486ef600cc56d4df9ed33baf53c60d5a629b 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc962fc889c0bdbc6a844456267385427a309e933a1ea7ff3b004a28066cefa3c134738982021-10-23 10:53:342 days 3 hrs ago 0x38e2ab4cadd92b87739aa5a71847e0b70bd4e631 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc962fc889c0bdbc6a844456267385427a309e933a1ea7ff3b004a28066cefa3c134738982021-10-23 10:53:342 days 3 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc962fc889c0bdbc6a844456267385427a309e933a1ea7ff3b004a28066cefa3c134738982021-10-23 10:53:342 days 3 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x38e2ab4cadd92b87739aa5a71847e0b70bd4e631 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x38e2ab4cadd92b87739aa5a71847e0b70bd4e631 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x7ef3296799fe6dbb118ec5f22881c5cc0cd3e44df0c7a7cfe11c8f689b037d70134735752021-10-23 10:37:252 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x62a066a72341cbda1e2f512e4b03f1c40084dc2c8bbcaee29a3368657cb20a47134734952021-10-23 10:33:252 days 4 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x62a066a72341cbda1e2f512e4b03f1c40084dc2c8bbcaee29a3368657cb20a47134734952021-10-23 10:33:252 days 4 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0x62a066a72341cbda1e2f512e4b03f1c40084dc2c8bbcaee29a3368657cb20a47134734952021-10-23 10:33:252 days 4 hrs ago 0x9e980e2c702268e6b97400da1ab1ee6ccc238f52 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc42c4a02a3fff47a8b49b497bb8f8b02535e08df95bdb6968019c18f91d69379133871292021-10-20 9:54:585 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc42c4a02a3fff47a8b49b497bb8f8b02535e08df95bdb6968019c18f91d69379133871292021-10-20 9:54:585 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc42c4a02a3fff47a8b49b497bb8f8b02535e08df95bdb6968019c18f91d69379133871292021-10-20 9:54:585 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc42c4a02a3fff47a8b49b497bb8f8b02535e08df95bdb6968019c18f91d69379133871292021-10-20 9:54:585 days 4 hrs ago 0x38e2ab4cadd92b87739aa5a71847e0b70bd4e631 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
0xc42c4a02a3fff47a8b49b497bb8f8b02535e08df95bdb6968019c18f91d69379133871292021-10-20 9:54:585 days 4 hrs ago 0x1771fe35b71bbf5ff7328ef5836e896850709f24 0xf8969a67ffba0eab9cc4f5683b3a275c2606c8f80 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
QToken

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 17 : QToken.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
* SOFTWARE.
*/

import "@openzeppelin/contracts/math/Math.sol";

import "../interfaces/IQDistributor.sol";
import "../library/SafeToken.sol";
import "./QMarket.sol";

contract QToken is QMarket {
    using SafeMath for uint;
    using SafeToken for address;

    /* ========== CONSTANT ========== */

    IQDistributor public constant qDistributor = IQDistributor(0xA2897BEDE359e56F67D06F42C39869719E59bEcc);

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

    string public name;
    string public symbol;
    uint8 public decimals;

    mapping(address => mapping(address => uint)) private _transferAllowances;

    /* ========== EVENT ========== */

    event Mint(address minter, uint mintAmount);
    event Redeem(address account, uint underlyingAmount, uint qTokenAmount);

    event Borrow(address account, uint ammount, uint accountBorrow);
    event RepayBorrow(address payer, address borrower, uint amount, uint accountBorrow);
    event LiquidateBorrow(
        address liquidator,
        address borrower,
        uint amount,
        address qTokenCollateral,
        uint seizeAmount
    );

    event Transfer(address indexed from, address indexed to, uint amount);
    event Approval(address indexed owner, address indexed spender, uint amount);

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

    function initialize(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) external initializer {
        __QMarket_init();

        name = _name;
        symbol = _symbol;
        decimals = _decimals;
    }

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

    function allowance(address account, address spender) external view override returns (uint) {
        return _transferAllowances[account][spender];
    }

    function getOwner() external view returns (address) {
        return owner();
    }

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

    function transfer(address dst, uint amount) external override accrue nonReentrant returns (bool) {
        _transferTokens(msg.sender, msg.sender, dst, amount);
        return true;
    }

    function transferFrom(
        address src,
        address dst,
        uint amount
    ) external override accrue nonReentrant returns (bool) {
        _transferTokens(msg.sender, src, dst, amount);
        return true;
    }

    function approve(address spender, uint amount) external override returns (bool) {
        _transferAllowances[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function supply(address account, uint uAmount) external payable override accrue onlyQore returns (uint) {
        uint exchangeRate = exchangeRate();
        uAmount = underlying == address(WBNB) ? msg.value : uAmount;
        uAmount = _doTransferIn(account, uAmount);
        uint qAmount = uAmount.mul(1e18).div(exchangeRate);

        totalSupply = totalSupply.add(qAmount);
        accountBalances[account] = accountBalances[account].add(qAmount);

        emit Mint(account, qAmount);
        emit Transfer(address(0), account, qAmount);
        return qAmount;
    }

    function redeemToken(address redeemer, uint qAmount) external override accrue onlyQore returns (uint) {
        return _redeem(redeemer, qAmount, 0);
    }

    function redeemUnderlying(address redeemer, uint uAmount) external override accrue onlyQore returns (uint) {
        return _redeem(redeemer, 0, uAmount);
    }

    function borrow(address account, uint amount) external override accrue onlyQore returns (uint) {
        require(getCash() >= amount, "QToken: borrow amount exceeds cash");
        updateBorrowInfo(account, amount, 0);
        _doTransferOut(account, amount);

        emit Borrow(account, amount, borrowBalanceOf(account));
        return amount;
    }

    function repayBorrow(address account, uint amount) external payable override accrue onlyQore returns (uint) {
        if (amount == uint(-1)) {
            amount = borrowBalanceOf(account);
        }
        return _repay(account, account, underlying == address(WBNB) ? msg.value : amount);
    }

    function repayBorrowBehalf(
        address payer,
        address borrower,
        uint amount
    ) external payable override accrue onlyQore returns (uint) {
        return _repay(payer, borrower, underlying == address(WBNB) ? msg.value : amount);
    }

    function liquidateBorrow(
        address qTokenCollateral,
        address liquidator,
        address borrower,
        uint amount
    ) external payable override accrue onlyQore returns (uint qAmountToSeize) {
        require(borrower != liquidator, "QToken: cannot liquidate yourself");

        amount = underlying == address(WBNB) ? msg.value : amount;
        amount = _repay(liquidator, borrower, amount);
        require(amount > 0 && amount < uint(-1), "QToken: invalid repay amount");

        qAmountToSeize = IQValidator(qore.qValidator()).qTokenAmountToSeize(address(this), qTokenCollateral, amount);
        require(
            IQToken(payable(qTokenCollateral)).balanceOf(borrower) >= qAmountToSeize,
            "QToken: too much seize amount"
        );
        emit LiquidateBorrow(liquidator, borrower, amount, qTokenCollateral, qAmountToSeize);
    }

    function seize(
        address liquidator,
        address borrower,
        uint qAmount
    ) external override accrue onlyQore {
        accountBalances[borrower] = accountBalances[borrower].sub(qAmount);
        accountBalances[liquidator] = accountBalances[liquidator].add(qAmount);
        qDistributor.notifyTransferred(address(this), borrower, liquidator);
        emit Transfer(borrower, liquidator, qAmount);
    }

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

    function _transferTokens(
        address spender,
        address src,
        address dst,
        uint amount
    ) private {
        require(
            src != dst && IQValidator(qore.qValidator()).redeemAllowed(address(this), src, amount),
            "QToken: cannot transfer"
        );
        require(amount != 0, "QToken: zero amount");

        uint _allowance = spender == src ? uint(-1) : _transferAllowances[src][spender];
        uint _allowanceNew = _allowance.sub(amount, "QToken: transfer amount exceeds allowance");

        accountBalances[src] = accountBalances[src].sub(amount);
        accountBalances[dst] = accountBalances[dst].add(amount);

        qDistributor.notifyTransferred(address(this), src, dst);

        if (_allowance != uint(-1)) {
            _transferAllowances[src][msg.sender] = _allowanceNew;
        }
        emit Transfer(src, dst, amount);
    }

    function _doTransferIn(address from, uint amount) private returns (uint) {
        if (underlying == address(WBNB)) {
            require(msg.value >= amount, "QToken: value mismatch");
            return Math.min(msg.value, amount);
        } else {
            uint balanceBefore = IBEP20(underlying).balanceOf(address(this));
            underlying.safeTransferFrom(from, address(this), amount);
            return IBEP20(underlying).balanceOf(address(this)).sub(balanceBefore);
        }
    }

    function _doTransferOut(address to, uint amount) private {
        if (underlying == address(WBNB)) {
            SafeToken.safeTransferETH(to, amount);
        } else {
            underlying.safeTransfer(to, amount);
        }
    }

    function _redeem(
        address account,
        uint qAmountIn,
        uint uAmountIn
    ) private returns (uint) {
        require(qAmountIn == 0 || uAmountIn == 0, "QToken: one of qAmountIn or uAmountIn must be zero");
        require(totalSupply >= qAmountIn, "QToken: not enough total supply");
        require(getCash() >= uAmountIn || uAmountIn == 0, "QToken: not enough underlying");
        require(
            getCash() >= qAmountIn.mul(exchangeRate()).div(1e18) || qAmountIn == 0,
            "QToken: not enough underlying"
        );

        uint qAmountToRedeem = qAmountIn > 0 ? qAmountIn : uAmountIn.mul(1e18).div(exchangeRate());
        uint uAmountToRedeem = qAmountIn > 0 ? qAmountIn.mul(exchangeRate()).div(1e18) : uAmountIn;

        require(
            IQValidator(qore.qValidator()).redeemAllowed(address(this), account, qAmountToRedeem),
            "QToken: cannot redeem"
        );

        totalSupply = totalSupply.sub(qAmountToRedeem);
        accountBalances[account] = accountBalances[account].sub(qAmountToRedeem);
        _doTransferOut(account, uAmountToRedeem);

        emit Transfer(account, address(0), qAmountToRedeem);
        emit Redeem(account, uAmountToRedeem, qAmountToRedeem);
        return uAmountToRedeem;
    }

    function _repay(
        address payer,
        address borrower,
        uint amount
    ) private returns (uint) {
        uint borrowBalance = borrowBalanceOf(borrower);
        uint repayAmount = Math.min(borrowBalance, amount);
        repayAmount = _doTransferIn(payer, repayAmount);
        updateBorrowInfo(borrower, 0, repayAmount);

        if (underlying == address(WBNB)) {
            uint refundAmount = amount > repayAmount ? amount.sub(repayAmount) : 0;
            if (refundAmount > 0) {
                _doTransferOut(payer, refundAmount);
            }
        }

        emit RepayBorrow(payer, borrower, repayAmount, borrowBalanceOf(borrower));
        return repayAmount;
    }
}

File 2 of 17 : 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 17 : IQDistributor.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
* SOFTWARE.
*/

interface IQDistributor {
    struct UserInfo {
        uint accruedQubit;
        uint boostedSupply; // effective(boosted) supply balance of user  (since last_action)
        uint boostedBorrow; // effective(boosted) borrow balance of user  (since last_action)
        uint accPerShareSupply; // Last integral value of Qubit rewards per share. ∫(qubitRate(t) / totalShare(t) dt) from 0 till (last_action)
        uint accPerShareBorrow; // Last integral value of Qubit rewards per share. ∫(qubitRate(t) / totalShare(t) dt) from 0 till (last_action)
    }

    struct DistributionInfo {
        uint supplyRate;
        uint borrowRate;
        uint totalBoostedSupply;
        uint totalBoostedBorrow;
        uint accPerShareSupply;
        uint accPerShareBorrow;
        uint accruedAt;
    }

    function accruedQubit(address market, address user) external view returns (uint);

    function qubitRatesOf(address market) external view returns (uint supplyRate, uint borrowRate);

    function totalBoosted(address market) external view returns (uint boostedSupply, uint boostedBorrow);

    function boostedBalanceOf(address market, address account)
        external
        view
        returns (uint boostedSupply, uint boostedBorrow);

    function notifySupplyUpdated(address market, address user) external;

    function notifyBorrowUpdated(address market, address user) external;

    function notifyTransferred(
        address qToken,
        address sender,
        address receiver
    ) external;

    function claimQubit(address user) external;

    function kick(address user) external;
}

File 4 of 17 : SafeToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

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

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

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

    function safeApprove(
        address token,
        address to,
        uint 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,
        uint 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,
        uint 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, uint value) internal {
        (bool success, ) = to.call{ value: value }(new bytes(0));
        require(success, "!safeTransferETH");
    }
}

File 5 of 17 : QMarket.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
* SOFTWARE.
*/

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol";

import "../interfaces/IQValidator.sol";
import "../interfaces/IRateModel.sol";
import "../interfaces/IQToken.sol";
import "../interfaces/IQore.sol";
import "../library/QConstant.sol";

abstract contract QMarket is IQToken, OwnableUpgradeable, ReentrancyGuardUpgradeable {
    using SafeMath for uint;

    /* ========== CONSTANT VARIABLES ========== */

    uint internal constant RESERVE_FACTOR_MAX = 1e18;
    uint internal constant DUST = 1000;

    address internal constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;
    address internal constant BUSD = 0x78867BbEeF44f2326bF8DDd1941a4439382EF2A7;

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

    IQore public qore;
    IRateModel public rateModel;
    address public override underlying;

    uint public override totalSupply;
    uint public override totalReserve;
    uint private _totalBorrow;

    mapping(address => uint) internal accountBalances;
    mapping(address => QConstant.BorrowInfo) internal accountBorrows;

    uint public override reserveFactor;
    uint private lastAccruedTime;
    uint private accInterestIndex;

    /* ========== Event ========== */

    event RateModelUpdated(address newRateModel);
    event ReserveFactorUpdated(uint newReserveFactor);

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

    receive() external payable {}

    function __QMarket_init() internal initializer {
        __Ownable_init();
        __ReentrancyGuard_init();

        lastAccruedTime = block.timestamp;
        accInterestIndex = 1e18;
    }

    /* ========== MODIFIERS ========== */

    modifier accrue() {
        if (block.timestamp > lastAccruedTime && address(rateModel) != address(0)) {
            uint borrowRate = rateModel.getBorrowRate(getCashPrior(), _totalBorrow, totalReserve);
            uint interestFactor = borrowRate.mul(block.timestamp.sub(lastAccruedTime));
            uint pendingInterest = _totalBorrow.mul(interestFactor).div(1e18);

            _totalBorrow = _totalBorrow.add(pendingInterest);
            totalReserve = totalReserve.add(pendingInterest.mul(reserveFactor).div(1e18));
            accInterestIndex = accInterestIndex.add(interestFactor.mul(accInterestIndex).div(1e18));
            lastAccruedTime = block.timestamp;
        }
        _;
    }

    modifier onlyQore() {
        require(msg.sender == address(qore), "QToken: only Qore Contract");
        _;
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function setQore(address _qore) public onlyOwner {
        require(_qore != address(0), "QMarket: invalid qore address");
        require(address(qore) == address(0), "QMarket: qore already set");
        qore = IQore(_qore);
    }

    function setUnderlying(address _underlying) public onlyOwner {
        require(_underlying != address(0), "QMarket: invalid underlying address");
        require(underlying == address(0), "QMarket: set underlying already");
        underlying = _underlying;
    }

    function setRateModel(address _rateModel) public accrue onlyOwner {
        require(_rateModel != address(0), "QMarket: invalid rate model address");
        rateModel = IRateModel(_rateModel);
        emit RateModelUpdated(_rateModel);
    }

    function setReserveFactor(uint _reserveFactor) public accrue onlyOwner {
        require(_reserveFactor <= RESERVE_FACTOR_MAX, "QMarket: invalid reserve factor");
        reserveFactor = _reserveFactor;
        emit ReserveFactorUpdated(_reserveFactor);
    }

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

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

    function accountSnapshot(address account) external view override returns (QConstant.AccountSnapshot memory) {
        QConstant.AccountSnapshot memory snapshot;
        snapshot.qTokenBalance = accountBalances[account];
        snapshot.borrowBalance = borrowBalanceOf(account);
        snapshot.exchangeRate = exchangeRate();
        return snapshot;
    }

    function underlyingBalanceOf(address account) external view override returns (uint) {
        return accountBalances[account].mul(exchangeRate()).div(1e18);
    }

    function borrowBalanceOf(address account) public view override returns (uint) {
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        QConstant.BorrowInfo storage info = accountBorrows[account];

        if (info.borrow == 0) return 0;
        return info.borrow.mul(snapshot.accInterestIndex).div(info.interestIndex);
    }

    function borrowRatePerSec() external view override returns (uint) {
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        return rateModel.getBorrowRate(getCashPrior(), snapshot.totalBorrow, snapshot.totalReserve);
    }

    function supplyRatePerSec() external view override returns (uint) {
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        return rateModel.getSupplyRate(getCashPrior(), snapshot.totalBorrow, snapshot.totalReserve, reserveFactor);
    }

    function totalBorrow() public view override returns (uint) {
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        return snapshot.totalBorrow;
    }

    function exchangeRate() public view override returns (uint) {
        if (totalSupply == 0) return 1e18;
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        return getCashPrior().add(snapshot.totalBorrow).sub(snapshot.totalReserve).mul(1e18).div(totalSupply);
    }

    function getCash() public view override returns (uint) {
        return getCashPrior();
    }

    function getAccInterestIndex() public view override returns (uint) {
        QConstant.AccrueSnapshot memory snapshot = pendingAccrueSnapshot();
        return snapshot.accInterestIndex;
    }

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

    function accruedAccountSnapshot(address account)
        external
        override
        accrue
        returns (QConstant.AccountSnapshot memory)
    {
        QConstant.AccountSnapshot memory snapshot;
        QConstant.BorrowInfo storage info = accountBorrows[account];
        if (info.interestIndex != 0) {
            info.borrow = info.borrow.mul(accInterestIndex).div(info.interestIndex);
            info.interestIndex = accInterestIndex;
        }

        snapshot.qTokenBalance = accountBalances[account];
        snapshot.borrowBalance = info.borrow;
        snapshot.exchangeRate = exchangeRate();
        return snapshot;
    }

    function accruedUnderlyingBalanceOf(address account) external override accrue returns (uint) {
        return accountBalances[account].mul(exchangeRate()).div(1e18);
    }

    function accruedBorrowBalanceOf(address account) external override accrue returns (uint) {
        QConstant.BorrowInfo storage info = accountBorrows[account];
        if (info.interestIndex != 0) {
            info.borrow = info.borrow.mul(accInterestIndex).div(info.interestIndex);
            info.interestIndex = accInterestIndex;
        }
        return info.borrow;
    }

    function accruedTotalBorrow() external override accrue returns (uint) {
        return _totalBorrow;
    }

    function accruedExchangeRate() external override accrue returns (uint) {
        return exchangeRate();
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function updateBorrowInfo(
        address account,
        uint addAmount,
        uint subAmount
    ) internal {
        QConstant.BorrowInfo storage info = accountBorrows[account];
        if (info.interestIndex == 0) {
            info.interestIndex = accInterestIndex;
        }

        info.borrow = info.borrow.mul(accInterestIndex).div(info.interestIndex).add(addAmount).sub(subAmount);
        info.interestIndex = accInterestIndex;
        _totalBorrow = _totalBorrow.add(addAmount).sub(subAmount);

        info.borrow = (info.borrow < DUST) ? 0 : info.borrow;
        _totalBorrow = (_totalBorrow < DUST) ? 0 : _totalBorrow;
    }

    function updateSupplyInfo(
        address account,
        uint addAmount,
        uint subAmount
    ) internal {
        accountBalances[account] = accountBalances[account].add(addAmount).sub(subAmount);
        totalSupply = totalSupply.add(addAmount).sub(subAmount);

        totalSupply = (totalSupply < DUST) ? 0 : totalSupply;
    }

    function getCashPrior() internal view returns (uint) {
        return
            underlying == address(WBNB)
                ? address(this).balance.sub(msg.value)
                : IBEP20(underlying).balanceOf(address(this));
    }

    function pendingAccrueSnapshot() internal view returns (QConstant.AccrueSnapshot memory) {
        QConstant.AccrueSnapshot memory snapshot;
        snapshot.totalBorrow = _totalBorrow;
        snapshot.totalReserve = totalReserve;
        snapshot.accInterestIndex = accInterestIndex;

        if (block.timestamp > lastAccruedTime && _totalBorrow > 0) {
            uint borrowRate = rateModel.getBorrowRate(getCashPrior(), _totalBorrow, totalReserve);
            uint interestFactor = borrowRate.mul(block.timestamp.sub(lastAccruedTime));
            uint pendingInterest = _totalBorrow.mul(interestFactor).div(1e18);

            snapshot.totalBorrow = _totalBorrow.add(pendingInterest);
            snapshot.totalReserve = totalReserve.add(pendingInterest.mul(reserveFactor).div(1e18));
            snapshot.accInterestIndex = accInterestIndex.add(interestFactor.mul(accInterestIndex).div(1e18));
        }
        return snapshot;
    }
}

File 6 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

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

File 7 of 17 : 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 8 of 17 : 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 9 of 17 : 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 10 of 17 : IQValidator.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
* SOFTWARE.
*/

interface IQValidator {
    function redeemAllowed(
        address qToken,
        address redeemer,
        uint redeemAmount
    ) external returns (bool);

    function borrowAllowed(
        address qToken,
        address borrower,
        uint borrowAmount
    ) external returns (bool);

    function liquidateAllowed(
        address qTokenBorrowed,
        address borrower,
        uint repayAmount,
        uint closeFactor
    ) external returns (bool);

    function qTokenAmountToSeize(
        address qTokenBorrowed,
        address qTokenCollateral,
        uint actualRepayAmount
    ) external returns (uint qTokenAmount);

    function getAccountLiquidity(
        address account,
        address qToken,
        uint redeemAmount,
        uint borrowAmount
    ) external view returns (uint liquidity, uint shortfall);

    function getAccountLiquidityValue(address account) external view returns (uint collateralUSD, uint borrowUSD);
}

File 11 of 17 : IRateModel.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
* SOFTWARE.
*/

interface IRateModel {
    function getBorrowRate(
        uint cash,
        uint borrows,
        uint reserves
    ) external view returns (uint);

    function getSupplyRate(
        uint cash,
        uint borrows,
        uint reserves,
        uint reserveFactor
    ) external view returns (uint);
}

File 12 of 17 : IQToken.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
* SOFTWARE.
*/

import "../library/QConstant.sol";

interface IQToken {
    function underlying() external view returns (address);

    function totalSupply() external view returns (uint);

    function accountSnapshot(address account) external view returns (QConstant.AccountSnapshot memory);

    function underlyingBalanceOf(address account) external view returns (uint);

    function borrowBalanceOf(address account) external view returns (uint);

    function borrowRatePerSec() external view returns (uint);

    function supplyRatePerSec() external view returns (uint);

    function totalBorrow() external view returns (uint);

    function totalReserve() external view returns (uint);

    function reserveFactor() external view returns (uint);

    function exchangeRate() external view returns (uint);

    function getCash() external view returns (uint);

    function getAccInterestIndex() external view returns (uint);

    function accruedAccountSnapshot(address account) external returns (QConstant.AccountSnapshot memory);

    function accruedUnderlyingBalanceOf(address account) external returns (uint);

    function accruedBorrowBalanceOf(address account) external returns (uint);

    function accruedTotalBorrow() external returns (uint);

    function accruedExchangeRate() external returns (uint);

    function approve(address spender, uint amount) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint);

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

    function transfer(address dst, uint amount) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint amount
    ) external returns (bool);

    function supply(address account, uint underlyingAmount) external payable returns (uint);

    function redeemToken(address account, uint qTokenAmount) external returns (uint);

    function redeemUnderlying(address account, uint underlyingAmount) external returns (uint);

    function borrow(address account, uint amount) external returns (uint);

    function repayBorrow(address account, uint amount) external payable returns (uint);

    function repayBorrowBehalf(
        address payer,
        address borrower,
        uint amount
    ) external payable returns (uint);

    function liquidateBorrow(
        address qTokenCollateral,
        address liquidator,
        address borrower,
        uint amount
    ) external payable returns (uint qAmountToSeize);

    function seize(
        address liquidator,
        address borrower,
        uint qTokenAmount
    ) external;
}

File 13 of 17 : IQore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "../library/QConstant.sol";

interface IQore {
    function qValidator() external view returns (address);

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

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

    function marketListOf(address account) external view returns (address[] memory);

    function marketInfoOf(address qToken) external view returns (QConstant.MarketInfo memory);

    function liquidationIncentive() external view returns (uint);

    function checkMembership(address account, address qToken) external view returns (bool);

    function enterMarkets(address[] memory qTokens) external;

    function exitMarket(address qToken) external;

    function supply(address qToken, uint underlyingAmount) external payable returns (uint);

    function redeemToken(address qToken, uint qTokenAmount) external returns (uint);

    function redeemUnderlying(address qToken, uint underlyingAmount) external returns (uint);

    function borrow(address qToken, uint amount) external;

    function repayBorrow(address qToken, uint amount) external payable;

    function repayBorrowBehalf(
        address qToken,
        address borrower,
        uint amount
    ) external payable;

    function liquidateBorrow(
        address qTokenBorrowed,
        address qTokenCollateral,
        address borrower,
        uint amount
    ) external payable;
}

File 14 of 17 : QConstant.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
* SOFTWARE.
*/

library QConstant {
    uint public constant CLOSE_FACTOR_MIN = 5e16;
    uint public constant CLOSE_FACTOR_MAX = 9e17;
    uint public constant COLLATERAL_FACTOR_MAX = 9e17;

    struct MarketInfo {
        bool isListed;
        uint borrowCap;
        uint collateralFactor;
    }

    struct BorrowInfo {
        uint borrow;
        uint interestIndex;
    }

    struct AccountSnapshot {
        uint qTokenBalance;
        uint borrowBalance;
        uint exchangeRate;
    }

    struct AccrueSnapshot {
        uint totalBorrow;
        uint totalReserve;
        uint accInterestIndex;
    }
}

File 15 of 17 : 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;
}

File 16 of 17 : 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 17 of 17 : 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);
            }
        }
    }
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"ammount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrow","type":"uint256"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"liquidator","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"qTokenCollateral","type":"address"},{"indexed":false,"internalType":"uint256","name":"seizeAmount","type":"uint256"}],"name":"LiquidateBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"Mint","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":false,"internalType":"address","name":"newRateModel","type":"address"}],"name":"RateModelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"underlyingAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"qTokenAmount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrow","type":"uint256"}],"name":"RepayBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newReserveFactor","type":"uint256"}],"name":"ReserveFactorUpdated","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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accountSnapshot","outputs":[{"components":[{"internalType":"uint256","name":"qTokenBalance","type":"uint256"},{"internalType":"uint256","name":"borrowBalance","type":"uint256"},{"internalType":"uint256","name":"exchangeRate","type":"uint256"}],"internalType":"struct QConstant.AccountSnapshot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accruedAccountSnapshot","outputs":[{"components":[{"internalType":"uint256","name":"qTokenBalance","type":"uint256"},{"internalType":"uint256","name":"borrowBalance","type":"uint256"},{"internalType":"uint256","name":"exchangeRate","type":"uint256"}],"internalType":"struct QConstant.AccountSnapshot","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accruedBorrowBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accruedExchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accruedTotalBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accruedUnderlyingBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","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":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowRatePerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccInterestIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"qTokenCollateral","type":"address"},{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"qAmountToSeize","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"qDistributor","outputs":[{"internalType":"contract IQDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"qore","outputs":[{"internalType":"contract IQore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rateModel","outputs":[{"internalType":"contract IRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"uint256","name":"qAmount","type":"uint256"}],"name":"redeemToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"uint256","name":"uAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"payer","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"reserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"qAmount","type":"uint256"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_qore","type":"address"}],"name":"setQore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rateModel","type":"address"}],"name":"setRateModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reserveFactor","type":"uint256"}],"name":"setReserveFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_underlying","type":"address"}],"name":"setUnderlying","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"uAmount","type":"uint256"}],"name":"supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"supplyRatePerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"underlyingBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50614f4a806100206000396000f3fe6080604052600436106102815760003560e01c80638285ef401161014f578063a1088459116100c1578063d88c3f221161007a578063d88c3f22146106fb578063dd62ed3e14610710578063e61604cf14610730578063ecdaff7e14610743578063f2b9fdb814610758578063f2fde38b1461076b57610288565b8063a10884591461065e578063a9059cbb14610673578063a95d02d314610693578063abdb5ea8146106a8578063b2a02ff1146106bb578063bdb2321f146106db57610288565b80638b9db037116101135780638b9db037146105bf5780638da5cb5b146105d457806392fa4e8e146105e9578063935a8b841461060957806395d89b4114610629578063962941781461063e57610288565b80638285ef4014610535578063830cbbbd1461054a5780638399c0ba1461056a57806388d9394e1461058a578063893d20e8146105aa57610288565b80634322b714116101f35780636aaa8033116101ac5780636aaa8033146104895780636f307dc3146104a957806370a08231146104cb578063715018a6146104eb5780637bc2c30e146105005780637f9028c81461051557610288565b80634322b714146104025780634b8a3529146104175780634c68df671461043757806356150b411461044c578063587a5e501461046157806359086a5e1461047657610288565b80631c446983116102455780631c4469831461035657806323b872dd14610376578063313ce56714610396578063374c49b4146103b85780633b1d21a2146103d85780633ba0b9a9146103ed57610288565b8063014a296f1461028d57806306fdde03146102c3578063095ea7b3146102e55780631624f6c61461031257806318160ddd1461033457610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a8366004614472565b61078b565b6040516102ba9190614e21565b60405180910390f35b3480156102cf57600080fd5b506102d86107d9565b6040516102ba919061477f565b3480156102f157600080fd5b50610305610300366004614572565b610867565b6040516102ba9190614774565b34801561031e57600080fd5b5061033261032d3660046145bd565b6108d2565b005b34801561034057600080fd5b506103496109a0565b6040516102ba9190614e42565b34801561036257600080fd5b50610332610371366004614637565b6109a6565b34801561038257600080fd5b50610305610391366004614532565b610bbe565b3480156103a257600080fd5b506103ab610d54565b6040516102ba9190614e7c565b3480156103c457600080fd5b506103496103d3366004614472565b610d5d565b3480156103e457600080fd5b50610349610dbf565b3480156103f957600080fd5b50610349610dcf565b34801561040e57600080fd5b50610349610e3f565b34801561042357600080fd5b50610349610432366004614572565b610e45565b34801561044357600080fd5b50610349611049565b34801561045857600080fd5b5061034961104f565b34801561046d57600080fd5b506103496110f7565b610349610484366004614532565b611153565b34801561049557600080fd5b506103496104a4366004614472565b61130c565b3480156104b557600080fd5b506104be611496565b6040516102ba9190614683565b3480156104d757600080fd5b506103496104e6366004614472565b6114a5565b3480156104f757600080fd5b506103326114c0565b34801561050c57600080fd5b506104be611549565b34801561052157600080fd5b50610332610530366004614472565b611561565b34801561054157600080fd5b50610349611763565b34801561055657600080fd5b50610349610565366004614572565b61177c565b34801561057657600080fd5b50610349610585366004614472565b61190d565b34801561059657600080fd5b506103326105a5366004614472565b611aae565b3480156105b657600080fd5b506104be611b5e565b3480156105cb57600080fd5b50610349611b68565b3480156105e057600080fd5b506104be611cc4565b3480156105f557600080fd5b506102ad610604366004614472565b611cd3565b34801561061557600080fd5b50610349610624366004614472565b611eb3565b34801561063557600080fd5b506102d8611ecc565b34801561064a57600080fd5b50610349610659366004614572565b611f27565b34801561066a57600080fd5b506104be6120b1565b34801561067f57600080fd5b5061030561068e366004614572565b6120c0565b34801561069f57600080fd5b506104be612255565b6103496106b6366004614572565b612264565b3480156106c757600080fd5b506103326106d6366004614532565b61242c565b3480156106e757600080fd5b506103326106f6366004614472565b6126c1565b34801561070757600080fd5b50610349612771565b34801561071c57600080fd5b5061034961072b3660046144aa565b61278d565b61034961073e3660046144e2565b6127b8565b34801561074f57600080fd5b50610349612bbd565b610349610766366004614572565b612d18565b34801561077757600080fd5b50610332610786366004614472565b612fc5565b610793614340565b61079b614340565b6001600160a01b0383166000908152609d602052604090205481526107bf83610d5d565b60208201526107cc610dcf565b604082015290505b919050565b60a2805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561085f5780601f106108345761010080835404028352916020019161085f565b820191906000526020600020905b81548152906001019060200180831161084257829003601f168201915b505050505081565b33600081815260a5602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906108c0908690614e42565b60405180910390a35060015b92915050565b600054610100900460ff16806108eb57506108eb613086565b806108f9575060005460ff16155b61091e5760405162461bcd60e51b815260040161091590614abd565b60405180910390fd5b600054610100900460ff16158015610949576000805460ff1961ff0019909116610100171660011790555b610951613097565b83516109649060a2906020870190614361565b5082516109789060a3906020860190614361565b5060a4805460ff191660ff8416179055801561099a576000805461ff00191690555b50505050565b609a5481565b60a054421180156109c157506098546001600160a01b031615155b15610b17576098546000906001600160a01b03166315f240536109e261313a565b609c54609b546040518463ffffffff1660e01b8152600401610a0693929190614e4b565b60206040518083038186803b158015610a1e57600080fd5b505afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a56919061464f565b90506000610a79610a7260a054426131ee90919063ffffffff16565b8390613216565b90506000610aa4670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b90613250565b609c54909150610ab49082613282565b609c55609f54610ae090610ad790670de0b6b3a764000090610a9e908590613216565b609b5490613282565b609b5560a154610b0c90610b0390670de0b6b3a764000090610a9e908690613216565b60a15490613282565b60a15550504260a055505b610b1f6132a7565b6001600160a01b0316610b30611cc4565b6001600160a01b031614610b565760405162461bcd60e51b815260040161091590614baa565b670de0b6b3a7640000811115610b7e5760405162461bcd60e51b815260040161091590614a4f565b609f8190556040517f1804cd3c6ff50c5878703b3136dbf22bce42299e390b6627af008fde9bc763ae90610bb3908390614e42565b60405180910390a150565b600060a05442118015610bdb57506098546001600160a01b031615155b15610d12576098546000906001600160a01b03166315f24053610bfc61313a565b609c54609b546040518463ffffffff1660e01b8152600401610c2093929190614e4b565b60206040518083038186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c70919061464f565b90506000610c8c610a7260a054426131ee90919063ffffffff16565b90506000610cb1670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150610cc19082613282565b609c55609f54610ce490610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154610d0790610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b60026065541415610d355760405162461bcd60e51b815260040161091590614d41565b6002606555610d46338585856132ab565b506001806065559392505050565b60a45460ff1681565b6000610d67614340565b610d6f6135ca565b6001600160a01b0384166000908152609e60205260409020805491925090610d9c576000925050506107d4565b600181015460408301518254610db79291610a9e9190613216565b949350505050565b6000610dc961313a565b90505b90565b6000609a5460001415610deb5750670de0b6b3a7640000610dcc565b610df3614340565b610dfb6135ca565b9050610e39609a54610a9e670de0b6b3a7640000610e338560200151610e2d8760000151610e2761313a565b90613282565b906131ee565b90613216565b91505090565b609f5481565b600060a05442118015610e6257506098546001600160a01b031615155b15610f99576098546000906001600160a01b03166315f24053610e8361313a565b609c54609b546040518463ffffffff1660e01b8152600401610ea793929190614e4b565b60206040518083038186803b158015610ebf57600080fd5b505afa158015610ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef7919061464f565b90506000610f13610a7260a054426131ee90919063ffffffff16565b90506000610f38670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150610f489082613282565b609c55609f54610f6b90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154610f8e90610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b03163314610fc35760405162461bcd60e51b815260040161091590614d78565b81610fcc610dbf565b1015610fea5760405162461bcd60e51b815260040161091590614ddf565b610ff68383600061373c565b61100083836137e4565b7fe1979fe4c35e0cef342fef5668e2c8e7a7e9f5d5d1ca8fee0ac6c427fa4153af838361102c86610d5d565b60405161103b93929190614753565b60405180910390a150919050565b609b5481565b6000611059614340565b6110616135ca565b6098549091506001600160a01b03166315f2405361107d61313a565b835160208501516040516001600160e01b031960e086901b1681526110a793929190600401614e4b565b60206040518083038186803b1580156110bf57600080fd5b505afa1580156110d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e39919061464f565b6000611101614340565b6111096135ca565b6098549091506001600160a01b031663b816881661112561313a565b83516020850151609f546040516001600160e01b031960e087901b1681526110a79493929190600401614e61565b600060a0544211801561117057506098546001600160a01b031615155b156112a7576098546000906001600160a01b03166315f2405361119161313a565b609c54609b546040518463ffffffff1660e01b81526004016111b593929190614e4b565b60206040518083038186803b1580156111cd57600080fd5b505afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611205919061464f565b90506000611221610a7260a054426131ee90919063ffffffff16565b90506000611246670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506112569082613282565b609c55609f5461127990610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461129c90610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146112d15760405162461bcd60e51b815260040161091590614d78565b609954610db790859085906001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd146113055784611307565b345b613835565b600060a0544211801561132957506098546001600160a01b031615155b15611460576098546000906001600160a01b03166315f2405361134a61313a565b609c54609b546040518463ffffffff1660e01b815260040161136e93929190614e4b565b60206040518083038186803b15801561138657600080fd5b505afa15801561139a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113be919061464f565b905060006113da610a7260a054426131ee90919063ffffffff16565b905060006113ff670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c5490915061140f9082613282565b609c55609f5461143290610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461145590610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6108cc670de0b6b3a7640000610a9e611477610dcf565b6001600160a01b0386166000908152609d602052604090205490613216565b6099546001600160a01b031681565b6001600160a01b03166000908152609d602052604090205490565b6114c86132a7565b6001600160a01b03166114d9611cc4565b6001600160a01b0316146114ff5760405162461bcd60e51b815260040161091590614baa565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b73a2897bede359e56f67d06f42c39869719e59becc81565b60a0544211801561157c57506098546001600160a01b031615155b156116b3576098546000906001600160a01b03166315f2405361159d61313a565b609c54609b546040518463ffffffff1660e01b81526004016115c193929190614e4b565b60206040518083038186803b1580156115d957600080fd5b505afa1580156115ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611611919061464f565b9050600061162d610a7260a054426131ee90919063ffffffff16565b90506000611652670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506116629082613282565b609c55609f5461168590610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a1546116a890610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6116bb6132a7565b6001600160a01b03166116cc611cc4565b6001600160a01b0316146116f25760405162461bcd60e51b815260040161091590614baa565b6001600160a01b0381166117185760405162461bcd60e51b815260040161091590614c4a565b609880546001600160a01b0319166001600160a01b0383161790556040517fcff37177e81915a3c86c00751eab54b05f50ff5f7dfa3cf52581d1387e0fe38390610bb3908390614683565b600061176d614340565b6117756135ca565b5191505090565b600060a0544211801561179957506098546001600160a01b031615155b156118d0576098546000906001600160a01b03166315f240536117ba61313a565b609c54609b546040518463ffffffff1660e01b81526004016117de93929190614e4b565b60206040518083038186803b1580156117f657600080fd5b505afa15801561180a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182e919061464f565b9050600061184a610a7260a054426131ee90919063ffffffff16565b9050600061186f670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c5490915061187f9082613282565b609c55609f546118a290610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a1546118c590610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146118fa5760405162461bcd60e51b815260040161091590614d78565b6119068383600061390c565b9392505050565b600060a0544211801561192a57506098546001600160a01b031615155b15611a61576098546000906001600160a01b03166315f2405361194b61313a565b609c54609b546040518463ffffffff1660e01b815260040161196f93929190614e4b565b60206040518083038186803b15801561198757600080fd5b505afa15801561199b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bf919061464f565b905060006119db610a7260a054426131ee90919063ffffffff16565b90506000611a00670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150611a109082613282565b609c55609f54611a3390610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154611a5690610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6001600160a01b0382166000908152609e60205260409020600181015415611aa757600181015460a1548254611a9c9291610a9e9190613216565b815560a15460018201555b5492915050565b611ab66132a7565b6001600160a01b0316611ac7611cc4565b6001600160a01b031614611aed5760405162461bcd60e51b815260040161091590614baa565b6001600160a01b038116611b135760405162461bcd60e51b8152600401610915906149aa565b6097546001600160a01b031615611b3c5760405162461bcd60e51b815260040161091590614d0a565b609780546001600160a01b0319166001600160a01b0392909216919091179055565b6000610dc9611cc4565b600060a05442118015611b8557506098546001600160a01b031615155b15611cbc576098546000906001600160a01b03166315f24053611ba661313a565b609c54609b546040518463ffffffff1660e01b8152600401611bca93929190614e4b565b60206040518083038186803b158015611be257600080fd5b505afa158015611bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1a919061464f565b90506000611c36610a7260a054426131ee90919063ffffffff16565b90506000611c5b670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150611c6b9082613282565b609c55609f54611c8e90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154611cb190610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b610dc9610dcf565b6033546001600160a01b031690565b611cdb614340565b60a05442118015611cf657506098546001600160a01b031615155b15611e2d576098546000906001600160a01b03166315f24053611d1761313a565b609c54609b546040518463ffffffff1660e01b8152600401611d3b93929190614e4b565b60206040518083038186803b158015611d5357600080fd5b505afa158015611d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8b919061464f565b90506000611da7610a7260a054426131ee90919063ffffffff16565b90506000611dcc670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150611ddc9082613282565b609c55609f54611dff90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154611e2290610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b611e35614340565b6001600160a01b0383166000908152609e60205260409020600181015415611e7b57600181015460a1548254611e709291610a9e9190613216565b815560a15460018201555b6001600160a01b0384166000908152609d60209081526040909120548352815490830152611ea7610dcf565b60408301525092915050565b60006108cc670de0b6b3a7640000610a9e611477610dcf565b60a3805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561085f5780601f106108345761010080835404028352916020019161085f565b600060a05442118015611f4457506098546001600160a01b031615155b1561207b576098546000906001600160a01b03166315f24053611f6561313a565b609c54609b546040518463ffffffff1660e01b8152600401611f8993929190614e4b565b60206040518083038186803b158015611fa157600080fd5b505afa158015611fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd9919061464f565b90506000611ff5610a7260a054426131ee90919063ffffffff16565b9050600061201a670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c5490915061202a9082613282565b609c55609f5461204d90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461207090610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146120a55760405162461bcd60e51b815260040161091590614d78565b6119068360008461390c565b6098546001600160a01b031681565b600060a054421180156120dd57506098546001600160a01b031615155b15612214576098546000906001600160a01b03166315f240536120fe61313a565b609c54609b546040518463ffffffff1660e01b815260040161212293929190614e4b565b60206040518083038186803b15801561213a57600080fd5b505afa15801561214e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612172919061464f565b9050600061218e610a7260a054426131ee90919063ffffffff16565b905060006121b3670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506121c39082613282565b609c55609f546121e690610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461220990610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b600260655414156122375760405162461bcd60e51b815260040161091590614d41565b6002606555612248338085856132ab565b5060018060655592915050565b6097546001600160a01b031681565b600060a0544211801561228157506098546001600160a01b031615155b156123b8576098546000906001600160a01b03166315f240536122a261313a565b609c54609b546040518463ffffffff1660e01b81526004016122c693929190614e4b565b60206040518083038186803b1580156122de57600080fd5b505afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612316919061464f565b90506000612332610a7260a054426131ee90919063ffffffff16565b90506000612357670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506123679082613282565b609c55609f5461238a90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a1546123ad90610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146123e25760405162461bcd60e51b815260040161091590614d78565b6000198214156123f8576123f583610d5d565b91505b60995461190690849081906001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd146113055784611307565b60a0544211801561244757506098546001600160a01b031615155b1561257e576098546000906001600160a01b03166315f2405361246861313a565b609c54609b546040518463ffffffff1660e01b815260040161248c93929190614e4b565b60206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124dc919061464f565b905060006124f8610a7260a054426131ee90919063ffffffff16565b9050600061251d670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c5490915061252d9082613282565b609c55609f5461255090610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461257390610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146125a85760405162461bcd60e51b815260040161091590614d78565b6001600160a01b0382166000908152609d60205260409020546125cb90826131ee565b6001600160a01b038084166000908152609d602052604080822093909355908516815220546125fa9082613282565b6001600160a01b0384166000908152609d602052604090819020919091555163dd9aba1b60e01b815273a2897bede359e56f67d06f42c39869719e59becc9063dd9aba1b9061265190309086908890600401614697565b600060405180830381600087803b15801561266b57600080fd5b505af115801561267f573d6000803e3d6000fd5b50505050826001600160a01b0316826001600160a01b0316600080516020614ecc833981519152836040516126b49190614e42565b60405180910390a3505050565b6126c96132a7565b6001600160a01b03166126da611cc4565b6001600160a01b0316146127005760405162461bcd60e51b815260040161091590614baa565b6001600160a01b0381166127265760405162461bcd60e51b815260040161091590614825565b6099546001600160a01b03161561274f5760405162461bcd60e51b815260040161091590614a18565b609980546001600160a01b0319166001600160a01b0392909216919091179055565b600061277b614340565b6127836135ca565b6040015191505090565b6001600160a01b03918216600090815260a56020908152604080832093909416825291909152205490565b600060a054421180156127d557506098546001600160a01b031615155b1561290c576098546000906001600160a01b03166315f240536127f661313a565b609c54609b546040518463ffffffff1660e01b815260040161281a93929190614e4b565b60206040518083038186803b15801561283257600080fd5b505afa158015612846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286a919061464f565b90506000612886610a7260a054426131ee90919063ffffffff16565b905060006128ab670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506128bb9082613282565b609c55609f546128de90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a15461290190610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b031633146129365760405162461bcd60e51b815260040161091590614d78565b836001600160a01b0316836001600160a01b031614156129685760405162461bcd60e51b815260040161091590614bdf565b6099546001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd146129945781612996565b345b91506129a3848484613835565b91506000821180156129b6575060001982105b6129d25760405162461bcd60e51b81526004016109159061493c565b609760009054906101000a90046001600160a01b03166001600160a01b031663940ced9e6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a2057600080fd5b505afa158015612a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a58919061448e565b6001600160a01b031663092ac6903087856040518463ffffffff1660e01b8152600401612a87939291906146ba565b602060405180830381600087803b158015612aa157600080fd5b505af1158015612ab5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad9919061464f565b905080856001600160a01b03166370a08231856040518263ffffffff1660e01b8152600401612b089190614683565b60206040518083038186803b158015612b2057600080fd5b505afa158015612b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b58919061464f565b1015612b765760405162461bcd60e51b815260040161091590614b0b565b7f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb528484848885604051612bad9594939291906146de565b60405180910390a1949350505050565b600060a05442118015612bda57506098546001600160a01b031615155b15612d11576098546000906001600160a01b03166315f24053612bfb61313a565b609c54609b546040518463ffffffff1660e01b8152600401612c1f93929190614e4b565b60206040518083038186803b158015612c3757600080fd5b505afa158015612c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6f919061464f565b90506000612c8b610a7260a054426131ee90919063ffffffff16565b90506000612cb0670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150612cc09082613282565b609c55609f54612ce390610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154612d0690610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b50609c5490565b600060a05442118015612d3557506098546001600160a01b031615155b15612e6c576098546000906001600160a01b03166315f24053612d5661313a565b609c54609b546040518463ffffffff1660e01b8152600401612d7a93929190614e4b565b60206040518083038186803b158015612d9257600080fd5b505afa158015612da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dca919061464f565b90506000612de6610a7260a054426131ee90919063ffffffff16565b90506000612e0b670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c54909150612e1b9082613282565b609c55609f54612e3e90610ad790670de0b6b3a764000090610a9e908590613216565b609b5560a154612e6190610b0390670de0b6b3a764000090610a9e908690613216565b60a15550504260a055505b6097546001600160a01b03163314612e965760405162461bcd60e51b815260040161091590614d78565b6000612ea0610dcf565b6099549091506001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd14612ecf5782612ed1565b345b9250612edd8484613c18565b92506000612ef782610a9e86670de0b6b3a7640000613216565b609a54909150612f079082613282565b609a556001600160a01b0385166000908152609d6020526040902054612f2d9082613282565b6001600160a01b0386166000908152609d60205260409081902091909155517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590612f7b908790849061473a565b60405180910390a1846001600160a01b031660006001600160a01b0316600080516020614ecc83398151915283604051612fb59190614e42565b60405180910390a3949350505050565b612fcd6132a7565b6001600160a01b0316612fde611cc4565b6001600160a01b0316146130045760405162461bcd60e51b815260040161091590614baa565b6001600160a01b03811661302a5760405162461bcd60e51b8152600401610915906147df565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600061309130613d9d565b15905090565b600054610100900460ff16806130b057506130b0613086565b806130be575060005460ff16155b6130da5760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff16158015613105576000805460ff1961ff0019909116610100171660011790555b61310d613da3565b613115613e35565b4260a055670de0b6b3a764000060a1558015613137576000805461ff00191690555b50565b6099546000906001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd146131e8576099546040516370a0823160e01b81526001600160a01b03909116906370a0823190613193903090600401614683565b60206040518083038186803b1580156131ab57600080fd5b505afa1580156131bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e3919061464f565b610dc9565b610dc947345b6000828211156132105760405162461bcd60e51b815260040161091590614973565b50900390565b600082613225575060006108cc565b8282028284828161323257fe5b04146119065760405162461bcd60e51b815260040161091590614b42565b60008082116132715760405162461bcd60e51b8152600401610915906149e1565b81838161327a57fe5b049392505050565b6000828201838110156119065760405162461bcd60e51b815260040161091590614868565b3390565b816001600160a01b0316836001600160a01b0316141580156133cf5750609760009054906101000a90046001600160a01b03166001600160a01b031663940ced9e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561331657600080fd5b505afa15801561332a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061334e919061448e565b6001600160a01b031663eabe7d913085846040518463ffffffff1660e01b815260040161337d939291906146ba565b602060405180830381600087803b15801561339757600080fd5b505af11580156133ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133cf919061459d565b6133eb5760405162461bcd60e51b815260040161091590614a86565b806134085760405162461bcd60e51b8152600401610915906147b2565b6000836001600160a01b0316856001600160a01b03161461344e576001600160a01b03808516600090815260a56020908152604080832093891683529290522054613452565b6000195b9050600061347b83604051806060016040528060298152602001614eec60299139849190613eab565b6001600160a01b0386166000908152609d60205260409020549091506134a190846131ee565b6001600160a01b038087166000908152609d602052604080822093909355908616815220546134d09084613282565b6001600160a01b0385166000908152609d602052604090819020919091555163dd9aba1b60e01b815273a2897bede359e56f67d06f42c39869719e59becc9063dd9aba1b9061352790309089908990600401614697565b600060405180830381600087803b15801561354157600080fd5b505af1158015613555573d6000803e3d6000fd5b505050506000198214613589576001600160a01b038516600090815260a56020908152604080832033845290915290208190555b836001600160a01b0316856001600160a01b0316600080516020614ecc833981519152856040516135ba9190614e42565b60405180910390a3505050505050565b6135d2614340565b6135da614340565b609c548152609b54602082015260a154604082015260a0544211801561360257506000609c54115b15610dc9576098546000906001600160a01b03166315f2405361362361313a565b609c54609b546040518463ffffffff1660e01b815260040161364793929190614e4b565b60206040518083038186803b15801561365f57600080fd5b505afa158015613673573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613697919061464f565b905060006136b3610a7260a054426131ee90919063ffffffff16565b905060006136d8670de0b6b3a7640000610a9e84609c5461321690919063ffffffff16565b609c549091506136e89082613282565b8452609f5461370a90610ad790670de0b6b3a764000090610a9e908590613216565b602085015260a15461372f90610b0390670de0b6b3a764000090610a9e908690613216565b6040850152505050905090565b6001600160a01b0383166000908152609e6020526040902060018101546137665760a15460018201555b61378f82610e2d85610e278560010154610a9e60a154886000015461321690919063ffffffff16565b815560a1546001820155609c546137ac908390610e2d9086613282565b609c5580546103e8116137c05780546137c3565b60005b8155609c546103e8116137d857609c546137db565b60005b609c5550505050565b6099546001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd141561381a576138158282613ed7565b613831565b609954613831906001600160a01b03168383613f69565b5050565b60008061384184610d5d565b9050600061384f8285614057565b905061385b8682613c18565b90506138698560008361373c565b6099546001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd14156138be5760008185116138a05760006138aa565b6138aa85836131ee565b905080156138bc576138bc87826137e4565b505b7fa9a154237a69922f8860321d1fec1624a5dbe8a8af89a3dd3d7a759f6c8080d88686836138eb89610d5d565b6040516138fb9493929190614711565b60405180910390a195945050505050565b6000821580613919575081155b6139355760405162461bcd60e51b815260040161091590614c8d565b82609a5410156139575760405162461bcd60e51b8152600401610915906148ce565b81613960610dbf565b10158061396b575081155b6139875760405162461bcd60e51b815260040161091590614905565b6139a5670de0b6b3a7640000610a9e61399e610dcf565b8690613216565b6139ad610dbf565b1015806139b8575082155b6139d45760405162461bcd60e51b815260040161091590614905565b60008084116139ff576139fa6139e8610dcf565b610a9e85670de0b6b3a7640000613216565b613a01565b835b90506000808511613a125783613a30565b613a30670de0b6b3a7640000610a9e613a29610dcf565b8890613216565b9050609760009054906101000a90046001600160a01b03166001600160a01b031663940ced9e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a8057600080fd5b505afa158015613a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ab8919061448e565b6001600160a01b031663eabe7d913088856040518463ffffffff1660e01b8152600401613ae7939291906146ba565b602060405180830381600087803b158015613b0157600080fd5b505af1158015613b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b39919061459d565b613b555760405162461bcd60e51b81526004016109159061489f565b609a54613b6290836131ee565b609a556001600160a01b0386166000908152609d6020526040902054613b8890836131ee565b6001600160a01b0387166000908152609d6020526040902055613bab86826137e4565b60006001600160a01b0316866001600160a01b0316600080516020614ecc83398151915284604051613bdd9190614e42565b60405180910390a37fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9298682846040516138fb93929190614753565b6099546000906001600160a01b031673ae13d989dac2f0debff460ac112a837c89baa7cd1415613c735781341015613c625760405162461bcd60e51b815260040161091590614daf565b613c6c3483614057565b90506108cc565b6099546040516370a0823160e01b81526000916001600160a01b0316906370a0823190613ca4903090600401614683565b60206040518083038186803b158015613cbc57600080fd5b505afa158015613cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cf4919061464f565b609954909150613d0f906001600160a01b031685308661406d565b6099546040516370a0823160e01b8152613d959183916001600160a01b03909116906370a0823190613d45903090600401614683565b60206040518083038186803b158015613d5d57600080fd5b505afa158015613d71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2d919061464f565b9150506108cc565b3b151590565b600054610100900460ff1680613dbc5750613dbc613086565b80613dca575060005460ff16155b613de65760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff16158015613e11576000805460ff1961ff0019909116610100171660011790555b613e1961415e565b613e216141df565b8015613137576000805461ff001916905550565b600054610100900460ff1680613e4e5750613e4e613086565b80613e5c575060005460ff16155b613e785760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff16158015613ea3576000805460ff1961ff0019909116610100171660011790555b613e216142b9565b60008184841115613ecf5760405162461bcd60e51b8152600401610915919061477f565b505050900390565b604080516000808252602082019092526001600160a01b038416908390604051613f019190614667565b60006040518083038185875af1925050503d8060008114613f3e576040519150601f19603f3d011682016040523d82523d6000602084013e613f43565b606091505b5050905080613f645760405162461bcd60e51b815260040161091590614c20565b505050565b60006060846001600160a01b031663a9059cbb8585604051602401613f8f92919061473a565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051613fc89190614667565b6000604051808303816000865af19150503d8060008114614005576040519150601f19603f3d011682016040523d82523d6000602084013e61400a565b606091505b5091509150818015614034575080511580614034575080806020019051810190614034919061459d565b6140505760405162461bcd60e51b815260040161091590614b83565b5050505050565b60008183106140665781611906565b5090919050565b60006060856001600160a01b03166323b872dd868686604051602401614095939291906146ba565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516140ce9190614667565b6000604051808303816000865af19150503d806000811461410b576040519150601f19603f3d011682016040523d82523d6000602084013e614110565b606091505b509150915081801561413a57508051158061413a57508080602001905181019061413a919061459d565b6141565760405162461bcd60e51b815260040161091590614cdf565b505050505050565b600054610100900460ff16806141775750614177613086565b80614185575060005460ff16155b6141a15760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff16158015613e21576000805460ff1961ff0019909116610100171660011790558015613137576000805461ff001916905550565b600054610100900460ff16806141f857506141f8613086565b80614206575060005460ff16155b6142225760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff1615801561424d576000805460ff1961ff0019909116610100171660011790555b60006142576132a7565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015613137576000805461ff001916905550565b600054610100900460ff16806142d257506142d2613086565b806142e0575060005460ff16155b6142fc5760405162461bcd60e51b815260040161091590614abd565b600054610100900460ff16158015614327576000805460ff1961ff0019909116610100171660011790555b60016065558015613137576000805461ff001916905550565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106143a257805160ff19168380011785556143cf565b828001600101855582156143cf579182015b828111156143cf5782518255916020019190600101906143b4565b506143db9291506143df565b5090565b5b808211156143db57600081556001016143e0565b600082601f830112614404578081fd5b813567ffffffffffffffff8082111561441b578283fd5b604051601f8301601f19168101602001828111828210171561443b578485fd5b60405282815292508284830160200186101561445657600080fd5b8260208601602083013760006020848301015250505092915050565b600060208284031215614483578081fd5b813561190681614eb6565b60006020828403121561449f578081fd5b815161190681614eb6565b600080604083850312156144bc578081fd5b82356144c781614eb6565b915060208301356144d781614eb6565b809150509250929050565b600080600080608085870312156144f7578182fd5b843561450281614eb6565b9350602085013561451281614eb6565b9250604085013561452281614eb6565b9396929550929360600135925050565b600080600060608486031215614546578283fd5b833561455181614eb6565b9250602084013561456181614eb6565b929592945050506040919091013590565b60008060408385031215614584578182fd5b823561458f81614eb6565b946020939093013593505050565b6000602082840312156145ae578081fd5b81518015158114611906578182fd5b6000806000606084860312156145d1578283fd5b833567ffffffffffffffff808211156145e8578485fd5b6145f4878388016143f4565b94506020860135915080821115614609578384fd5b50614616868287016143f4565b925050604084013560ff8116811461462c578182fd5b809150509250925092565b600060208284031215614648578081fd5b5035919050565b600060208284031215614660578081fd5b5051919050565b60008251614679818460208701614e8a565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039586168152938516602085015260408401929092529092166060820152608081019190915260a00190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b600060208252825180602084015261479e816040850160208701614e8a565b601f01601f19169190910160400192915050565b60208082526013908201527214551bdad95b8e881e995c9bc8185b5bdd5b9d606a1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526023908201527f514d61726b65743a20696e76616c696420756e6465726c79696e67206164647260408201526265737360e81b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526015908201527451546f6b656e3a2063616e6e6f742072656465656d60581b604082015260600190565b6020808252601f908201527f51546f6b656e3a206e6f7420656e6f75676820746f74616c20737570706c7900604082015260600190565b6020808252601d908201527f51546f6b656e3a206e6f7420656e6f75676820756e6465726c79696e67000000604082015260600190565b6020808252601c908201527f51546f6b656e3a20696e76616c696420726570617920616d6f756e7400000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601d908201527f514d61726b65743a20696e76616c696420716f72652061646472657373000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601f908201527f514d61726b65743a2073657420756e6465726c79696e6720616c726561647900604082015260600190565b6020808252601f908201527f514d61726b65743a20696e76616c6964207265736572766520666163746f7200604082015260600190565b60208082526017908201527f51546f6b656e3a2063616e6e6f74207472616e73666572000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601d908201527f51546f6b656e3a20746f6f206d756368207365697a6520616d6f756e74000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c10b9b0b332aa3930b739b332b960991b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f51546f6b656e3a2063616e6e6f74206c697175696461746520796f757273656c6040820152603360f91b606082015260800190565b60208082526010908201526f042e6c2cccaa8e4c2dce6cccae48aa8960831b604082015260600190565b60208082526023908201527f514d61726b65743a20696e76616c69642072617465206d6f64656c206164647260408201526265737360e81b606082015260800190565b60208082526032908201527f51546f6b656e3a206f6e65206f662071416d6f756e74496e206f722075416d6f604082015271756e74496e206d757374206265207a65726f60701b606082015260800190565b60208082526011908201527021736166655472616e7366657246726f6d60781b604082015260600190565b60208082526019908201527f514d61726b65743a20716f726520616c72656164792073657400000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601a908201527f51546f6b656e3a206f6e6c7920516f726520436f6e7472616374000000000000604082015260600190565b6020808252601690820152750a2a8ded6cadc7440ecc2d8eaca40dad2e6dac2e8c6d60531b604082015260600190565b60208082526022908201527f51546f6b656e3a20626f72726f7720616d6f756e7420657863656564732063616040820152610e6d60f31b606082015260800190565b81518152602080830151908201526040918201519181019190915260600190565b90815260200190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b60ff91909116815260200190565b60005b83811015614ea5578181015183820152602001614e8d565b8381111561099a5750506000910152565b6001600160a01b038116811461313757600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef51546f6b656e3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122054fdd66913f80140fafc93cbb86c2cb81f542685fd7da715eece5a7771e3f8bf64736f6c634300060c0033

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