Contract 0x369878Ecc69B7148b7cC151d1a03dbcbfD9b537E

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xf9c94fd92a36ef28d41af46c6e45ceebcbc75d778e1a9338108685e33dfa0015500402021-07-01 12:32:1378 days 7 hrs ago0x904b5993fc92979eeedc19ccc58bed6b7216667c IN  Contract Creation0 ETH0.014101068583 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XMCB

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : XMCB.sol
// SPDX-License-Identifier: GPL
pragma solidity 0.7.4;

import "@openzeppelin/contracts-upgradeable/GSN/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";

import "./interfaces/IAuthenticator.sol";

import "./Comp.sol";
import "./BalanceBroadcaster.sol";

contract XMCB is
    Initializable,
    ReentrancyGuardUpgradeable,
    ContextUpgradeable,
    Comp,
    BalanceBroadcaster
{
    using AddressUpgradeable for address;
    using SafeMathUpgradeable for uint256;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    bytes32 public constant XMCB_ADMIN_ROLE = keccak256("XMCB_ADMIN_ROLE");
    uint256 private constant WONE = 1e18;

    IAuthenticator public authenticator;
    IERC20Upgradeable public rawToken;
    uint256 public withdrawalPenaltyRate;

    uint96 internal _rawTotalSupply;

    event Deposit(address indexed account, uint256 amount);
    event Withdraw(address indexed account, uint256 amount, uint256 penalty);
    event SetWithdrawalPenaltyRate(uint256 previousPenaltyRate, uint256 newPenaltyRate);

    modifier onlyAuthorized() {
        require(
            authenticator.hasRoleOrAdmin(XMCB_ADMIN_ROLE, msg.sender),
            "caller is not authorized"
        );
        _;
    }

    /**
     * @notice  initialize XMCB token.
     * @param   authenticator_          Owner of XMCB who is able to set withdraw penalty rate.
     * @param   rawToken_               The token used as collateral for XMCB.
     * @param   withdrawalPenaltyRate_  The penalty rate when user withdraw.
     *                                  The deducted part will be added to all remaining holders.
     */
    function initialize(
        address authenticator_,
        address rawToken_,
        uint256 withdrawalPenaltyRate_
    ) external initializer {
        require(authenticator_ != address(0), "authenticator is the zero address");
        require(rawToken_.isContract(), "raw token must be a contract");
        require(withdrawalPenaltyRate_ <= WONE, "new withdrawalPenaltyRate exceed 100%");

        __Context_init();
        __ReentrancyGuard_init();
        __Comp_init();
        __BalanceBroadcaster_init();

        authenticator = IAuthenticator(authenticator_);
        rawToken = IERC20Upgradeable(rawToken_);
        withdrawalPenaltyRate = withdrawalPenaltyRate_;
    }

    /**
     * @notice  The balance of an account, also known as weighted balance.
     *          The balance is affected by a magnification factor,
     *          which is changed on every withdrawal (expect the last time).
     *          This is how the holders share the profit from withdrawal penalty.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _wmul(_balances[account], _balanceFactor());
    }

    /**
     * @notice  Comparing to `balanceOf`, raw balance indicates the unweighted balance.
     *          This may be useful for other contract which takes XMCB's balance as reference.
     */
    function rawBalanceOf(address account) external view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @notice  Like `rawBalanceOf`, this is the unweighted total supply.
     */
    function rawTotalSupply() external view virtual returns (uint256) {
        return uint256(_rawTotalSupply);
    }

    /**
     * @notice  Set withdrawal penalty rate. Only available to owner of XMCB.
     * @param   withdrawalPenaltyRate_  A fixed-point decimal, when 1e18 == 100% and 1e16 == 1%.
     */
    function setWithdrawalPenaltyRate(uint256 withdrawalPenaltyRate_)
        external
        virtual
        onlyAuthorized
    {
        require(withdrawalPenaltyRate_ <= WONE, "new withdrawalPenaltyRate exceed 100%");
        emit SetWithdrawalPenaltyRate(withdrawalPenaltyRate, withdrawalPenaltyRate_);
        withdrawalPenaltyRate = withdrawalPenaltyRate_;
    }

    /**
     * @notice  Deposit `rawToken` for XMCB token. The exchange rate is always 1:1.
     * @param   amount  The amount of `rawToken` to deposit.
     */
    function deposit(uint256 amount) external virtual nonReentrant {
        require(amount > 0, "zero amount");
        _beforeMintingToken(_msgSender(), amount, _totalSupply);
        _deposit(_msgSender(), amount);
    }

    /**
     * @notice  Exchange an equal amount of XMCB for `rawToken`. A withdrawal penalty will be applied on the amount.
     *          User is expected to get `amount * (1 - withdrawalPenaltyRate)` token back.
     * @param   amount  The amount of `rawToken` to withdraw.
     */
    function withdraw(uint256 amount) external virtual nonReentrant {
        require(amount != 0, "zero amount");
        require(amount <= balanceOf(_msgSender()), "exceeded withdrawable balance");
        _beforeBurningToken(_msgSender(), amount, _totalSupply);
        _withdraw(_msgSender(), amount);
    }

    /**
     * @notice  Add a component to list. A component means a external contract which is able to receive deposit / withdraw
     *          notification from XMCB.
     * @param   component   The address of component to add.
     */
    function addComponent(address component) external virtual onlyAuthorized {
        _addComponent(component);
    }

    /**
     * @notice  Remove a component from list. A component means a external contract which is able to receive deposit / withdraw
     *          notification from XMCB.
     * @param   component   The address of component to add.
     */
    function removeComponent(address component) external virtual onlyAuthorized {
        _removeComponent(component);
    }

    function _deposit(address account, uint256 amount) internal virtual {
        rawToken.safeTransferFrom(account, address(this), amount);
        _mintRaw(account, _wdiv(amount, _balanceFactor()));
        _totalSupply = add96(
            _totalSupply,
            safe96(amount, "XMCB::_deposit: amount exceeds 96 bits"),
            "XMCB::_deposit: deposit amount overflows"
        );
        emit Deposit(account, amount);
    }

    function _withdraw(address account, uint256 amount) internal virtual {
        uint256 penalty = (amount == _totalSupply) ? 0 : _wmul(amount, withdrawalPenaltyRate);
        rawToken.safeTransfer(account, amount.sub(penalty));
        _burnRaw(account, _wdiv(amount, _balanceFactor()));
        _totalSupply = sub96(
            _totalSupply,
            safe96(amount.sub(penalty), "XMCB::_withdraw: amount exceeds 96 bits"),
            "XMCB::_withdraw: withdraw amount underflows"
        );
        emit Withdraw(account, amount, penalty);
    }

    function _mintRaw(address account, uint256 amount) internal virtual {
        uint96 safeAmount = safe96(amount, "XMCB::mint: amount exceeds 96 bits");
        _balances[account] = add96(
            _balances[account],
            safeAmount,
            "XMCB::_increaseBalance: balance overflows"
        );
        _rawTotalSupply = add96(
            _rawTotalSupply,
            safeAmount,
            "XMCB::_deposit: deposit amount overflows"
        );
        _moveDelegates(address(0), getDelegate(account), safeAmount);
    }

    function _burnRaw(address account, uint256 amount) internal virtual {
        uint96 safeAmount = safe96(amount, "XMCB::burn: amount exceeds 96 bits");
        _balances[account] = sub96(
            _balances[account],
            safeAmount,
            "XMCB::_decreaseBalance: balance overflows"
        );
        _rawTotalSupply = sub96(
            _rawTotalSupply,
            safeAmount,
            "XMCB::_deposit: deposit amount overflows"
        );
        _moveDelegates(getDelegate(account), address(0), safeAmount);
    }

    function _balanceFactor() internal view returns (uint256) {
        if (_rawTotalSupply == 0) {
            return WONE;
        }
        return _wdiv(_totalSupply, _rawTotalSupply);
    }

    function _wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x.mul(y) / WONE;
    }

    function _wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x.mul(WONE).add(y / 2).div(y);
    }

    // reserved for upgrade
    bytes32[50] private __gap;
}

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

