ETH Price: $3,086.25 (-1.12%)

Contract

0x8251A76012219c48019E911c22Adf2FE44055359
 

Overview

ETH Balance

1 wei

Eth Value

Less Than $0.01 (@ $3,086.25/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw180855922023-09-07 15:58:35437 days ago1694102315IN
0x8251A760...E44055359
0 ETH0.0140598416.88117439
Claim LP180855882023-09-07 15:57:47437 days ago1694102267IN
0x8251A760...E44055359
0 ETH0.0010903815.83737793
Claim LP153610672022-08-17 21:25:13823 days ago1660771513IN
0x8251A760...E44055359
0 ETH0.001845621.47330199
Claim LP130268562021-08-15 1:36:061191 days ago1628991366IN
0x8251A760...E44055359
0 ETH0.0024925229
Stake128328682021-07-15 17:28:571221 days ago1626370137IN
0x8251A760...E44055359
0.001 ETH0.0204466945
Stake To Hugo128109612021-07-12 6:49:201225 days ago1626072560IN
0x8251A760...E44055359
0 ETH0.001338610
Withdraw127576152021-07-03 23:38:191233 days ago1625355499IN
0x8251A760...E44055359
0 ETH0.003126274
Stake To Hugo126992462021-06-24 21:25:301242 days ago1624569930IN
0x8251A760...E44055359
0 ETH0.0040895419
Withdraw126992002021-06-24 21:14:151242 days ago1624569255IN
0x8251A760...E44055359
0 ETH0.0144998820
Withdraw126573492021-06-18 8:18:541249 days ago1624004334IN
0x8251A760...E44055359
0 ETH0.0121722511
Add Airgrabber117660482021-01-31 20:47:361386 days ago1612126056IN
0x8251A760...E44055359
0 ETH0.0057753124
Set Governing Pa...117660262021-01-31 20:40:421386 days ago1612125642IN
0x8251A760...E44055359
0 ETH0.00693649107.8
Send To Treasury117658562021-01-31 20:00:361386 days ago1612123236IN
0x8251A760...E44055359
0 ETH0.0030357197
Stake To Hugo116255232021-01-10 6:42:451408 days ago1610260965IN
0x8251A760...E44055359
0 ETH0.006900651
Claim LP116155692021-01-08 17:59:391409 days ago1610128779IN
0x8251A760...E44055359
0 ETH0.00582698
Stake To Hugo115975982021-01-05 23:42:391412 days ago1609890159IN
0x8251A760...E44055359
0 ETH0.01935542115
Stake To Hugo115697042021-01-01 17:00:121416 days ago1609520412IN
0x8251A760...E44055359
0 ETH0.0119226265
Withdraw115557462020-12-30 13:53:531418 days ago1609336433IN
0x8251A760...E44055359
0 ETH0.02613542144
Withdraw115477822020-12-29 8:16:181420 days ago1609229778IN
0x8251A760...E44055359
0 ETH0.0418052674
Withdraw115377362020-12-27 19:32:371421 days ago1609097557IN
0x8251A760...E44055359
0 ETH0.0347172961
Withdraw115328402020-12-27 1:19:271422 days ago1609031967IN
0x8251A760...E44055359
0 ETH0.0261802546
Stake Airgrabber115303162020-12-26 16:02:331422 days ago1608998553IN
0x8251A760...E44055359
0 ETH0.0134834275
Stake To Hugo115300732020-12-26 15:11:491422 days ago1608995509IN
0x8251A760...E44055359
0 ETH0.0173893865
Stake To Hugo115293652020-12-26 12:38:121423 days ago1608986292IN
0x8251A760...E44055359
0 ETH0.0128408148
Stake To Hugo115244632020-12-25 18:39:491423 days ago1608921589IN
0x8251A760...E44055359
0 ETH0.0051228559
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
128328682021-07-15 17:28:571221 days ago1626370137
0x8251A760...E44055359
1 wei
128328682021-07-15 17:28:571221 days ago1626370137
0x8251A760...E44055359
0.00098 ETH
128328682021-07-15 17:28:571221 days ago1626370137
0x8251A760...E44055359
0.00002 ETH
117658562021-01-31 20:00:361386 days ago1612123236
0x8251A760...E44055359
0.1376866 ETH
115477822020-12-29 8:16:181420 days ago1609229778
0x8251A760...E44055359
0.31928445 ETH
115477822020-12-29 8:16:181420 days ago1609229778
0x8251A760...E44055359
0.01029949 ETH
115477822020-12-29 8:16:181420 days ago1609229778
0x8251A760...E44055359
0.33988345 ETH
115377362020-12-27 19:32:371421 days ago1609097557
0x8251A760...E44055359
0.07676574 ETH
115377362020-12-27 19:32:371421 days ago1609097557
0x8251A760...E44055359
0.00247631 ETH
115377362020-12-27 19:32:371421 days ago1609097557
0x8251A760...E44055359
0.08171837 ETH
115328402020-12-27 1:19:271422 days ago1609031967
0x8251A760...E44055359
0.07676574 ETH
115328402020-12-27 1:19:271422 days ago1609031967
0x8251A760...E44055359
0.00247631 ETH
115328402020-12-27 1:19:271422 days ago1609031967
0x8251A760...E44055359
0.08171837 ETH
115117372020-12-23 19:30:421425 days ago1608751842
0x8251A760...E44055359
0.0761919 ETH
115117372020-12-23 19:30:421425 days ago1608751842
0x8251A760...E44055359
0.0024578 ETH
115117372020-12-23 19:30:421425 days ago1608751842
0x8251A760...E44055359
0.0811075 ETH
115061022020-12-22 22:55:461426 days ago1608677746
0x8251A760...E44055359
0.0761919 ETH
115061022020-12-22 22:55:461426 days ago1608677746
0x8251A760...E44055359
0.0024578 ETH
115061022020-12-22 22:55:461426 days ago1608677746
0x8251A760...E44055359
0.0811075 ETH
114987972020-12-21 20:04:541427 days ago1608581094
0x8251A760...E44055359
0.0761919 ETH
114987972020-12-21 20:04:541427 days ago1608581094
0x8251A760...E44055359
0.0024578 ETH
114987972020-12-21 20:04:541427 days ago1608581094
0x8251A760...E44055359
0.0811075 ETH
114885232020-12-20 6:10:241429 days ago1608444624
0x8251A760...E44055359
0.0070502 ETH
114885232020-12-20 6:10:241429 days ago1608444624
0x8251A760...E44055359
0.00022742 ETH
114885232020-12-20 6:10:241429 days ago1608444624
0x8251A760...E44055359
0.00750506 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CategoryFive

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : CategoryFive.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

import "./interfaces/IERC20.sol";
import "./interfaces/IUniswap.sol";
import "./interfaces/IWETH.sol";
import "./lib/ReentrancyGuard.sol";
import "./lib/Ownable.sol";
import "./lib/SafeMath.sol";
import "./lib/Math.sol";
import "./lib/Address.sol";
import "./lib/SafeERC20.sol";
import "./lib/FeeHelpers.sol";
import "./Cane.sol";
import "./Hugo.sol";


// File: contracts/CategoryFive.sol

contract CategoryFive is ReentrancyGuard, Ownable {
 
    using SafeMath for uint256;
    using Address for address;
    using SafeERC20 for IERC20;

    event Staked(address indexed from, uint256 amount, uint256 amountLP);
    event Withdrawn(address indexed to, uint256 poolId, uint256 amount, uint256 amountLP);
    event Claimed(address indexed to, uint256 poolId, uint256 amount);
    event ClaimedAndStaked(address indexed to, uint256 poolId, uint256 amount);
    event Halving(uint256 amount);
    event Received(address indexed from, uint256 amount);
    event EmergencyWithdraw(address indexed to, uint256 poolId, uint256 amount);
    event ClaimedLPReward(address indexed to, uint256 poolId, uint256 lpEthReward, uint256 lpCaneReward);

    Cane public cane; // Hurricane farming token
    Hugo public hugo; // Hurricane governance token

    IUniswapV2Factory public factory;
    IUniswapV2Router02 public router;
    address public weth;
    address payable public treasury;
    bool public treasuryDisabled = false;

    struct AccountInfo {
        uint256 index;
        uint256 balance;
        uint256 maxBalance;
        uint256 lastWithdrawTimestamp;
        uint256 lastStakedTimestamp;
        uint256 reward;
        uint256 rewardPerTokenPaid;
        uint256 lpEthReward;
        uint256 lpEthRewardPaid;
        uint256 lpCaneReward;
        uint256 lpCaneRewardPaid;
    }
    struct PoolInfo {
        IERC20 pairAddress; // Address of LP token contract
        IERC20 otherToken; // Reference to other token in pair (e.g. 'weth')
        uint256 rewardAllocation; // Rewards allocated for this pool
        uint256 totalSupply; // Total supply of tokens in pool
        uint256 borrowedSupply; // Total CANE token borrowed for pool
        uint256 rewardPerTokenStored; // Rewards per token in this pool
    }
    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => AccountInfo)) public accountInfos;
    // List for supporting accountInfos interation
    mapping(uint256 => address payable[]) public accountInfosIndex;

    struct Airgrabber {
        uint256 ethAmount; // Amount of ETH due
        uint256 caneAmount; // Amount of CANE due
        bool ethClaimed; // Track eth claim status
        bool caneClaimed; // Track claimed CANE
    }
    mapping(address => Airgrabber) public airgrabbers;

    uint256 public constant HALVING_DURATION = 14 days;
    uint256 public rewardAllocation = 5000 * 10 ** 18;
    uint256 public halvingTimestamp = 0;
    uint256 public lastUpdateTimestamp = 0;

    uint256 public rewardRate = 0;

    // configurable parameters via gov voting (days 30+ parameters only)
    uint256 public rewardHalvingPercent = 50;
    uint256 public claimBurnFee = 1;
    uint256 public claimTreasuryFeePercent = 2;
    uint256 public claimLPFeePercent = 2;
    uint256 public claimLiquidBalancePercent = 95;
    uint256 public unstakeLPFeePercent = 2;
    uint256 public unstakeTreasuryFeePercent = 2;
    uint256 public unstakeBurnFeePercent = 1;
    uint256 public withdrawalLimitPercent = 20;
    uint256 public katrinaExitFeePercent = 3;

    // Goal is for farming to be started as early as this timestamp
    // Date and time (GMT): Tuesday, December 15, 2020 7:00 PM UTC
    uint256 public farmingStartTimestamp = 1608058800;
    bool public farmingStarted = false;

    // References to our 2 core pools
    uint256 private constant HUGO_POOL_ID = 0;
    uint256 private constant KATRINA_POOL_ID = 1;

    // Burn address
    address constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;

    // Uniswap Router Address
    address constant ROUTER_ADDRESS = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

    // Prevent big buys for first few mins after farming starts
    uint256 public constant NOBUY_DURATION = 5 minutes;

    constructor(address payable _treasury) public {
        cane = new Cane(address(this), farmingStartTimestamp.add(NOBUY_DURATION));
        hugo = new Hugo(address(this));

        router = IUniswapV2Router02(ROUTER_ADDRESS);
        factory = IUniswapV2Factory(router.factory());
        weth = router.WETH();
        treasury = _treasury;

        IERC20(cane).safeApprove(address(router), uint256(-1));

        // Calc initial reward rate
        rewardRate = rewardAllocation.div(HALVING_DURATION);

        // Initialize CANE staking pool w/ 30% of rewards at launch
        // New allocations can be set dynamically via governance
        poolInfo.push(PoolInfo({
            pairAddress: cane,
            otherToken: cane,
            rewardAllocation: rewardAllocation.mul(30).div(100),
            borrowedSupply: 0,
            totalSupply: 0,
            rewardPerTokenStored: 0
        }));

        // Initialize Katrina liquidity pool w/ 70% of rewards at launch
        // New allocations can be set dynamically via governance
        poolInfo.push(PoolInfo({
            pairAddress: IERC20(factory.createPair(address(cane), weth)),
            otherToken: IERC20(weth),
            rewardAllocation: rewardAllocation.mul(70).div(100),
            borrowedSupply: 0,
            totalSupply: 0,
            rewardPerTokenStored: 0
        }));
    }

    receive() external payable {
        emit Received(msg.sender, msg.value);
    }

    function stakeToHugo(uint256 _amount, bool _claimAndStakeRewards) public nonReentrant {
        _checkFarming();
        _updateReward(HUGO_POOL_ID);
        _halving(HUGO_POOL_ID);

        // Retrieve pool & account Info
        PoolInfo storage pool = poolInfo[HUGO_POOL_ID];
        AccountInfo storage account = accountInfos[HUGO_POOL_ID][msg.sender];

        // find user rewards due in each pool and auto claim
        if (_claimAndStakeRewards) {
            uint256 rewardsDue = account.reward; // current reward due in Hugo
            for (uint256 pid = 1; pid < poolInfo.length; pid++) {
                if (accountInfos[pid][msg.sender].reward > 0) {
                    rewardsDue = rewardsDue.add(accountInfos[pid][msg.sender].reward);
                    accountInfos[pid][msg.sender].reward = 0;
                }
            }

            if (rewardsDue > 0) { // transfer to Hugo staking pool directly without any fees
                // mint rewards directly to pool, plus send equiv Hugo gov tokens to user
                cane.mint(address(this), rewardsDue);
                hugo.mint(msg.sender, rewardsDue);

                emit ClaimedAndStaked(msg.sender, HUGO_POOL_ID, rewardsDue);

                account.balance = account.balance.add(rewardsDue);
                // Track to always allow full withdrawals against withdrawalLimit
                if (account.balance > account.maxBalance) {
                    account.maxBalance = account.balance;
                }
                account.lastStakedTimestamp = block.timestamp;
                if (account.index == 0) {
                    accountInfosIndex[HUGO_POOL_ID].push(msg.sender);
                    account.index = accountInfosIndex[HUGO_POOL_ID].length;
                }

                pool.totalSupply = pool.totalSupply.add(rewardsDue);

                if (account.reward > 0) {
                    account.reward = 0;
                }
            }
        }

        if (_amount > 0) { // allows staking only rewards to Hugo
            require(cane.balanceOf(msg.sender) >= _amount, 'Invalid balance');
            cane.transferFrom(msg.sender, address(this), _amount);

            // Add balance to pool's total supply
            pool.totalSupply = pool.totalSupply.add(_amount);

            // Add to iterator tracker if not exists
            account.balance = account.balance.add(_amount);
            // Track to always allow full withdrawals against withdrawalLimit
            if (account.balance > account.maxBalance) {
                account.maxBalance = account.balance;
            }
            account.lastStakedTimestamp = block.timestamp;
            
            if (account.index == 0) {
                accountInfosIndex[HUGO_POOL_ID].push(msg.sender);
                account.index = accountInfosIndex[HUGO_POOL_ID].length;
            }

            // Mint equivalent number of our gov token for user
            hugo.mint(msg.sender, _amount);

            emit Staked(msg.sender, _amount, 0);
        }
    }

    function stake(uint256 _poolId, uint256 _amount, address payable sender) external payable nonReentrant {
        _checkFarming();
        _updateReward(_poolId);
        _halving(_poolId);

        if (_poolId == KATRINA_POOL_ID) {
            _amount = msg.value;
        }

        require(_amount > 0, 'Invalid amount');
        require(!address(msg.sender).isContract() || address(msg.sender) == address(this), 'Invalid user');

        require(_poolId < poolInfo.length, 'Invalid pool');
        require(_poolId > HUGO_POOL_ID, 'Stake in Hugo');

        if (address(msg.sender) != address(this)) {
            sender = msg.sender;
        }

        PoolInfo storage pool = poolInfo[_poolId];
        AccountInfo storage account = accountInfos[_poolId][sender];

        // Use 2% of deposit sent to purchase CANE
        uint256 boughtCane = 0;
        if (pool.totalSupply > 0 && 
            farmingStartTimestamp.add(NOBUY_DURATION) <= block.timestamp && 
            _poolId == KATRINA_POOL_ID) {
            address[] memory swapPath = new address[](2);
            swapPath[0] = address(pool.otherToken);
            swapPath[1] = address(cane);
            IERC20(pool.otherToken).safeApprove(address(router), 0);
            IERC20(pool.otherToken).safeApprove(address(router), _amount.div(50));
            uint256[] memory amounts = router.swapExactETHForTokens{ value: _amount.div(50) }
                (uint(0), swapPath, address(this), block.timestamp + 1 days);
            
            boughtCane = amounts[amounts.length - 1];
            _amount = _amount.sub(_amount.div(50));
        }

        uint256 caneTokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress));
        uint256 otherTokenAmount = IERC20(pool.otherToken).balanceOf(address(pool.pairAddress));
        
        // If otherTokenAmount = 0 then set initial price to 1 ETH = 1 CANE
        uint256 amountCaneTokenDesired = 0;
        if (_poolId == KATRINA_POOL_ID) {
            amountCaneTokenDesired = (otherTokenAmount == 0) ? 
                _amount * 1 : _amount.mul(caneTokenAmount).div(otherTokenAmount);
        } else {
            require(otherTokenAmount > 0, "Pool not started"); // require manual add for new LPs
            amountCaneTokenDesired = _amount.mul(caneTokenAmount).div(otherTokenAmount);
        }

        // Mint borrowed cane and update borrowed amount in pool
        cane.mint(address(this), amountCaneTokenDesired.sub(boughtCane));
        pool.borrowedSupply = pool.borrowedSupply.add(amountCaneTokenDesired);

        // Add liquidity in uniswap
        IERC20(cane).approve(address(router), amountCaneTokenDesired);
        
        uint256 liquidity;
        if (_poolId == KATRINA_POOL_ID) { // use addLiquidityETH
            (,, liquidity) = router.addLiquidityETH{value : _amount}(
                address(cane), amountCaneTokenDesired, 0, 0, address(this), block.timestamp + 1 days);
        } else { // use addLiquidity for token/cane liquidity
            IERC20(pool.otherToken).approve(address(router), _amount);
            (,, liquidity) = router.addLiquidity(
                address(pool.otherToken), address(cane), 
                _amount, amountCaneTokenDesired, 0, 0, address(this), block.timestamp + 1 days);
        }

        // Add LP token to total supply
        pool.totalSupply = pool.totalSupply.add(liquidity);

        // Add to balance and iterator tracker if not exists
        account.balance = account.balance.add(liquidity);
        // Track to always allow full withdrawals against withdrawalLimit
        if (account.balance > account.maxBalance) {
            account.maxBalance = account.balance;
        }
        if (account.index == 0) {
            accountInfosIndex[_poolId].push(sender);
            account.index = accountInfosIndex[_poolId].length;
        }

        // Set stake timestamp as last withdraw timestamp
        // to prevent withdraw immediately after first staking
        account.lastStakedTimestamp = block.timestamp;
        if (account.lastWithdrawTimestamp == 0) {
            account.lastWithdrawTimestamp = block.timestamp;
        }

        emit Staked(sender, _amount, liquidity);
    }

    function withdraw(uint256 _poolId) external nonReentrant {
        _checkFarming();
        _updateReward(_poolId);
        _halving(_poolId);

        require(_poolId < poolInfo.length, 'Invalid pool');

        // Retrieve account in pool
        PoolInfo storage pool = poolInfo[_poolId];
        AccountInfo storage account = accountInfos[_poolId][msg.sender];

        require(account.lastWithdrawTimestamp + 12 hours <= block.timestamp, 'Invalid withdraw time');
        require(account.balance > 0, 'Invalid balance');

        uint256 _amount = account.maxBalance.mul(withdrawalLimitPercent).div(100);
        if (account.balance < _amount) {
            _amount = account.balance;
        }

        // Reduce total supply in pool
        pool.totalSupply = pool.totalSupply.sub(_amount);
        // Reduce user's balance
        account.balance = account.balance.sub(_amount);
        // Update user's withdraw timestamp
        account.lastWithdrawTimestamp = block.timestamp;

        uint256[] memory totalToken = new uint256[](2);

        uint256 otherTokenAmountMinusFees = 0;

        if (_poolId == HUGO_POOL_ID) { // burn Hugo
            totalToken[1] = _amount;
            hugo.burn(msg.sender, _amount);

            uint256 burnFee = _amount.div(FeeHelpers.getUnstakeBurnFee(account.lastStakedTimestamp, unstakeBurnFeePercent)); // calculate fee
            cane.burn(BURN_ADDRESS, burnFee);
            otherTokenAmountMinusFees = _amount.sub(burnFee);
        } else { // Remove liquidity in uniswap
            IERC20(pool.pairAddress).approve(address(router), _amount);
            if (_poolId == KATRINA_POOL_ID) {
                (uint256 caneTokenAmount, uint256 otherTokenAmount) = router.removeLiquidityETH(address(cane), _amount, 0, 0, address(this), block.timestamp + 1 days);
                totalToken[0] = caneTokenAmount;
                totalToken[1] = otherTokenAmount;
            } else {
                (uint256 caneTokenAmount, uint256 otherTokenAmount) = router.removeLiquidity(address(cane), address(pool.otherToken), _amount, 0, 0, address(this), block.timestamp + 1 days);
                totalToken[0] = caneTokenAmount;
                totalToken[1] = otherTokenAmount;
            }

            // Burn borrowed cane and update count
            cane.burn(address(this), totalToken[0]);
            pool.borrowedSupply = pool.borrowedSupply.sub(totalToken[0]);
        }

        // Calculate and transfer withdrawal fee to treasury
        uint256 treasuryFee = 0;
        if (_poolId == KATRINA_POOL_ID) {
            treasuryFee = FeeHelpers.getKatrinaExitFee(katrinaExitFeePercent);
            treasuryFee = totalToken[1].div(treasuryFee);
            treasury.transfer(treasuryFee);
        } else {
            treasuryFee = FeeHelpers.getUnstakeTreasuryFee(account.lastStakedTimestamp, unstakeTreasuryFeePercent);
            treasuryFee = totalToken[1].div(treasuryFee);
            pool.otherToken.transfer(treasury, treasuryFee);
        }
        
        if (_poolId == HUGO_POOL_ID) {
            otherTokenAmountMinusFees = otherTokenAmountMinusFees.sub(treasuryFee);
        } else {
            otherTokenAmountMinusFees = totalToken[1].sub(treasuryFee);
        }
        
        // Calculate and transfer withdrawal fee for distribution to other LPs
        if (accountInfosIndex[_poolId].length > 0 && pool.totalSupply > 0) {
            uint256 lpFee = 0;
            if (_poolId == KATRINA_POOL_ID) {
                lpFee = FeeHelpers.getKatrinaExitFee(katrinaExitFeePercent);
            } else {
                lpFee = FeeHelpers.getUnstakeLPFee(account.lastStakedTimestamp, unstakeLPFeePercent);
            }

            lpFee = totalToken[1].div(lpFee);
            for (uint256 i = 0; i < accountInfosIndex[_poolId].length; i ++) {
                AccountInfo storage lpAccount = accountInfos[_poolId][accountInfosIndex[_poolId][i]];
                // Send portion of fee and track amounts if we have an LP balance and is not sender
                if (lpAccount.balance > 0 && accountInfosIndex[_poolId][i] != msg.sender) {
                    if (_poolId == KATRINA_POOL_ID) {
                        lpAccount.lpEthReward = lpAccount.lpEthReward.add(lpAccount.balance.mul(lpFee).div(pool.totalSupply));
                    } else {
                        lpAccount.lpCaneReward = lpAccount.lpCaneReward.add(lpAccount.balance.mul(lpFee).div(pool.totalSupply));
                    }
                }
            }
            otherTokenAmountMinusFees = otherTokenAmountMinusFees.sub(lpFee);
        }

        totalToken[1] = otherTokenAmountMinusFees;

        if (_poolId == KATRINA_POOL_ID) {
            msg.sender.transfer(totalToken[1]);
        } else {
            pool.otherToken.transfer(msg.sender, totalToken[1]);
        }

        // Remove from list if balance is zero
        if (account.balance == 0 && account.index > 0 && account.index <= accountInfosIndex[_poolId].length) {
            uint256 accountIndex = account.index - 1; // Fetch real index in array
            accountInfos[_poolId][accountInfosIndex[_poolId][accountInfosIndex[_poolId].length - 1]].index = accountIndex + 1; // Give it my index
            accountInfosIndex[_poolId][accountIndex] = accountInfosIndex[_poolId][accountInfosIndex[_poolId].length - 1]; // Give it my address
            accountInfosIndex[_poolId].pop();
            account.index = 0; // Keep struct ref valid, but remove from tracking list of active LPs
        }

        emit Withdrawn(msg.sender, _poolId, _amount, totalToken[1]);
    }

    // Claim functions for extracting pool rewards
    function claim(uint256 _poolId) external nonReentrant {
        _checkFarming();
        _updateReward(_poolId);
        _halving(_poolId);

        require(_poolId < poolInfo.length, 'Invalid pool');

        // Retrieve account in pool
        PoolInfo storage pool = poolInfo[_poolId];
        AccountInfo storage account = accountInfos[_poolId][msg.sender];
        
        uint256 reward = account.reward;

        require(reward > 0, 'No rewards');

        if (reward > 0) {
            // Reduce rewards due
            account.reward = 0;
            // Apply variable % burn fee
            cane.mint(BURN_ADDRESS, reward.div(FeeHelpers.getClaimBurnFee(account.lastStakedTimestamp, claimBurnFee)));
            // Extract liquid qty and send liquid to user wallet
            cane.mint(msg.sender, reward.div(FeeHelpers.getClaimLiquidBalancePcnt(account.lastStakedTimestamp, claimLiquidBalancePercent)));
            // Extract treasury fee and send
            cane.mint(address(treasury), reward.div(FeeHelpers.getClaimTreasuryFee(account.lastStakedTimestamp, claimTreasuryFeePercent)));

            // Extract LPs fees amount and distribute
            if (accountInfosIndex[_poolId].length > 0 && pool.totalSupply > 0) {
                for (uint256 i = 0; i < accountInfosIndex[_poolId].length; i ++) {
                    AccountInfo storage lpAccount = accountInfos[_poolId][accountInfosIndex[_poolId][i]];
                    // Send portion of fee and track amounts if we have an LP balance and is not sender
                    if (lpAccount.balance > 0 && accountInfosIndex[_poolId][i] != msg.sender) {
                        lpAccount.lpCaneReward = lpAccount.lpCaneReward.add(lpAccount.balance
                            .mul(reward.div(FeeHelpers.getClaimLPFee(account.lastStakedTimestamp, claimLPFeePercent)))
                            .div(pool.totalSupply));
                    }
                }
            }

            // Remove liquid and treasury/lp/burn fees, then remainder goes back to LP
            uint256[] memory rewardAmounts = new uint256[](2);
            rewardAmounts[0] = reward
                .sub(reward.div(FeeHelpers.getClaimBurnFee(account.lastStakedTimestamp, claimBurnFee)))
                .sub(reward.div(FeeHelpers.getClaimLiquidBalancePcnt(account.lastStakedTimestamp, claimLiquidBalancePercent)))
                .sub(reward.div(FeeHelpers.getClaimTreasuryFee(account.lastStakedTimestamp, claimTreasuryFeePercent)))
                .sub(reward.div(FeeHelpers.getClaimLPFee(account.lastStakedTimestamp, claimLPFeePercent)));
            rewardAmounts[1] = rewardAmounts[0].div(2);
            // Mint [ALL] the qty of tokens needed to buy ETH and add LP
            cane.mint(address(this), rewardAmounts[0]);
            // Build swap pair from token to token (eg: WETH)
            address[] memory swapPath = new address[](2);
            swapPath[0] = address(cane);
            swapPath[1] = address(weth);
            // Sell minted half for ETH equivalent
            IERC20(cane).safeApprove(address(router), 0);
            IERC20(cane).safeApprove(address(router), rewardAmounts[1]);
            uint256[] memory swappedTokens = router.swapExactTokensForETH(rewardAmounts[1], uint(0), swapPath, address(this), block.timestamp + 1 days);
            // Use other minted half for CANE part, add to lp
            uint256[] memory totalLp = new uint256[](3);
            IERC20(cane).safeApprove(address(router), 0);
            IERC20(cane).safeApprove(address(router), rewardAmounts[1]);
            (totalLp[0], totalLp[1], totalLp[2]) = router.addLiquidityETH{value: swappedTokens[swappedTokens.length - 1]}
                (address(cane), rewardAmounts[1], 0, 0, address(this), block.timestamp + 5 minutes);
            // Check for any leftover CANE dust, return to treasury
            if (rewardAmounts[1].sub(totalLp[0]) > 0) {
                cane.mint(treasury, rewardAmounts[1].sub(totalLp[0]));
            }
            // Check for any leftover ETH dust, return to treasury
            if (swappedTokens[swappedTokens.length - 1].sub(totalLp[1]) > 0) {
                treasury.transfer(swappedTokens[swappedTokens.length - 1].sub(totalLp[1]));
            }

            // Add LP token to total and borrowed supply to KAT pool
            PoolInfo storage katPool = poolInfo[KATRINA_POOL_ID];
            AccountInfo storage katAccount = accountInfos[KATRINA_POOL_ID][msg.sender];

            katPool.totalSupply = katPool.totalSupply.add(totalLp[2]);
            katPool.borrowedSupply = katPool.borrowedSupply.add(totalLp[0]);
            
            // Add to balance and iterator if not already in pool
            katAccount.balance = katAccount.balance.add(totalLp[2]);
            if (katAccount.index == 0) {
                accountInfosIndex[KATRINA_POOL_ID].push(msg.sender);
                katAccount.index = accountInfosIndex[KATRINA_POOL_ID].length;
            }

            emit Claimed(msg.sender, _poolId, reward);
        }
    }

    // allow LPs to claim fee rewards with no penalties
    function claimLP(uint256 _poolId) external {
        AccountInfo storage account = accountInfos[_poolId][msg.sender];
        require (account.lpEthReward > 0 || account.lpCaneReward > 0, 'No LP rewards');
        emit ClaimedLPReward(msg.sender, _poolId, account.lpEthReward, account.lpCaneReward);

        if (account.lpEthReward > 0) {
            // Reduce rewards due, track total paid, and send ETH
            account.lpEthRewardPaid = account.lpEthRewardPaid.add(account.lpEthReward);
            msg.sender.transfer(account.lpEthReward);
            account.lpEthReward = 0;
        }
        if (account.lpCaneReward > 0) {
            account.lpCaneRewardPaid = account.lpCaneRewardPaid.add(account.lpCaneReward);
            cane.mint(msg.sender, account.lpCaneReward);
            account.lpCaneReward = 0;
        }
    }

    // stake airgrabber's tokens to Hugo
    function stakeAirgrabber() external {
        require(airgrabbers[msg.sender].caneAmount > 0, "No CANE to stake");
        require(!airgrabbers[msg.sender].caneClaimed, "Already airgrabbed CANE");
        airgrabbers[msg.sender].caneClaimed = true;
        cane.mint(msg.sender, airgrabbers[msg.sender].caneAmount);
        stakeToHugo(airgrabbers[msg.sender].caneAmount, false);
    }

    // stake airgrabber's tokens to Katrina
    function stakeAirgrabberLP() external {
        require(airgrabbers[msg.sender].ethAmount > 0, "No ETH to stake");
        require(!airgrabbers[msg.sender].ethClaimed, "Already airgrabbed ETH");
        airgrabbers[msg.sender].ethClaimed = true;
        this.stake{value: airgrabbers[msg.sender].ethAmount}(KATRINA_POOL_ID, airgrabbers[msg.sender].ethAmount, msg.sender);
    }

    // withdraw airgrabber's ETH to their wallet
    function withdrawAirgrabber() external {
        require(airgrabbers[msg.sender].ethAmount > 0, "No ETH to stake");
        require(!airgrabbers[msg.sender].ethClaimed, "Already airgrabbed ETH");
        airgrabbers[msg.sender].ethClaimed = true;
        msg.sender.transfer(airgrabbers[msg.sender].ethAmount);
    }

    // Accepts user's address and adds their ETH/CANE stakes due from the airgrab
    function addAirgrabber(address _airgrabber, uint256 _ethAmount, uint256 _caneAmount) external onlyOwner {
        require(!airgrabbers[_airgrabber].ethClaimed || !airgrabbers[_airgrabber].caneClaimed, "Airgrabber already claimed");
        airgrabbers[_airgrabber] = Airgrabber({
            ethAmount: _ethAmount,
            caneAmount: _caneAmount,
            ethClaimed: false,
            caneClaimed: false
        });
    }

    // transfer to treasury if problem found. allow disabling 
    // of this function, if we find all is well over time
    function disableSendToTreasury() external onlyOwner {
        require(!treasuryDisabled, "Already disabled");
        treasuryDisabled = true;
    }
    function sendToTreasury() external onlyOwner {
        require(!treasuryDisabled, "Invalid operation");
        treasury.transfer(address(this).balance);
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    // _rewardAllocation must be % number (e.g. 15 means 15%)
    
    function add(
        uint256 _rewardAllocation, 
        IERC20 _pairAddress, 
        IERC20 _otherToken
        ) external onlyOwner {
        require (_rewardAllocation <= 100, "Invalid allocation");
        uint256 _totalAllocation = rewardAllocation.mul(_rewardAllocation).div(100);
        for (uint256 pid = 0; pid < poolInfo.length; ++ pid) {
            _totalAllocation = _totalAllocation.add(poolInfo[pid].rewardAllocation);
        }
        require (_totalAllocation <= rewardAllocation, "Allocation exceeded");

        poolInfo.push(PoolInfo({
            pairAddress: _pairAddress,
            otherToken: _otherToken,
            rewardAllocation: rewardAllocation.mul(_rewardAllocation).div(100),
            borrowedSupply: 0,
            totalSupply: 0,
            rewardPerTokenStored: 0
        }));
    }

    // Update the given pool's CANE rewards. Can only be called by the owner.
    // _rewardAllocation must be % number (e.g. 15 means 15%)
    function set(uint256 _poolId, uint256 _rewardAllocation) external onlyOwner {
        require (_rewardAllocation <= 100, "Invalid allocation");
        uint256 totalAllocation = rewardAllocation.sub(poolInfo[_poolId].rewardAllocation).add(
            rewardAllocation.mul(_rewardAllocation).div(100)
        );
        require (totalAllocation <= rewardAllocation, "Allocation exceeded");
        
        if (poolInfo[_poolId].rewardAllocation != rewardAllocation.mul(_rewardAllocation).div(100)) {
            poolInfo[_poolId].rewardAllocation = rewardAllocation.mul(_rewardAllocation).div(100);
        }
    }

    // Fetches length of accounts in a pool
    // Allows easy front end iteration of accountInfos
    function accountInfosLength(uint256 _poolId) external view returns (uint256) {
        require(_poolId < poolInfo.length, 'Invalid pool');
        return accountInfosIndex[_poolId].length;
    }

    // Fetches details of account in the pool specified
    // Allows easy front end iteration of accountInfos
    function accountInfosByIndex(uint256 _poolId, uint256 _index) 
        external view returns (
            uint256 index,
            uint256 balance,
            uint256 lastWithdrawTimestamp,
            uint256 lastStakedTimestamp,
            uint256 reward,
            uint256 rewardPerTokenPaid,
            uint256 lpEthReward,
            uint256 lpEthRewardPaid,
            uint256 lpCaneReward,
            uint256 lpCaneRewardPaid,
            address userAddress) {

        require(_poolId < poolInfo.length, 'Invalid pool');
        userAddress = accountInfosIndex[_poolId][_index];
        AccountInfo memory account = accountInfos[_poolId][userAddress];
        return (
            account.index,
            account.balance,
            account.lastWithdrawTimestamp,
            account.lastStakedTimestamp,
            account.reward,
            account.rewardPerTokenPaid,
            account.lpEthReward,
            account.lpEthRewardPaid,
            account.lpCaneReward,
            account.lpCaneRewardPaid,
            userAddress
            );
    }

    // Fetches individual balances for each token in a pair
    function balanceOfPool(uint256 _poolId) external view returns (uint256, uint256) {
        require(_poolId < poolInfo.length, 'Invalid pool');
        PoolInfo storage pool = poolInfo[_poolId];
        
        uint256 otherTokenAmount = IERC20(pool.otherToken).balanceOf(address(pool.pairAddress));
        uint256 caneTokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress));

        return (otherTokenAmount, caneTokenAmount);
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function burnedTokenAmount() external view returns (uint256) {
        return cane.balanceOf(BURN_ADDRESS);
    }

    function rewardPerToken(uint256 _poolId) public view returns (uint256) {
        require(_poolId < poolInfo.length, 'Invalid pool');
        PoolInfo storage pool = poolInfo[_poolId];
        if (pool.totalSupply == 0) {
            return pool.rewardPerTokenStored;
        }

        uint256 poolRewardRate = pool.rewardAllocation.mul(rewardRate).div(rewardAllocation);

        return pool.rewardPerTokenStored
        .add(
            lastRewardTimestamp()
            .sub(lastUpdateTimestamp)
            .mul(poolRewardRate)
            .mul(1e18)
            .div(pool.totalSupply)
        );
    }

    function lastRewardTimestamp() public view returns (uint256) {
        return Math.min(block.timestamp, halvingTimestamp);
    }

    function rewardEarned(uint256 _poolId, address account) public view returns (uint256) {
        return accountInfos[_poolId][account].balance.mul(
            rewardPerToken(_poolId).sub(accountInfos[_poolId][account].rewardPerTokenPaid)
        )
        .div(1e18)
        .add(accountInfos[_poolId][account].reward);
    }

    // Token price in eth
    function tokenPrice(uint256 _poolId) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_poolId];
        uint256 ethAmount = IERC20(weth).balanceOf(address(pool.pairAddress));
        uint256 tokenAmount = IERC20(cane).balanceOf(address(pool.pairAddress));
        
        return tokenAmount > 0 ?
        // Current price
        ethAmount.mul(1e18).div(tokenAmount) :
        // Initial price
        (uint256(1e18).div(1));
    }

    // Set all configurable parameters
    function setGoverningParameters(uint256[] memory _parameters) external onlyOwner {
        require(_parameters[0] >= 5 && _parameters[0] <= 50, "Invalid range");  //_parameters[0] _rewardHalvingPercent
        require(_parameters[1] >= 10 && _parameters[1] <= 50, "Invalid range"); //_parameters[1] _withdrawalLimitPercent
        require(_parameters[2] >= 1 && _parameters[2] <= 5, "Invalid range");   //_parameters[2] _claimBurnFee
        require(_parameters[3] >= 1 && _parameters[3] <= 5, "Invalid range");   //_parameters[3] _claimTreasuryFeePercent
        require(_parameters[4] >= 1 && _parameters[4] <= 5, "Invalid range");   //_parameters[4] _claimLPFeePercent
        require(_parameters[5] >= 25 && _parameters[5] <= 95, "Invalid range"); //_parameters[5] _claimLiquidBalancePercent
        require(_parameters[6] >= 1 && _parameters[6] <= 5, "Invalid range");   //_parameters[6] _unstakeBurnFeePercent
        require(_parameters[7] >= 1 && _parameters[7] <= 5, "Invalid range");   //_parameters[7] _unstakeTreasuryFeePercent
        require(_parameters[8] >= 1 && _parameters[8] <= 5, "Invalid range");   //_parameters[8] _unstakeLPFeePercent
        require(_parameters[9] >= 2 && _parameters[9] <= 10, "Invalid range");  //_parameters[9] _katrinaExitFeePercent
        require(_parameters[2]   // _claimBurnFee
            .add(_parameters[3]) // _claimTreasuryFeePercent
            .add(_parameters[4]) // _claimLPFeePercent
            .add(_parameters[5]) // _claimLiquidBalancePercent
            == 100, 'Invalid claim fees');
        rewardHalvingPercent = _parameters[0];
        withdrawalLimitPercent = _parameters[1];
        claimBurnFee = _parameters[2];
        claimTreasuryFeePercent = _parameters[3];
        claimLPFeePercent = _parameters[4];
        claimLiquidBalancePercent = _parameters[5];
        unstakeBurnFeePercent = _parameters[6];
        unstakeTreasuryFeePercent = _parameters[7];
        unstakeLPFeePercent = _parameters[8];
        katrinaExitFeePercent = _parameters[9];
    }
    
    // Only allow our farmingStartTimestamp to be changed between 72 hours
    // of the original schedule. Gives us flexibility in when to go live
    // if some unexpected circumstances happens (such as high gas prices)
    //
    // We must start farming somewhere between Dec 15, 2020 and Dec 16, 2020 19:00 GMT
    // Thanks Karl (Cat3) for the suggestion ;-)
    function setFarmingStartTimestamp(uint256 _farmingStartTimestamp) external onlyOwner {
        require(!farmingStarted && _farmingStartTimestamp >= 1608058800 && _farmingStartTimestamp <= 1608145200, "Invalid range");
        farmingStartTimestamp = _farmingStartTimestamp;
    }

    // Update user rewards
    function _updateReward(uint256 _poolId) internal {
        PoolInfo storage pool = poolInfo[_poolId];
        pool.rewardPerTokenStored = rewardPerToken(_poolId);
        lastUpdateTimestamp = lastRewardTimestamp();
        if (msg.sender != address(0)) {
            accountInfos[_poolId][msg.sender].reward = rewardEarned(_poolId, msg.sender);
            accountInfos[_poolId][msg.sender].rewardPerTokenPaid = pool.rewardPerTokenStored;
        }
    }

    // Do halving when timestamp reached
    function _halving(uint256 _poolId) internal {
        if (block.timestamp >= halvingTimestamp) {
            rewardAllocation = rewardAllocation.mul(rewardHalvingPercent).div(100);

            rewardRate = rewardAllocation.div(HALVING_DURATION);
            halvingTimestamp = halvingTimestamp.add(HALVING_DURATION);

            _updateReward(_poolId);
            emit Halving(rewardAllocation);
        }
    }
    // Check if farming is started
    function _checkFarming() internal {
        require(farmingStartTimestamp <= block.timestamp, 'Farming has not yet started. Try again later.');
        if (!farmingStarted) {
            // We made it to this line, so farming has finally started! The Hurricane.Finance team 
            // would love to thank the following team members for their unwavering support:
            // Kart (Cat3); Foxtrot Delta; Storm Wins; psychologist; Lito; and Lizzie
            // ...and of course, me, Meteorologist - hehehe.
            //
            // Let's go, Hurricanes!
            farmingStarted = true;
            halvingTimestamp = block.timestamp.add(HALVING_DURATION);
            lastUpdateTimestamp = block.timestamp;
        }
    }
}

