ETH Price: $3,238.98 (-2.66%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Controller194836452024-03-21 14:31:23307 days ago1711031483IN
0xF7F9C789...18fC68C0B
0 ETH0.0007280630.47060636
Harvest194835942024-03-21 14:21:11307 days ago1711030871IN
0xF7F9C789...18fC68C0B
0 ETH0.0292846532.05500686
Harvest193170782024-02-27 6:24:11330 days ago1709015051IN
0xF7F9C789...18fC68C0B
0 ETH0.0393151638.83593371
Harvest174841302023-06-15 8:34:35587 days ago1686818075IN
0xF7F9C789...18fC68C0B
0 ETH0.0182570521.32418037
Harvest162201212022-12-19 17:05:23765 days ago1671469523IN
0xF7F9C789...18fC68C0B
0 ETH0.0181609419.41423471
Harvest139665142022-01-08 18:53:191110 days ago1641667999IN
0xF7F9C789...18fC68C0B
0 ETH0.12176361140.82009169
Harvest133265992021-09-30 10:43:311210 days ago1632998611IN
0xF7F9C789...18fC68C0B
0 ETH0.0399678247.9933177
Harvest127210572021-06-28 6:57:211304 days ago1624863441IN
0xF7F9C789...18fC68C0B
0 ETH0.0141204718
Harvest121345772021-03-29 14:02:181395 days ago1617026538IN
0xF7F9C789...18fC68C0B
0 ETH0.12490945164
Harvest120542552021-03-17 5:24:481407 days ago1615958688IN
0xF7F9C789...18fC68C0B
0 ETH0.1081533142
Harvest119977902021-03-08 12:14:231416 days ago1615205663IN
0xF7F9C789...18fC68C0B
0 ETH0.08197339105
Set Governance119510582021-03-01 7:43:541423 days ago1614584634IN
0xF7F9C789...18fC68C0B
0 ETH0.00342120

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
213204642024-12-03 7:23:5950 days ago1733210639
0xF7F9C789...18fC68C0B
0 ETH
213204642024-12-03 7:23:5950 days ago1733210639
0xF7F9C789...18fC68C0B
0 ETH
213204642024-12-03 7:23:5950 days ago1733210639
0xF7F9C789...18fC68C0B
0 ETH
212753922024-11-27 0:04:4756 days ago1732665887
0xF7F9C789...18fC68C0B
0 ETH
212753922024-11-27 0:04:4756 days ago1732665887
0xF7F9C789...18fC68C0B
0 ETH
212753922024-11-27 0:04:4756 days ago1732665887
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194836022024-03-21 14:22:47307 days ago1711030967
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
194835942024-03-21 14:21:11307 days ago1711030871
0xF7F9C789...18fC68C0B
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategyHbtc

Compiler Version
v0.5.15+commit.6a57276f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 14 : StrategyHbtc.sol
pragma solidity 0.5.15;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../interfaces/ICrvDeposit.sol";
import "../interfaces/ICrvMinter.sol";
import "../interfaces/ICrvPool.sol";
import "../interfaces/IController.sol";
import "../interfaces/IUniswapRouter.sol";
import "./CrvLocker.sol";

/*

 A strategy must implement the following calls;
 
 - deposit()
 - withdraw(address) must exclude any tokens used in the yield - Controller role - withdraw should return to Controller
 - withdraw(uint) - Controller | Vault role - withdraw should always return to vault
 - withdrawAll() - Controller | Vault role - withdraw should always return to vault
 - balanceOf()
 
 Where possible, strategies must remain as immutable as possible, instead of updating variables, we update the contract by linking it in the controller
 
*/

contract StrategyHbtc is CrvLocker {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    // TODO: change want according to wBTC/hBTC
    // HBTC 0x0316EB71485b0Ab14103307bf65a021042c6d380
    // WBTC 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
    address constant public want = address(0x0316EB71485b0Ab14103307bf65a021042c6d380); // hBtc
    address constant public hBTCPool = address(0x4CA9b3063Ec5866A4B82E437059D2C43d1be596F); // hBTC Pool
    address constant public hBTCGauge = address(0x4c18E409Dc8619bFb6a1cB56D114C3f592E0aE79); // hBTC gauge
    address constant public hCrv = address(0xb19059ebb43466C323583928285a49f558E572Fd); // hCrv
    address constant public bella = address(0xA91ac63D040dEB1b7A5E4d4134aD23eb0ba07e14);
    address constant public weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
    address constant public output = address(0xD533a949740bb3306d119CC777fa900bA034cd52); // CRV   
    address constant public unirouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
    address constant public crv_minter = address(0xd061D61a4d941c39E5453435B6345Dc261C2fcE0);
    address constant public wBTC = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // wBTC (used to convert from crv to hCrv)

    // 0 = hBTC, 1 = wBTC in hBTC pool
    enum TokenIndexInHBTCPool {HBTC, WBTC}
    uint56 constant tokenIndexHBTCPool = uint56(TokenIndexInHBTCPool.HBTC); // TODO: change according to hBTC/wBTC
    uint56 constant tokenIndexWBTC = uint56(TokenIndexInHBTCPool.WBTC);

    address public governance;
    address public controller;

    uint256 public toWant = 92; // 20% manager fee + 80%*90%
    uint256 public toBella = 8;
    uint256 public manageFee = 22; //92%*22% = 20%

    uint256 public burnPercent = 50;
    uint256 public distributionPercent = 50;
    address public burnAddress = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

    // withdrawSome withdraw a bit more to compensate the imbalanced asset, 10000=1
    uint256 public withdrawCompensation = 30;

    address[] public swap2BellaRouting;
    address[] public swap2WBTCRouting;
    
    constructor(address _controller, address _governance) public CrvLocker(_governance) {
        governance = _governance;
        controller = _controller;
        swap2BellaRouting = [output, weth, bella];
        swap2WBTCRouting = [output, weth, wBTC];
        doApprove();
    }

    function doApprove () public {

        // crv -> want
        IERC20(crv).safeApprove(unirouter, 0);
        IERC20(crv).safeApprove(unirouter, uint(-1)); 

        // wBTC/hBTC -> hBTC Pool
        // IERC20(want).safeApprove(hBTCPool, 0); HTBC can not approve 0!!!
        IERC20(want).safeApprove(hBTCPool, uint(-1));

        // hCrv -> hBTC gauge
        IERC20(hCrv).safeApprove(hBTCGauge, 0);
        IERC20(hCrv).safeApprove(hBTCGauge, uint(-1));

        IERC20(wBTC).safeApprove(hBTCPool, 0);
        IERC20(wBTC).safeApprove(hBTCPool, uint(-1));        

    }
    
    function deposit() public {
        require((msg.sender == governance || 
            (msg.sender == tx.origin) ||
            (msg.sender == controller)),"!contract");

        /// wBTC/hBTC -> hBTC pool
        uint256[2] memory amounts = wrapCoinAmount(IERC20(want).balanceOf(address(this)), tokenIndexHBTCPool);
        ICrvPool2Coins(hBTCPool).add_liquidity(amounts, 0);

        /// hBTC pool -> gauge
        invest(hBTCGauge, IERC20(hCrv).balanceOf(address(this)));
    }

    /**
     * @dev Deposit XCurve into XCurve gauge
     */
    function invest(address gauge, uint256 amount) internal {

        ICrvDeposit(gauge).deposit(amount);

    }

    /**
     * @dev Get CRV rewards
     */
    function harvest(address gauge) public {
        require(msg.sender == tx.origin ,"!contract");

        ICrvMinter(crv_minter).mint(gauge);

        uint256 crvToWBTC = crv.balanceOf(address(this)).mul(toWant).div(100);

        if (crvToWBTC == 0)
            return;

        uint256 bWantBefore = IERC20(wBTC).balanceOf(address(this));

        IUniswapRouter(unirouter).swapExactTokensForTokens(
            crvToWBTC, 1, swap2WBTCRouting, address(this), block.timestamp
        );

        uint256 bWantAfter = IERC20(wBTC).balanceOf(address(this));

        uint256 fee = bWantAfter.sub(bWantBefore).mul(manageFee).div(100);
        IERC20(wBTC).safeTransfer(IController(controller).rewards(), fee);

        if (toBella != 0) {
            uint256 crvBalance = crv.balanceOf(address(this));
            IUniswapRouter(unirouter).swapExactTokensForTokens(
                crvBalance, 1, swap2BellaRouting, address(this), block.timestamp
            );
            splitBella();
        }

        depositWbtc();

    }

    /**
     * @dev wBTC -> hCrv -> hCrv gauge
     */
    function depositWbtc() internal {
        /// wBTC -> hCrv  Pool
        uint256[2] memory amounts = wrapCoinAmount(IERC20(wBTC).balanceOf(address(this)), tokenIndexWBTC);
        ICrvPool2Coins(hBTCPool).add_liquidity(amounts, 0);

        /// hCrv -> gauge
        invest(hBTCGauge, IERC20(hCrv).balanceOf(address(this)));
    }

    function splitBella() internal {
        uint bellaBalance = IERC20(bella).balanceOf(address(this));

        uint burn = bellaBalance.mul(burnPercent).div(100);
        uint distribution = bellaBalance.mul(distributionPercent).div(100);
        
        IERC20(bella).safeTransfer(IController(controller).belRewards(), distribution);
        IERC20(bella).safeTransfer(burnAddress, burn); 
    }
    
    // Controller only function for creating additional rewards from dust
    function withdraw(IERC20 _asset) external returns (uint balance) {
        require(msg.sender == controller, "!controller");
        require(address(_asset) != address(hCrv), "!hCrv");
        require(address(_asset) != address(want), "!want");
        require(address(_asset) != address(crv), "!crv");
        require(address(_asset) != address(wBTC), "!wBTC");
        balance = _asset.balanceOf(address(this));
        _asset.safeTransfer(controller, balance);
    }
    
    // Withdraw partial funds, normally used with a vault withdrawal
    function withdraw(uint _amount) external {
        require(msg.sender == controller, "!controller");
        uint _balance = IERC20(want).balanceOf(address(this));
        if (_balance < _amount) {
            _amount = _withdrawSome(_amount.sub(_balance));
            _amount = _amount.add(_balance);
        }
        address _vault = IController(controller).vaults(address(want));
        require(_vault != address(0), "!vault"); // additional protection so we don't burn the funds
        IERC20(want).safeTransfer(_vault, _amount);
    }
    
    // Withdraw all funds, normally used when migrating strategies
    function withdrawAll() external returns (uint balance) {
        require(msg.sender == controller, "!controller");
        _withdrawAll();
        balance = IERC20(want).balanceOf(address(this));
        address _vault = IController(controller).vaults(address(want));
        require(_vault != address(0), "!vault"); // additional protection so we don't burn the funds
        IERC20(want).safeTransfer(_vault, balance);
    }
    
    function _withdrawAll() internal {
        // withdraw hBTC pool crv from gauge
        uint256 amount = ICrvDeposit(hBTCGauge).balanceOf(address(this));
        _withdrawXCurve(hBTCGauge, amount);
        
        // exchange xcrv from pool to say dai 
        ICrvPool2Coins(hBTCPool).remove_liquidity_one_coin(amount, tokenIndexHBTCPool, 1);
    }
    
    function _withdrawSome(uint256 _amount) internal returns (uint) {
        // withdraw hBTC pool crv from gauge
        uint256 amount = _amount.mul(1e18).div(ICrvPool2Coins(hBTCPool).get_virtual_price())
            .mul(10000 + withdrawCompensation).div(10000);
        amount = _withdrawXCurve(hBTCGauge, amount);

        uint256 bBefore = IERC20(want).balanceOf(address(this));

        ICrvPool2Coins(hBTCPool).remove_liquidity_one_coin(amount, tokenIndexHBTCPool, 1);

        uint256 bAfter = IERC20(want).balanceOf(address(this));

        return bAfter.sub(bBefore);
    }

    /**
     * @dev Internal function to withdraw yCurve, handle the case when withdraw amount exceeds the buffer
     * @param gauge Gauge address (hBTC pool, busd, usdt)
     * @param amount Amount of yCurve to withdraw
     */
    function _withdrawXCurve(address gauge, uint256 amount) internal returns (uint256) {
        uint256 a = Math.min(ICrvDeposit(gauge).balanceOf(address(this)), amount);
        ICrvDeposit(gauge).withdraw(a);
        return a;
    }
    
    function balanceOf() public view returns (uint) {
        return IERC20(want).balanceOf(address(this))
                .add(balanceInPool());
    }

    function underlyingBalanceOf() public view returns (uint) {
        return IERC20(want).balanceOf(address(this))
                .add(underlyingBalanceInPool());
    }
    
    function balanceInPool() public view returns (uint256) {
        return ICrvDeposit(hBTCGauge).balanceOf(address(this)).mul(ICrvPool2Coins(hBTCPool).get_virtual_price()).div(1e18);
    }

    function underlyingBalanceInPool() public view returns (uint256) {
        uint balance = ICrvDeposit(hBTCGauge).balanceOf(address(this));
        if (balance == 0) {
            return 0;
        }
        uint balanceVirtual = balance.mul(ICrvPool2Coins(hBTCPool).get_virtual_price()).div(1e18);
        uint balanceUnderlying = ICrvPool2Coins(hBTCPool).calc_withdraw_one_coin(balance, tokenIndexHBTCPool);
        return Math.min(balanceVirtual, balanceUnderlying);
    }

    function setGovernance(address _governance) external {
        require(msg.sender == governance, "!governance");
        governance = _governance;
    }
    
    function setController(address _controller) external {
        require(msg.sender == governance, "!governance");
        controller = _controller;
    }

    function changeManageFee(uint256 newManageFee) external {
        require(msg.sender == governance, "!governance");
        require(newManageFee <= 100, "must less than 100%!");
        manageFee = newManageFee;
    }

    function changeBelWantRatio(uint256 newToBella, uint256 newToWant) external {
        require(msg.sender == governance, "!governance");
        require(newToBella.add(newToWant) == 100, "must divide all the pool");
        toBella = newToBella;
        toWant = newToWant;
    }

    function setDistributionAndBurnRatio(uint256 newDistributionPercent, uint256 newBurnPercent) external{
        require(msg.sender == governance, "!governance");
        require(newDistributionPercent.add(newBurnPercent) == 100, "must be 100% total");
        distributionPercent = newDistributionPercent;
        burnPercent = newBurnPercent;
    }

    function setBurnAddress(address _burnAddress) public{
        require(msg.sender == governance, "!governance");
        require(_burnAddress != address(0), "cannot send bella to 0 address");
        burnAddress = _burnAddress;
    }

    function setWithdrawCompensation(uint256 _withdrawCompensation) public {
        require(msg.sender == governance, "!governance");
        require(_withdrawCompensation <= 100, "too much compensation");
        withdrawCompensation = _withdrawCompensation;
    }

    /**
    * @dev Wraps the coin amount in the array for interacting with the Curve protocol
    */
    function wrapCoinAmount(uint256 amount, uint56 index) internal pure returns (uint256[2] memory) {
        uint256[2] memory amounts = [uint256(0), uint256(0)];
        amounts[index] = amount;
        return amounts;
    }

}

File 2 of 14 : Math.sol
pragma solidity ^0.5.0;

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

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

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

File 3 of 14 : SafeMath.sol
pragma solidity ^0.5.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

File 4 of 14 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @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 5 of 14 : SafeERC20.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

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

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

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

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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(IERC20 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(IERC20 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(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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 14 : Address.sol
pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

File 7 of 14 : IController.sol
pragma solidity 0.5.15;

interface IController {
    function vaults(address) external view returns (address);
    function withdraw(address, uint) external;
    function balanceOf(address) external view returns (uint);
    function underlyingBalanceOf(address) external view returns (uint);
    function earn(address, uint) external;
    function rewards() external view returns (address);
    function belRewards() external view returns (address);
    function paused() external view returns (bool);
}

File 8 of 14 : ICrvDeposit.sol
pragma solidity 0.5.15;

interface ICrvDeposit{
    function deposit(uint256) external;
    function withdraw(uint256) external;
    function balanceOf(address) external view returns (uint256);
    // function claimable_tokens(address) external view returns (uint256);
}

File 9 of 14 : ICrvMinter.sol
pragma solidity 0.5.15;

interface ICrvMinter{
    function mint(address) external;
}

File 10 of 14 : ICrvPool.sol
pragma solidity 0.5.15;

// only for 3 token pools
// checked for 3pool
interface ICrvPool {
    function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external;
    function remove_liquidity_one_coin(uint256 _token_amount, int128 i, uint256 min_amount) external;
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external;
    function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256);
    function get_virtual_price() external view returns (uint256);
}

interface ICrvPool2Coins {
    function add_liquidity(uint256[2] calldata amounts, uint256 min_mint_amount) external;
    function remove_liquidity_one_coin(uint256 _token_amount, int128 i, uint256 min_amount) external;
    function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256);
    function get_virtual_price() external view returns (uint256);
}

File 11 of 14 : IUniswapRouter.sol
pragma solidity ^0.5.15;

interface IUniswapRouter {
    function swapExactTokensForTokens(uint, uint, address[] calldata, address, uint) external;
}

File 12 of 14 : IVotingEscrow.sol
pragma solidity 0.5.15;

interface IVotingEscrow {
    function create_lock(uint256 _value, uint256 _unlock_time) external;
    function increase_amount(uint256 _value) external;
    function increase_unlock_time(uint256 _unlock_time) external;
    function withdraw() external;
}

File 13 of 14 : Ownable.sol
pragma solidity 0.5.15;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

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

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the a
     * specified account.
     * @param initalOwner The address of the inital owner.
     */
    constructor(address initalOwner) internal {
        _owner = initalOwner;
        emit OwnershipTransferred(address(0), _owner);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Only owner can call");
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     * @notice Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Owner should not be 0 address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 14 of 14 : CrvLocker.sol
pragma solidity 0.5.15;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../libraries/Ownable.sol";
import "../interfaces/IVotingEscrow.sol";

/**
* @title CrvLocker
* @dev Inherit this contract to gain functionalities to interact with curve's voting_escrow
*/
contract CrvLocker is Ownable {

    constructor(address owner) public Ownable(owner) {}

    address constant public voting_escrow = address(0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2);
    IERC20 constant public crv = IERC20(0xD533a949740bb3306d119CC777fa900bA034cd52);

    /**
     * @dev Lock CRV to enhance CRV rewards
     * @param amount amount of CRV to lock
     * @param unlockTime unix timestamp to unlock
     */
    function lock_crv(uint256 amount, uint256 unlockTime) external onlyOwner {
        crv.approve(voting_escrow, 0);
        crv.approve(voting_escrow, amount);
        IVotingEscrow(voting_escrow).create_lock(amount, unlockTime);
    }

    /**
     * @dev Withdraw locked CRV after the unlock time
     */
    function withdraw_crv() external onlyOwner {
        IVotingEscrow(voting_escrow).withdraw();
    }

    /**
     * @dev Increase CRV locking amount
     * @param amount amount of CRV to increase
     */
    function increase_crv_amount(uint256 amount) external onlyOwner {
        crv.approve(voting_escrow, 0);
        crv.approve(voting_escrow, amount);
        IVotingEscrow(voting_escrow).increase_amount(amount);
    }

    /**
     * @dev Increase CRV locking time
     * @param unlockTime new CRV locking time
     */
    function increase_crv_unlock_time(uint256 unlockTime) external onlyOwner {
        IVotingEscrow(voting_escrow).increase_unlock_time(unlockTime);
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [
    ":@openzeppelin/=/home/ubuntu/flex-saving/node_modules/@openzeppelin/"
  ],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_controller","type":"address"},{"internalType":"address","name":"_governance","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":true,"inputs":[],"name":"balanceInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bella","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"burnPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newToBella","type":"uint256"},{"internalType":"uint256","name":"newToWant","type":"uint256"}],"name":"changeBelWantRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newManageFee","type":"uint256"}],"name":"changeManageFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"crv","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"crv_minter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"distributionPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"doApprove","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hBTCGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hBTCPool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hCrv","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"gauge","type":"address"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increase_crv_amount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"name":"increase_crv_unlock_time","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"name":"lock_crv","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"manageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"output","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_burnAddress","type":"address"}],"name":"setBurnAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newDistributionPercent","type":"uint256"},{"internalType":"uint256","name":"newBurnPercent","type":"uint256"}],"name":"setDistributionAndBurnRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_withdrawCompensation","type":"uint256"}],"name":"setWithdrawCompensation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swap2BellaRouting","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swap2WBTCRouting","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"toBella","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"toWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"voting_escrow","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wBTC","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IERC20","name":"_asset","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"withdrawCompensation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw_crv","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