pragma solidity >=0.6.0 <0.8.0;

import "../utils/ContextUpgradeable.sol";

File 3 of 16 : SafeMathUpgradeable.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 SafeMathUpgradeable {
    /**
     * @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 4 of 16 : 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 5 of 16 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20Upgradeable.sol";
import "../../math/SafeMathUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";

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

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

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

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

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

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

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

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

File 6 of 16 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 7 of 16 : 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 8 of 16 : IAuthenticator.sol
// SPDX-License-Identifier: GPL
pragma solidity 0.7.4;

interface IAuthenticator {
    /**
     * @notice  Check if an account has the given role.
     * @param   role    A bytes32 value generated from keccak256("ROLE_NAME").
     * @param   account The account to be checked.
     * @return  True if the account has already granted permissions for the given role.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @notice  This should be called from external contract, to test if a account has specified role.

     * @param   role    A bytes32 value generated from keccak256("ROLE_NAME").
     * @param   account The account to be checked.
     * @return  True if the account has already granted permissions for the given role.
     */
    function hasRoleOrAdmin(bytes32 role, address account) external view returns (bool);
}

File 9 of 16 : Comp.sol
// SPDX-License-Identifier: GPL
//
// The 3-Clause BSD License
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pragma solidity 0.7.4;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts-upgradeable/GSN/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";

import { IComp } from "./interfaces/IComp.sol";