File 2 of 15 : Cane.sol
pragma solidity ^0.6.12;

import "./lib/ERC20.sol";

// File: contracts/Cane.sol
contract Cane is ERC20 {

    address minter;
    uint256 tradingStartTimestamp;
    uint256 public constant maxSupply = 12500 * 1e18;

    modifier onlyMinter {
        require(msg.sender == minter, 'Only minter can call this function.');
        _;
    }

    modifier limitEarlyBuy (uint256 _amount) {
        require(tradingStartTimestamp <= block.timestamp ||
            _amount <= (5 * 1e18), "ERC20: early buys limited"
        );
        _;
    }

    constructor(address _minter, uint256 _tradingStartTimestamp) public ERC20('Hurricane Finance', 'HCANE') {
        tradingStartTimestamp = _tradingStartTimestamp;
        minter = _minter;
    }

    function mint(address account, uint256 amount) external onlyMinter {
        require(_totalSupply.add(amount) <= maxSupply, "ERC20: max supply exceeded");
        _mint(account, amount);
    }

    function burn(address account, uint256 amount) external onlyMinter {
        _burn(account, amount);
    }

    function transfer(address recipient, uint256 amount) public virtual override limitEarlyBuy (amount) returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public virtual override limitEarlyBuy (amount) returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }
}