6080604052605c6003556008600481905560166005556032600681905560075580546001600160a01b03191673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee179055601e6009553480156200005557600080fd5b5060405162003b4f38038062003b4f833981810160405260408110156200007b57600080fd5b508051602090910151600080546001600160a01b0319166001600160a01b0380841691909117808355604051849384939290921691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35050600180546001600160a01b038084166001600160a01b03199283161790925560028054928516929091169190911790556040805160608101825273d533a949740bb3306d119cc777fa900ba034cd52815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2602082015273a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14918101919091526200016f90600a906003620006fd565b506040805160608101825273d533a949740bb3306d119cc777fa900ba034cd52815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26020820152732260fac5e5542a773aa44fbcfedf7c193bc2c59991810191909152620001d790600b906003620006fd565b50620001eb6001600160e01b03620001f316565b505062000791565b6200023573d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d6000620003c7602090811b62002b0717901c565b6200027873d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d600019620003c7602090811b62002b0717901c565b620002bb730316eb71485b0ab14103307bf65a021042c6d380734ca9b3063ec5866a4b82e437059d2c43d1be596f600019620003c7602090811b62002b0717901c565b620002fd73b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae796000620003c7602090811b62002b0717901c565b6200034073b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae79600019620003c7602090811b62002b0717901c565b62000382732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f6000620003c7602090811b62002b0717901c565b620003c5732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f600019620003c7602090811b62002b0717901c565b565b80158062000451575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156200042157600080fd5b505afa15801562000436573d6000803e3d6000fd5b505050506040513d60208110156200044d57600080fd5b5051155b6200048e5760405162461bcd60e51b815260040180806020018281038252603681526020018062003b196036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620004e6918591620004eb16565b505050565b6200050a826001600160a01b0316620006c060201b6200321e1760201c565b6200055c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106200059c5780518252601f1990920191602091820191016200057b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462000600576040519150601f19603f3d011682016040523d82523d6000602084013e62000605565b606091505b5091509150816200065d576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115620006ba578080602001905160208110156200067b57600080fd5b5051620006ba5760405162461bcd60e51b815260040180806020018281038252602a81526020018062003aef602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590620006f557508115155b949350505050565b82805482825590600052602060002090810192821562000755579160200282015b828111156200075557825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200071e565b506200076392915062000767565b5090565b6200078e91905b80821115620007635780546001600160a01b03191681556001016200076e565b90565b61334e80620007a16000396000f3fe608060405234801561001057600080fd5b50600436106102a05760003560e01c80636ddc1e5e11610167578063acf6c7fd116100ce578063d1cef37d11610087578063d1cef37d1461059e578063d6935831146105bb578063dfe05031146105c3578063f20eaeb814610486578063f2fde38b146105cb578063f77c4791146105f1576102a0565b8063acf6c7fd14610553578063c1d40dbb1461055b578063c229a93f14610563578063c2dfe4b61461056b578063cb3e071514610573578063d0e30db014610596576102a0565b80638da5cb5b116101205780638da5cb5b146104d35780638f32d59b146104db57806392eefe9b146104f75780639b4529311461051d5780639cd7a1c414610525578063ab033ea91461052d576102a0565b80636ddc1e5e1461048e57806370d5ae05146104ab578063715018a6146104b3578063722713f7146104bb578063853828b6146104c357806387a15dc9146104cb576102a0565b80634b0e72161161020b57806352e65f91116101c457806352e65f91146104495780635aa6e675146104515780635bb5ebbe1461045957806366c31db714610461578063689557ca146104695780636a4874a114610486576102a0565b80634b0e7216146103b35780634bbdf4da146103d95780634c25b94a146103e15780634dec0ec7146103fe5780634eb582c81461040657806351cff8d914610423576102a0565b80631f1fcd511161025d5780631f1fcd511461036e578063257ae0de146103765780632e1a7d4d1461037e5780632f92b92a1461039b5780633fc8cef3146103a357806348f2090b146103ab576102a0565b806303807ee5146102a557806304d08035146102bf57806305d474cd146102e35780630e5c011e1461030257806319001193146103285780631cd95a2b1461034b575b600080fd5b6102ad6105f9565b60408051918252519081900360200190f35b6102c76105ff565b604080516001600160a01b039092168252519081900360200190f35b610300600480360360208110156102f957600080fd5b5035610617565b005b6103006004803603602081101561031857600080fd5b50356001600160a01b031661080c565b6103006004803603604081101561033e57600080fd5b5080359060200135610db8565b6103006004803603604081101561036157600080fd5b5080359060200135610e74565b6102c7611071565b6102c7611083565b6103006004803603602081101561039457600080fd5b503561109b565b6102c7611289565b6102c76112a1565b6102ad6112b9565b610300600480360360208110156103c957600080fd5b50356001600160a01b03166112bf565b6102ad611389565b610300600480360360208110156103f757600080fd5b503561138f565b6102ad61142e565b6103006004803603602081101561041c57600080fd5b5035611434565b6102ad6004803603602081101561043957600080fd5b50356001600160a01b03166114dd565b6102ad61172a565b6102c7611730565b61030061173f565b6102ad6118d5565b6102c76004803603602081101561047f57600080fd5b50356119b6565b6102c76119dd565b6102c7600480360360208110156104a457600080fd5b50356119f5565b6102c7611a02565b610300611a11565b6102ad611aaa565b6102ad611b3a565b6102ad611cfd565b6102c7611d03565b6104e3611d12565b604080519115158252519081900360200190f35b6103006004803603602081101561050d57600080fd5b50356001600160a01b0316611d23565b6102c7611d92565b6102ad611daa565b6103006004803603602081101561054357600080fd5b50356001600160a01b0316611db7565b6102c7611e26565b6102ad611e3e565b6102c761200f565b610300612027565b6103006004803603604081101561058957600080fd5b50803590602001356120df565b610300612190565b610300600480360360208110156105b457600080fd5b50356123c4565b6102c7612464565b6102c761247c565b610300600480360360208110156105e157600080fd5b50356001600160a01b0316612494565b6102c76124ec565b60065481565b734c18e409dc8619bfb6a1cb56d114c3f592e0ae7981565b61061f611d12565b610666576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26004820152600060248201819052915173d533a949740bb3306d119cc777fa900ba034cd529263095ea7b392604480820193602093909283900390910190829087803b1580156106d857600080fd5b505af11580156106ec573d6000803e3d6000fd5b505050506040513d602081101561070257600080fd5b50506040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2600482015260248101839052905173d533a949740bb3306d119cc777fa900ba034cd529163095ea7b39160448083019260209291908290030181600087803b15801561077257600080fd5b505af1158015610786573d6000803e3d6000fd5b505050506040513d602081101561079c57600080fd5b505060408051631255d9df60e21b8152600481018390529051735f3b5dfeb7b28cdbd7faba78963ee202a494e2a291634957677c91602480830192600092919082900301818387803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b5050505050565b33321461084c576040805162461bcd60e51b81526020600482015260096024820152680858dbdb9d1c9858dd60ba1b604482015290519081900360640190fd5b604080516335313c2160e11b81526001600160a01b0383166004820152905173d061d61a4d941c39e5453435b6345dc261c2fce091636a62784291602480830192600092919082900301818387803b1580156108a757600080fd5b505af11580156108bb573d6000803e3d6000fd5b50505050600061097a606461096e60035473d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561093657600080fd5b505afa15801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50519063ffffffff6124fb16565b9063ffffffff61255d16565b9050806109875750610db5565b604080516370a0823160e01b81523060048201529051600091732260fac5e5542a773aa44fbcfedf7c193bc2c599916370a0823191602480820192602092909190829003018186803b1580156109dc57600080fd5b505afa1580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50516040516338ed173960e01b8152600481018481526001602483018190523060648401819052426084850181905260a060448601908152600b805460a48801819052979850737a250d5630b4cf539739df2c5dacb4c659f2488d976338ed1739978b97929594939160c49091019086908015610aac57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a8e575b50509650505050505050600060405180830381600087803b158015610ad057600080fd5b505af1158015610ae4573d6000803e3d6000fd5b5050604080516370a0823160e01b8152306004820152905160009350732260fac5e5542a773aa44fbcfedf7c193bc2c59992506370a0823191602480820192602092909190829003018186803b158015610b3d57600080fd5b505afa158015610b51573d6000803e3d6000fd5b505050506040513d6020811015610b6757600080fd5b5051600554909150600090610b999060649061096e90610b8d868863ffffffff61259f16565b9063ffffffff6124fb16565b9050610c3a600260009054906101000a90046001600160a01b03166001600160a01b0316639ec5a8946040518163ffffffff1660e01b815260040160206040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6020811015610c1657600080fd5b5051732260fac5e5542a773aa44fbcfedf7c193bc2c599908363ffffffff6125e116565b60045415610dad57604080516370a0823160e01b8152306004820152905160009173d533a949740bb3306d119cc777fa900ba034cd52916370a0823191602480820192602092909190829003018186803b158015610c9757600080fd5b505afa158015610cab573d6000803e3d6000fd5b505050506040513d6020811015610cc157600080fd5b50516040516338ed173960e01b8152600481018281526001602483018190523060648401819052426084850181905260a060448601908152600a805460a48801819052979850737a250d5630b4cf539739df2c5dacb4c659f2488d976338ed1739978a97929594939160c49091019086908015610d6757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d49575b50509650505050505050600060405180830381600087803b158015610d8b57600080fd5b505af1158015610d9f573d6000803e3d6000fd5b50505050610dab612633565b505b6108056127c6565b50565b6001546001600160a01b03163314610e05576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b610e15828263ffffffff61285716565b606414610e69576040805162461bcd60e51b815260206004820152601860248201527f6d7573742064697669646520616c6c2074686520706f6f6c0000000000000000604482015290519081900360640190fd5b600491909155600355565b610e7c611d12565b610ec3576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26004820152600060248201819052915173d533a949740bb3306d119cc777fa900ba034cd529263095ea7b392604480820193602093909283900390910190829087803b158015610f3557600080fd5b505af1158015610f49573d6000803e3d6000fd5b505050506040513d6020811015610f5f57600080fd5b50506040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2600482015260248101849052905173d533a949740bb3306d119cc777fa900ba034cd529163095ea7b39160448083019260209291908290030181600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050506040513d6020811015610ff957600080fd5b5050604080516365fc387360e01b815260048101849052602481018390529051735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2916365fc387391604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b505050505050565b60008051602061327983398151915281565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6002546001600160a01b031633146110e8576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091600080516020613279833981519152916370a0823191602480820192602092909190829003018186803b15801561113757600080fd5b505afa15801561114b573d6000803e3d6000fd5b505050506040513d602081101561116157600080fd5b505190508181101561119a57611185611180838363ffffffff61259f16565b6128b1565b9150611197828263ffffffff61285716565b91505b60025460408051632988bb9f60e21b8152600080516020613279833981519152600482015290516000926001600160a01b03169163a622ee7c916024808301926020929190829003018186803b1580156111f357600080fd5b505afa158015611207573d6000803e3d6000fd5b505050506040513d602081101561121d57600080fd5b505190506001600160a01b038116611265576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b611284600080516020613279833981519152828563ffffffff6125e116565b505050565b734ca9b3063ec5866a4b82e437059d2c43d1be596f81565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60075481565b6001546001600160a01b0316331461130c576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b038116611367576040805162461bcd60e51b815260206004820152601e60248201527f63616e6e6f742073656e642062656c6c6120746f203020616464726573730000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b6001546001600160a01b031633146113dc576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6064811115611429576040805162461bcd60e51b81526020600482015260146024820152736d757374206c657373207468616e20313030252160601b604482015290519081900360640190fd5b600555565b60045481565b61143c611d12565b611483576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26001600160a01b031663eff7a612826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107f157600080fd5b6002546000906001600160a01b0316331461152d576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b03821673b19059ebb43466c323583928285a49f558e572fd1415611587576040805162461bcd60e51b815260206004820152600560248201526410b421b93b60d91b604482015290519081900360640190fd5b6001600160a01b03821660008051602061327983398151915214156115db576040805162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b604482015290519081900360640190fd5b6001600160a01b03821673d533a949740bb3306d119cc777fa900ba034cd521415611636576040805162461bcd60e51b8152602060048083019190915260248201526310b1b93b60e11b604482015290519081900360640190fd5b6001600160a01b038216732260fac5e5542a773aa44fbcfedf7c193bc2c5991415611690576040805162461bcd60e51b8152602060048201526005602482015264217742544360d81b604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156116d657600080fd5b505afa1580156116ea573d6000803e3d6000fd5b505050506040513d602081101561170057600080fd5b5051600254909150611725906001600160a01b0384811691168363ffffffff6125e116565b919050565b60035481565b6001546001600160a01b031681565b61177973d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d600063ffffffff612b0716565b6117b473d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d60001963ffffffff612b0716565b6117e9600080516020613279833981519152734ca9b3063ec5866a4b82e437059d2c43d1be596f60001963ffffffff612b0716565b61182373b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae79600063ffffffff612b0716565b61185e73b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae7960001963ffffffff612b0716565b611898732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f600063ffffffff612b0716565b6118d3732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f60001963ffffffff612b0716565b565b60006119b0670de0b6b3a764000061096e734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b15801561193357600080fd5b505afa158015611947573d6000803e3d6000fd5b505050506040513d602081101561195d57600080fd5b5051604080516370a0823160e01b81523060048201529051734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a08231916024808301926020929190829003018186803b15801561093657600080fd5b90505b90565b600b81815481106119c357fe5b6000918252602090912001546001600160a01b0316905081565b73d533a949740bb3306d119cc777fa900ba034cd5281565b600a81815481106119c357fe5b6008546001600160a01b031681565b611a19611d12565b611a60576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006119b0611ab76118d5565b604080516370a0823160e01b81523060048201529051600080516020613279833981519152916370a08231916024808301926020929190829003018186803b158015611b0257600080fd5b505afa158015611b16573d6000803e3d6000fd5b505050506040513d6020811015611b2c57600080fd5b50519063ffffffff61285716565b6002546000906001600160a01b03163314611b8a576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b611b92612c1a565b604080516370a0823160e01b81523060048201529051600080516020613279833981519152916370a08231916024808301926020929190829003018186803b158015611bdd57600080fd5b505afa158015611bf1573d6000803e3d6000fd5b505050506040513d6020811015611c0757600080fd5b505160025460408051632988bb9f60e21b8152600080516020613279833981519152600482015290519293506000926001600160a01b039092169163a622ee7c91602480820192602092909190829003018186803b158015611c6857600080fd5b505afa158015611c7c573d6000803e3d6000fd5b505050506040513d6020811015611c9257600080fd5b505190506001600160a01b038116611cda576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b611cf9600080516020613279833981519152828463ffffffff6125e116565b5090565b60095481565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546001600160a01b03163314611d70576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b732260fac5e5542a773aa44fbcfedf7c193bc2c59981565b60006119b0611ab7611e3e565b6001546001600160a01b03163314611e04576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b73b19059ebb43466c323583928285a49f558e572fd81565b604080516370a0823160e01b815230600482015290516000918291734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a08231916024808301926020929190829003018186803b158015611e9457600080fd5b505afa158015611ea8573d6000803e3d6000fd5b505050506040513d6020811015611ebe57600080fd5b5051905080611ed15760009150506119b3565b6000611f68670de0b6b3a764000061096e734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b5051859063ffffffff6124fb16565b90506000734ca9b3063ec5866a4b82e437059d2c43d1be596f63cc2b27d784836040518363ffffffff1660e01b8152600401808381526020018266ffffffffffffff16600f0b81526020019250505060206040518083038186803b158015611fcf57600080fd5b505afa158015611fe3573d6000803e3d6000fd5b505050506040513d6020811015611ff957600080fd5b505190506120078282612d1b565b935050505090565b73d061d61a4d941c39e5453435b6345dc261c2fce081565b61202f611d12565b612076576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26001600160a01b0316633ccfd60b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156120c557600080fd5b505af11580156120d9573d6000803e3d6000fd5b50505050565b6001546001600160a01b0316331461212c576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b61213c828263ffffffff61285716565b606414612185576040805162461bcd60e51b81526020600482015260126024820152711b5d5cdd081899480c4c0c09481d1bdd185b60721b604482015290519081900360640190fd5b600791909155600655565b6001546001600160a01b03163314806121a857503332145b806121bd57506002546001600160a01b031633145b6121fa576040805162461bcd60e51b81526020600482015260096024820152680858dbdb9d1c9858dd60ba1b604482015290519081900360640190fd5b61220261325a565b604080516370a0823160e01b8152306004820152905161228691600080516020613279833981519152916370a0823191602480820192602092909190829003018186803b15801561225257600080fd5b505afa158015612266573d6000803e3d6000fd5b505050506040513d602081101561227c57600080fd5b505160005b612d31565b9050734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b0316630b4c7e4d8260006040518363ffffffff1660e01b81526004018083600260200280838360005b838110156122e55781810151838201526020016122cd565b5050505090500182815260200192505050600060405180830381600087803b15801561231057600080fd5b505af1158015612324573d6000803e3d6000fd5b5050604080516370a0823160e01b81523060048201529051610db59350734c18e409dc8619bfb6a1cb56d114c3f592e0ae79925073b19059ebb43466c323583928285a49f558e572fd916370a08231916024808301926020929190829003018186803b15801561239357600080fd5b505afa1580156123a7573d6000803e3d6000fd5b505050506040513d60208110156123bd57600080fd5b5051612d78565b6001546001600160a01b03163314612411576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b606481111561245f576040805162461bcd60e51b81526020600482015260156024820152743a37b79036bab1b41031b7b6b832b739b0ba34b7b760591b604482015290519081900360640190fd5b600955565b73a91ac63d040deb1b7a5e4d4134ad23eb0ba07e1481565b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a281565b61249c611d12565b6124e3576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b610db581612dbe565b6002546001600160a01b031681565b60008261250a57506000612557565b8282028284828161251757fe5b04146125545760405162461bcd60e51b81526004018080602001828103825260218152602001806132996021913960400191505060405180910390fd5b90505b92915050565b600061255483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612e74565b600061255483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612f16565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611284908490612f70565b604080516370a0823160e01b8152306004820152905160009173a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14916370a0823191602480820192602092909190829003018186803b15801561268857600080fd5b505afa15801561269c573d6000803e3d6000fd5b505050506040513d60208110156126b257600080fd5b50516006549091506000906126d59060649061096e90859063ffffffff6124fb16565b905060006126f3606461096e600754866124fb90919063ffffffff16565b9050612794600260009054906101000a90046001600160a01b03166001600160a01b031663d7a78a0f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561274657600080fd5b505afa15801561275a573d6000803e3d6000fd5b505050506040513d602081101561277057600080fd5b505173a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14908363ffffffff6125e116565b6008546112849073a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14906001600160a01b03168463ffffffff6125e116565b6127ce61325a565b604080516370a0823160e01b8152306004820152905161228691732260fac5e5542a773aa44fbcfedf7c193bc2c599916370a0823191602480820192602092909190829003018186803b15801561282457600080fd5b505afa158015612838573d6000803e3d6000fd5b505050506040513d602081101561284e57600080fd5b50516001612281565b600082820183811015612554576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008061295861271061096e60095461271001610b8d734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b15801561291457600080fd5b505afa158015612928573d6000803e3d6000fd5b505050506040513d602081101561293e57600080fd5b505161096e89670de0b6b3a764000063ffffffff6124fb16565b9050612978734c18e409dc8619bfb6a1cb56d114c3f592e0ae7982613128565b604080516370a0823160e01b81523060048201529051919250600091600080516020613279833981519152916370a08231916024808301926020929190829003018186803b1580156129c957600080fd5b505afa1580156129dd573d6000803e3d6000fd5b505050506040513d60208110156129f357600080fd5b505160408051630d2680e960e11b815260048101859052600060248201819052600160448301529151929350734ca9b3063ec5866a4b82e437059d2c43d1be596f92631a4d01d29260648084019391929182900301818387803b158015612a5957600080fd5b505af1158015612a6d573d6000803e3d6000fd5b5050604080516370a0823160e01b815230600482015290516000935060008051602061327983398151915292506370a0823191602480820192602092909190829003018186803b158015612ac057600080fd5b505afa158015612ad4573d6000803e3d6000fd5b505050506040513d6020811015612aea57600080fd5b50519050612afe818363ffffffff61259f16565b95945050505050565b801580612b8d575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015612b5f57600080fd5b505afa158015612b73573d6000803e3d6000fd5b505050506040513d6020811015612b8957600080fd5b5051155b612bc85760405162461bcd60e51b81526004018080602001828103825260368152602001806132e46036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611284908490612f70565b604080516370a0823160e01b81523060048201529051600091734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a0823191602480820192602092909190829003018186803b158015612c6f57600080fd5b505afa158015612c83573d6000803e3d6000fd5b505050506040513d6020811015612c9957600080fd5b50519050612cbb734c18e409dc8619bfb6a1cb56d114c3f592e0ae7982613128565b5060408051630d2680e960e11b815260048101839052600060248201819052600160448301529151734ca9b3063ec5866a4b82e437059d2c43d1be596f92631a4d01d2926064808201939182900301818387803b1580156107f157600080fd5b6000818310612d2a5781612554565b5090919050565b612d3961325a565b612d4161325a565b506040805180820190915260008082526020820152838166ffffffffffffff851660028110612d6c57fe5b60200201529392505050565b816001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561105557600080fd5b6001600160a01b038116612e19576040805162461bcd60e51b815260206004820152601d60248201527f4f776e65722073686f756c64206e6f7420626520302061646472657373000000604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008183612f005760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ec5578181015183820152602001612ead565b50505050905090810190601f168015612ef25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612f0c57fe5b0495945050505050565b60008184841115612f685760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ec5578181015183820152602001612ead565b505050900390565b612f82826001600160a01b031661321e565b612fd3576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106130115780518252601f199092019160209182019101612ff2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613073576040519150601f19603f3d011682016040523d82523d6000602084013e613078565b606091505b5091509150816130cf576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156120d9578080602001905160208110156130eb57600080fd5b50516120d95760405162461bcd60e51b815260040180806020018281038252602a8152602001806132ba602a913960400191505060405180910390fd5b6000806131b6846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561318457600080fd5b505afa158015613198573d6000803e3d6000fd5b505050506040513d60208110156131ae57600080fd5b505184612d1b565b9050836001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156131fe57600080fd5b505af1158015613212573d6000803e3d6000fd5b50929695505050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061325257508115155b949350505050565b6040518060400160405280600290602082028038833950919291505056fe0000000000000000000000000316eb71485b0ab14103307bf65a021042c6d380536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820b6fa82bd06c7696e9ff4d9e8f8b735e5f90ca1a55c607cd4acb61d89ac6348da64736f6c634300050f00325361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000000000d8c5344e331d5f4161f03726870ce9da8b504d2a00000000000000000000000010f919f874db00239a1f891d96279ff999514b82

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102a05760003560e01c80636ddc1e5e11610167578063acf6c7fd116100ce578063d1cef37d11610087578063d1cef37d1461059e578063d6935831146105bb578063dfe05031146105c3578063f20eaeb814610486578063f2fde38b146105cb578063f77c4791146105f1576102a0565b8063acf6c7fd14610553578063c1d40dbb1461055b578063c229a93f14610563578063c2dfe4b61461056b578063cb3e071514610573578063d0e30db014610596576102a0565b80638da5cb5b116101205780638da5cb5b146104d35780638f32d59b146104db57806392eefe9b146104f75780639b4529311461051d5780639cd7a1c414610525578063ab033ea91461052d576102a0565b80636ddc1e5e1461048e57806370d5ae05146104ab578063715018a6146104b3578063722713f7146104bb578063853828b6146104c357806387a15dc9146104cb576102a0565b80634b0e72161161020b57806352e65f91116101c457806352e65f91146104495780635aa6e675146104515780635bb5ebbe1461045957806366c31db714610461578063689557ca146104695780636a4874a114610486576102a0565b80634b0e7216146103b35780634bbdf4da146103d95780634c25b94a146103e15780634dec0ec7146103fe5780634eb582c81461040657806351cff8d914610423576102a0565b80631f1fcd511161025d5780631f1fcd511461036e578063257ae0de146103765780632e1a7d4d1461037e5780632f92b92a1461039b5780633fc8cef3146103a357806348f2090b146103ab576102a0565b806303807ee5146102a557806304d08035146102bf57806305d474cd146102e35780630e5c011e1461030257806319001193146103285780631cd95a2b1461034b575b600080fd5b6102ad6105f9565b60408051918252519081900360200190f35b6102c76105ff565b604080516001600160a01b039092168252519081900360200190f35b610300600480360360208110156102f957600080fd5b5035610617565b005b6103006004803603602081101561031857600080fd5b50356001600160a01b031661080c565b6103006004803603604081101561033e57600080fd5b5080359060200135610db8565b6103006004803603604081101561036157600080fd5b5080359060200135610e74565b6102c7611071565b6102c7611083565b6103006004803603602081101561039457600080fd5b503561109b565b6102c7611289565b6102c76112a1565b6102ad6112b9565b610300600480360360208110156103c957600080fd5b50356001600160a01b03166112bf565b6102ad611389565b610300600480360360208110156103f757600080fd5b503561138f565b6102ad61142e565b6103006004803603602081101561041c57600080fd5b5035611434565b6102ad6004803603602081101561043957600080fd5b50356001600160a01b03166114dd565b6102ad61172a565b6102c7611730565b61030061173f565b6102ad6118d5565b6102c76004803603602081101561047f57600080fd5b50356119b6565b6102c76119dd565b6102c7600480360360208110156104a457600080fd5b50356119f5565b6102c7611a02565b610300611a11565b6102ad611aaa565b6102ad611b3a565b6102ad611cfd565b6102c7611d03565b6104e3611d12565b604080519115158252519081900360200190f35b6103006004803603602081101561050d57600080fd5b50356001600160a01b0316611d23565b6102c7611d92565b6102ad611daa565b6103006004803603602081101561054357600080fd5b50356001600160a01b0316611db7565b6102c7611e26565b6102ad611e3e565b6102c761200f565b610300612027565b6103006004803603604081101561058957600080fd5b50803590602001356120df565b610300612190565b610300600480360360208110156105b457600080fd5b50356123c4565b6102c7612464565b6102c761247c565b610300600480360360208110156105e157600080fd5b50356001600160a01b0316612494565b6102c76124ec565b60065481565b734c18e409dc8619bfb6a1cb56d114c3f592e0ae7981565b61061f611d12565b610666576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26004820152600060248201819052915173d533a949740bb3306d119cc777fa900ba034cd529263095ea7b392604480820193602093909283900390910190829087803b1580156106d857600080fd5b505af11580156106ec573d6000803e3d6000fd5b505050506040513d602081101561070257600080fd5b50506040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2600482015260248101839052905173d533a949740bb3306d119cc777fa900ba034cd529163095ea7b39160448083019260209291908290030181600087803b15801561077257600080fd5b505af1158015610786573d6000803e3d6000fd5b505050506040513d602081101561079c57600080fd5b505060408051631255d9df60e21b8152600481018390529051735f3b5dfeb7b28cdbd7faba78963ee202a494e2a291634957677c91602480830192600092919082900301818387803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b5050505050565b33321461084c576040805162461bcd60e51b81526020600482015260096024820152680858dbdb9d1c9858dd60ba1b604482015290519081900360640190fd5b604080516335313c2160e11b81526001600160a01b0383166004820152905173d061d61a4d941c39e5453435b6345dc261c2fce091636a62784291602480830192600092919082900301818387803b1580156108a757600080fd5b505af11580156108bb573d6000803e3d6000fd5b50505050600061097a606461096e60035473d533a949740bb3306d119cc777fa900ba034cd526001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561093657600080fd5b505afa15801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b50519063ffffffff6124fb16565b9063ffffffff61255d16565b9050806109875750610db5565b604080516370a0823160e01b81523060048201529051600091732260fac5e5542a773aa44fbcfedf7c193bc2c599916370a0823191602480820192602092909190829003018186803b1580156109dc57600080fd5b505afa1580156109f0573d6000803e3d6000fd5b505050506040513d6020811015610a0657600080fd5b50516040516338ed173960e01b8152600481018481526001602483018190523060648401819052426084850181905260a060448601908152600b805460a48801819052979850737a250d5630b4cf539739df2c5dacb4c659f2488d976338ed1739978b97929594939160c49091019086908015610aac57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a8e575b50509650505050505050600060405180830381600087803b158015610ad057600080fd5b505af1158015610ae4573d6000803e3d6000fd5b5050604080516370a0823160e01b8152306004820152905160009350732260fac5e5542a773aa44fbcfedf7c193bc2c59992506370a0823191602480820192602092909190829003018186803b158015610b3d57600080fd5b505afa158015610b51573d6000803e3d6000fd5b505050506040513d6020811015610b6757600080fd5b5051600554909150600090610b999060649061096e90610b8d868863ffffffff61259f16565b9063ffffffff6124fb16565b9050610c3a600260009054906101000a90046001600160a01b03166001600160a01b0316639ec5a8946040518163ffffffff1660e01b815260040160206040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6020811015610c1657600080fd5b5051732260fac5e5542a773aa44fbcfedf7c193bc2c599908363ffffffff6125e116565b60045415610dad57604080516370a0823160e01b8152306004820152905160009173d533a949740bb3306d119cc777fa900ba034cd52916370a0823191602480820192602092909190829003018186803b158015610c9757600080fd5b505afa158015610cab573d6000803e3d6000fd5b505050506040513d6020811015610cc157600080fd5b50516040516338ed173960e01b8152600481018281526001602483018190523060648401819052426084850181905260a060448601908152600a805460a48801819052979850737a250d5630b4cf539739df2c5dacb4c659f2488d976338ed1739978a97929594939160c49091019086908015610d6757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d49575b50509650505050505050600060405180830381600087803b158015610d8b57600080fd5b505af1158015610d9f573d6000803e3d6000fd5b50505050610dab612633565b505b6108056127c6565b50565b6001546001600160a01b03163314610e05576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b610e15828263ffffffff61285716565b606414610e69576040805162461bcd60e51b815260206004820152601860248201527f6d7573742064697669646520616c6c2074686520706f6f6c0000000000000000604482015290519081900360640190fd5b600491909155600355565b610e7c611d12565b610ec3576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26004820152600060248201819052915173d533a949740bb3306d119cc777fa900ba034cd529263095ea7b392604480820193602093909283900390910190829087803b158015610f3557600080fd5b505af1158015610f49573d6000803e3d6000fd5b505050506040513d6020811015610f5f57600080fd5b50506040805163095ea7b360e01b8152735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2600482015260248101849052905173d533a949740bb3306d119cc777fa900ba034cd529163095ea7b39160448083019260209291908290030181600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050506040513d6020811015610ff957600080fd5b5050604080516365fc387360e01b815260048101849052602481018390529051735f3b5dfeb7b28cdbd7faba78963ee202a494e2a2916365fc387391604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b505050505050565b60008051602061327983398151915281565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6002546001600160a01b031633146110e8576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091600080516020613279833981519152916370a0823191602480820192602092909190829003018186803b15801561113757600080fd5b505afa15801561114b573d6000803e3d6000fd5b505050506040513d602081101561116157600080fd5b505190508181101561119a57611185611180838363ffffffff61259f16565b6128b1565b9150611197828263ffffffff61285716565b91505b60025460408051632988bb9f60e21b8152600080516020613279833981519152600482015290516000926001600160a01b03169163a622ee7c916024808301926020929190829003018186803b1580156111f357600080fd5b505afa158015611207573d6000803e3d6000fd5b505050506040513d602081101561121d57600080fd5b505190506001600160a01b038116611265576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b611284600080516020613279833981519152828563ffffffff6125e116565b505050565b734ca9b3063ec5866a4b82e437059d2c43d1be596f81565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60075481565b6001546001600160a01b0316331461130c576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b038116611367576040805162461bcd60e51b815260206004820152601e60248201527f63616e6e6f742073656e642062656c6c6120746f203020616464726573730000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b6001546001600160a01b031633146113dc576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6064811115611429576040805162461bcd60e51b81526020600482015260146024820152736d757374206c657373207468616e20313030252160601b604482015290519081900360640190fd5b600555565b60045481565b61143c611d12565b611483576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26001600160a01b031663eff7a612826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107f157600080fd5b6002546000906001600160a01b0316331461152d576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b03821673b19059ebb43466c323583928285a49f558e572fd1415611587576040805162461bcd60e51b815260206004820152600560248201526410b421b93b60d91b604482015290519081900360640190fd5b6001600160a01b03821660008051602061327983398151915214156115db576040805162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b604482015290519081900360640190fd5b6001600160a01b03821673d533a949740bb3306d119cc777fa900ba034cd521415611636576040805162461bcd60e51b8152602060048083019190915260248201526310b1b93b60e11b604482015290519081900360640190fd5b6001600160a01b038216732260fac5e5542a773aa44fbcfedf7c193bc2c5991415611690576040805162461bcd60e51b8152602060048201526005602482015264217742544360d81b604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156116d657600080fd5b505afa1580156116ea573d6000803e3d6000fd5b505050506040513d602081101561170057600080fd5b5051600254909150611725906001600160a01b0384811691168363ffffffff6125e116565b919050565b60035481565b6001546001600160a01b031681565b61177973d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d600063ffffffff612b0716565b6117b473d533a949740bb3306d119cc777fa900ba034cd52737a250d5630b4cf539739df2c5dacb4c659f2488d60001963ffffffff612b0716565b6117e9600080516020613279833981519152734ca9b3063ec5866a4b82e437059d2c43d1be596f60001963ffffffff612b0716565b61182373b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae79600063ffffffff612b0716565b61185e73b19059ebb43466c323583928285a49f558e572fd734c18e409dc8619bfb6a1cb56d114c3f592e0ae7960001963ffffffff612b0716565b611898732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f600063ffffffff612b0716565b6118d3732260fac5e5542a773aa44fbcfedf7c193bc2c599734ca9b3063ec5866a4b82e437059d2c43d1be596f60001963ffffffff612b0716565b565b60006119b0670de0b6b3a764000061096e734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b15801561193357600080fd5b505afa158015611947573d6000803e3d6000fd5b505050506040513d602081101561195d57600080fd5b5051604080516370a0823160e01b81523060048201529051734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a08231916024808301926020929190829003018186803b15801561093657600080fd5b90505b90565b600b81815481106119c357fe5b6000918252602090912001546001600160a01b0316905081565b73d533a949740bb3306d119cc777fa900ba034cd5281565b600a81815481106119c357fe5b6008546001600160a01b031681565b611a19611d12565b611a60576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006119b0611ab76118d5565b604080516370a0823160e01b81523060048201529051600080516020613279833981519152916370a08231916024808301926020929190829003018186803b158015611b0257600080fd5b505afa158015611b16573d6000803e3d6000fd5b505050506040513d6020811015611b2c57600080fd5b50519063ffffffff61285716565b6002546000906001600160a01b03163314611b8a576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b611b92612c1a565b604080516370a0823160e01b81523060048201529051600080516020613279833981519152916370a08231916024808301926020929190829003018186803b158015611bdd57600080fd5b505afa158015611bf1573d6000803e3d6000fd5b505050506040513d6020811015611c0757600080fd5b505160025460408051632988bb9f60e21b8152600080516020613279833981519152600482015290519293506000926001600160a01b039092169163a622ee7c91602480820192602092909190829003018186803b158015611c6857600080fd5b505afa158015611c7c573d6000803e3d6000fd5b505050506040513d6020811015611c9257600080fd5b505190506001600160a01b038116611cda576040805162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b604482015290519081900360640190fd5b611cf9600080516020613279833981519152828463ffffffff6125e116565b5090565b60095481565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546001600160a01b03163314611d70576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b732260fac5e5542a773aa44fbcfedf7c193bc2c59981565b60006119b0611ab7611e3e565b6001546001600160a01b03163314611e04576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b73b19059ebb43466c323583928285a49f558e572fd81565b604080516370a0823160e01b815230600482015290516000918291734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a08231916024808301926020929190829003018186803b158015611e9457600080fd5b505afa158015611ea8573d6000803e3d6000fd5b505050506040513d6020811015611ebe57600080fd5b5051905080611ed15760009150506119b3565b6000611f68670de0b6b3a764000061096e734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b5051859063ffffffff6124fb16565b90506000734ca9b3063ec5866a4b82e437059d2c43d1be596f63cc2b27d784836040518363ffffffff1660e01b8152600401808381526020018266ffffffffffffff16600f0b81526020019250505060206040518083038186803b158015611fcf57600080fd5b505afa158015611fe3573d6000803e3d6000fd5b505050506040513d6020811015611ff957600080fd5b505190506120078282612d1b565b935050505090565b73d061d61a4d941c39e5453435b6345dc261c2fce081565b61202f611d12565b612076576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a26001600160a01b0316633ccfd60b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156120c557600080fd5b505af11580156120d9573d6000803e3d6000fd5b50505050565b6001546001600160a01b0316331461212c576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b61213c828263ffffffff61285716565b606414612185576040805162461bcd60e51b81526020600482015260126024820152711b5d5cdd081899480c4c0c09481d1bdd185b60721b604482015290519081900360640190fd5b600791909155600655565b6001546001600160a01b03163314806121a857503332145b806121bd57506002546001600160a01b031633145b6121fa576040805162461bcd60e51b81526020600482015260096024820152680858dbdb9d1c9858dd60ba1b604482015290519081900360640190fd5b61220261325a565b604080516370a0823160e01b8152306004820152905161228691600080516020613279833981519152916370a0823191602480820192602092909190829003018186803b15801561225257600080fd5b505afa158015612266573d6000803e3d6000fd5b505050506040513d602081101561227c57600080fd5b505160005b612d31565b9050734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b0316630b4c7e4d8260006040518363ffffffff1660e01b81526004018083600260200280838360005b838110156122e55781810151838201526020016122cd565b5050505090500182815260200192505050600060405180830381600087803b15801561231057600080fd5b505af1158015612324573d6000803e3d6000fd5b5050604080516370a0823160e01b81523060048201529051610db59350734c18e409dc8619bfb6a1cb56d114c3f592e0ae79925073b19059ebb43466c323583928285a49f558e572fd916370a08231916024808301926020929190829003018186803b15801561239357600080fd5b505afa1580156123a7573d6000803e3d6000fd5b505050506040513d60208110156123bd57600080fd5b5051612d78565b6001546001600160a01b03163314612411576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b606481111561245f576040805162461bcd60e51b81526020600482015260156024820152743a37b79036bab1b41031b7b6b832b739b0ba34b7b760591b604482015290519081900360640190fd5b600955565b73a91ac63d040deb1b7a5e4d4134ad23eb0ba07e1481565b735f3b5dfeb7b28cdbd7faba78963ee202a494e2a281565b61249c611d12565b6124e3576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b610db581612dbe565b6002546001600160a01b031681565b60008261250a57506000612557565b8282028284828161251757fe5b04146125545760405162461bcd60e51b81526004018080602001828103825260218152602001806132996021913960400191505060405180910390fd5b90505b92915050565b600061255483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612e74565b600061255483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612f16565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611284908490612f70565b604080516370a0823160e01b8152306004820152905160009173a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14916370a0823191602480820192602092909190829003018186803b15801561268857600080fd5b505afa15801561269c573d6000803e3d6000fd5b505050506040513d60208110156126b257600080fd5b50516006549091506000906126d59060649061096e90859063ffffffff6124fb16565b905060006126f3606461096e600754866124fb90919063ffffffff16565b9050612794600260009054906101000a90046001600160a01b03166001600160a01b031663d7a78a0f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561274657600080fd5b505afa15801561275a573d6000803e3d6000fd5b505050506040513d602081101561277057600080fd5b505173a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14908363ffffffff6125e116565b6008546112849073a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14906001600160a01b03168463ffffffff6125e116565b6127ce61325a565b604080516370a0823160e01b8152306004820152905161228691732260fac5e5542a773aa44fbcfedf7c193bc2c599916370a0823191602480820192602092909190829003018186803b15801561282457600080fd5b505afa158015612838573d6000803e3d6000fd5b505050506040513d602081101561284e57600080fd5b50516001612281565b600082820183811015612554576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008061295861271061096e60095461271001610b8d734ca9b3063ec5866a4b82e437059d2c43d1be596f6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b15801561291457600080fd5b505afa158015612928573d6000803e3d6000fd5b505050506040513d602081101561293e57600080fd5b505161096e89670de0b6b3a764000063ffffffff6124fb16565b9050612978734c18e409dc8619bfb6a1cb56d114c3f592e0ae7982613128565b604080516370a0823160e01b81523060048201529051919250600091600080516020613279833981519152916370a08231916024808301926020929190829003018186803b1580156129c957600080fd5b505afa1580156129dd573d6000803e3d6000fd5b505050506040513d60208110156129f357600080fd5b505160408051630d2680e960e11b815260048101859052600060248201819052600160448301529151929350734ca9b3063ec5866a4b82e437059d2c43d1be596f92631a4d01d29260648084019391929182900301818387803b158015612a5957600080fd5b505af1158015612a6d573d6000803e3d6000fd5b5050604080516370a0823160e01b815230600482015290516000935060008051602061327983398151915292506370a0823191602480820192602092909190829003018186803b158015612ac057600080fd5b505afa158015612ad4573d6000803e3d6000fd5b505050506040513d6020811015612aea57600080fd5b50519050612afe818363ffffffff61259f16565b95945050505050565b801580612b8d575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015612b5f57600080fd5b505afa158015612b73573d6000803e3d6000fd5b505050506040513d6020811015612b8957600080fd5b5051155b612bc85760405162461bcd60e51b81526004018080602001828103825260368152602001806132e46036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611284908490612f70565b604080516370a0823160e01b81523060048201529051600091734c18e409dc8619bfb6a1cb56d114c3f592e0ae79916370a0823191602480820192602092909190829003018186803b158015612c6f57600080fd5b505afa158015612c83573d6000803e3d6000fd5b505050506040513d6020811015612c9957600080fd5b50519050612cbb734c18e409dc8619bfb6a1cb56d114c3f592e0ae7982613128565b5060408051630d2680e960e11b815260048101839052600060248201819052600160448301529151734ca9b3063ec5866a4b82e437059d2c43d1be596f92631a4d01d2926064808201939182900301818387803b1580156107f157600080fd5b6000818310612d2a5781612554565b5090919050565b612d3961325a565b612d4161325a565b506040805180820190915260008082526020820152838166ffffffffffffff851660028110612d6c57fe5b60200201529392505050565b816001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561105557600080fd5b6001600160a01b038116612e19576040805162461bcd60e51b815260206004820152601d60248201527f4f776e65722073686f756c64206e6f7420626520302061646472657373000000604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008183612f005760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ec5578181015183820152602001612ead565b50505050905090810190601f168015612ef25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612f0c57fe5b0495945050505050565b60008184841115612f685760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ec5578181015183820152602001612ead565b505050900390565b612f82826001600160a01b031661321e565b612fd3576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106130115780518252601f199092019160209182019101612ff2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613073576040519150601f19603f3d011682016040523d82523d6000602084013e613078565b606091505b5091509150816130cf576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156120d9578080602001905160208110156130eb57600080fd5b50516120d95760405162461bcd60e51b815260040180806020018281038252602a8152602001806132ba602a913960400191505060405180910390fd5b6000806131b6846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561318457600080fd5b505afa158015613198573d6000803e3d6000fd5b505050506040513d60208110156131ae57600080fd5b505184612d1b565b9050836001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156131fe57600080fd5b505af1158015613212573d6000803e3d6000fd5b50929695505050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061325257508115155b949350505050565b6040518060400160405280600290602082028038833950919291505056fe0000000000000000000000000316eb71485b0ab14103307bf65a021042c6d380536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820b6fa82bd06c7696e9ff4d9e8f8b735e5f90ca1a55c607cd4acb61d89ac6348da64736f6c634300050f0032

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

000000000000000000000000d8c5344e331d5f4161f03726870ce9da8b504d2a00000000000000000000000010f919f874db00239a1f891d96279ff999514b82

-----Decoded View---------------
Arg [0] : _controller (address): 0xd8c5344E331d5f4161f03726870ce9DA8B504d2A
Arg [1] : _governance (address): 0x10f919f874dB00239a1f891d96279Ff999514B82

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8c5344e331d5f4161f03726870ce9da8b504d2a
Arg [1] : 00000000000000000000000010f919f874db00239a1f891d96279ff999514b82


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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