contract Comp is Initializable, ContextUpgradeable, IComp {
    /// @notice EIP-20 token name for this token
    string public constant name = "XMCB";

    /// @notice EIP-20 token symbol for this token
    string public constant symbol = "XMCB";

    /// @notice EIP-20 token decimals for this token
    uint8 public constant decimals = 18;

    uint96 internal _totalSupply;

    mapping(address => uint96) internal _balances;

    /// @notice A record of each accounts delegate
    mapping(address => address) public delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH =
        keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(
        address indexed delegator,
        address indexed fromDelegate,
        address indexed toDelegate
    );

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(
        address indexed delegate,
        uint256 previousBalance,
        uint256 newBalance
    );

    /// @notice The standard EIP-20 transfer event
    event Transfer(address indexed from, address indexed to, uint256 amount);

    /// @notice The standard EIP-20 approval event
    event Approval(address indexed owner, address indexed spender, uint256 amount);

    function __Comp_init() internal initializer {}

    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @notice Get the number of tokens held by the `account`
     * @param account The address of the account to get the balance of
     * @return The number of tokens held
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`
     */
    function allowance(address, address) external pure returns (uint256) {
        return 0;
    }

    /**
     * @notice Approve `spender` to transfer up to `amount` from `src`
     * @dev This will overwrite the approval amount for `spender`
     *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
     */
    function approve(address, uint256) external pure returns (bool) {
        revert("approve disabled");
    }

    /**
     * @notice Transfer `amount` tokens from `_msgSender()` to `dst`
     */
    function transfer(address, uint256) external pure returns (bool) {
        revert("transfer disabled");
    }

    /**
     * @notice Transfer `amount` tokens from `src` to `dst`
     */
    function transferFrom(
        address,
        address,
        uint256
    ) external pure returns (bool) {
        revert("transferFrom disabled");
    }

    /**
     * @notice Delegate votes from `_msgSender()` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        return _delegate(_msgSender(), delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))
        );
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "XMCB::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "XMCB::delegateBySig: invalid nonce");
        require(getBlockTimestamp() <= expiry, "XMCB::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint96) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber)
        public
        view
        override
        returns (uint96)
    {
        require(blockNumber < getBlockNumber(), "XMCB::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function getDelegate(address delegator) public view returns (address) {
        address currentDelegate = delegates[delegator];
        return currentDelegate == address(0) ? delegator : currentDelegate;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = getDelegate(delegator);
        uint96 delegatorBalance = _balances[delegator];
        delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint96 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint96 srcRepNew = sub96(
                    srcRepOld,
                    amount,
                    "XMCB::_moveVotes: vote amount underflows"
                );
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint96 dstRepNew = add96(
                    dstRepOld,
                    amount,
                    "XMCB::_moveVotes: vote amount overflows"
                );
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint96 oldVotes,
        uint96 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            getBlockNumber(),
            "XMCB::_writeCheckpoint: block number exceeds 32 bits"
        );

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
        require(n < 2**96, errorMessage);
        return uint96(n);
    }

    function add96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        uint96 c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function getChainId() internal pure returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }

    function getBlockNumber() internal view virtual returns (uint256) {
        return block.number;
    }

    function getBlockTimestamp() internal view virtual returns (uint256) {
        return block.timestamp;
    }

    bytes32[50] private __gap;
}

File 10 of 16 : BalanceBroadcaster.sol
// SPDX-License-Identifier: GPL
pragma solidity 0.7.4;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";

import "./interfaces/IComponent.sol";

contract BalanceBroadcaster is Initializable {
    using SafeMathUpgradeable for uint256;
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    EnumerableSetUpgradeable.AddressSet internal _components;

    event AddListener(address indexed component);
    event RemoveListener(address indexed component);

    function __BalanceBroadcaster_init() internal virtual initializer {}

    /**
     * @notice  Return the count of registered components.
     */
    function componentCount() external view returns (uint256) {
        return _components.length();
    }

    /**
     * @notice  Check if a address is a registered component in broadcaster.
     */
    function isComponent(address component) external view returns (bool) {
        return _components.contains(component);
    }

    /**
     * @notice  Get registered components within [begin, end) as an array of addresses.
     */
    function listComponents(uint256 begin, uint256 end)
        public
        view
        returns (address[] memory result)
    {
        require(end > begin, "begin should be lower than end");
        uint256 length = _components.length();
        if (begin >= length) {
            return result;
        }
        uint256 safeEnd = (end <= length) ? end : length;
        result = new address[](safeEnd.sub(begin));
        for (uint256 i = begin; i < safeEnd; i++) {
            result[i.sub(begin)] = _components.at(i);
        }
        return result;
    }

    function _addComponent(address component) internal {
        require(!_components.contains(component), "component already exists");
        require(IComponent(component).baseToken() == address(this), "owner of component mismatch");
        _components.add(component);
        emit AddListener(component);
    }

    function _removeComponent(address component) internal {
        require(_components.contains(component), "component not exists");
        _components.remove(component);
        emit RemoveListener(component);
    }

    function _beforeMintingToken(
        address account,
        uint256 amount,
        uint256 totalSupply
    ) internal {
        uint256 length = _components.length();
        for (uint256 i = 0; i < length; i++) {
            IComponent(_components.at(i)).beforeMintingToken(account, amount, totalSupply);
        }
    }

    function _beforeBurningToken(
        address account,
        uint256 amount,
        uint256 totalSupply
    ) internal {
        uint256 length = _components.length();
        for (uint256 i = 0; i < length; i++) {
            IComponent(_components.at(i)).beforeBurningToken(account, amount, totalSupply);
        }
    }

    bytes32[50] private __gap;
}

File 11 of 16 : 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 12 of 16 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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 13 of 16 : IComp.sol
// SPDX-License-Identifier: GPL
//
// The 3-Clause BSD License
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pragma solidity 0.7.4;

interface IComp {
    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);
}

File 14 of 16 : 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 15 of 16 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

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

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

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

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

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

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

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

File 16 of 16 : IComponent.sol
// SPDX-License-Identifier: GPL
pragma solidity 0.7.4;

interface IComponent {
    /**
     * @notice  The address of base token.
     */
    function baseToken() external view returns (address);

    /**
     * @notice  A hook which is call when user deposits MCB into XMCB.
     */
    function beforeMintingToken(
        address account,
        uint256 amount,
        uint256 totalSupply
    ) external;

    /**
     * @notice  A hook which is call when user withdraws MCB from XMCB.
     */
    function beforeBurningToken(
        address account,
        uint256 amount,
        uint256 totalSupply
    ) external;
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"component","type":"address"}],"name":"AddListener","type":"event"},{"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":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"component","type":"address"}],"name":"RemoveListener","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousPenaltyRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPenaltyRate","type":"uint256"}],"name":"SetWithdrawalPenaltyRate","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"XMCB_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"component","type":"address"}],"name":"addComponent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"authenticator","outputs":[{"internalType":"contract IAuthenticator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"componentCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"getDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authenticator_","type":"address"},{"internalType":"address","name":"rawToken_","type":"address"},{"internalType":"uint256","name":"withdrawalPenaltyRate_","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"component","type":"address"}],"name":"isComponent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"begin","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"listComponents","outputs":[{"internalType":"address[]","name":"result","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"rawBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rawToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rawTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"component","type":"address"}],"name":"removeComponent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawalPenaltyRate_","type":"uint256"}],"name":"setWithdrawalPenaltyRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalPenaltyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506132a7806100206000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063b6b55f25116100ad578063dd62ed3e1161007c578063dd62ed3e14610674578063df5e9b29146106a2578063e7a324dc146106c8578063f1127ed8146106d0578063f6813c3b1461072a57610211565b8063b6b55f2514610600578063c3cda5201461061d578063d67f7cc814610664578063d8a561011461066c57610211565b806395d89b41116100f457806395d89b4114610216578063a592d9ec1461059e578063a9059cbb146105a6578063aef79a4f146105d2578063b4b5ea57146105da57610211565b806370a08231146104ed5780637542028914610513578063782d6fe1146105305780637ecebe001461057857610211565b806323b872dd116101a8578063544d856411610177578063544d856414610416578063587cde1e1461043c5780635c19a95c146104625780636f86c897146104885780636fcfff45146104ae57610211565b806323b872dd1461037f5780632e1a7d4d146103b5578063313ce567146103d25780634e353270146103f057610211565b806318160ddd116101e457806318160ddd146103435780631fe26e9d1461034b57806320606b70146103535780632335c76b1461035b57610211565b806306fdde0314610216578063095ea7b31461029357806312064c34146102d35780631794bb3c1461030b575b600080fd5b61021e61079d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610258578181015183820152602001610240565b50505050905090810190601f1680156102855780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102bf600480360360408110156102a957600080fd5b506001600160a01b0381351690602001356107bd565b604080519115158252519081900360200190f35b6102f9600480360360208110156102e957600080fd5b50356001600160a01b03166107e0565b60408051918252519081900360200190f35b6103416004803603606081101561032157600080fd5b506001600160a01b03813581169160208101359091169060400135610804565b005b6102f96109ed565b6102f96109fd565b6102f9610a0e565b610363610a32565b604080516001600160a01b039092168252519081900360200190f35b6102bf6004803603606081101561039557600080fd5b506001600160a01b03813581169160208101359091169060400135610a41565b610341600480360360208110156103cb57600080fd5b5035610a5b565b6103da610b92565b6040805160ff9092168252519081900360200190f35b6103416004803603602081101561040657600080fd5b50356001600160a01b0316610b97565b6103636004803603602081101561042c57600080fd5b50356001600160a01b0316610c7a565b6103636004803603602081101561045257600080fd5b50356001600160a01b0316610cac565b6103416004803603602081101561047857600080fd5b50356001600160a01b0316610cc7565b6103416004803603602081101561049e57600080fd5b50356001600160a01b0316610cd8565b6104d4600480360360208110156104c457600080fd5b50356001600160a01b0316610db8565b6040805163ffffffff9092168252519081900360200190f35b6102f96004803603602081101561050357600080fd5b50356001600160a01b0316610dd0565b6103416004803603602081101561052957600080fd5b5035610e09565b61055c6004803603604081101561054657600080fd5b506001600160a01b038135169060200135610f69565b604080516001600160601b039092168252519081900360200190f35b6102f96004803603602081101561058e57600080fd5b50356001600160a01b031661117e565b6102f9611190565b6102bf600480360360408110156105bc57600080fd5b506001600160a01b03813516906020013561119f565b6103636111b9565b61055c600480360360208110156105f057600080fd5b50356001600160a01b03166111c8565b6103416004803603602081101561061657600080fd5b503561123a565b610341600480360360c081101561063357600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135611306565b6102f961150f565b6102f9611521565b6102f96004803603604081101561068a57600080fd5b506001600160a01b0381358116916020013516611527565b6102bf600480360360208110156106b857600080fd5b50356001600160a01b031661152f565b6102f961153c565b610702600480360360408110156106e657600080fd5b5080356001600160a01b0316906020013563ffffffff16611560565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b61074d6004803603604081101561074057600080fd5b5080359060200135611595565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610789578181015183820152602001610771565b505050509050019250505060405180910390f35b604051806040016040528060048152602001632c26a1a160e11b81525081565b600060405162461bcd60e51b81526004016107d790612ef3565b60405180910390fd5b6001600160a01b03166000908152606660205260409020546001600160601b031690565b600054610100900460ff168061081d575061081d6116ba565b8061082b575060005460ff16155b6108665760405162461bcd60e51b815260040180806020018281038252602e815260200180613109602e913960400191505060405180910390fd5b600054610100900460ff16158015610891576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0384166108d65760405162461bcd60e51b81526004018080602001828103825260218152602001806131a86021913960400191505060405180910390fd5b6108e8836001600160a01b03166116cb565b610939576040805162461bcd60e51b815260206004820152601c60248201527f72617720746f6b656e206d757374206265206120636f6e747261637400000000604482015290519081900360640190fd5b670de0b6b3a76400008211156109805760405162461bcd60e51b8152600401808060200182810382526025815260200180612fda6025913960400191505060405180910390fd5b6109886116d1565b61099061177a565b61099861180f565b6109a061180f565b60d180546001600160a01b038087166001600160a01b03199283161790925560d280549286169290911691909117905560d382905580156109e7576000805461ff00191690555b50505050565b6065546001600160601b03165b90565b6000610a09609d6118af565b905090565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60d1546001600160a01b031681565b600060405162461bcd60e51b81526004016107d790612f48565b60026001541415610ab3576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015580610af8576040805162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b604482015290519081900360640190fd5b610b08610b036118ba565b610dd0565b811115610b5c576040805162461bcd60e51b815260206004820152601d60248201527f657863656564656420776974686472617761626c652062616c616e6365000000604482015290519081900360640190fd5b610b7a610b676118ba565b60655483906001600160601b03166118be565b610b8b610b856118ba565b8261196b565b5060018055565b601281565b60d15460408051635db8200960e01b81526000805160206130c1833981519152600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b158015610bf657600080fd5b505afa158015610c0a573d6000803e3d6000fd5b505050506040513d6020811015610c2057600080fd5b5051610c6e576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b610c7781611a92565b50565b6001600160a01b038082166000908152606760205260408120549091168015610ca35780610ca5565b825b9392505050565b6067602052600090815260409020546001600160a01b031681565b610c77610cd26118ba565b82611bfc565b60d15460408051635db8200960e01b81526000805160206130c1833981519152600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b505050506040513d6020811015610d6157600080fd5b5051610daf576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b610c7781611c86565b60696020526000908152604090205463ffffffff1681565b6001600160a01b038116600090815260666020526040812054610e03906001600160601b0316610dfe611d1c565b611d5a565b92915050565b60d15460408051635db8200960e01b81526000805160206130c1833981519152600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b158015610e6857600080fd5b505afa158015610e7c573d6000803e3d6000fd5b505050506040513d6020811015610e9257600080fd5b5051610ee0576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b670de0b6b3a7640000811115610f275760405162461bcd60e51b8152600401808060200182810382526025815260200180612fda6025913960400191505060405180910390fd5b60d354604080519182526020820183905280517f25c2ff8e122299f15651f5a6ce99e9c861aa3fe4aaa9a515bea8364e8dcb4bdd9281900390910190a160d355565b6000610f73611d7e565b8210610f915760405162461bcd60e51b81526004016107d790612e66565b6001600160a01b03831660009081526069602052604090205463ffffffff1680610fbf576000915050610e03565b6001600160a01b038416600090815260686020908152604080832063ffffffff60001986018116855292529091205416831061103b576001600160a01b03841660009081526068602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050610e03565b6001600160a01b038416600090815260686020908152604080832083805290915290205463ffffffff16831015611076576000915050610e03565b600060001982015b8163ffffffff168163ffffffff16111561113957600282820363ffffffff160481036110a8612cf3565b506001600160a01b038716600090815260686020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b0316918101919091529087141561111457602001519450610e039350505050565b805163ffffffff1687111561112b57819350611132565b6001820392505b505061107e565b506001600160a01b038516600090815260686020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b606a6020526000908152604090205481565b60d4546001600160601b031690565b600060405162461bcd60e51b81526004016107d790612f1d565b60d2546001600160a01b031681565b6001600160a01b03811660009081526069602052604081205463ffffffff16806111f3576000610ca5565b6001600160a01b038316600090815260686020908152604080832063ffffffff60001986011684529091529020546001600160601b03600160201b90910416915050919050565b60026001541415611292576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155806112d7576040805162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b604482015290519081900360640190fd5b6112f56112e26118ba565b60655483906001600160601b0316611d82565b610b8b6113006118ba565b82611e28565b6040805180820190915260048152632c26a1a160e11b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f917cf6f0cb7c60c5927771220b095ba9ff041b8d6eec7d3cdd22b92f317faa2761136e611f0d565b306040516020016113829493929190612d49565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf8888886040516020016113d39493929190612d25565b60405160208183030381529060405280519060200120905060008282604051602001611400929190612d0a565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161143d9493929190612d6d565b6020604051602081039080840390855afa15801561145f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166114925760405162461bcd60e51b81526004016107d790612dde565b6001600160a01b0381166000908152606a6020526040902080546001810190915589146114d15760405162461bcd60e51b81526004016107d790612e24565b876114da611f11565b11156114f85760405162461bcd60e51b81526004016107d790612ead565b611502818b611bfc565b505050505b505050505050565b6000805160206130c183398151915281565b60d35481565b600092915050565b6000610e03609d83611f15565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b606860209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b60608282116115eb576040805162461bcd60e51b815260206004820152601e60248201527f626567696e2073686f756c64206265206c6f776572207468616e20656e640000604482015290519081900360640190fd5b60006115f7609d6118af565b90508084106116065750610e03565b6000818411156116165781611618565b835b90506116248186611f2a565b67ffffffffffffffff8111801561163a57600080fd5b50604051908082528060200260200182016040528015611664578160200160208202803683370190505b509250845b818110156116b15761167c609d82611f87565b846116878389611f2a565b8151811061169157fe5b6001600160a01b0390921660209283029190910190910152600101611669565b50505092915050565b60006116c5306116cb565b15905090565b3b151590565b600054610100900460ff16806116ea57506116ea6116ba565b806116f8575060005460ff16155b6117335760405162461bcd60e51b815260040180806020018281038252602e815260200180613109602e913960400191505060405180910390fd5b600054610100900460ff1615801561175e576000805460ff1961ff0019909116610100171660011790555b61176661180f565b8015610c77576000805461ff001916905550565b600054610100900460ff168061179357506117936116ba565b806117a1575060005460ff16155b6117dc5760405162461bcd60e51b815260040180806020018281038252602e815260200180613109602e913960400191505060405180910390fd5b600054610100900460ff16158015611807576000805460ff1961ff0019909116610100171660011790555b611766611f93565b600054610100900460ff168061182857506118286116ba565b80611836575060005460ff16155b6118715760405162461bcd60e51b815260040180806020018281038252602e815260200180613109602e913960400191505060405180910390fd5b600054610100900460ff16158015611766576000805460ff1961ff0019909116610100171660011790558015610c77576000805461ff001916905550565b6000610e0382612038565b3390565b60006118ca609d6118af565b905060005b81811015611964576118e2609d82611f87565b6001600160a01b0316630bb872338686866040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b15801561194057600080fd5b505af1158015611954573d6000803e3d6000fd5b5050600190920191506118cf9050565b5050505050565b6065546000906001600160601b031682146119915761198c8260d354611d5a565b611994565b60005b90506119b7836119a48484611f2a565b60d2546001600160a01b0316919061203c565b6119d1836119cc846119c7611d1c565b612093565b6120be565b606554611a2a906001600160601b0316611a0c6119ee8585611f2a565b604051806060016040528060278152602001613074602791396121d4565b6040518060600160405280602b8152602001613049602b9139612203565b606580546001600160601b0319166001600160601b0392909216919091179055604080518381526020810183905281516001600160a01b038616927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a2505050565b611a9d609d82611f15565b15611aef576040805162461bcd60e51b815260206004820152601860248201527f636f6d706f6e656e7420616c7265616479206578697374730000000000000000604482015290519081900360640190fd5b306001600160a01b0316816001600160a01b031663c55dae636040518163ffffffff1660e01b815260040160206040518083038186803b158015611b3257600080fd5b505afa158015611b46573d6000803e3d6000fd5b505050506040513d6020811015611b5c57600080fd5b50516001600160a01b031614611bb9576040805162461bcd60e51b815260206004820152601b60248201527f6f776e6572206f6620636f6d706f6e656e74206d69736d617463680000000000604482015290519081900360640190fd5b611bc4609d82612242565b506040516001600160a01b038216907fb7f4e867f2c6c5d1776109e21a9c1dbe164680f433978a2e7cfb1b296f9c4b7690600090a250565b6000611c0783610c7a565b6001600160a01b03848116600081815260666020908152604080832054606790925280832080546001600160a01b03191689871690811790915590519596506001600160601b03909116949093861692917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f91a46109e7828483612257565b611c91609d82611f15565b611cd9576040805162461bcd60e51b8152602060048201526014602482015273636f6d706f6e656e74206e6f742065786973747360601b604482015290519081900360640190fd5b611ce4609d826123e9565b506040516001600160a01b038216907fea7dd270a191a945cfa461d38156fb39ee4693afcd958ebc1ec5815a0e9b9b1590600090a250565b60d4546000906001600160601b0316611d3e5750670de0b6b3a76400006109fa565b60655460d454610a09916001600160601b039081169116612093565b6000670de0b6b3a7640000611d6f84846123fe565b81611d7657fe5b049392505050565b4390565b6000611d8e609d6118af565b905060005b8181101561196457611da6609d82611f87565b6001600160a01b031663be5c63968686866040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b158015611e0457600080fd5b505af1158015611e18573d6000803e3d6000fd5b505060019092019150611d939050565b60d254611e40906001600160a01b0316833084612457565b611e5582611e50836119c7611d1c565b6124b1565b60655460408051606081019091526026808252611ea8926001600160601b031691611e8a91859190612f9260208301396121d4565b604051806060016040528060288152602001612fff602891396125c7565b606580546001600160601b03929092166001600160601b03199092169190911790556040805182815290516001600160a01b038416917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25050565b4690565b4290565b6000610ca5836001600160a01b038416612603565b600082821115611f81576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000610ca5838361261b565b600054610100900460ff1680611fac5750611fac6116ba565b80611fba575060005460ff16155b611ff55760405162461bcd60e51b815260040180806020018281038252602e815260200180613109602e913960400191505060405180910390fd5b600054610100900460ff16158015612020576000805460ff1961ff0019909116610100171660011790555b600180558015610c77576000805461ff001916905550565b5490565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261208e90849061267f565b505050565b6000610ca5826120b8600282046120b287670de0b6b3a76400006123fe565b90612730565b9061278a565b60006120e282604051806060016040528060228152602001613027602291396121d4565b905061213f60666000856001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b03168260405180606001604052806029815260200161324960299139612203565b6001600160a01b03841660009081526066602090815260409182902080546001600160601b0319166001600160601b0394851617905560d45482516060810190935260288084526121a09491909116928592909190612fff90830139612203565b60d480546001600160601b0319166001600160601b039290921691909117905561208e6121cc84610c7a565b600083612257565b600081600160601b84106121fb5760405162461bcd60e51b81526004016107d79190612d8b565b509192915050565b6000836001600160601b0316836001600160601b03161115829061223a5760405162461bcd60e51b81526004016107d79190612d8b565b505050900390565b6000610ca5836001600160a01b0384166127e9565b816001600160a01b0316836001600160a01b03161415801561228257506000816001600160601b0316115b1561208e576001600160a01b0383161561233a576001600160a01b03831660009081526069602052604081205463ffffffff1690816122c2576000612301565b6001600160a01b0385166000908152606860209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061232882856040518060600160405280602881526020016130e160289139612203565b905061233686848484612833565b5050505b6001600160a01b0382161561208e576001600160a01b03821660009081526069602052604081205463ffffffff1690816123755760006123b4565b6001600160a01b0384166000908152606860209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006123db8285604051806060016040528060278152602001613137602791396125c7565b905061150785848484612833565b6000610ca5836001600160a01b0384166129ef565b60008261240d57506000610e03565b8282028284828161241a57fe5b0414610ca55760405162461bcd60e51b815260040180806020018281038252602181526020018061315e6021913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526109e790859061267f565b60006124d5826040518060600160405280602281526020016131c9602291396121d4565b905061253260666000856001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b03168260405180606001604052806029815260200161317f602991396125c7565b6001600160a01b03841660009081526066602090815260409182902080546001600160601b0319166001600160601b0394851617905560d45482516060810190935260288084526125939491909116928592909190612fff908301396125c7565b60d480546001600160601b0319166001600160601b039290921691909117905561208e60006125c185610c7a565b83612257565b6000838301826001600160601b0380871690831610156125fa5760405162461bcd60e51b81526004016107d79190612d8b565b50949350505050565b60009081526001919091016020526040902054151590565b8154600090821061265d5760405162461bcd60e51b8152600401808060200182810382526022815260200180612fb86022913960400191505060405180910390fd5b82600001828154811061266c57fe5b9060005260206000200154905092915050565b60606126d4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ab59092919063ffffffff16565b80519091501561208e578080602001905160208110156126f357600080fd5b505161208e5760405162461bcd60e51b815260040180806020018281038252602a8152602001806131eb602a913960400191505060405180910390fd5b600082820183811015610ca5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008082116127e0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d7657fe5b60006127f58383612603565b61282b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e03565b506000610e03565b600061285e612840611d7e565b60405180606001604052806034815260200161321560349139612acc565b905060008463ffffffff161180156128a757506001600160a01b038516600090815260686020908152604080832063ffffffff6000198901811685529252909120548282169116145b15612906576001600160a01b0385166000908152606860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b038516021790556129a5565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152606883528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252606990935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516129e0929190612f77565b60405180910390a25050505050565b60008181526001830160205260408120548015612aab5783546000198083019190810190600090879083908110612a2257fe5b9060005260206000200154905080876000018481548110612a3f57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612a6f57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610e03565b6000915050610e03565b6060612ac48484600085612af3565b949350505050565b600081600160201b84106121fb5760405162461bcd60e51b81526004016107d79190612d8b565b606082471015612b345760405162461bcd60e51b815260040180806020018281038252602681526020018061309b6026913960400191505060405180910390fd5b612b3d856116cb565b612b8e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612bcd5780518252601f199092019160209182019101612bae565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612c2f576040519150601f19603f3d011682016040523d82523d6000602084013e612c34565b606091505b5091509150612c44828286612c4f565b979650505050505050565b60608315612c5e575081610ca5565b825115612c6e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612cb8578181015183820152602001612ca0565b50505050905090810190601f168015612ce55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080518082019091526000808252602082015290565b61190160f01b81526002810192909252602282015260420190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015612db757858101830151858201604001528201612d9b565b81811115612dc85783604083870101525b50601f01601f1916929092016040019392505050565b60208082526026908201527f584d43423a3a64656c656761746542795369673a20696e76616c6964207369676040820152656e617475726560d01b606082015260800190565b60208082526022908201527f584d43423a3a64656c656761746542795369673a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b60208082526027908201527f584d43423a3a6765745072696f72566f7465733a206e6f742079657420646574604082015266195c9b5a5b995960ca1b606082015260800190565b60208082526026908201527f584d43423a3a64656c656761746542795369673a207369676e617475726520656040820152651e1c1a5c995960d21b606082015260800190565b60208082526010908201526f185c1c1c9bdd9948191a5cd8589b195960821b604082015260600190565b6020808252601190820152701d1c985b9cd9995c88191a5cd8589b1959607a1b604082015260600190565b6020808252601590820152741d1c985b9cd9995c919c9bdb48191a5cd8589b1959605a1b604082015260600190565b6001600160601b039283168152911660208201526040019056fe584d43423a3a5f6465706f7369743a20616d6f756e7420657863656564732039362062697473456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64736e6577207769746864726177616c50656e616c747952617465206578636565642031303025584d43423a3a5f6465706f7369743a206465706f73697420616d6f756e74206f766572666c6f7773584d43423a3a6275726e3a20616d6f756e7420657863656564732039362062697473584d43423a3a5f77697468647261773a20776974686472617720616d6f756e7420756e646572666c6f7773584d43423a3a5f77697468647261773a20616d6f756e7420657863656564732039362062697473416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c8e7d5415c25b1edede89d13dc064784f10d0ebcb6a2f26f62f30a3d881bbf3ca584d43423a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564584d43423a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77584d43423a3a5f696e63726561736542616c616e63653a2062616c616e6365206f766572666c6f777361757468656e74696361746f7220697320746865207a65726f2061646472657373584d43423a3a6d696e743a20616d6f756e74206578636565647320393620626974735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564584d43423a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473584d43423a3a5f646563726561736542616c616e63653a2062616c616e6365206f766572666c6f7773a26469706673582212201f0a8c979775b5644a700cad295d190c528d71595ad7e88f77e518bd605fabdb64736f6c63430007040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.