File 3 of 15 : Hugo.sol
pragma solidity ^0.6.12;

import "./lib/ERC20.sol";

// File: contracts/Hugo.sol
contract Hugo is ERC20 {
    
    address minter;

    modifier onlyMinter {
        require(msg.sender == minter, 'Only minter can call this function.');
        _;
    }

    constructor(address _minter) public ERC20('Hurricane Gov', 'HGOV') {
        minter = _minter;
    }

    function mint(address account, uint256 amount) external onlyMinter {
        _mint(account, amount);
    }

    function burn(address account, uint256 amount) external onlyMinter {
        _burn(account, amount);
    }
}

File 4 of 15 : IERC20.sol
pragma solidity ^0.6.12;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 15 : IUniswap.sol
pragma solidity ^0.6.12;

// File: contracts/uniswapv2/interfaces/IUniswapV2Factory.sol

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

// File: contracts/uniswapv2/interfaces/IUniswapV2Pair.sol

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: contracts/uniswapv2/interfaces/IUniswapV2Router01.sol

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// File: contracts/uniswapv2/interfaces/IUniswapV2Router02.sol

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 6 of 15 : IWETH.sol
pragma solidity ^0.6.12;

// File: contracts/uniswapv2/interfaces/IWETH.sol

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 7 of 15 : Address.sol
pragma solidity ^0.6.12;

// File: @openzeppelin/contracts/utils/Address.sol

/**
 * @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) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 8 of 15 : Context.sol
pragma solidity ^0.6.12;

// File: @openzeppelin/contracts/GSN/Context.sol

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

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

File 9 of 15 : ERC20.sol
pragma solidity ^0.6.12;

import "./Address.sol";
import "./Context.sol";
import "./SafeMath.sol";
import "../interfaces/IERC20.sol";

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol

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

    mapping (address => uint256) _balances;

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

    uint256 _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

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

File 10 of 15 : FeeHelpers.sol
pragma solidity ^0.6.12;

import "./SafeMath.sol";
import "./Math.sol";

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library FeeHelpers {
    using SafeMath for uint256;
    
    function getClaimBurnFee(uint256 lastStakedTimestamp, uint256 claimBurnFee) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days) {
            return base.mul(100).div(25);
        } else if (block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(20);
        } else if (block.timestamp < lastStakedTimestamp + 3 days) {
            return base.mul(100).div(10);
        } else if (block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(5);
        } else {
            return base.mul(100).div(claimBurnFee);
        }
    }

    function getClaimTreasuryFee(uint256 lastStakedTimestamp, uint256 claimTreasuryFeePercent) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days) {
            return base.mul(100).div(9);
        } else if (block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(8);
        } else if (block.timestamp < lastStakedTimestamp + 3 days || block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(5);
        } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(4);
        } else {
            return base.mul(100).div(claimTreasuryFeePercent);
        }
    }

    function getClaimLPFee(uint256 lastStakedTimestamp, uint256 claimLPFeePercent) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days) {
            return base.mul(100).div(15);
        } else if (block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(12);
        } else if (block.timestamp < lastStakedTimestamp + 3 days || block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(10);
        } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(5);
        } else {
            return base.mul(100).div(claimLPFeePercent);
        }
    }
    
    function getClaimLiquidBalancePcnt(uint256 lastStakedTimestamp, uint256 claimLiquidBalancePercent) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days) {
            return base.mul(100).div(1);
        } else if (block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(10);
        } else if (block.timestamp < lastStakedTimestamp + 3 days) {
            return base.mul(100).div(15);
        } else if (block.timestamp > lastStakedTimestamp + 3 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(20);
        } else {
            return base.mul(100).div(claimLiquidBalancePercent);
        }
    }

    function getUnstakeBurnFee(uint256 lastStakedTimestamp, uint256 unstakeBurnFeePercent) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(25);
        } else if (block.timestamp < lastStakedTimestamp + 3 days) {
            return base.mul(100).div(20);
        } else if (block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(15);
        } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(5);
        } else {
            return base.mul(100).div(unstakeBurnFeePercent);
        }
    }

    function getUnstakeTreasuryFee(uint256 lastStakedTimestamp, uint256 unstakeTreasuryFeePercent) public view returns (uint256) {
        uint256 base = 1;

        if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(25);
        } else if (block.timestamp < lastStakedTimestamp + 3 days) {
            return base.mul(100).div(20);
        } else if (block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(15);
        } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(5);
        } else {
            return base.mul(100).div(unstakeTreasuryFeePercent);
        }
    }
    
    function getUnstakeLPFee(uint256 lastStakedTimestamp, uint256 unstakeLPFeePercent) public view returns (uint256) {
        uint256 base = 1;
        if (block.timestamp < lastStakedTimestamp + 1 days || block.timestamp < lastStakedTimestamp + 2 days) {
            return base.mul(100).div(25);
        } else if (block.timestamp < lastStakedTimestamp + 3 days) {
            return base.mul(100).div(20);
        } else if (block.timestamp < lastStakedTimestamp + 4 days) {
            return base.mul(100).div(15);
        } else if (block.timestamp > lastStakedTimestamp + 4 days && block.timestamp < lastStakedTimestamp + 29 days) {
            return base.mul(100).div(10);
        } else {
            return base.mul(100).div(unstakeLPFeePercent);
        }
    }

    function getKatrinaExitFee(uint256 katrinaExitFeePercent) public pure returns (uint256) {
        uint256 base = 1;
        return base.mul(100).div(katrinaExitFeePercent);
    }
}

File 11 of 15 : Math.sol
pragma solidity ^0.6.12;

// File: @openzeppelin/contracts/math/Math.sol

/**
 * @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 12 of 15 : Ownable.sol
pragma solidity ^0.6.12;

/**
 * @title Owned
 * @dev Basic contract for authorization control.
 * @author dicether
 */
contract Ownable {
    address public owner;
    address public pendingOwner;

    event LogOwnerShipTransferred(address indexed previousOwner, address indexed newOwner);
    event LogOwnerShipTransferInitiated(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Modifier, which throws if called by other account than owner.
     */
    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Modifier throws if called by any account other than the pendingOwner.
     */
    modifier onlyPendingOwner() {
        require(msg.sender == pendingOwner);
        _;
    }

    /**
     * @dev Set contract creator as initial owner
     */
    constructor() public {
        owner = msg.sender;
        pendingOwner = address(0);
    }

    /**
     * @dev Allows the current owner to set the pendingOwner address.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        pendingOwner = _newOwner;
        emit LogOwnerShipTransferInitiated(owner, _newOwner);
    }

    /**
     * @dev PendingOwner can accept ownership.
     */
    function claimOwnership() public onlyPendingOwner {
        owner = pendingOwner;
        pendingOwner = address(0);
        emit LogOwnerShipTransferred(owner, pendingOwner);
    }
}

File 13 of 15 : ReentrancyGuard.sol
pragma solidity ^0.6.12;

// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 14 of 15 : SafeERC20.sol
pragma solidity ^0.6.12;

import "./Address.sol";
import "./SafeMath.sol";

import "../interfaces/IERC20.sol";

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

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

File 15 of 15 : SafeMath.sol
pragma solidity ^0.6.12;

// File: @openzeppelin/contracts/math/SafeMath.sol

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedAndStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpCaneReward","type":"uint256"}],"name":"ClaimedLPReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Halving","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogOwnerShipTransferInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogOwnerShipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"HALVING_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NOBUY_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"accountInfos","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"maxBalance","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastStakedTimestamp","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"internalType":"uint256","name":"lpEthRewardPaid","type":"uint256"},{"internalType":"uint256","name":"lpCaneReward","type":"uint256"},{"internalType":"uint256","name":"lpCaneRewardPaid","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"accountInfosByIndex","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastStakedTimestamp","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"lpEthReward","type":"uint256"},{"internalType":"uint256","name":"lpEthRewardPaid","type":"uint256"},{"internalType":"uint256","name":"lpCaneReward","type":"uint256"},{"internalType":"uint256","name":"lpCaneRewardPaid","type":"uint256"},{"internalType":"address","name":"userAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"accountInfosIndex","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"accountInfosLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardAllocation","type":"uint256"},{"internalType":"contract IERC20","name":"_pairAddress","type":"address"},{"internalType":"contract IERC20","name":"_otherToken","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_airgrabber","type":"address"},{"internalType":"uint256","name":"_ethAmount","type":"uint256"},{"internalType":"uint256","name":"_caneAmount","type":"uint256"}],"name":"addAirgrabber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"airgrabbers","outputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"caneAmount","type":"uint256"},{"internalType":"bool","name":"ethClaimed","type":"bool"},{"internalType":"bool","name":"caneClaimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnedTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cane","outputs":[{"internalType":"contract Cane","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimBurnFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"claimLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimLPFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimLiquidBalancePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTreasuryFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableSendToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmingStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"farmingStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"halvingTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hugo","outputs":[{"internalType":"contract Hugo","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"katrinaExitFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"pairAddress","type":"address"},{"internalType":"contract IERC20","name":"otherToken","type":"address"},{"internalType":"uint256","name":"rewardAllocation","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"borrowedSupply","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"rewardEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardHalvingPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sendToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_rewardAllocation","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_farmingStartTimestamp","type":"uint256"}],"name":"setFarmingStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_parameters","type":"uint256[]"}],"name":"setGoverningParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"sender","type":"address"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakeAirgrabber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAirgrabberLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_claimAndStakeRewards","type":"bool"}],"name":"stakeToHugo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"tokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeBurnFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeLPFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakeTreasuryFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAirgrabber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalLimitPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526008805460ff60a01b1916905569010f0cf064dd59200000600d556000600e819055600f819055601055603260115560016012819055600260138190556014818155605f60155560168290556017919091556018919091556019556003601a55635fd907b0601b55601c805460ff191690553480156200008357600080fd5b5060405162008ab738038062008ab783398181016040526020811015620000a957600080fd5b5051600160008190558054336001600160a01b031991821617909155600280549091169055601b543090620000ed9061012c6200057c602090811b6200571517901c565b604051620000fb9062000aa7565b6001600160a01b0390921682526020820152604080519182900301906000f0801580156200012d573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b039290921691909117905560405130906200015e9062000ab5565b6001600160a01b03909116815260405190819003602001906000f0801580156200018c573d6000803e3d6000fd5b50600480546001600160a01b039283166001600160a01b031991821617825560068054909116737a250d5630b4cf539739df2c5dacb4c659f2488d17908190556040805163c45a015560e01b81529051919093169263c45a01559281810192602092909190829003018186803b1580156200020657600080fd5b505afa1580156200021b573d6000803e3d6000fd5b505050506040513d60208110156200023257600080fd5b5051600580546001600160a01b0319166001600160a01b03928316179055600654604080516315ab88c960e31b81529051919092169163ad5c4648916004808301926020929190829003018186803b1580156200028e57600080fd5b505afa158015620002a3573d6000803e3d6000fd5b505050506040513d6020811015620002ba57600080fd5b5051600780546001600160a01b03199081166001600160a01b0393841617909155600880549091168383161790556006546003546200030d929081169116600019620005e0602090811b6200576f17901c565b6200032c62127500600d546200070460201b620058821790919060201c565b6010556040805160c0810182526003546001600160a01b0316808252602080830191909152600d546009938301916200038e916064916200037a9190601e90620058c46200074e821b17901c565b6200070460201b620058821790919060201c565b81526000602080830182905260408084018390526060938401839052855460018082018855968452828420865160069092020180546001600160a01b03199081166001600160a01b0393841617825587850151988201805490911698831698909817909755858201516002880155938501516003808801919091556080860151600488015560a090950151600596870155805160c08101808352965495546007546364e329cb60e11b909852851660c482015295841660e487015251600995948594169263c9c653969261010480870193919282880390910190829087803b1580156200047a57600080fd5b505af11580156200048f573d6000803e3d6000fd5b505050506040513d6020811015620004a657600080fd5b50516001600160a01b03908116825260075416602082810191909152600d54604090920191620004ea916064916200037a91604690620058c46200074e821b17901c565b8152600060208083018290526040808401839052606093840183905285546001808201885596845292829020855160069094020180546001600160a01b03199081166001600160a01b039586161782559286015196810180549093169690931695909517905592820151600284015581015160038301556080810151600483015560a001516005909101555062000ac3565b600082820183811015620005d7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b8015806200066a575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156200063a57600080fd5b505afa1580156200064f573d6000803e3d6000fd5b505050506040513d60208110156200066657600080fd5b5051155b620006a75760405162461bcd60e51b815260040180806020018281038252603681526020018062008a816036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620006ff918591620007ac16565b505050565b6000620005d783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200086860201b60201c565b6000826200075f57506000620005da565b828202828482816200076d57fe5b0414620005d75760405162461bcd60e51b815260040180806020018281038252602181526020018062008a366021913960400191505060405180910390fd5b606062000808826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200090f60201b6200591d179092919060201c565b805190915015620006ff578080602001905160208110156200082957600080fd5b5051620006ff5760405162461bcd60e51b815260040180806020018281038252602a81526020018062008a57602a913960400191505060405180910390fd5b60008183620008f85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620008bc578181015183820152602001620008a2565b50505050905090810190601f168015620008ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200090557fe5b0495945050505050565b606062000920848460008562000928565b949350505050565b6060620009358562000aa1565b62000987576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310620009c85780518252601f199092019160209182019101620009a7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811462000a2c576040519150601f19603f3d011682016040523d82523d6000602084013e62000a31565b606091505b5091509150811562000a47579150620009209050565b80511562000a585780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315620008bc578181015183820152602001620008a2565b3b151590565b6110ba8062006a4f83390190565b610f2d8062007b0983390190565b615f7c8062000ad36000396000f3fe60806040526004361061037a5760003560e01c806370e27603116101d1578063c45a015511610102578063e3766f99116100a0578063f8077fae1161006f578063f8077fae14610bd1578063f887ea4014610be6578063fc926a0914610bfb578063fd7e584814610c8a576103b7565b8063e3766f9914610b35578063ef08bf4814610b4a578063f2fde38b14610b5f578063f6ec540b14610b92576103b7565b8063d43cdb62116100dc578063d43cdb6214610ab7578063d4ddce8a14610ae1578063e0493f8c14610b0b578063e30c397814610b20576103b7565b8063c45a015514610a54578063cd7fdde614610a69578063cdfa2c3614610a7e576103b7565b80638da5cb5b1161016f5780639ca6fbb4116101495780639ca6fbb4146109c05780639d06c563146109e9578063ab12f464146109fe578063ab7de09814610a13576103b7565b80638da5cb5b1461098157806395a2a043146109965780639a30a287146109ab576103b7565b8063777d5c7b116101ab578063777d5c7b146108e05780637b0a47ee14610910578063868a898814610925578063874c120b14610957576103b7565b806370e2760314610884578063721a033f146108995780637628a37d146108ae576103b7565b8063346cfb27116102ab5780634e71e0c81161024957806361d027b31161022357806361d027b3146107a157806361edc2a9146107b65780636631fa46146107e0578063677393871461086f576103b7565b80634e71e0c81461071c578063500bef841461073157806358da5afa14610746576103b7565b80633e6ec0c6116102855780633e6ec0c6146106115780633fc8cef3146106425780634011962e146106575780634db8159414610707576103b7565b8063346cfb27146105a8578063379607f5146105bd5780633bba00c4146105e7576103b7565b80631ab06ee51161031857806325798e61116102f257806325798e611461053f5780632cbe0a27146105545780632e1a7d4d146105695780632f60f52514610593576103b7565b80631ab06ee5146104e55780631b67d229146105155780631f353cec1461052a576103b7565b80630a2e5c75116103545780630a2e5c751461040f5780630d749cec1461042457806314bcec9f146104675780631526fe271461047c576103b7565b806302683fa9146103bc57806306ead93c146103e3578063081e3eda146103fa576103b7565b366103b75760408051348152905133917f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874919081900360200190a2005b600080fd5b3480156103c857600080fd5b506103d1610c9f565b60408051918252519081900360200190f35b3480156103ef57600080fd5b506103f8610ca5565b005b34801561040657600080fd5b506103d1610d23565b34801561041b57600080fd5b506103d1610d29565b34801561043057600080fd5b5061044e6004803603602081101561044757600080fd5b5035610d2f565b6040805192835260208301919091528051918290030190f35b34801561047357600080fd5b506103d1610ea2565b34801561048857600080fd5b506104a66004803603602081101561049f57600080fd5b5035610ea8565b604080516001600160a01b039788168152959096166020860152848601939093526060840191909152608083015260a082015290519081900360c00190f35b3480156104f157600080fd5b506103f86004803603604081101561050857600080fd5b5080359060200135610ef8565b34801561052157600080fd5b506103d1611087565b34801561053657600080fd5b506103d161108d565b34801561054b57600080fd5b506103d1611093565b34801561056057600080fd5b506103d161109a565b34801561057557600080fd5b506103f86004803603602081101561058c57600080fd5b50356110a0565b34801561059f57600080fd5b506103d1611f38565b3480156105b457600080fd5b506103d1611f3e565b3480156105c957600080fd5b506103f8600480360360208110156105e057600080fd5b5035611f44565b3480156105f357600080fd5b506103f86004803603602081101561060a57600080fd5b5035612f13565b34801561061d57600080fd5b50610626612f97565b604080516001600160a01b039092168252519081900360200190f35b34801561064e57600080fd5b50610626612fa6565b34801561066357600080fd5b506103f86004803603602081101561067a57600080fd5b81019060208101813564010000000081111561069557600080fd5b8201836020820111156106a757600080fd5b803590602001918460208302840111640100000000831117156106c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612fb5945050505050565b34801561071357600080fd5b506103f861365f565b34801561072857600080fd5b506103f861375c565b34801561073d57600080fd5b506103f86137cd565b34801561075257600080fd5b506107796004803603602081101561076957600080fd5b50356001600160a01b0316613870565b6040805194855260208501939093529015158383015215156060830152519081900360800190f35b3480156107ad57600080fd5b5061062661389d565b3480156107c257600080fd5b506103f8600480360360208110156107d957600080fd5b50356138ac565b3480156107ec57600080fd5b506108106004803603604081101561080357600080fd5b5080359060200135613a63565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501526101208401526001600160a01b031661014083015251908190036101600190f35b34801561087b57600080fd5b506103d1613c01565b34801561089057600080fd5b506103d1613c07565b3480156108a557600080fd5b506103d1613c0d565b6103f8600480360360608110156108c457600080fd5b50803590602081013590604001356001600160a01b0316613c13565b3480156108ec57600080fd5b506106266004803603604081101561090357600080fd5b5080359060200135614649565b34801561091c57600080fd5b506103d161467e565b34801561093157600080fd5b506103f86004803603604081101561094857600080fd5b50803590602001351515614684565b34801561096357600080fd5b506103d16004803603602081101561097a57600080fd5b5035614c58565b34801561098d57600080fd5b50610626614d3e565b3480156109a257600080fd5b506103d1614d4d565b3480156109b757600080fd5b506103f8614dcb565b3480156109cc57600080fd5b506109d5614f09565b604080519115158252519081900360200190f35b3480156109f557600080fd5b506103d1614f12565b348015610a0a57600080fd5b50610626614f18565b348015610a1f57600080fd5b506103f860048036036060811015610a3657600080fd5b508035906001600160a01b0360208201358116916040013516614f27565b348015610a6057600080fd5b50610626615113565b348015610a7557600080fd5b506103f8615122565b348015610a8a57600080fd5b506103d160048036036040811015610aa157600080fd5b50803590602001356001600160a01b0316615293565b348015610ac357600080fd5b506103d160048036036020811015610ada57600080fd5b5035615319565b348015610aed57600080fd5b506103d160048036036020811015610b0457600080fd5b5035615374565b348015610b1757600080fd5b506103d16154cc565b348015610b2c57600080fd5b506106266154d2565b348015610b4157600080fd5b506109d56154e1565b348015610b5657600080fd5b506103d16154f1565b348015610b6b57600080fd5b506103f860048036036020811015610b8257600080fd5b50356001600160a01b03166154f7565b348015610b9e57600080fd5b506103f860048036036060811015610bb557600080fd5b506001600160a01b038135169060208101359060400135615560565b348015610bdd57600080fd5b506103d1615686565b348015610bf257600080fd5b50610626615699565b348015610c0757600080fd5b50610c3460048036036040811015610c1e57600080fd5b50803590602001356001600160a01b03166156a8565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b348015610c9657600080fd5b506103d161570f565b60135481565b6001546001600160a01b03163314610cbc57600080fd5b600854600160a01b900460ff1615610d0e576040805162461bcd60e51b815260206004820152601060248201526f105b1c9958591e48191a5cd8589b195960821b604482015290519081900360640190fd5b6008805460ff60a01b1916600160a01b179055565b60095490565b60185481565b60095460009081908310610d79576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098481548110610d8857fe5b6000918252602080832060069290920290910160018101548154604080516370a0823160e01b81526001600160a01b03928316600482015290519396509116926370a0823192602480840193829003018186803b158015610de857600080fd5b505afa158015610dfc573d6000803e3d6000fd5b505050506040513d6020811015610e1257600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015610e6957600080fd5b505afa158015610e7d573d6000803e3d6000fd5b505050506040513d6020811015610e9357600080fd5b50519194509092505050915091565b600f5481565b60098181548110610eb557fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0394851696509390921693909286565b6001546001600160a01b03163314610f0f57600080fd5b6064811115610f5a576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000610fb8610f7f6064610f7985600d546158c490919063ffffffff16565b90615882565b610fb260098681548110610f8f57fe5b906000526020600020906006020160020154600d5461593490919063ffffffff16565b90615715565b9050600d54811115611007576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b6110216064610f7984600d546158c490919063ffffffff16565b6009848154811061102e57fe5b906000526020600020906006020160020154146110825761105f6064610f7984600d546158c490919063ffffffff16565b6009848154811061106c57fe5b9060005260206000209060060201600201819055505b505050565b60115481565b60195481565b6212750081565b601a5481565b600260005414156110e6576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b60026000556110f3615976565b6110fc816159e4565b61110581615a5a565b600954811061114a576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60006009828154811061115957fe5b60009182526020808320858452600a8252604080852033865290925292206003810154600690920290920192504261a8c090910111156111d8576040805162461bcd60e51b8152602060048201526015602482015274496e76616c69642077697468647261772074696d6560581b604482015290519081900360640190fd5b6000816001015411611223576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b60006112436064610f7960195485600201546158c490919063ffffffff16565b90508082600101541015611258575060018101545b60038301546112679082615934565b6003840155600182015461127b9082615934565b600183015542600383015560408051600280825260608083018452926020830190803683370190505090506000856114525782826001815181106112bb57fe5b60209081029190910101526004805460408051632770a7eb60e21b8152339381019390935260248301869052516001600160a01b0390911691639dc29fac91604480830192600092919082900301818387803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505060006113c7731dfff442355ea663aeecf868df691b9013454b58637c18f69687600401546018546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561139457600080fd5b505af41580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b50518590615882565b60035460408051632770a7eb60e21b815261dead60048201526024810184905290519293506001600160a01b0390911691639dc29fac9160448082019260009290919082900301818387803b15801561141f57600080fd5b505af1158015611433573d6000803e3d6000fd5b5050505061144a818561593490919063ffffffff16565b915050611777565b84546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d60208110156114d457600080fd5b505060018614156115c85760065460035460408051629d473b60e21b81526001600160a01b039283166004820152602481018790526000604482018190526064820181905230608483015262015180420160a483015282519094859416926302751cec9260c4808201939182900301818787803b15801561155457600080fd5b505af1158015611568573d6000803e3d6000fd5b505050506040513d604081101561157e57600080fd5b508051602090910151855191935091508290859060009061159b57fe5b60200260200101818152505080846001815181106115b557fe5b60200260200101818152505050506116bc565b600654600354600187015460408051635d5155ef60e11b81526001600160a01b039384166004820152918316602483015260448201879052600060648301819052608483018190523060a484015262015180420160c4840152815190948594169263baa2abde9260e480830193919282900301818787803b15801561164c57600080fd5b505af1158015611660573d6000803e3d6000fd5b505050506040513d604081101561167657600080fd5b508051602090910151855191935091508290859060009061169357fe5b60200260200101818152505080846001815181106116ad57fe5b60200260200101818152505050505b60035482516001600160a01b0390911690639dc29fac90309085906000906116e057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561172e57600080fd5b505af1158015611742573d6000803e3d6000fd5b505050506117718260008151811061175657fe5b6020026020010151866004015461593490919063ffffffff16565b60048601555b6000600187141561186e57731dfff442355ea663aeecf868df691b9013454b5863d9a961c6601a546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156117d357600080fd5b505af41580156117e7573d6000803e3d6000fd5b505050506040513d60208110156117fd57600080fd5b5051835190915061182d9082908590600190811061181757fe5b602002602001015161588290919063ffffffff16565b6008546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015611868573d6000803e3d6000fd5b50611999565b731dfff442355ea663aeecf868df691b9013454b58631915579886600401546017546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156118cb57600080fd5b505af41580156118df573d6000803e3d6000fd5b505050506040513d60208110156118f557600080fd5b5051835190915061190f9082908590600190811061181757fe5b60018701546008546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561196c57600080fd5b505af1158015611980573d6000803e3d6000fd5b505050506040513d602081101561199657600080fd5b50505b866119af576119a88282615934565b91506119d9565b6119d681846001815181106119c057fe5b602002602001015161593490919063ffffffff16565b91505b6000878152600b6020526040902054158015906119fa575060008660030154115b15611c675760006001881415611a8e57731dfff442355ea663aeecf868df691b9013454b5863d9a961c6601a546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a5b57600080fd5b505af4158015611a6f573d6000803e3d6000fd5b505050506040513d6020811015611a8557600080fd5b50519050611b1a565b731dfff442355ea663aeecf868df691b9013454b586397c0f28887600401546016546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611aeb57600080fd5b505af4158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b505190505b611b2b818560018151811061181757fe5b905060005b6000898152600b6020526040902054811015611c58576000898152600a60209081526040808320600b9092528220805483919085908110611b6d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600181015490915015801590611bd7575060008a8152600b60205260409020805433919084908110611bbf57fe5b6000918252602090912001546001600160a01b031614155b15611c4f5760018a1415611c1c57611c12611c078a60030154610f798685600101546158c490919063ffffffff16565b600783015490615715565b6007820155611c4f565b611c49611c3e8a60030154610f798685600101546158c490919063ffffffff16565b600983015490615715565b60098201555b50600101611b30565b50611c638382615934565b9250505b8183600181518110611c7557fe5b6020026020010181815250506001871415611cdd57336001600160a01b03166108fc84600181518110611ca457fe5b60200260200101519081150290604051600060405180830381858888f19350505050158015611cd7573d6000803e3d6000fd5b50611d7e565b60018087015484516001600160a01b039091169163a9059cbb91339187918110611d0357fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611d5157600080fd5b505af1158015611d65573d6000803e3d6000fd5b505050506040513d6020811015611d7b57600080fd5b50505b6001850154158015611d905750845415155b8015611dab57506000878152600b6020526040902054855411155b15611ec55784546000888152600a60209081526040808320600b9092528220805460001980860195949291908101908110611de257fe5b60009182526020808320909101546001600160a01b031683528281019390935260409182018120939093558a8352600b909152902080546000198101908110611e2757fe5b60009182526020808320909101548a8352600b909152604090912080546001600160a01b039092169183908110611e5a57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255898152600b90915260409020805480611e9c57fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091558655505b336001600160a01b03167f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a21888686600181518110611eff57fe5b602002602001015160405180848152602001838152602001828152602001935050505060405180910390a2505060016000555050505050565b600e5481565b60165481565b60026000541415611f8a576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b6002600055611f97615976565b611fa0816159e4565b611fa981615a5a565b6009548110611fee576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098281548110611ffd57fe5b60009182526020808320858452600a82526040808520338652909252922060058101546006909202909201925080612069576040805162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b604482015290519081900360640190fd5b8015612f0857600060058301556003546004808401546012546040805163d572676d60e01b8152938401929092526024830152516001600160a01b03909216916340c10f199161dead916120f391731dfff442355ea663aeecf868df691b9013454b589163d572676d91604480820192602092909190829003018186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561213957600080fd5b505af115801561214d573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b03166340c10f19336121d6731dfff442355ea663aeecf868df691b9013454b586310d8c9aa87600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561221c57600080fd5b505af1158015612230573d6000803e3d6000fd5b50506003546008546004808701546013546040805163f1dc0cc360e01b8152938401929092526024830152516001600160a01b0393841695506340c10f19945091909216916122b491731dfff442355ea663aeecf868df691b9013454b589163f1dc0cc3916044808301926020929190829003018186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156122fa57600080fd5b505af115801561230e573d6000803e3d6000fd5b5050506000858152600b60205260409020541580159150612333575060008360030154115b156124a45760005b6000858152600b60205260409020548110156124a2576000858152600a60209081526040808320600b909252822080548391908590811061237857fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206001810154909150158015906123e257506000868152600b602052604090208054339190849081106123ca57fe5b6000918252602090912001546001600160a01b031614155b1561249957612493611c3e8660030154610f79612488731dfff442355ea663aeecf868df691b9013454b5863f6286ae18a600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561245557600080fd5b505af4158015612469573d6000803e3d6000fd5b505050506040513d602081101561247f57600080fd5b50518890615882565b6001860154906158c4565b60098201555b5060010161233b565b505b60408051600280825260608083018452926020830190803683370190505090506126f661255a731dfff442355ea663aeecf868df691b9013454b5863f6286ae186600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561252757600080fd5b505af415801561253b573d6000803e3d6000fd5b505050506040513d602081101561255157600080fd5b50518490615882565b6126f06125f0731dfff442355ea663aeecf868df691b9013454b5863f1dc0cc388600401546013546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156125bd57600080fd5b505af41580156125d1573d6000803e3d6000fd5b505050506040513d60208110156125e757600080fd5b50518690615882565b6126f0612653731dfff442355ea663aeecf868df691b9013454b586310d8c9aa8a600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561245557600080fd5b6126f06126e9731dfff442355ea663aeecf868df691b9013454b5863d572676d8c600401546012546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156126b657600080fd5b505af41580156126ca573d6000803e3d6000fd5b505050506040513d60208110156126e057600080fd5b50518a90615882565b8990615934565b90615934565b8160008151811061270357fe5b60200260200101818152505061272160028260008151811061181757fe5b8160018151811061272e57fe5b602090810291909101015260035481516001600160a01b03909116906340c10f19903090849060009061275d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156127ab57600080fd5b505af11580156127bf573d6000803e3d6000fd5b505060408051600280825260608083018452945090925090602083019080368337505060035482519293506001600160a01b03169183915060009061280057fe5b6001600160a01b03928316602091820292909201015260075482519116908290600190811061282b57fe5b6001600160a01b039283166020918202929092010152600654600354612857929081169116600061576f565b6006548251612895916001600160a01b0316908490600190811061287757fe5b60209081029190910101516003546001600160a01b0316919061576f565b60065482516060916001600160a01b0316906318cbafe590859060019081106128ba57fe5b6020026020010151600085304262015180016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561293c578181015183820152602001612924565b505050509050019650505050505050600060405180830381600087803b15801561296557600080fd5b505af1158015612979573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129a257600080fd5b81019080805160405193929190846401000000008211156129c257600080fd5b9083019060208201858111156129d757600080fd5b82518660208202830111640100000000821117156129f457600080fd5b82525081516020918201928201910280838360005b83811015612a21578181015183820152602001612a09565b5050505090500160405250505090506060600367ffffffffffffffff81118015612a4a57600080fd5b50604051908082528060200260200182016040528015612a74578160200160208202803683370190505b50600654600354919250612a96916001600160a01b039081169116600061576f565b6006548451612ab6916001600160a01b0316908690600190811061287757fe5b60065482516001600160a01b039091169063f305d7199084906000198101908110612add57fe5b6020026020010151600360009054906101000a90046001600160a01b031687600181518110612b0857fe5b6020026020010151600080304261012c016040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015612b8357600080fd5b505af1158015612b97573d6000803e3d6000fd5b50505050506040513d6060811015612bae57600080fd5b508051602082015160409092015183519192918490600090612bcc57fe5b6020026020010184600181518110612be057fe5b6020026020010185600281518110612bf457fe5b602002602001018381525083815250838152505050506000612c3182600081518110612c1c57fe5b6020026020010151866001815181106119c057fe5b1115612cd65760035460085482516001600160a01b03928316926340c10f19921690612c77908590600090612c6257fe5b6020026020010151886001815181106119c057fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612cbd57600080fd5b505af1158015612cd1573d6000803e3d6000fd5b505050505b6000612d0082600181518110612ce857fe5b6020026020010151846001865103815181106119c057fe5b1115612d6e5760085481516001600160a01b03909116906108fc90612d449084906001908110612d2c57fe5b6020026020010151856001875103815181106119c057fe5b6040518115909202916000818181858888f19350505050158015612d6c573d6000803e3d6000fd5b505b60006009600181548110612d7e57fe5b600091825260208083203384527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091526040909220845160069092029092019250612dec9084906002908110612dd157fe5b6020026020010151836003015461571590919063ffffffff16565b8260030181905550612e1f83600081518110612e0457fe5b6020026020010151836004015461571590919063ffffffff16565b8260040181905550612e5283600281518110612e3757fe5b6020026020010151826001015461571590919063ffffffff16565b60018201558054612ec757600b6020527f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5cf8054600181810183557ffc2858506235d5502cafdfae2dcc7804b97258f4d77357c39b0f2a32aa2e6a5090910180546001600160a01b031916331790556000525481555b604080518b815260208101899052815133927f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a928290030190a25050505050505b505060016000555050565b6001546001600160a01b03163314612f2a57600080fd5b601c5460ff16158015612f415750635fd907b08110155b8015612f515750635fda59308111155b612f92576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b601b55565b6004546001600160a01b031681565b6007546001600160a01b031681565b6001546001600160a01b03163314612fcc57600080fd5b600581600081518110612fdb57fe5b6020026020010151101580156130065750603281600081518110612ffb57fe5b602002602001015111155b613047576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b600a8160018151811061305657fe5b602002602001015110158015613081575060328160018151811061307657fe5b602002602001015111155b6130c2576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816002815181106130d157fe5b6020026020010151101580156130fc57506005816002815181106130f157fe5b602002602001015111155b61313d576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160038151811061314c57fe5b602002602001015110158015613177575060058160038151811061316c57fe5b602002602001015111155b6131b8576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816004815181106131c757fe5b6020026020010151101580156131f257506005816004815181106131e757fe5b602002602001015111155b613233576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60198160058151811061324257fe5b60200260200101511015801561326d5750605f8160058151811061326257fe5b602002602001015111155b6132ae576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816006815181106132bd57fe5b6020026020010151101580156132e857506005816006815181106132dd57fe5b602002602001015111155b613329576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160078151811061333857fe5b602002602001015110158015613363575060058160078151811061335857fe5b602002602001015111155b6133a4576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816008815181106133b357fe5b6020026020010151101580156133de57506005816008815181106133d357fe5b602002602001015111155b61341f576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60028160098151811061342e57fe5b6020026020010151101580156134595750600a8160098151811061344e57fe5b602002602001015111155b61349a576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b613505816005815181106134aa57fe5b6020026020010151610fb2836004815181106134c257fe5b6020026020010151610fb2856003815181106134da57fe5b6020026020010151866002815181106134ef57fe5b602002602001015161571590919063ffffffff16565b60641461354e576040805162461bcd60e51b8152602060048201526012602482015271496e76616c696420636c61696d206665657360701b604482015290519081900360640190fd5b8060008151811061355b57fe5b60200260200101516011819055508060018151811061357657fe5b60200260200101516019819055508060028151811061359157fe5b6020026020010151601281905550806003815181106135ac57fe5b6020026020010151601381905550806004815181106135c757fe5b6020026020010151601481905550806005815181106135e257fe5b6020026020010151601581905550806006815181106135fd57fe5b60200260200101516018819055508060078151811061361857fe5b60200260200101516017819055508060088151811061363357fe5b60200260200101516016819055508060098151811061364e57fe5b6020026020010151601a8190555050565b336000908152600c60205260409020546136b2576040805162461bcd60e51b815260206004820152600f60248201526e4e6f2045544820746f207374616b6560881b604482015290519081900360640190fd5b336000908152600c602052604090206002015460ff1615613713576040805162461bcd60e51b8152602060048201526016602482015275082d8e4cac2c8f240c2d2e4cee4c2c4c4cac8408aa8960531b604482015290519081900360640190fd5b336000818152600c602052604080822060028101805460ff1916600117905554905181156108fc0292818181858888f19350505050158015613759573d6000803e3d6000fd5b50565b6002546001600160a01b0316331461377357600080fd5b60028054600180546001600160a01b038084166001600160a01b031992831617928390559216909255604051600092909116907f897d3c8bbea11029ba3b26eb993fe8edb14c2c4c0d2ecceccce41d1d83d3e359908390a3565b6001546001600160a01b031633146137e457600080fd5b600854600160a01b900460ff1615613837576040805162461bcd60e51b815260206004820152601160248201527024b73b30b634b21037b832b930ba34b7b760791b604482015290519081900360640190fd5b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015613759573d6000803e3d6000fd5b600c6020526000908152604090208054600182015460029092015490919060ff8082169161010090041684565b6008546001600160a01b031681565b6000818152600a60209081526040808320338452909152902060078101541515806138db575060008160090154115b61391c576040805162461bcd60e51b815260206004820152600d60248201526c4e6f204c50207265776172647360981b604482015290519081900360640190fd5b60078101546009820154604080518581526020810193909352828101919091525133917f3eebddb24765187145dfd33b309fe37cda5b88eea08993213266bcf045d5765e919081900360600190a26007810154156139c5576007810154600882015461398791615715565b60088201556007810154604051339180156108fc02916000818181858888f193505050501580156139bc573d6000803e3d6000fd5b50600060078201555b600981015415613a5f576009810154600a8201546139e291615715565b600a8201556003546009820154604080516340c10f1960e01b81523360048201526024810192909252516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015613a3f57600080fd5b505af1158015613a53573d6000803e3d6000fd5b50506000600984015550505b5050565b60008060008060008060008060008060006009805490508d10613abc576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008d8152600b6020526040902080548d908110613ad657fe5b6000918252602090912001546001600160a01b03169050613af5615e1e565b600a60008f81526020019081526020016000206000836001600160a01b03166001600160a01b031681526020019081526020016000206040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82015481525050905080600001518160200151826060015183608001518460a001518560c001518660e001518761010001518861012001518961014001519b509b509b509b509b509b509b509b509b509b50509295989b509295989b9093969950565b600d5481565b61012c81565b60155481565b60026000541415613c59576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b6002600055613c66615976565b613c6f836159e4565b613c7883615a5a565b6001831415613c85573491505b60008211613ccb576040805162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015290519081900360640190fd5b613cd433615ae8565b1580613cdf57503330145b613d1f576040805162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b604482015290519081900360640190fd5b6009548310613d64576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008311613da9576040805162461bcd60e51b815260206004820152600d60248201526c5374616b6520696e204875676f60981b604482015290519081900360640190fd5b333014613db35750335b600060098481548110613dc257fe5b60009182526020808320878452600a825260408085206001600160a01b038816865290925290832060069290920201600381015490935090919015801590613e195750601b544290613e169061012c615715565b11155b8015613e255750600186145b156140b2576040805160028082526060808301845292602083019080368337505050600185015481519192506001600160a01b0316908290600090613e6657fe5b6001600160a01b039283166020918202929092010152600354825191169082906001908110613e9157fe5b6001600160a01b0392831660209182029290920101526006546001860154613ebf929081169116600061576f565b600654613eef906001600160a01b0316613eda886032615882565b60018701546001600160a01b0316919061576f565b6006546060906001600160a01b0316637ff36ab5613f0e896032615882565b600085304262015180016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613f82578181015183820152602001613f6a565b50505050905001955050505050506000604051808303818588803b158015613fa957600080fd5b505af1158015613fbd573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015613fe757600080fd5b810190808051604051939291908464010000000082111561400757600080fd5b90830190602082018581111561401c57600080fd5b825186602082028301116401000000008211171561403957600080fd5b82525081516020918201928201910280838360005b8381101561406657818101518382015260200161404e565b5050505090500160405250505090508060018251038151811061408557fe5b602002602001015192506140ad6140a660328961588290919063ffffffff16565b8890615934565b965050505b6003548354604080516370a0823160e01b81526001600160a01b039283166004820152905160009392909216916370a0823191602480820192602092909190829003018186803b15801561410557600080fd5b505afa158015614119573d6000803e3d6000fd5b505050506040513d602081101561412f57600080fd5b505160018501548554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561418857600080fd5b505afa15801561419c573d6000803e3d6000fd5b505050506040513d60208110156141b257600080fd5b50519050600060018914156141e35781156141da576141d582610f798a866158c4565b6141dc565b875b905061423c565b6000821161422b576040805162461bcd60e51b815260206004820152601060248201526f141bdbdb081b9bdd081cdd185c9d195960821b604482015290519081900360640190fd5b61423982610f798a866158c4565b90505b6003546001600160a01b03166340c10f19306142588488615934565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561429e57600080fd5b505af11580156142b2573d6000803e3d6000fd5b50505060048701546142c5915082615715565b6004808801919091556003546006546040805163095ea7b360e01b81526001600160a01b0392831694810194909452602484018590525191169163095ea7b39160448083019260209291908290030181600087803b15801561432657600080fd5b505af115801561433a573d6000803e3d6000fd5b505050506040513d602081101561435057600080fd5b506000905060018a141561440f576006546003546040805163f305d71960e01b81526001600160a01b03928316600482015260248101869052600060448201819052606482015230608482015262015180420160a48201529051919092169163f305d719918c9160c48082019260609290919082900301818588803b1580156143d857600080fd5b505af11580156143ec573d6000803e3d6000fd5b50505050506040513d606081101561440357600080fd5b50604001519050614557565b60018701546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018d90529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561446a57600080fd5b505af115801561447e573d6000803e3d6000fd5b505050506040513d602081101561449457600080fd5b505060065460018801546003546040805162e8e33760e81b81526001600160a01b0393841660048201529183166024830152604482018d90526064820186905260006084830181905260a483018190523060c484015262015180420160e48401529051929093169263e8e3370092610104808401936060939083900390910190829087803b15801561452557600080fd5b505af1158015614539573d6000803e3d6000fd5b505050506040513d606081101561454f57600080fd5b506040015190505b60038701546145669082615715565b6003880155600186015461457a9082615715565b600187018190556002870154101561459757600186015460028701555b85546145df5760008a8152600b602090815260408220805460018101825581845291832090910180546001600160a01b0319166001600160a01b038c16179055908b90525486555b42600487015560038601546145f5574260038701555b604080518a81526020810183905281516001600160a01b038b16927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a2505060016000555050505050505050565b600b602052816000526040600020818154811061466257fe5b6000918252602090912001546001600160a01b03169150829050565b60105481565b600260005414156146ca576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b60026000556146d7615976565b6146e160006159e4565b6146eb6000615a5a565b600060096000815481106146fb57fe5b600091825260208083203384527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e390915260409092206006909102909101915082156149a957600581015460015b6009548110156147c5576000818152600a60209081526040808320338452909152902060050154156147bd576000818152600a6020908152604080832033845290915290206005015461479d908390615715565b6000828152600a6020908152604080832033845290915281206005015591505b600101614749565b5080156149a757600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b15801561481f57600080fd5b505af1158015614833573d6000803e3d6000fd5b505060048054604080516340c10f1960e01b8152339381019390935260248301869052516001600160a01b0390911693506340c10f199250604480830192600092919082900301818387803b15801561488b57600080fd5b505af115801561489f573d6000803e3d6000fd5b505060408051600081526020810185905281513394507ff3a03193094a1b3c41754b7de76a0833a26ad4ee4b4e896eb27162f09831073093509081900390910190a260018201546148f09082615715565b600183018190556002830154101561490d57600182015460028301555b426004830155815461498157600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525482555b60038301546149909082615715565b60038401556005820154156149a757600060058301555b505b8315612f0857600354604080516370a0823160e01b8152336004820152905186926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156149f957600080fd5b505afa158015614a0d573d6000803e3d6000fd5b505050506040513d6020811015614a2357600080fd5b50511015614a6a576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b600354604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015614ac457600080fd5b505af1158015614ad8573d6000803e3d6000fd5b505050506040513d6020811015614aee57600080fd5b50506003820154614aff9085615715565b60038301556001810154614b139085615715565b6001820181905560028201541015614b3057600181015460028201555b4260048201558054614ba457600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525481555b60048054604080516340c10f1960e01b8152339381019390935260248301879052516001600160a01b03909116916340c10f1991604480830192600092919082900301818387803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050604080518781526000602082015281513394507f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee9093509081900390910190a2505060016000555050565b6009546000908210614ca0576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098381548110614caf57fe5b90600052602060002090600602019050806003015460001415614cd757600501549050614d39565b6000614cf8600d54610f7960105485600201546158c490919063ffffffff16565b9050614d34614d298360030154610f79670de0b6b3a7640000614d2386614d23600f546126f0615686565b906158c4565b600584015490615715565b925050505b919050565b6001546001600160a01b031681565b600354604080516370a0823160e01b815261dead600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015614d9a57600080fd5b505afa158015614dae573d6000803e3d6000fd5b505050506040513d6020811015614dc457600080fd5b5051905090565b336000908152600c6020526040902054614e1e576040805162461bcd60e51b815260206004820152600f60248201526e4e6f2045544820746f207374616b6560881b604482015290519081900360640190fd5b336000908152600c602052604090206002015460ff1615614e7f576040805162461bcd60e51b8152602060048201526016602482015275082d8e4cac2c8f240c2d2e4cee4c2c4c4cac8408aa8960531b604482015290519081900360640190fd5b336000818152600c602052604080822060028101805460ff1916600190811790915590548251637628a37d60e01b8152600481019290925260248201819052604482019490945290513093637628a37d9390926064808201939182900301818588803b158015614eee57600080fd5b505af1158015614f02573d6000803e3d6000fd5b5050505050565b601c5460ff1681565b601b5481565b6003546001600160a01b031681565b6001546001600160a01b03163314614f3e57600080fd5b6064831115614f89576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000614fa56064610f7986600d546158c490919063ffffffff16565b905060005b600954811015614fef57614fe560098281548110614fc457fe5b9060005260206000209060060201600201548361571590919063ffffffff16565b9150600101614faa565b50600d5481111561503d576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b60096040518060c00160405280856001600160a01b03168152602001846001600160a01b031681526020016150826064610f7989600d546158c490919063ffffffff16565b8152600060208083018290526040808401839052606093840183905285546001808201885596845292829020855160069094020180546001600160a01b03199081166001600160a01b039586161782559286015196810180549093169690931695909517905592820151600284015581015160038301556080810151600483015560a0015160059091015550505050565b6005546001600160a01b031681565b336000908152600c6020526040902060010154615179576040805162461bcd60e51b815260206004820152601060248201526f4e6f2043414e4520746f207374616b6560801b604482015290519081900360640190fd5b336000908152600c6020526040902060020154610100900460ff16156151e6576040805162461bcd60e51b815260206004820152601760248201527f416c726561647920616972677261626265642043414e45000000000000000000604482015290519081900360640190fd5b336000818152600c602052604080822060028101805461ff0019166101001790556003546001919091015482516340c10f1960e01b81526004810195909552602485015290516001600160a01b0391909116926340c10f1992604480830193919282900301818387803b15801561525c57600080fd5b505af1158015615270573d6000803e3d6000fd5b5050336000908152600c602052604081206001015461529193509150614684565b565b6000828152600a602090815260408083206001600160a01b0385168452909152812060058101546006909101546153109190610fb290670de0b6b3a764000090610f79906152e4906126f08a614c58565b6000898152600a602090815260408083206001600160a01b038c168452909152902060010154906158c4565b90505b92915050565b6009546000908210615361576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b506000908152600b602052604090205490565b6000806009838154811061538457fe5b600091825260208083206007546006909302018054604080516370a0823160e01b81526001600160a01b03928316600482015290519296509316926370a08231926024808301939192829003018186803b1580156153e157600080fd5b505afa1580156153f5573d6000803e3d6000fd5b505050506040513d602081101561540b57600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561546257600080fd5b505afa158015615476573d6000803e3d6000fd5b505050506040513d602081101561548c57600080fd5b50519050806154ad576154a8670de0b6b3a76400006001615882565b6154c3565b6154c381610f7984670de0b6b3a76400006158c4565b95945050505050565b60125481565b6002546001600160a01b031681565b600854600160a01b900460ff1681565b60145481565b6001546001600160a01b0316331461550e57600080fd5b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907f83ada3430836f9d4bd6f7bc690ffbba5199cb19b37393dd64c2299302135359690600090a350565b6001546001600160a01b0316331461557757600080fd5b6001600160a01b0383166000908152600c602052604090206002015460ff1615806155c357506001600160a01b0383166000908152600c6020526040902060020154610100900460ff16155b615614576040805162461bcd60e51b815260206004820152601a60248201527f4169726772616262657220616c726561647920636c61696d6564000000000000604482015290519081900360640190fd5b6040805160808101825292835260208084019283526000848301818152606086018281526001600160a01b039097168252600c9092529190912092518355905160018301555160029091018054925115156101000261ff001992151560ff199094169390931791909116919091179055565b600061569442600e54615aee565b905090565b6006546001600160a01b031681565b600a6020528160005260406000206020528060005260406000206000915091505080600001549080600101549080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a015490508b565b60175481565b600082820183811015615310576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8015806157f5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156157c757600080fd5b505afa1580156157db573d6000803e3d6000fd5b505050506040513d60208110156157f157600080fd5b5051155b6158305760405162461bcd60e51b8152600401808060200182810382526036815260200180615f116036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611082908490615b04565b600061531083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615bb5565b6000826158d357506000615313565b828202828482816158e057fe5b04146153105760405162461bcd60e51b8152600401808060200182810382526021815260200180615ec66021913960400191505060405180910390fd5b606061592c8484600085615c57565b949350505050565b600061531083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615dc4565b42601b5411156159b75760405162461bcd60e51b815260040180806020018281038252602d815260200180615e79602d913960400191505060405180910390fd5b601c5460ff1661529157601c805460ff191660011790556159db4262127500615715565b600e5542600f55565b6000600982815481106159f357fe5b90600052602060002090600602019050615a0c82614c58565b6005820155615a19615686565b600f553315613a5f57615a2c8233615293565b6000928352600a60209081526040808520338652909152909220600580820193909355910154600690910155565b600e54421061375957615a7f6064610f79601154600d546158c490919063ffffffff16565b600d819055615a919062127500615882565b601055600e54615aa49062127500615715565b600e55615ab0816159e4565b600d5460408051918252517ffafb0ec84dbe5a6bf08f4fec2f970b66d402032cdfea2008b11e11eb5c3990f09181900360200190a150565b3b151590565b6000818310615afd5781615310565b5090919050565b6060615b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661591d9092919063ffffffff16565b80519091501561108257808060200190516020811015615b7857600080fd5b50516110825760405162461bcd60e51b815260040180806020018281038252602a815260200180615ee7602a913960400191505060405180910390fd5b60008183615c415760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c06578181015183820152602001615bee565b50505050905090810190601f168015615c335780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615c4d57fe5b0495945050505050565b6060615c6285615ae8565b615cb3576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310615cf25780518252601f199092019160209182019101615cd3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615d54576040519150601f19603f3d011682016040523d82523d6000602084013e615d59565b606091505b50915091508115615d6d57915061592c9050565b805115615d7d5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315615c06578181015183820152602001615bee565b60008184841115615e165760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315615c06578181015183820152602001615bee565b505050900390565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4661726d696e6720686173206e6f742079657420737461727465642e2054727920616761696e206c617465722e5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201633695deda991d9199f1c4378c73f6d4f05e59856df2941b4e9a9bd1b0bba9364736f6c634300060c0033608060405234801561001057600080fd5b506040516110ba3803806110ba8339818101604052604081101561003357600080fd5b5080516020918201516040805180820182526011815270487572726963616e652046696e616e636560781b818601908152825180840190935260058352644843414e4560d81b95830195909552805193949293909261009591600391906100e8565b5080516100a99060049060208401906100e8565b5050600580546006939093556001600160a01b0390931661010002610100600160a81b031960ff1990931660121792909216919091179091555061017b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012957805160ff1916838001178555610156565b82800160010185558215610156579182015b8281111561015657825182559160200191906001019061013b565b50610162929150610166565b5090565b5b808211156101625760008155600101610167565b610f308061018a6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146102ce578063a9059cbb146102fa578063d5abeb0114610326578063dd62ed3e1461032e576100ea565b806370a082311461027457806395d89b411461029a5780639dc29fac146102a2576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc578063395093511461021a57806340c10f1914610246576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f761035c565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b0381351690602001356103f2565b604080519115158252519081900360200190f35b6101b461040f565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b03813581169160208101359091169060400135610415565b610204610504565b6040805160ff9092168252519081900360200190f35b6101986004803603604081101561023057600080fd5b506001600160a01b03813516906020013561050d565b6102726004803603604081101561025c57600080fd5b506001600160a01b03813516906020013561055b565b005b6101b46004803603602081101561028a57600080fd5b50356001600160a01b0316610623565b6100f761063e565b610272600480360360408110156102b857600080fd5b506001600160a01b03813516906020013561069f565b610198600480360360408110156102e457600080fd5b506001600160a01b0381351690602001356106f7565b6101986004803603604081101561031057600080fd5b506001600160a01b03813516906020013561075f565b6101b46107e4565b6101b46004803603604081101561034457600080fd5b506001600160a01b03813581169160200135166107f2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b820191906000526020600020905b8154815290600101906020018083116103cb57829003601f168201915b5050505050905090565b60006104066103ff61081d565b8484610821565b50600192915050565b60025490565b600081426006541115806104315750674563918244f400008111155b61047e576040805162461bcd60e51b8152602060048201526019602482015278115490cc8c0e8819585c9b1e48189d5e5cc81b1a5b5a5d1959603a1b604482015290519081900360640190fd5b61048985858561090d565b6104f98561049561081d565b6104f486604051806060016040528060288152602001610e44602891396001600160a01b038b166000908152600160205260408120906104d361081d565b6001600160a01b031681526020810191909152604001600020549190610a68565b610821565b506001949350505050565b60055460ff1690565b600061040661051a61081d565b846104f4856001600061052b61081d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610aff565b60055461010090046001600160a01b031633146105a95760405162461bcd60e51b8152600401808060200182810382526023815260200180610dfb6023913960400191505060405180910390fd5b6002546902a5a058fc295ed00000906105c29083610aff565b1115610615576040805162461bcd60e51b815260206004820152601a60248201527f45524332303a206d617820737570706c79206578636565646564000000000000604482015290519081900360640190fd5b61061f8282610b60565b5050565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b60055461010090046001600160a01b031633146106ed5760405162461bcd60e51b8152600401808060200182810382526023815260200180610dfb6023913960400191505060405180910390fd5b61061f8282610c50565b600061040661070461081d565b846104f485604051806060016040528060258152602001610ed6602591396001600061072e61081d565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610a68565b6000814260065411158061077b5750674563918244f400008111155b6107c8576040805162461bcd60e51b8152602060048201526019602482015278115490cc8c0e8819585c9b1e48189d5e5cc81b1a5b5a5d1959603a1b604482015290519081900360640190fd5b6107da6107d361081d565b858561090d565b5060019392505050565b6902a5a058fc295ed0000081565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166108665760405162461bcd60e51b8152600401808060200182810382526024815260200180610eb26024913960400191505060405180910390fd5b6001600160a01b0382166108ab5760405162461bcd60e51b8152600401808060200182810382526022815260200180610dd96022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166109525760405162461bcd60e51b8152600401808060200182810382526025815260200180610e8d6025913960400191505060405180910390fd5b6001600160a01b0382166109975760405162461bcd60e51b8152600401808060200182810382526023815260200180610d946023913960400191505060405180910390fd5b6109a2838383610d4c565b6109df81604051806060016040528060268152602001610e1e602691396001600160a01b0386166000908152602081905260409020549190610a68565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a0e9082610aff565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610af75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610abc578181015183820152602001610aa4565b50505050905090810190601f168015610ae95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610b59576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610bbb576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610bc760008383610d4c565b600254610bd49082610aff565b6002556001600160a01b038216600090815260208190526040902054610bfa9082610aff565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610c955760405162461bcd60e51b8152600401808060200182810382526021815260200180610e6c6021913960400191505060405180910390fd5b610ca182600083610d4c565b610cde81604051806060016040528060228152602001610db7602291396001600160a01b0385166000908152602081905260409020549190610a68565b6001600160a01b038316600090815260208190526040902055600254610d049082610d51565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b505050565b6000610b5983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a6856fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f20616464726573734f6e6c79206d696e7465722063616e2063616c6c20746869732066756e6374696f6e2e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cbbc9ff58b0362b7dd21b914686d4d6aeda1e0a2b1b76f20941b9b157cb7ff2a64736f6c634300060c0033608060405234801561001057600080fd5b50604051610f2d380380610f2d8339818101604052602081101561003357600080fd5b5051604080518082018252600d81526c243ab93934b1b0b7329023b7bb60991b6020828101918252835180850190945260048452632423a7ab60e11b908401528151919291610084916003916100d1565b5080516100989060049060208401906100d1565b5050600580546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550610164565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011257805160ff191683800117855561013f565b8280016001018555821561013f579182015b8281111561013f578251825591602001919060010190610124565b5061014b92915061014f565b5090565b5b8082111561014b5760008155600101610150565b610dba806101736000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806340c10f191161008c5780639dc29fac116100665780639dc29fac14610287578063a457c2d7146102b3578063a9059cbb146102df578063dd62ed3e1461030b576100cf565b806340c10f191461022b57806370a082311461025957806395d89b411461027f576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610339565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103cf565b604080519115158252519081900360200190f35b6101996103ec565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103f2565b6101e9610479565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610482565b6102576004803603604081101561024157600080fd5b506001600160a01b0381351690602001356104d0565b005b6101996004803603602081101561026f57600080fd5b50356001600160a01b031661052c565b6100dc610547565b6102576004803603604081101561029d57600080fd5b506001600160a01b0381351690602001356105a8565b61017d600480360360408110156102c957600080fd5b506001600160a01b038135169060200135610600565b61017d600480360360408110156102f557600080fd5b506001600160a01b038135169060200135610668565b6101996004803603604081101561032157600080fd5b506001600160a01b038135811691602001351661067c565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050905090565b60006103e36103dc6106a7565b84846106ab565b50600192915050565b60025490565b60006103ff848484610797565b61046f8461040b6106a7565b61046a85604051806060016040528060288152602001610cce602891396001600160a01b038a166000908152600160205260408120906104496106a7565b6001600160a01b0316815260208101919091526040016000205491906108f2565b6106ab565b5060019392505050565b60055460ff1690565b60006103e361048f6106a7565b8461046a85600160006104a06106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610989565b60055461010090046001600160a01b0316331461051e5760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b61052882826109ea565b5050565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b60055461010090046001600160a01b031633146105f65760405162461bcd60e51b8152600401808060200182810382526023815260200180610c856023913960400191505060405180910390fd5b6105288282610ada565b60006103e361060d6106a7565b8461046a85604051806060016040528060258152602001610d6060259139600160006106376106a7565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906108f2565b60006103e36106756106a7565b8484610797565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166106f05760405162461bcd60e51b8152600401808060200182810382526024815260200180610d3c6024913960400191505060405180910390fd5b6001600160a01b0382166107355760405162461bcd60e51b8152600401808060200182810382526022815260200180610c636022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166107dc5760405162461bcd60e51b8152600401808060200182810382526025815260200180610d176025913960400191505060405180910390fd5b6001600160a01b0382166108215760405162461bcd60e51b8152600401808060200182810382526023815260200180610c1e6023913960400191505060405180910390fd5b61082c838383610bd6565b61086981604051806060016040528060268152602001610ca8602691396001600160a01b03861660009081526020819052604090205491906108f2565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546108989082610989565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156109815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561094657818101518382015260200161092e565b50505050905090810190601f1680156109735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156109e3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610a45576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610a5160008383610bd6565b600254610a5e9082610989565b6002556001600160a01b038216600090815260208190526040902054610a849082610989565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610b1f5760405162461bcd60e51b8152600401808060200182810382526021815260200180610cf66021913960400191505060405180910390fd5b610b2b82600083610bd6565b610b6881604051806060016040528060228152602001610c41602291396001600160a01b03851660009081526020819052604090205491906108f2565b6001600160a01b038316600090815260208190526040902055600254610b8e9082610bdb565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b505050565b60006109e383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506108f256fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f20616464726573734f6e6c79206d696e7465722063616e2063616c6c20746869732066756e6374696f6e2e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fa815f2f4e8230edec89d3a9df36fbf5191da4566aa2f64cdc1e52493d00e17b64736f6c634300060c0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0

Deployed Bytecode

0x60806040526004361061037a5760003560e01c806370e27603116101d1578063c45a015511610102578063e3766f99116100a0578063f8077fae1161006f578063f8077fae14610bd1578063f887ea4014610be6578063fc926a0914610bfb578063fd7e584814610c8a576103b7565b8063e3766f9914610b35578063ef08bf4814610b4a578063f2fde38b14610b5f578063f6ec540b14610b92576103b7565b8063d43cdb62116100dc578063d43cdb6214610ab7578063d4ddce8a14610ae1578063e0493f8c14610b0b578063e30c397814610b20576103b7565b8063c45a015514610a54578063cd7fdde614610a69578063cdfa2c3614610a7e576103b7565b80638da5cb5b1161016f5780639ca6fbb4116101495780639ca6fbb4146109c05780639d06c563146109e9578063ab12f464146109fe578063ab7de09814610a13576103b7565b80638da5cb5b1461098157806395a2a043146109965780639a30a287146109ab576103b7565b8063777d5c7b116101ab578063777d5c7b146108e05780637b0a47ee14610910578063868a898814610925578063874c120b14610957576103b7565b806370e2760314610884578063721a033f146108995780637628a37d146108ae576103b7565b8063346cfb27116102ab5780634e71e0c81161024957806361d027b31161022357806361d027b3146107a157806361edc2a9146107b65780636631fa46146107e0578063677393871461086f576103b7565b80634e71e0c81461071c578063500bef841461073157806358da5afa14610746576103b7565b80633e6ec0c6116102855780633e6ec0c6146106115780633fc8cef3146106425780634011962e146106575780634db8159414610707576103b7565b8063346cfb27146105a8578063379607f5146105bd5780633bba00c4146105e7576103b7565b80631ab06ee51161031857806325798e61116102f257806325798e611461053f5780632cbe0a27146105545780632e1a7d4d146105695780632f60f52514610593576103b7565b80631ab06ee5146104e55780631b67d229146105155780631f353cec1461052a576103b7565b80630a2e5c75116103545780630a2e5c751461040f5780630d749cec1461042457806314bcec9f146104675780631526fe271461047c576103b7565b806302683fa9146103bc57806306ead93c146103e3578063081e3eda146103fa576103b7565b366103b75760408051348152905133917f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874919081900360200190a2005b600080fd5b3480156103c857600080fd5b506103d1610c9f565b60408051918252519081900360200190f35b3480156103ef57600080fd5b506103f8610ca5565b005b34801561040657600080fd5b506103d1610d23565b34801561041b57600080fd5b506103d1610d29565b34801561043057600080fd5b5061044e6004803603602081101561044757600080fd5b5035610d2f565b6040805192835260208301919091528051918290030190f35b34801561047357600080fd5b506103d1610ea2565b34801561048857600080fd5b506104a66004803603602081101561049f57600080fd5b5035610ea8565b604080516001600160a01b039788168152959096166020860152848601939093526060840191909152608083015260a082015290519081900360c00190f35b3480156104f157600080fd5b506103f86004803603604081101561050857600080fd5b5080359060200135610ef8565b34801561052157600080fd5b506103d1611087565b34801561053657600080fd5b506103d161108d565b34801561054b57600080fd5b506103d1611093565b34801561056057600080fd5b506103d161109a565b34801561057557600080fd5b506103f86004803603602081101561058c57600080fd5b50356110a0565b34801561059f57600080fd5b506103d1611f38565b3480156105b457600080fd5b506103d1611f3e565b3480156105c957600080fd5b506103f8600480360360208110156105e057600080fd5b5035611f44565b3480156105f357600080fd5b506103f86004803603602081101561060a57600080fd5b5035612f13565b34801561061d57600080fd5b50610626612f97565b604080516001600160a01b039092168252519081900360200190f35b34801561064e57600080fd5b50610626612fa6565b34801561066357600080fd5b506103f86004803603602081101561067a57600080fd5b81019060208101813564010000000081111561069557600080fd5b8201836020820111156106a757600080fd5b803590602001918460208302840111640100000000831117156106c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612fb5945050505050565b34801561071357600080fd5b506103f861365f565b34801561072857600080fd5b506103f861375c565b34801561073d57600080fd5b506103f86137cd565b34801561075257600080fd5b506107796004803603602081101561076957600080fd5b50356001600160a01b0316613870565b6040805194855260208501939093529015158383015215156060830152519081900360800190f35b3480156107ad57600080fd5b5061062661389d565b3480156107c257600080fd5b506103f8600480360360208110156107d957600080fd5b50356138ac565b3480156107ec57600080fd5b506108106004803603604081101561080357600080fd5b5080359060200135613a63565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501526101208401526001600160a01b031661014083015251908190036101600190f35b34801561087b57600080fd5b506103d1613c01565b34801561089057600080fd5b506103d1613c07565b3480156108a557600080fd5b506103d1613c0d565b6103f8600480360360608110156108c457600080fd5b50803590602081013590604001356001600160a01b0316613c13565b3480156108ec57600080fd5b506106266004803603604081101561090357600080fd5b5080359060200135614649565b34801561091c57600080fd5b506103d161467e565b34801561093157600080fd5b506103f86004803603604081101561094857600080fd5b50803590602001351515614684565b34801561096357600080fd5b506103d16004803603602081101561097a57600080fd5b5035614c58565b34801561098d57600080fd5b50610626614d3e565b3480156109a257600080fd5b506103d1614d4d565b3480156109b757600080fd5b506103f8614dcb565b3480156109cc57600080fd5b506109d5614f09565b604080519115158252519081900360200190f35b3480156109f557600080fd5b506103d1614f12565b348015610a0a57600080fd5b50610626614f18565b348015610a1f57600080fd5b506103f860048036036060811015610a3657600080fd5b508035906001600160a01b0360208201358116916040013516614f27565b348015610a6057600080fd5b50610626615113565b348015610a7557600080fd5b506103f8615122565b348015610a8a57600080fd5b506103d160048036036040811015610aa157600080fd5b50803590602001356001600160a01b0316615293565b348015610ac357600080fd5b506103d160048036036020811015610ada57600080fd5b5035615319565b348015610aed57600080fd5b506103d160048036036020811015610b0457600080fd5b5035615374565b348015610b1757600080fd5b506103d16154cc565b348015610b2c57600080fd5b506106266154d2565b348015610b4157600080fd5b506109d56154e1565b348015610b5657600080fd5b506103d16154f1565b348015610b6b57600080fd5b506103f860048036036020811015610b8257600080fd5b50356001600160a01b03166154f7565b348015610b9e57600080fd5b506103f860048036036060811015610bb557600080fd5b506001600160a01b038135169060208101359060400135615560565b348015610bdd57600080fd5b506103d1615686565b348015610bf257600080fd5b50610626615699565b348015610c0757600080fd5b50610c3460048036036040811015610c1e57600080fd5b50803590602001356001600160a01b03166156a8565b604080519b8c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b348015610c9657600080fd5b506103d161570f565b60135481565b6001546001600160a01b03163314610cbc57600080fd5b600854600160a01b900460ff1615610d0e576040805162461bcd60e51b815260206004820152601060248201526f105b1c9958591e48191a5cd8589b195960821b604482015290519081900360640190fd5b6008805460ff60a01b1916600160a01b179055565b60095490565b60185481565b60095460009081908310610d79576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098481548110610d8857fe5b6000918252602080832060069290920290910160018101548154604080516370a0823160e01b81526001600160a01b03928316600482015290519396509116926370a0823192602480840193829003018186803b158015610de857600080fd5b505afa158015610dfc573d6000803e3d6000fd5b505050506040513d6020811015610e1257600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b158015610e6957600080fd5b505afa158015610e7d573d6000803e3d6000fd5b505050506040513d6020811015610e9357600080fd5b50519194509092505050915091565b600f5481565b60098181548110610eb557fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0394851696509390921693909286565b6001546001600160a01b03163314610f0f57600080fd5b6064811115610f5a576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000610fb8610f7f6064610f7985600d546158c490919063ffffffff16565b90615882565b610fb260098681548110610f8f57fe5b906000526020600020906006020160020154600d5461593490919063ffffffff16565b90615715565b9050600d54811115611007576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b6110216064610f7984600d546158c490919063ffffffff16565b6009848154811061102e57fe5b906000526020600020906006020160020154146110825761105f6064610f7984600d546158c490919063ffffffff16565b6009848154811061106c57fe5b9060005260206000209060060201600201819055505b505050565b60115481565b60195481565b6212750081565b601a5481565b600260005414156110e6576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b60026000556110f3615976565b6110fc816159e4565b61110581615a5a565b600954811061114a576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60006009828154811061115957fe5b60009182526020808320858452600a8252604080852033865290925292206003810154600690920290920192504261a8c090910111156111d8576040805162461bcd60e51b8152602060048201526015602482015274496e76616c69642077697468647261772074696d6560581b604482015290519081900360640190fd5b6000816001015411611223576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b60006112436064610f7960195485600201546158c490919063ffffffff16565b90508082600101541015611258575060018101545b60038301546112679082615934565b6003840155600182015461127b9082615934565b600183015542600383015560408051600280825260608083018452926020830190803683370190505090506000856114525782826001815181106112bb57fe5b60209081029190910101526004805460408051632770a7eb60e21b8152339381019390935260248301869052516001600160a01b0390911691639dc29fac91604480830192600092919082900301818387803b15801561131a57600080fd5b505af115801561132e573d6000803e3d6000fd5b5050505060006113c7731dfff442355ea663aeecf868df691b9013454b58637c18f69687600401546018546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561139457600080fd5b505af41580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b50518590615882565b60035460408051632770a7eb60e21b815261dead60048201526024810184905290519293506001600160a01b0390911691639dc29fac9160448082019260009290919082900301818387803b15801561141f57600080fd5b505af1158015611433573d6000803e3d6000fd5b5050505061144a818561593490919063ffffffff16565b915050611777565b84546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d60208110156114d457600080fd5b505060018614156115c85760065460035460408051629d473b60e21b81526001600160a01b039283166004820152602481018790526000604482018190526064820181905230608483015262015180420160a483015282519094859416926302751cec9260c4808201939182900301818787803b15801561155457600080fd5b505af1158015611568573d6000803e3d6000fd5b505050506040513d604081101561157e57600080fd5b508051602090910151855191935091508290859060009061159b57fe5b60200260200101818152505080846001815181106115b557fe5b60200260200101818152505050506116bc565b600654600354600187015460408051635d5155ef60e11b81526001600160a01b039384166004820152918316602483015260448201879052600060648301819052608483018190523060a484015262015180420160c4840152815190948594169263baa2abde9260e480830193919282900301818787803b15801561164c57600080fd5b505af1158015611660573d6000803e3d6000fd5b505050506040513d604081101561167657600080fd5b508051602090910151855191935091508290859060009061169357fe5b60200260200101818152505080846001815181106116ad57fe5b60200260200101818152505050505b60035482516001600160a01b0390911690639dc29fac90309085906000906116e057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561172e57600080fd5b505af1158015611742573d6000803e3d6000fd5b505050506117718260008151811061175657fe5b6020026020010151866004015461593490919063ffffffff16565b60048601555b6000600187141561186e57731dfff442355ea663aeecf868df691b9013454b5863d9a961c6601a546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156117d357600080fd5b505af41580156117e7573d6000803e3d6000fd5b505050506040513d60208110156117fd57600080fd5b5051835190915061182d9082908590600190811061181757fe5b602002602001015161588290919063ffffffff16565b6008546040519192506001600160a01b03169082156108fc029083906000818181858888f19350505050158015611868573d6000803e3d6000fd5b50611999565b731dfff442355ea663aeecf868df691b9013454b58631915579886600401546017546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156118cb57600080fd5b505af41580156118df573d6000803e3d6000fd5b505050506040513d60208110156118f557600080fd5b5051835190915061190f9082908590600190811061181757fe5b60018701546008546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561196c57600080fd5b505af1158015611980573d6000803e3d6000fd5b505050506040513d602081101561199657600080fd5b50505b866119af576119a88282615934565b91506119d9565b6119d681846001815181106119c057fe5b602002602001015161593490919063ffffffff16565b91505b6000878152600b6020526040902054158015906119fa575060008660030154115b15611c675760006001881415611a8e57731dfff442355ea663aeecf868df691b9013454b5863d9a961c6601a546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a5b57600080fd5b505af4158015611a6f573d6000803e3d6000fd5b505050506040513d6020811015611a8557600080fd5b50519050611b1a565b731dfff442355ea663aeecf868df691b9013454b586397c0f28887600401546016546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611aeb57600080fd5b505af4158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b505190505b611b2b818560018151811061181757fe5b905060005b6000898152600b6020526040902054811015611c58576000898152600a60209081526040808320600b9092528220805483919085908110611b6d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600181015490915015801590611bd7575060008a8152600b60205260409020805433919084908110611bbf57fe5b6000918252602090912001546001600160a01b031614155b15611c4f5760018a1415611c1c57611c12611c078a60030154610f798685600101546158c490919063ffffffff16565b600783015490615715565b6007820155611c4f565b611c49611c3e8a60030154610f798685600101546158c490919063ffffffff16565b600983015490615715565b60098201555b50600101611b30565b50611c638382615934565b9250505b8183600181518110611c7557fe5b6020026020010181815250506001871415611cdd57336001600160a01b03166108fc84600181518110611ca457fe5b60200260200101519081150290604051600060405180830381858888f19350505050158015611cd7573d6000803e3d6000fd5b50611d7e565b60018087015484516001600160a01b039091169163a9059cbb91339187918110611d0357fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611d5157600080fd5b505af1158015611d65573d6000803e3d6000fd5b505050506040513d6020811015611d7b57600080fd5b50505b6001850154158015611d905750845415155b8015611dab57506000878152600b6020526040902054855411155b15611ec55784546000888152600a60209081526040808320600b9092528220805460001980860195949291908101908110611de257fe5b60009182526020808320909101546001600160a01b031683528281019390935260409182018120939093558a8352600b909152902080546000198101908110611e2757fe5b60009182526020808320909101548a8352600b909152604090912080546001600160a01b039092169183908110611e5a57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255898152600b90915260409020805480611e9c57fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091558655505b336001600160a01b03167f75e161b3e824b114fc1a33274bd7091918dd4e639cede50b78b15a4eea956a21888686600181518110611eff57fe5b602002602001015160405180848152602001838152602001828152602001935050505060405180910390a2505060016000555050505050565b600e5481565b60165481565b60026000541415611f8a576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b6002600055611f97615976565b611fa0816159e4565b611fa981615a5a565b6009548110611fee576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098281548110611ffd57fe5b60009182526020808320858452600a82526040808520338652909252922060058101546006909202909201925080612069576040805162461bcd60e51b815260206004820152600a6024820152694e6f207265776172647360b01b604482015290519081900360640190fd5b8015612f0857600060058301556003546004808401546012546040805163d572676d60e01b8152938401929092526024830152516001600160a01b03909216916340c10f199161dead916120f391731dfff442355ea663aeecf868df691b9013454b589163d572676d91604480820192602092909190829003018186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561213957600080fd5b505af115801561214d573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b03166340c10f19336121d6731dfff442355ea663aeecf868df691b9013454b586310d8c9aa87600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561221c57600080fd5b505af1158015612230573d6000803e3d6000fd5b50506003546008546004808701546013546040805163f1dc0cc360e01b8152938401929092526024830152516001600160a01b0393841695506340c10f19945091909216916122b491731dfff442355ea663aeecf868df691b9013454b589163f1dc0cc3916044808301926020929190829003018186803b15801561139457600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156122fa57600080fd5b505af115801561230e573d6000803e3d6000fd5b5050506000858152600b60205260409020541580159150612333575060008360030154115b156124a45760005b6000858152600b60205260409020548110156124a2576000858152600a60209081526040808320600b909252822080548391908590811061237857fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190206001810154909150158015906123e257506000868152600b602052604090208054339190849081106123ca57fe5b6000918252602090912001546001600160a01b031614155b1561249957612493611c3e8660030154610f79612488731dfff442355ea663aeecf868df691b9013454b5863f6286ae18a600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561245557600080fd5b505af4158015612469573d6000803e3d6000fd5b505050506040513d602081101561247f57600080fd5b50518890615882565b6001860154906158c4565b60098201555b5060010161233b565b505b60408051600280825260608083018452926020830190803683370190505090506126f661255a731dfff442355ea663aeecf868df691b9013454b5863f6286ae186600401546014546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561252757600080fd5b505af415801561253b573d6000803e3d6000fd5b505050506040513d602081101561255157600080fd5b50518490615882565b6126f06125f0731dfff442355ea663aeecf868df691b9013454b5863f1dc0cc388600401546013546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156125bd57600080fd5b505af41580156125d1573d6000803e3d6000fd5b505050506040513d60208110156125e757600080fd5b50518690615882565b6126f0612653731dfff442355ea663aeecf868df691b9013454b586310d8c9aa8a600401546015546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561245557600080fd5b6126f06126e9731dfff442355ea663aeecf868df691b9013454b5863d572676d8c600401546012546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156126b657600080fd5b505af41580156126ca573d6000803e3d6000fd5b505050506040513d60208110156126e057600080fd5b50518a90615882565b8990615934565b90615934565b8160008151811061270357fe5b60200260200101818152505061272160028260008151811061181757fe5b8160018151811061272e57fe5b602090810291909101015260035481516001600160a01b03909116906340c10f19903090849060009061275d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156127ab57600080fd5b505af11580156127bf573d6000803e3d6000fd5b505060408051600280825260608083018452945090925090602083019080368337505060035482519293506001600160a01b03169183915060009061280057fe5b6001600160a01b03928316602091820292909201015260075482519116908290600190811061282b57fe5b6001600160a01b039283166020918202929092010152600654600354612857929081169116600061576f565b6006548251612895916001600160a01b0316908490600190811061287757fe5b60209081029190910101516003546001600160a01b0316919061576f565b60065482516060916001600160a01b0316906318cbafe590859060019081106128ba57fe5b6020026020010151600085304262015180016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561293c578181015183820152602001612924565b505050509050019650505050505050600060405180830381600087803b15801561296557600080fd5b505af1158015612979573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129a257600080fd5b81019080805160405193929190846401000000008211156129c257600080fd5b9083019060208201858111156129d757600080fd5b82518660208202830111640100000000821117156129f457600080fd5b82525081516020918201928201910280838360005b83811015612a21578181015183820152602001612a09565b5050505090500160405250505090506060600367ffffffffffffffff81118015612a4a57600080fd5b50604051908082528060200260200182016040528015612a74578160200160208202803683370190505b50600654600354919250612a96916001600160a01b039081169116600061576f565b6006548451612ab6916001600160a01b0316908690600190811061287757fe5b60065482516001600160a01b039091169063f305d7199084906000198101908110612add57fe5b6020026020010151600360009054906101000a90046001600160a01b031687600181518110612b0857fe5b6020026020010151600080304261012c016040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015612b8357600080fd5b505af1158015612b97573d6000803e3d6000fd5b50505050506040513d6060811015612bae57600080fd5b508051602082015160409092015183519192918490600090612bcc57fe5b6020026020010184600181518110612be057fe5b6020026020010185600281518110612bf457fe5b602002602001018381525083815250838152505050506000612c3182600081518110612c1c57fe5b6020026020010151866001815181106119c057fe5b1115612cd65760035460085482516001600160a01b03928316926340c10f19921690612c77908590600090612c6257fe5b6020026020010151886001815181106119c057fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612cbd57600080fd5b505af1158015612cd1573d6000803e3d6000fd5b505050505b6000612d0082600181518110612ce857fe5b6020026020010151846001865103815181106119c057fe5b1115612d6e5760085481516001600160a01b03909116906108fc90612d449084906001908110612d2c57fe5b6020026020010151856001875103815181106119c057fe5b6040518115909202916000818181858888f19350505050158015612d6c573d6000803e3d6000fd5b505b60006009600181548110612d7e57fe5b600091825260208083203384527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091526040909220845160069092029092019250612dec9084906002908110612dd157fe5b6020026020010151836003015461571590919063ffffffff16565b8260030181905550612e1f83600081518110612e0457fe5b6020026020010151836004015461571590919063ffffffff16565b8260040181905550612e5283600281518110612e3757fe5b6020026020010151826001015461571590919063ffffffff16565b60018201558054612ec757600b6020527f72c6bfb7988af3a1efa6568f02a999bc52252641c659d85961ca3d372b57d5cf8054600181810183557ffc2858506235d5502cafdfae2dcc7804b97258f4d77357c39b0f2a32aa2e6a5090910180546001600160a01b031916331790556000525481555b604080518b815260208101899052815133927f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a928290030190a25050505050505b505060016000555050565b6001546001600160a01b03163314612f2a57600080fd5b601c5460ff16158015612f415750635fd907b08110155b8015612f515750635fda59308111155b612f92576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b601b55565b6004546001600160a01b031681565b6007546001600160a01b031681565b6001546001600160a01b03163314612fcc57600080fd5b600581600081518110612fdb57fe5b6020026020010151101580156130065750603281600081518110612ffb57fe5b602002602001015111155b613047576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b600a8160018151811061305657fe5b602002602001015110158015613081575060328160018151811061307657fe5b602002602001015111155b6130c2576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816002815181106130d157fe5b6020026020010151101580156130fc57506005816002815181106130f157fe5b602002602001015111155b61313d576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160038151811061314c57fe5b602002602001015110158015613177575060058160038151811061316c57fe5b602002602001015111155b6131b8576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816004815181106131c757fe5b6020026020010151101580156131f257506005816004815181106131e757fe5b602002602001015111155b613233576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60198160058151811061324257fe5b60200260200101511015801561326d5750605f8160058151811061326257fe5b602002602001015111155b6132ae576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816006815181106132bd57fe5b6020026020010151101580156132e857506005816006815181106132dd57fe5b602002602001015111155b613329576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60018160078151811061333857fe5b602002602001015110158015613363575060058160078151811061335857fe5b602002602001015111155b6133a4576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b6001816008815181106133b357fe5b6020026020010151101580156133de57506005816008815181106133d357fe5b602002602001015111155b61341f576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b60028160098151811061342e57fe5b6020026020010151101580156134595750600a8160098151811061344e57fe5b602002602001015111155b61349a576040805162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b604482015290519081900360640190fd5b613505816005815181106134aa57fe5b6020026020010151610fb2836004815181106134c257fe5b6020026020010151610fb2856003815181106134da57fe5b6020026020010151866002815181106134ef57fe5b602002602001015161571590919063ffffffff16565b60641461354e576040805162461bcd60e51b8152602060048201526012602482015271496e76616c696420636c61696d206665657360701b604482015290519081900360640190fd5b8060008151811061355b57fe5b60200260200101516011819055508060018151811061357657fe5b60200260200101516019819055508060028151811061359157fe5b6020026020010151601281905550806003815181106135ac57fe5b6020026020010151601381905550806004815181106135c757fe5b6020026020010151601481905550806005815181106135e257fe5b6020026020010151601581905550806006815181106135fd57fe5b60200260200101516018819055508060078151811061361857fe5b60200260200101516017819055508060088151811061363357fe5b60200260200101516016819055508060098151811061364e57fe5b6020026020010151601a8190555050565b336000908152600c60205260409020546136b2576040805162461bcd60e51b815260206004820152600f60248201526e4e6f2045544820746f207374616b6560881b604482015290519081900360640190fd5b336000908152600c602052604090206002015460ff1615613713576040805162461bcd60e51b8152602060048201526016602482015275082d8e4cac2c8f240c2d2e4cee4c2c4c4cac8408aa8960531b604482015290519081900360640190fd5b336000818152600c602052604080822060028101805460ff1916600117905554905181156108fc0292818181858888f19350505050158015613759573d6000803e3d6000fd5b50565b6002546001600160a01b0316331461377357600080fd5b60028054600180546001600160a01b038084166001600160a01b031992831617928390559216909255604051600092909116907f897d3c8bbea11029ba3b26eb993fe8edb14c2c4c0d2ecceccce41d1d83d3e359908390a3565b6001546001600160a01b031633146137e457600080fd5b600854600160a01b900460ff1615613837576040805162461bcd60e51b815260206004820152601160248201527024b73b30b634b21037b832b930ba34b7b760791b604482015290519081900360640190fd5b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015613759573d6000803e3d6000fd5b600c6020526000908152604090208054600182015460029092015490919060ff8082169161010090041684565b6008546001600160a01b031681565b6000818152600a60209081526040808320338452909152902060078101541515806138db575060008160090154115b61391c576040805162461bcd60e51b815260206004820152600d60248201526c4e6f204c50207265776172647360981b604482015290519081900360640190fd5b60078101546009820154604080518581526020810193909352828101919091525133917f3eebddb24765187145dfd33b309fe37cda5b88eea08993213266bcf045d5765e919081900360600190a26007810154156139c5576007810154600882015461398791615715565b60088201556007810154604051339180156108fc02916000818181858888f193505050501580156139bc573d6000803e3d6000fd5b50600060078201555b600981015415613a5f576009810154600a8201546139e291615715565b600a8201556003546009820154604080516340c10f1960e01b81523360048201526024810192909252516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015613a3f57600080fd5b505af1158015613a53573d6000803e3d6000fd5b50506000600984015550505b5050565b60008060008060008060008060008060006009805490508d10613abc576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008d8152600b6020526040902080548d908110613ad657fe5b6000918252602090912001546001600160a01b03169050613af5615e1e565b600a60008f81526020019081526020016000206000836001600160a01b03166001600160a01b031681526020019081526020016000206040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82015481525050905080600001518160200151826060015183608001518460a001518560c001518660e001518761010001518861012001518961014001519b509b509b509b509b509b509b509b509b509b50509295989b509295989b9093969950565b600d5481565b61012c81565b60155481565b60026000541415613c59576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b6002600055613c66615976565b613c6f836159e4565b613c7883615a5a565b6001831415613c85573491505b60008211613ccb576040805162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015290519081900360640190fd5b613cd433615ae8565b1580613cdf57503330145b613d1f576040805162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b604482015290519081900360640190fd5b6009548310613d64576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b60008311613da9576040805162461bcd60e51b815260206004820152600d60248201526c5374616b6520696e204875676f60981b604482015290519081900360640190fd5b333014613db35750335b600060098481548110613dc257fe5b60009182526020808320878452600a825260408085206001600160a01b038816865290925290832060069290920201600381015490935090919015801590613e195750601b544290613e169061012c615715565b11155b8015613e255750600186145b156140b2576040805160028082526060808301845292602083019080368337505050600185015481519192506001600160a01b0316908290600090613e6657fe5b6001600160a01b039283166020918202929092010152600354825191169082906001908110613e9157fe5b6001600160a01b0392831660209182029290920101526006546001860154613ebf929081169116600061576f565b600654613eef906001600160a01b0316613eda886032615882565b60018701546001600160a01b0316919061576f565b6006546060906001600160a01b0316637ff36ab5613f0e896032615882565b600085304262015180016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613f82578181015183820152602001613f6a565b50505050905001955050505050506000604051808303818588803b158015613fa957600080fd5b505af1158015613fbd573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015613fe757600080fd5b810190808051604051939291908464010000000082111561400757600080fd5b90830190602082018581111561401c57600080fd5b825186602082028301116401000000008211171561403957600080fd5b82525081516020918201928201910280838360005b8381101561406657818101518382015260200161404e565b5050505090500160405250505090508060018251038151811061408557fe5b602002602001015192506140ad6140a660328961588290919063ffffffff16565b8890615934565b965050505b6003548354604080516370a0823160e01b81526001600160a01b039283166004820152905160009392909216916370a0823191602480820192602092909190829003018186803b15801561410557600080fd5b505afa158015614119573d6000803e3d6000fd5b505050506040513d602081101561412f57600080fd5b505160018501548554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561418857600080fd5b505afa15801561419c573d6000803e3d6000fd5b505050506040513d60208110156141b257600080fd5b50519050600060018914156141e35781156141da576141d582610f798a866158c4565b6141dc565b875b905061423c565b6000821161422b576040805162461bcd60e51b815260206004820152601060248201526f141bdbdb081b9bdd081cdd185c9d195960821b604482015290519081900360640190fd5b61423982610f798a866158c4565b90505b6003546001600160a01b03166340c10f19306142588488615934565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561429e57600080fd5b505af11580156142b2573d6000803e3d6000fd5b50505060048701546142c5915082615715565b6004808801919091556003546006546040805163095ea7b360e01b81526001600160a01b0392831694810194909452602484018590525191169163095ea7b39160448083019260209291908290030181600087803b15801561432657600080fd5b505af115801561433a573d6000803e3d6000fd5b505050506040513d602081101561435057600080fd5b506000905060018a141561440f576006546003546040805163f305d71960e01b81526001600160a01b03928316600482015260248101869052600060448201819052606482015230608482015262015180420160a48201529051919092169163f305d719918c9160c48082019260609290919082900301818588803b1580156143d857600080fd5b505af11580156143ec573d6000803e3d6000fd5b50505050506040513d606081101561440357600080fd5b50604001519050614557565b60018701546006546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018d90529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561446a57600080fd5b505af115801561447e573d6000803e3d6000fd5b505050506040513d602081101561449457600080fd5b505060065460018801546003546040805162e8e33760e81b81526001600160a01b0393841660048201529183166024830152604482018d90526064820186905260006084830181905260a483018190523060c484015262015180420160e48401529051929093169263e8e3370092610104808401936060939083900390910190829087803b15801561452557600080fd5b505af1158015614539573d6000803e3d6000fd5b505050506040513d606081101561454f57600080fd5b506040015190505b60038701546145669082615715565b6003880155600186015461457a9082615715565b600187018190556002870154101561459757600186015460028701555b85546145df5760008a8152600b602090815260408220805460018101825581845291832090910180546001600160a01b0319166001600160a01b038c16179055908b90525486555b42600487015560038601546145f5574260038701555b604080518a81526020810183905281516001600160a01b038b16927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a2505060016000555050505050505050565b600b602052816000526040600020818154811061466257fe5b6000918252602090912001546001600160a01b03169150829050565b60105481565b600260005414156146ca576040805162461bcd60e51b815260206004820152601f6024820152600080516020615ea6833981519152604482015290519081900360640190fd5b60026000556146d7615976565b6146e160006159e4565b6146eb6000615a5a565b600060096000815481106146fb57fe5b600091825260208083203384527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e390915260409092206006909102909101915082156149a957600581015460015b6009548110156147c5576000818152600a60209081526040808320338452909152902060050154156147bd576000818152600a6020908152604080832033845290915290206005015461479d908390615715565b6000828152600a6020908152604080832033845290915281206005015591505b600101614749565b5080156149a757600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b15801561481f57600080fd5b505af1158015614833573d6000803e3d6000fd5b505060048054604080516340c10f1960e01b8152339381019390935260248301869052516001600160a01b0390911693506340c10f199250604480830192600092919082900301818387803b15801561488b57600080fd5b505af115801561489f573d6000803e3d6000fd5b505060408051600081526020810185905281513394507ff3a03193094a1b3c41754b7de76a0833a26ad4ee4b4e896eb27162f09831073093509081900390910190a260018201546148f09082615715565b600183018190556002830154101561490d57600182015460028301555b426004830155815461498157600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525482555b60038301546149909082615715565b60038401556005820154156149a757600060058301555b505b8315612f0857600354604080516370a0823160e01b8152336004820152905186926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156149f957600080fd5b505afa158015614a0d573d6000803e3d6000fd5b505050506040513d6020811015614a2357600080fd5b50511015614a6a576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c69642062616c616e636560881b604482015290519081900360640190fd5b600354604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015614ac457600080fd5b505af1158015614ad8573d6000803e3d6000fd5b505050506040513d6020811015614aee57600080fd5b50506003820154614aff9085615715565b60038301556001810154614b139085615715565b6001820181905560028201541015614b3057600181015460028201555b4260048201558054614ba457600b6020527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7680546001810182557f4335e144cd35056e5b3aebd10c5e62566e9af1617088f92a0f803bf15715d84a0180546001600160a01b03191633179055600080525481555b60048054604080516340c10f1960e01b8152339381019390935260248301879052516001600160a01b03909116916340c10f1991604480830192600092919082900301818387803b158015614bf857600080fd5b505af1158015614c0c573d6000803e3d6000fd5b5050604080518781526000602082015281513394507f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee9093509081900390910190a2505060016000555050565b6009546000908210614ca0576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b600060098381548110614caf57fe5b90600052602060002090600602019050806003015460001415614cd757600501549050614d39565b6000614cf8600d54610f7960105485600201546158c490919063ffffffff16565b9050614d34614d298360030154610f79670de0b6b3a7640000614d2386614d23600f546126f0615686565b906158c4565b600584015490615715565b925050505b919050565b6001546001600160a01b031681565b600354604080516370a0823160e01b815261dead600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015614d9a57600080fd5b505afa158015614dae573d6000803e3d6000fd5b505050506040513d6020811015614dc457600080fd5b5051905090565b336000908152600c6020526040902054614e1e576040805162461bcd60e51b815260206004820152600f60248201526e4e6f2045544820746f207374616b6560881b604482015290519081900360640190fd5b336000908152600c602052604090206002015460ff1615614e7f576040805162461bcd60e51b8152602060048201526016602482015275082d8e4cac2c8f240c2d2e4cee4c2c4c4cac8408aa8960531b604482015290519081900360640190fd5b336000818152600c602052604080822060028101805460ff1916600190811790915590548251637628a37d60e01b8152600481019290925260248201819052604482019490945290513093637628a37d9390926064808201939182900301818588803b158015614eee57600080fd5b505af1158015614f02573d6000803e3d6000fd5b5050505050565b601c5460ff1681565b601b5481565b6003546001600160a01b031681565b6001546001600160a01b03163314614f3e57600080fd5b6064831115614f89576040805162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b63637b1b0ba34b7b760711b604482015290519081900360640190fd5b6000614fa56064610f7986600d546158c490919063ffffffff16565b905060005b600954811015614fef57614fe560098281548110614fc457fe5b9060005260206000209060060201600201548361571590919063ffffffff16565b9150600101614faa565b50600d5481111561503d576040805162461bcd60e51b8152602060048201526013602482015272105b1b1bd8d85d1a5bdb88195e18d959591959606a1b604482015290519081900360640190fd5b60096040518060c00160405280856001600160a01b03168152602001846001600160a01b031681526020016150826064610f7989600d546158c490919063ffffffff16565b8152600060208083018290526040808401839052606093840183905285546001808201885596845292829020855160069094020180546001600160a01b03199081166001600160a01b039586161782559286015196810180549093169690931695909517905592820151600284015581015160038301556080810151600483015560a0015160059091015550505050565b6005546001600160a01b031681565b336000908152600c6020526040902060010154615179576040805162461bcd60e51b815260206004820152601060248201526f4e6f2043414e4520746f207374616b6560801b604482015290519081900360640190fd5b336000908152600c6020526040902060020154610100900460ff16156151e6576040805162461bcd60e51b815260206004820152601760248201527f416c726561647920616972677261626265642043414e45000000000000000000604482015290519081900360640190fd5b336000818152600c602052604080822060028101805461ff0019166101001790556003546001919091015482516340c10f1960e01b81526004810195909552602485015290516001600160a01b0391909116926340c10f1992604480830193919282900301818387803b15801561525c57600080fd5b505af1158015615270573d6000803e3d6000fd5b5050336000908152600c602052604081206001015461529193509150614684565b565b6000828152600a602090815260408083206001600160a01b0385168452909152812060058101546006909101546153109190610fb290670de0b6b3a764000090610f79906152e4906126f08a614c58565b6000898152600a602090815260408083206001600160a01b038c168452909152902060010154906158c4565b90505b92915050565b6009546000908210615361576040805162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081c1bdbdb60a21b604482015290519081900360640190fd5b506000908152600b602052604090205490565b6000806009838154811061538457fe5b600091825260208083206007546006909302018054604080516370a0823160e01b81526001600160a01b03928316600482015290519296509316926370a08231926024808301939192829003018186803b1580156153e157600080fd5b505afa1580156153f5573d6000803e3d6000fd5b505050506040513d602081101561540b57600080fd5b50516003548354604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561546257600080fd5b505afa158015615476573d6000803e3d6000fd5b505050506040513d602081101561548c57600080fd5b50519050806154ad576154a8670de0b6b3a76400006001615882565b6154c3565b6154c381610f7984670de0b6b3a76400006158c4565b95945050505050565b60125481565b6002546001600160a01b031681565b600854600160a01b900460ff1681565b60145481565b6001546001600160a01b0316331461550e57600080fd5b600280546001600160a01b0319166001600160a01b03838116918217909255600154604051919216907f83ada3430836f9d4bd6f7bc690ffbba5199cb19b37393dd64c2299302135359690600090a350565b6001546001600160a01b0316331461557757600080fd5b6001600160a01b0383166000908152600c602052604090206002015460ff1615806155c357506001600160a01b0383166000908152600c6020526040902060020154610100900460ff16155b615614576040805162461bcd60e51b815260206004820152601a60248201527f4169726772616262657220616c726561647920636c61696d6564000000000000604482015290519081900360640190fd5b6040805160808101825292835260208084019283526000848301818152606086018281526001600160a01b039097168252600c9092529190912092518355905160018301555160029091018054925115156101000261ff001992151560ff199094169390931791909116919091179055565b600061569442600e54615aee565b905090565b6006546001600160a01b031681565b600a6020528160005260406000206020528060005260406000206000915091505080600001549080600101549080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a015490508b565b60175481565b600082820183811015615310576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8015806157f5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156157c757600080fd5b505afa1580156157db573d6000803e3d6000fd5b505050506040513d60208110156157f157600080fd5b5051155b6158305760405162461bcd60e51b8152600401808060200182810382526036815260200180615f116036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611082908490615b04565b600061531083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615bb5565b6000826158d357506000615313565b828202828482816158e057fe5b04146153105760405162461bcd60e51b8152600401808060200182810382526021815260200180615ec66021913960400191505060405180910390fd5b606061592c8484600085615c57565b949350505050565b600061531083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615dc4565b42601b5411156159b75760405162461bcd60e51b815260040180806020018281038252602d815260200180615e79602d913960400191505060405180910390fd5b601c5460ff1661529157601c805460ff191660011790556159db4262127500615715565b600e5542600f55565b6000600982815481106159f357fe5b90600052602060002090600602019050615a0c82614c58565b6005820155615a19615686565b600f553315613a5f57615a2c8233615293565b6000928352600a60209081526040808520338652909152909220600580820193909355910154600690910155565b600e54421061375957615a7f6064610f79601154600d546158c490919063ffffffff16565b600d819055615a919062127500615882565b601055600e54615aa49062127500615715565b600e55615ab0816159e4565b600d5460408051918252517ffafb0ec84dbe5a6bf08f4fec2f970b66d402032cdfea2008b11e11eb5c3990f09181900360200190a150565b3b151590565b6000818310615afd5781615310565b5090919050565b6060615b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661591d9092919063ffffffff16565b80519091501561108257808060200190516020811015615b7857600080fd5b50516110825760405162461bcd60e51b815260040180806020018281038252602a815260200180615ee7602a913960400191505060405180910390fd5b60008183615c415760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c06578181015183820152602001615bee565b50505050905090810190601f168015615c335780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615c4d57fe5b0495945050505050565b6060615c6285615ae8565b615cb3576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310615cf25780518252601f199092019160209182019101615cd3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615d54576040519150601f19603f3d011682016040523d82523d6000602084013e615d59565b606091505b50915091508115615d6d57915061592c9050565b805115615d7d5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315615c06578181015183820152602001615bee565b60008184841115615e165760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315615c06578181015183820152602001615bee565b505050900390565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4661726d696e6720686173206e6f742079657420737461727465642e2054727920616761696e206c617465722e5265656e7472616e637947756172643a207265656e7472616e742063616c6c00536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201633695deda991d9199f1c4378c73f6d4f05e59856df2941b4e9a9bd1b0bba9364736f6c634300060c0033

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

0000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0

-----Decoded View---------------
Arg [0] : _treasury (address): 0x1b5ed7c13eB64819F7b0C7b2D810dAbA93DFC2E0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001b5ed7c13eb64819f7b0c7b2d810daba93dfc2e0


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  ]
[ 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.