ETH Price: $3,400.15 (+1.97%)

Contract

0x31FF00F7BEb461D13630B2f3c191A726aAD251Cc
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw157356742022-10-13 0:40:59808 days ago1665621659IN
Archer DAO: Distribution
0 ETH0.0066685425.43817629
Deposit144416522022-03-23 9:10:321012 days ago1648026632IN
Archer DAO: Distribution
0 ETH0.0139353725.51626099
Withdraw138359282021-12-19 13:40:251105 days ago1639921225IN
Archer DAO: Distribution
0 ETH0.0239662641.59220456
Withdraw135708072021-11-07 17:53:271147 days ago1636307607IN
Archer DAO: Distribution
0 ETH0.0277626999.42411776
Withdraw132035872021-09-11 9:15:551205 days ago1631351755IN
Archer DAO: Distribution
0 ETH0.0147389552.78333391
Withdraw130742822021-08-22 9:32:261225 days ago1629624746IN
Archer DAO: Distribution
0 ETH0.0064610723.13847738
Withdraw130724162021-08-22 2:31:011225 days ago1629599461IN
Archer DAO: Distribution
0 ETH0.0055048321
Withdraw130534082021-08-19 4:07:561228 days ago1629346076IN
Archer DAO: Distribution
0 ETH0.0164517729.42504128
Deposit130277212021-08-15 4:56:321232 days ago1629003392IN
Archer DAO: Distribution
0 ETH0.0030906128
Withdraw130277212021-08-15 4:56:321232 days ago1629003392IN
Archer DAO: Distribution
0 ETH0.0073401128
Withdraw130266142021-08-15 0:35:561232 days ago1628987756IN
Archer DAO: Distribution
0 ETH0.0094702833.91365004
Withdraw130096052021-08-12 9:46:561235 days ago1628761616IN
Archer DAO: Distribution
0 ETH0.0078906230.1
Withdraw130074412021-08-12 1:45:351235 days ago1628732735IN
Archer DAO: Distribution
0 ETH0.0135271348.44562556
Withdraw129622462021-08-05 2:03:141242 days ago1628128994IN
Archer DAO: Distribution
0 ETH0.0102976443
Withdraw129607902021-08-04 20:25:031242 days ago1628108703IN
Archer DAO: Distribution
0 ETH0.008479835
Withdraw129585262021-08-04 12:00:161242 days ago1628078416IN
Archer DAO: Distribution
0 ETH0.0053304222
Withdraw129529212021-08-03 14:51:081243 days ago1628002268IN
Archer DAO: Distribution
0 ETH0.0123568951
Withdraw129511262021-08-03 8:01:141244 days ago1627977674IN
Archer DAO: Distribution
0 ETH0.0070264629
Withdraw129493042021-08-03 0:56:011244 days ago1627952161IN
Archer DAO: Distribution
0 ETH0.003272926
Deposit129493042021-08-03 0:56:011244 days ago1627952161IN
Archer DAO: Distribution
0 ETH0.01482926.5
Deposit129491842021-08-03 0:29:591244 days ago1627950599IN
Archer DAO: Distribution
0 ETH0.0053182931
Withdraw129491832021-08-03 0:29:461244 days ago1627950586IN
Archer DAO: Distribution
0 ETH0.0075110531
Withdraw129454232021-08-02 10:29:071245 days ago1627900147IN
Archer DAO: Distribution
0 ETH0.0049368322.2
Withdraw129451372021-08-02 9:23:571245 days ago1627896237IN
Archer DAO: Distribution
0 ETH0.0053371224
Withdraw129440152021-08-02 5:05:541245 days ago1627880754IN
Archer DAO: Distribution
0 ETH0.0134116225
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardsManager

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license
File 1 of 9 : RewardsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "./interfaces/IMasterChef.sol";
import "./interfaces/IVault.sol";
import "./interfaces/ILockManager.sol";
import "./lib/SafeMath.sol";
import "./lib/SafeERC20.sol";
import "./lib/ReentrancyGuard.sol";

/**
 * @title RewardsManager
 * @dev Controls rewards distribution for network
 */
contract RewardsManager is ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /// @notice Current owner of this contract
    address public owner;

    /// @notice Info of each user.
    struct UserInfo {
        uint256 amount;          // How many tokens the user has provided.
        uint256 rewardTokenDebt; // Reward debt for reward token. See explanation below.
        uint256 sushiRewardDebt; // Reward debt for Sushi rewards. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of reward tokens
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accRewardsPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws tokens to a pool. Here's what happens:
        //   1. The pool's `accRewardsPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    /// @notice Info of each pool.
    struct PoolInfo {
        IERC20 token;               // Address of token contract.
        uint256 allocPoint;         // How many allocation points assigned to this pool. Reward tokens to distribute per block.
        uint256 lastRewardBlock;    // Last block number where reward tokens were distributed.
        uint256 accRewardsPerShare; // Accumulated reward tokens per share, times 1e12. See below.
        uint32 vestingPercent;      // Percentage of rewards that vest (measured in bips: 500,000 bips = 50% of rewards)
        uint16 vestingPeriod;       // Vesting period in days for vesting rewards
        uint16 vestingCliff;        // Vesting cliff in days for vesting rewards
        uint256 totalStaked;        // Total amount of token staked via Rewards Manager
        bool vpForDeposit;          // Do users get voting power for deposits of this token?
        bool vpForVesting;          // Do users get voting power for vesting balances?
    }

    /// @notice Reward token
    IERC20 public rewardToken;

    /// @notice SUSHI token
    IERC20 public sushiToken;

    /// @notice Sushi Master Chef
    IMasterChef public masterChef;

    /// @notice Vault for vesting tokens
    IVault public vault;

    /// @notice LockManager contract
    ILockManager public lockManager;

    /// @notice Reward tokens rewarded per block.
    uint256 public rewardTokensPerBlock;

    /// @notice Info of each pool.
    PoolInfo[] public poolInfo;
    
    /// @notice Mapping of Sushi tokens to MasterChef pids 
    mapping (address => uint256) public sushiPools;

    /// @notice Info of each user that stakes tokens.
    mapping (uint256 => mapping (address => UserInfo)) public userInfo;
    
    /// @notice Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    /// @notice The block number when rewards start.
    uint256 public startBlock;

    /// @notice The block number when rewards end.
    uint256 public endBlock;

    /// @notice only owner can call function
    modifier onlyOwner {
        require(msg.sender == owner, "not owner");
        _;
    }

    /// @notice Event emitted when a user deposits funds in the rewards manager
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);

    /// @notice Event emitted when a user withdraws their original funds + rewards from the rewards manager
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);

    /// @notice Event emitted when a user withdraws their original funds from the rewards manager without claiming rewards
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    /// @notice Event emitted when new pool is added to the rewards manager
    event PoolAdded(uint256 indexed pid, address indexed token, uint256 allocPoints, uint256 totalAllocPoints, uint256 rewardStartBlock, uint256 sushiPid, bool vpForDeposit, bool vpForVesting);
    
    /// @notice Event emitted when pool allocation points are updated
    event PoolUpdated(uint256 indexed pid, uint256 oldAllocPoints, uint256 newAllocPoints, uint256 newTotalAllocPoints);

    /// @notice Event emitted when the owner of the rewards manager contract is updated
    event ChangedOwner(address indexed oldOwner, address indexed newOwner);

    /// @notice Event emitted when the amount of reward tokens per block is updated
    event ChangedRewardTokensPerBlock(uint256 indexed oldRewardTokensPerBlock, uint256 indexed newRewardTokensPerBlock);

    /// @notice Event emitted when the rewards start block is set
    event SetRewardsStartBlock(uint256 indexed startBlock);

    /// @notice Event emitted when the rewards end block is updated
    event ChangedRewardsEndBlock(uint256 indexed oldEndBlock, uint256 indexed newEndBlock);

    /// @notice Event emitted when contract address is changed
    event ChangedAddress(string indexed addressType, address indexed oldAddress, address indexed newAddress);

    /**
     * @notice Create a new Rewards Manager contract
     * @param _owner owner of contract
     * @param _lockManager address of LockManager contract
     * @param _vault address of Vault contract
     * @param _rewardToken address of token that is being offered as a reward
     * @param _sushiToken address of SUSHI token
     * @param _masterChef address of SushiSwap MasterChef contract
     * @param _startBlock block number when rewards will start
     * @param _rewardTokensPerBlock initial amount of reward tokens to be distributed per block
     */
    constructor(
        address _owner, 
        address _lockManager,
        address _vault,
        address _rewardToken,
        address _sushiToken,
        address _masterChef,
        uint256 _startBlock,
        uint256 _rewardTokensPerBlock
    ) {
        owner = _owner;
        emit ChangedOwner(address(0), _owner);

        lockManager = ILockManager(_lockManager);
        emit ChangedAddress("LOCK_MANAGER", address(0), _lockManager);

        vault = IVault(_vault);
        emit ChangedAddress("VAULT", address(0), _vault);

        rewardToken = IERC20(_rewardToken);
        emit ChangedAddress("REWARD_TOKEN", address(0), _rewardToken);

        sushiToken = IERC20(_sushiToken);
        emit ChangedAddress("SUSHI_TOKEN", address(0), _sushiToken);

        masterChef = IMasterChef(_masterChef);
        emit ChangedAddress("MASTER_CHEF", address(0), _masterChef);

        startBlock = _startBlock == 0 ? block.number : _startBlock;
        emit SetRewardsStartBlock(startBlock);

        rewardTokensPerBlock = _rewardTokensPerBlock;
        emit ChangedRewardTokensPerBlock(0, _rewardTokensPerBlock);

        rewardToken.safeIncreaseAllowance(address(vault), uint256(-1));
    }

    /**
     * @notice View function to see current poolInfo array length
     * @return pool length
     */
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    /**
     * @notice Add a new reward token to the pool
     * @dev Can only be called by the owner. DO NOT add the same token more than once. Rewards will be messed up if you do.
     * @param allocPoint Number of allocation points to allot to this token/pool
     * @param token The token that will be staked for rewards
     * @param vestingPercent The percentage of rewards from this pool that will vest
     * @param vestingPeriod The number of days for the vesting period
     * @param vestingCliff The number of days for the vesting cliff
     * @param withUpdate if specified, update all pools before adding new pool
     * @param sushiPid The pid of the Sushiswap pool in the Masterchef contract (if exists, otherwise provide zero)
     * @param vpForDeposit If true, users get voting power for deposits
     * @param vpForVesting If true, users get voting power for vesting balances
     */
    function add(
        uint256 allocPoint, 
        address token,
        uint32 vestingPercent,
        uint16 vestingPeriod,
        uint16 vestingCliff,
        bool withUpdate,
        uint256 sushiPid,
        bool vpForDeposit,
        bool vpForVesting
    ) external onlyOwner {
        if (withUpdate) {
            massUpdatePools();
        }
        uint256 rewardStartBlock = block.number > startBlock ? block.number : startBlock;
        if (totalAllocPoint == 0) {
            _setRewardsEndBlock();
        }
        totalAllocPoint = totalAllocPoint.add(allocPoint);
        poolInfo.push(PoolInfo({
            token: IERC20(token),
            allocPoint: allocPoint,
            lastRewardBlock: rewardStartBlock,
            accRewardsPerShare: 0,
            vestingPercent: vestingPercent,
            vestingPeriod: vestingPeriod,
            vestingCliff: vestingCliff,
            totalStaked: 0,
            vpForDeposit: vpForDeposit,
            vpForVesting: vpForVesting
        }));
        if (sushiPid != uint256(0)) {
            sushiPools[token] = sushiPid;
            IERC20(token).safeIncreaseAllowance(address(masterChef), uint256(-1));
        }
        IERC20(token).safeIncreaseAllowance(address(vault), uint256(-1));
        emit PoolAdded(poolInfo.length - 1, token, allocPoint, totalAllocPoint, rewardStartBlock, sushiPid, vpForDeposit, vpForVesting);
    }

    /**
     * @notice Update the given pool's allocation points
     * @dev Can only be called by the owner
     * @param pid The RewardManager pool id
     * @param allocPoint New number of allocation points for pool
     * @param withUpdate if specified, update all pools before setting allocation points
     */
    function set(
        uint256 pid, 
        uint256 allocPoint, 
        bool withUpdate
    ) external onlyOwner {
        if (withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[pid].allocPoint).add(allocPoint);
        emit PoolUpdated(pid, poolInfo[pid].allocPoint, allocPoint, totalAllocPoint);
        poolInfo[pid].allocPoint = allocPoint;
    }

    /**
     * @notice Returns true if rewards are actively being accumulated
     */
    function rewardsActive() public view returns (bool) {
        return block.number >= startBlock && block.number <= endBlock && totalAllocPoint > 0 ? true : false;
    }

    /**
     * @notice Return reward multiplier over the given from to to block.
     * @param from From block number
     * @param to To block number
     * @return multiplier
     */
    function getMultiplier(uint256 from, uint256 to) public view returns (uint256) {
        uint256 toBlock = to > endBlock ? endBlock : to;
        return toBlock > from ? toBlock.sub(from) : 0;
    }

    /**
     * @notice View function to see pending reward tokens on frontend.
     * @param pid pool id
     * @param account user account to check
     * @return pending rewards
     */
    function pendingRewardTokens(uint256 pid, address account) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][account];
        uint256 accRewardsPerShare = pool.accRewardsPerShare;
        uint256 tokenSupply = pool.totalStaked;
        if (block.number > pool.lastRewardBlock && tokenSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 totalReward = multiplier.mul(rewardTokensPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accRewardsPerShare = accRewardsPerShare.add(totalReward.mul(1e12).div(tokenSupply));
        }

        uint256 accumulatedRewards = user.amount.mul(accRewardsPerShare).div(1e12);
        
        if (accumulatedRewards < user.rewardTokenDebt) {
            return 0;
        }

        return accumulatedRewards.sub(user.rewardTokenDebt);
    }

    /**
     * @notice View function to see pending SUSHI on frontend.
     * @param pid pool id
     * @param account user account to check
     * @return pending SUSHI rewards
     */
    function pendingSushi(uint256 pid, address account) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][account];
        uint256 sushiPid = sushiPools[address(pool.token)];
        if (sushiPid == uint256(0)) {
            return 0;
        }
        IMasterChef.PoolInfo memory sushiPool = masterChef.poolInfo(sushiPid);
        uint256 sushiPerBlock = masterChef.sushiPerBlock();
        uint256 totalSushiAllocPoint = masterChef.totalAllocPoint();
        uint256 accSushiPerShare = sushiPool.accSushiPerShare;
        uint256 lpSupply = sushiPool.lpToken.balanceOf(address(masterChef));
        if (block.number > sushiPool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = masterChef.getMultiplier(sushiPool.lastRewardBlock, block.number);
            uint256 sushiReward = multiplier.mul(sushiPerBlock).mul(sushiPool.allocPoint).div(totalSushiAllocPoint);
            accSushiPerShare = accSushiPerShare.add(sushiReward.mul(1e12).div(lpSupply));
        }
        
        uint256 accumulatedSushi = user.amount.mul(accSushiPerShare).div(1e12);
        
        if (accumulatedSushi < user.sushiRewardDebt) {
            return 0;
        }

        return accumulatedSushi.sub(user.sushiRewardDebt);
        
    }

    /**
     * @notice Update reward variables for all pools
     * @dev Be careful of gas spending!
     */
    function massUpdatePools() public {
        for (uint256 pid = 0; pid < poolInfo.length; ++pid) {
            updatePool(pid);
        }
    }

    /**
     * @notice Update reward variables of the given pool to be up-to-date
     * @param pid pool id
     */
    function updatePool(uint256 pid) public {
        PoolInfo storage pool = poolInfo[pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }

        uint256 tokenSupply = pool.totalStaked;
        if (tokenSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 totalReward = multiplier.mul(rewardTokensPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        pool.accRewardsPerShare = pool.accRewardsPerShare.add(totalReward.mul(1e12).div(tokenSupply));
        pool.lastRewardBlock = block.number;
    }

    /**
     * @notice Deposit tokens to RewardsManager for rewards allocation.
     * @param pid pool id
     * @param amount number of tokens to deposit
     */
    function deposit(uint256 pid, uint256 amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][msg.sender];
        _deposit(pid, amount, pool, user);
    }

    /**
     * @notice Deposit tokens to RewardsManager for rewards allocation, using permit for approval
     * @dev It is up to the frontend developer to ensure the pool token implements permit - otherwise this will fail
     * @param pid pool id
     * @param amount number of tokens to deposit
     * @param deadline The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function depositWithPermit(
        uint256 pid, 
        uint256 amount,
        uint256 deadline, 
        uint8 v, 
        bytes32 r, 
        bytes32 s
    ) external nonReentrant {
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][msg.sender];
        pool.token.permit(msg.sender, address(this), amount, deadline, v, r, s);
        _deposit(pid, amount, pool, user);
    }

    /**
     * @notice Withdraw tokens from RewardsManager, claiming rewards.
     * @param pid pool id
     * @param amount number of tokens to withdraw
     */
    function withdraw(uint256 pid, uint256 amount) external nonReentrant {
        require(amount > 0, "RM::withdraw: amount must be > 0");
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][msg.sender];
        _withdraw(pid, amount, pool, user);
    }

    /**
     * @notice Withdraw without caring about rewards. EMERGENCY ONLY.
     * @param pid pool id
     */
    function emergencyWithdraw(uint256 pid) external nonReentrant {
        PoolInfo storage pool = poolInfo[pid];
        UserInfo storage user = userInfo[pid][msg.sender];

        if (user.amount > 0) {
            uint256 sushiPid = sushiPools[address(pool.token)];
            if (sushiPid != uint256(0)) {
                masterChef.withdraw(sushiPid, user.amount);
            }

            if (pool.vpForDeposit) {
                lockManager.removeVotingPower(msg.sender, address(pool.token), user.amount);
            }

            pool.totalStaked = pool.totalStaked.sub(user.amount);
            pool.token.safeTransfer(msg.sender, user.amount);

            emit EmergencyWithdraw(msg.sender, pid, user.amount);

            user.amount = 0;
            user.rewardTokenDebt = 0;
            user.sushiRewardDebt = 0;
        }
    }

    /**
     * @notice Set approvals for external addresses to use contract tokens
     * @dev Can only be called by the owner
     * @param tokensToApprove the tokens to approve
     * @param approvalAmounts the token approval amounts
     * @param spender the address to allow spending of token
     */
    function tokenAllow(
        address[] memory tokensToApprove, 
        uint256[] memory approvalAmounts, 
        address spender
    ) external onlyOwner {
        require(tokensToApprove.length == approvalAmounts.length, "RM::tokenAllow: not same length");
        for(uint i = 0; i < tokensToApprove.length; i++) {
            IERC20 token = IERC20(tokensToApprove[i]);
            if (token.allowance(address(this), spender) != uint256(-1)) {
                token.safeApprove(spender, approvalAmounts[i]);
            }
        }
    }

    /**
     * @notice Rescue (withdraw) tokens from the smart contract
     * @dev Can only be called by the owner
     * @param tokens the tokens to withdraw
     * @param amounts the amount of each token to withdraw.  If zero, withdraws the maximum allowed amount for each token
     * @param receiver the address that will receive the tokens
     * @param updateRewardsEndBlock if true, update the rewards end block after performing transfers
     */
    function rescueTokens(
        address[] calldata tokens, 
        uint256[] calldata amounts, 
        address receiver,
        bool updateRewardsEndBlock
    ) external onlyOwner {
        require(tokens.length == amounts.length, "RM::rescueTokens: not same length");
        for (uint i = 0; i < tokens.length; i++) {
            IERC20 token = IERC20(tokens[i]);
            uint256 withdrawalAmount;
            uint256 tokenBalance = token.balanceOf(address(this));
            uint256 tokenAllowance = token.allowance(address(this), receiver);
            if (amounts[i] == 0) {
                if (tokenBalance > tokenAllowance) {
                    withdrawalAmount = tokenAllowance;
                } else {
                    withdrawalAmount = tokenBalance;
                }
            } else {
                require(tokenBalance >= amounts[i], "RM::rescueTokens: contract balance too low");
                require(tokenAllowance >= amounts[i], "RM::rescueTokens: increase token allowance");
                withdrawalAmount = amounts[i];
            }
            token.safeTransferFrom(address(this), receiver, withdrawalAmount);
        }

        if (updateRewardsEndBlock) {
            _setRewardsEndBlock();
        }
    }

    /**
     * @notice Set new rewards per block
     * @dev Can only be called by the owner
     * @param newRewardTokensPerBlock new amount of reward token to reward each block
     */
    function setRewardsPerBlock(uint256 newRewardTokensPerBlock) external onlyOwner {
        emit ChangedRewardTokensPerBlock(rewardTokensPerBlock, newRewardTokensPerBlock);
        rewardTokensPerBlock = newRewardTokensPerBlock;
        _setRewardsEndBlock();
    }

    /**
     * @notice Set new reward token address
     * @param newToken address of new reward token
     * @param newRewardTokensPerBlock new amount of reward token to reward each block
     */
    function setRewardToken(address newToken, uint256 newRewardTokensPerBlock) external onlyOwner {
        emit ChangedAddress("REWARD_TOKEN", address(rewardToken), newToken);
        rewardToken = IERC20(newToken);
        rewardTokensPerBlock = newRewardTokensPerBlock;
        _setRewardsEndBlock();
    }

    /**
     * @notice Set new SUSHI token address
     * @dev Can only be called by the owner
     * @param newToken address of new SUSHI token
     */
    function setSushiToken(address newToken) external onlyOwner {
        emit ChangedAddress("SUSHI_TOKEN", address(sushiToken), newToken);
        sushiToken = IERC20(newToken);
    }

    /**
     * @notice Set new MasterChef address
     * @dev Can only be called by the owner
     * @param newAddress address of new MasterChef
     */
    function setMasterChef(address newAddress) external onlyOwner {
        emit ChangedAddress("MASTER_CHEF", address(masterChef), newAddress);
        masterChef = IMasterChef(newAddress);
    }
        
    /**
     * @notice Set new Vault address
     * @param newAddress address of new Vault
     */
    function setVault(address newAddress) external onlyOwner {
        emit ChangedAddress("VAULT", address(vault), newAddress);
        vault = IVault(newAddress);
    }

    /**
     * @notice Set new LockManager address
     * @param newAddress address of new LockManager
     */
    function setLockManager(address newAddress) external onlyOwner {
        emit ChangedAddress("LOCK_MANAGER", address(lockManager), newAddress);
        lockManager = ILockManager(newAddress);
    }

    /**
     * @notice Add rewards to contract
     * @dev Can only be called by the owner
     * @param amount amount of tokens to add
     */
    function addRewardsBalance(uint256 amount) external onlyOwner {
        rewardToken.safeTransferFrom(msg.sender, address(this), amount);
        _setRewardsEndBlock();
    }

    /**
     * @notice Reset rewards end block manually based on new balances
     */
    function resetRewardsEndBlock() external onlyOwner {
        _setRewardsEndBlock();
    }

    /**
     * @notice Change owner of vesting contract
     * @dev Can only be called by the owner
     * @param newOwner New owner address
     */
    function changeOwner(address newOwner) external onlyOwner {
        require(newOwner != address(0) && newOwner != address(this), "RM::changeOwner: not valid address");
        emit ChangedOwner(owner, newOwner);
        owner = newOwner;
    }

    /**
     * @notice Internal implementation of deposit
     * @param pid pool id
     * @param amount number of tokens to deposit
     * @param pool the pool info
     * @param user the user info 
     */
    function _deposit(
        uint256 pid, 
        uint256 amount, 
        PoolInfo storage pool, 
        UserInfo storage user
    ) internal {
        updatePool(pid);

        uint256 sushiPid = sushiPools[address(pool.token)];
        uint256 pendingSushiTokens = 0;

        if (user.amount > 0) {
            uint256 pendingRewards = user.amount.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardTokenDebt);

            if (pendingRewards > 0) {
                _distributeRewards(msg.sender, pendingRewards, pool.vestingPercent, pool.vestingPeriod, pool.vestingCliff, pool.vpForVesting);
            }

            if (sushiPid != uint256(0)) {
                masterChef.updatePool(sushiPid);
                pendingSushiTokens = user.amount.mul(masterChef.poolInfo(sushiPid).accSushiPerShare).div(1e12).sub(user.sushiRewardDebt);
            }
        }
       
        pool.token.safeTransferFrom(msg.sender, address(this), amount);
        pool.totalStaked = pool.totalStaked.add(amount);
        user.amount = user.amount.add(amount);
        user.rewardTokenDebt = user.amount.mul(pool.accRewardsPerShare).div(1e12);

        if (sushiPid != uint256(0)) {
            masterChef.updatePool(sushiPid);
            user.sushiRewardDebt = user.amount.mul(masterChef.poolInfo(sushiPid).accSushiPerShare).div(1e12);
            masterChef.deposit(sushiPid, amount);
        }

        if (amount > 0 && pool.vpForDeposit) {
            lockManager.grantVotingPower(msg.sender, address(pool.token), amount);
        }

        if (pendingSushiTokens > 0) {
            _safeSushiTransfer(msg.sender, pendingSushiTokens);
        }

        emit Deposit(msg.sender, pid, amount);
    }

    /**
     * @notice Internal implementation of withdraw
     * @param pid pool id
     * @param amount number of tokens to withdraw
     * @param pool the pool info
     * @param user the user info 
     */
    function _withdraw(
        uint256 pid, 
        uint256 amount,
        PoolInfo storage pool, 
        UserInfo storage user
    ) internal {
        require(user.amount >= amount, "RM::_withdraw: amount > user balance");

        updatePool(pid);

        uint256 sushiPid = sushiPools[address(pool.token)];

        if (sushiPid != uint256(0)) {
            masterChef.updatePool(sushiPid);
            uint256 pendingSushiTokens = user.amount.mul(masterChef.poolInfo(sushiPid).accSushiPerShare).div(1e12).sub(user.sushiRewardDebt);
            masterChef.withdraw(sushiPid, amount);
            user.sushiRewardDebt = user.amount.sub(amount).mul(masterChef.poolInfo(sushiPid).accSushiPerShare).div(1e12);
            if (pendingSushiTokens > 0) {
                _safeSushiTransfer(msg.sender, pendingSushiTokens);
            }
        }

        uint256 pendingRewards = user.amount.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardTokenDebt);
        user.amount = user.amount.sub(amount);
        user.rewardTokenDebt = user.amount.mul(pool.accRewardsPerShare).div(1e12);

        if (pendingRewards > 0) {
            _distributeRewards(msg.sender, pendingRewards, pool.vestingPercent, pool.vestingPeriod, pool.vestingCliff, pool.vpForVesting);
        }
        
        if (pool.vpForDeposit) {
            lockManager.removeVotingPower(msg.sender, address(pool.token), amount);
        }

        pool.totalStaked = pool.totalStaked.sub(amount);
        pool.token.safeTransfer(msg.sender, amount);

        emit Withdraw(msg.sender, pid, amount);
    }

    /**
     * @notice Internal function used to distribute rewards, optionally vesting a %
     * @param account account that is due rewards
     * @param amount amount of rewards to distribute
     * @param vestingPercent percent of rewards to vest in bips
     * @param vestingPeriod number of days over which to vest rewards
     * @param vestingCliff number of days for vesting cliff
     * @param vestingVotingPower if true, grant voting power for vesting balance
     */
    function _distributeRewards(
        address account, 
        uint256 amount, 
        uint32 vestingPercent, 
        uint16 vestingPeriod, 
        uint16 vestingCliff,
        bool vestingVotingPower
    ) internal {
        uint256 rewardAmount = amount > rewardToken.balanceOf(address(this)) ? rewardToken.balanceOf(address(this)) : amount;
        uint256 vestingRewards = rewardAmount.mul(vestingPercent).div(1000000);
        vault.lockTokens(address(rewardToken), address(this), account, 0, vestingRewards, vestingPeriod, vestingCliff, vestingVotingPower);
        _safeRewardsTransfer(msg.sender, rewardAmount.sub(vestingRewards));
    }

    /**
     * @notice Safe reward transfer function, just in case if rounding error causes pool to not have enough reward token.
     * @param to account that is receiving rewards
     * @param amount amount of rewards to send
     */
    function _safeRewardsTransfer(address to, uint256 amount) internal {
        uint256 rewardTokenBalance = rewardToken.balanceOf(address(this));
        if (amount > rewardTokenBalance) {
            rewardToken.safeTransfer(to, rewardTokenBalance);
        } else {
            rewardToken.safeTransfer(to, amount);
        }
    }

    /**
     * @notice Safe SUSHI transfer function, just in case if rounding error causes pool to not have enough SUSHI.
     * @param to account that is receiving SUSHI
     * @param amount amount of SUSHI to send
     */
    function _safeSushiTransfer(address to, uint256 amount) internal {
        uint256 sushiBalance = sushiToken.balanceOf(address(this));
        if (amount > sushiBalance) {
            sushiToken.safeTransfer(to, sushiBalance);
        } else {
            sushiToken.safeTransfer(to, amount);
        }
    }

    /**
     * @notice Internal function that updates rewards end block based on tokens per block and the token balance of the contract
     */
    function _setRewardsEndBlock() internal {
        if(rewardTokensPerBlock > 0) {
            uint256 rewardFromBlock = block.number >= startBlock ? block.number : startBlock;
            uint256 newEndBlock = rewardFromBlock.add(rewardToken.balanceOf(address(this)).div(rewardTokensPerBlock));
            if(newEndBlock > rewardFromBlock && newEndBlock != endBlock) {
                emit ChangedRewardsEndBlock(endBlock, newEndBlock);
                endBlock = newEndBlock;
            }
        }
    }
}

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

interface IERC20 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 9 : ILockManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

interface ILockManager {
    struct LockedStake {
        uint256 amount;
        uint256 votingPower;
    }

    function getAmountStaked(address staker, address stakedToken) external view returns (uint256);
    function getStake(address staker, address stakedToken) external view returns (LockedStake memory);
    function calculateVotingPower(address token, uint256 amount) external view returns (uint256);
    function grantVotingPower(address receiver, address token, uint256 tokenAmount) external returns (uint256 votingPowerGranted);
    function removeVotingPower(address receiver, address token, uint256 tokenAmount) external returns (uint256 votingPowerRemoved);
}

File 4 of 9 : IMasterChef.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "./IERC20.sol";

interface IMasterChef {
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. SUSHIs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that SUSHIs distribution occurs.
        uint256 accSushiPerShare; // Accumulated SUSHIs per share, times 1e12.
    }
    function deposit(uint256 _pid, uint256 _amount) external;
    function withdraw(uint256 _pid, uint256 _amount) external;
    function poolInfo(uint256 _pid) external view returns (PoolInfo memory);
    function pendingSushi(uint256 _pid, address _user) external view returns (uint256);
    function updatePool(uint256 _pid) external;
    function sushiPerBlock() external view returns (uint256);
    function totalAllocPoint() external view returns (uint256);
    function getMultiplier(uint256 _from, uint256 _to) external view returns (uint256);
}

File 5 of 9 : IVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

interface IVault {
    
    struct Lock {
        address token;
        address receiver;
        uint48 startTime;
        uint16 vestingDurationInDays;
        uint16 cliffDurationInDays;
        uint256 amount;
        uint256 amountClaimed;
        uint256 votingPower;
    }

    struct LockBalance {
        uint256 id;
        uint256 claimableAmount;
        Lock lock;
    }

    struct TokenBalance {
        uint256 totalAmount;
        uint256 claimableAmount;
        uint256 claimedAmount;
        uint256 votingPower;
    }

    function lockTokens(address token, address locker, address receiver, uint48 startTime, uint256 amount, uint16 lockDurationInDays, uint16 cliffDurationInDays, bool grantVotingPower) external;
    function lockTokensWithPermit(address token, address locker, address receiver, uint48 startTime, uint256 amount, uint16 lockDurationInDays, uint16 cliffDurationInDays, bool grantVotingPower, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
    function claimUnlockedTokenAmounts(uint256[] memory lockIds, uint256[] memory amounts) external;
    function claimAllUnlockedTokens(uint256[] memory lockIds) external;
    function tokenLocks(uint256 lockId) external view returns(Lock memory);
    function allActiveLockIds() external view returns(uint256[] memory);
    function allActiveLocks() external view returns(Lock[] memory);
    function allActiveLockBalances() external view returns(LockBalance[] memory);
    function activeLockIds(address receiver) external view returns(uint256[] memory);
    function allLocks(address receiver) external view returns(Lock[] memory);
    function activeLocks(address receiver) external view returns(Lock[] memory);
    function activeLockBalances(address receiver) external view returns(LockBalance[] memory);
    function totalTokenBalance(address token) external view returns(TokenBalance memory balance);
    function tokenBalance(address token, address receiver) external view returns(TokenBalance memory balance);
    function lockBalance(uint256 lockId) external view returns (LockBalance memory);
    function claimableBalance(uint256 lockId) external view returns (uint256);
    function extendLock(uint256 lockId, uint16 vestingDaysToAdd, uint16 cliffDaysToAdd) external;
}

File 6 of 9 : Address.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract 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 () {
        _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 8 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for 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 9 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @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 addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    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 multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) 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, errorMessage);

        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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_lockManager","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_sushiToken","type":"address"},{"internalType":"address","name":"_masterChef","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardTokensPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"addressType","type":"string"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ChangedAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"ChangedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldRewardTokensPerBlock","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newRewardTokensPerBlock","type":"uint256"}],"name":"ChangedRewardTokensPerBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldEndBlock","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newEndBlock","type":"uint256"}],"name":"ChangedRewardsEndBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAllocPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardStartBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiPid","type":"uint256"},{"indexed":false,"internalType":"bool","name":"vpForDeposit","type":"bool"},{"indexed":false,"internalType":"bool","name":"vpForVesting","type":"bool"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAllocPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAllocPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalAllocPoints","type":"uint256"}],"name":"PoolUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"SetRewardsStartBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint32","name":"vestingPercent","type":"uint32"},{"internalType":"uint16","name":"vestingPeriod","type":"uint16"},{"internalType":"uint16","name":"vestingCliff","type":"uint16"},{"internalType":"bool","name":"withUpdate","type":"bool"},{"internalType":"uint256","name":"sushiPid","type":"uint256"},{"internalType":"bool","name":"vpForDeposit","type":"bool"},{"internalType":"bool","name":"vpForVesting","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addRewardsBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockManager","outputs":[{"internalType":"contract ILockManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"masterChef","outputs":[{"internalType":"contract IMasterChef","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"pendingRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"pendingSushi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardsPerShare","type":"uint256"},{"internalType":"uint32","name":"vestingPercent","type":"uint32"},{"internalType":"uint16","name":"vestingPeriod","type":"uint16"},{"internalType":"uint16","name":"vestingCliff","type":"uint16"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"bool","name":"vpForDeposit","type":"bool"},{"internalType":"bool","name":"vpForVesting","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bool","name":"updateRewardsEndBlock","type":"bool"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetRewardsEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTokensPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"bool","name":"withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setLockManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setMasterChef","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"},{"internalType":"uint256","name":"newRewardTokensPerBlock","type":"uint256"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRewardTokensPerBlock","type":"uint256"}],"name":"setRewardsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"}],"name":"setSushiToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sushiPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sushiToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokensToApprove","type":"address[]"},{"internalType":"uint256[]","name":"approvalAmounts","type":"uint256[]"},{"internalType":"address","name":"spender","type":"address"}],"name":"tokenAllow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardTokenDebt","type":"uint256"},{"internalType":"uint256","name":"sushiRewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620051f9380380620051f9833981016040819052620000349162000729565b6001600081815581546001600160a01b0319166001600160a01b038b169081179092556040517f2748503f8f31d8071821d1d5144384ba6a465036cda17fa1629a8a2509ccee0e908290a3600680546001600160a01b0319166001600160a01b038916908117909155604051600090620000ae90620007fd565b604051908190038120906000805160206200518983398151915290600090a4600580546001600160a01b0319166001600160a01b038816908117909155604051600090620000fc90620007bd565b604051908190038120906000805160206200518983398151915290600090a4600280546001600160a01b0319166001600160a01b0387169081179091556040516000906200014a90620007e5565b604051908190038120906000805160206200518983398151915290600090a4600380546001600160a01b0319166001600160a01b0386169081179091556040516000906200019890620007ce565b604051908190038120906000805160206200518983398151915290600090a4600480546001600160a01b0319166001600160a01b038516908117909155604051600090620001e69062000815565b604051908190038120906000805160206200518983398151915290600090a4811562000213578162000215565b435b600c8190556040517f1b190b90c41faf64e3c69c95576c9ab1ad9fdbd9f620f05d271ab76202a56bd390600090a2600781905560405181906000907f946161e5739a4430df1991fae9a81c63724a1971bf00a784a024333d7a7489eb908290a3600554600254620002a2916001600160a01b039182169116600019620002b0602090811b6200243b17901c565b50505050505050506200082c565b60006200035782856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156200031657600080fd5b505afa1580156200032b573d6000803e3d6000fd5b505050506040513d60208110156200034257600080fd5b505190620003b9602090811b6200258817901c565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620003b3918691906200041b16565b50505050565b60008282018381101562000414576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b606062000477826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620004dc60201b62002603179092919060201c565b805190915015620004d7578080602001905160208110156200049857600080fd5b5051620004d75760405162461bcd60e51b815260040180806020018281038252602a815260200180620051cf602a913960400191505060405180910390fd5b505050565b6060620004ed8484600085620004f5565b949350505050565b606082471015620005385760405162461bcd60e51b8152600401808060200182810382526026815260200180620051a96026913960400191505060405180910390fd5b62000543856200065d565b62000595576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310620005d65780518252601f199092019160209182019101620005b5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146200063a576040519150601f19603f3d011682016040523d82523d6000602084013e6200063f565b606091505b5090925090506200065282828662000667565b979650505050505050565b803b15155b919050565b606083156200067857508162000414565b825115620006895782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620006d5578181015183820152602001620006bb565b50505050905090810190601f168015620007035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80516001600160a01b03811681146200066257600080fd5b600080600080600080600080610100898b03121562000746578384fd5b620007518962000711565b97506200076160208a0162000711565b96506200077160408a0162000711565b95506200078160608a0162000711565b94506200079160808a0162000711565b9350620007a160a08a0162000711565b60c08a015160e0909a0151989b979a5095989497939692505050565b64159055531560da1b815260050190565b6a29aaa9a424afaa27a5a2a760a91b8152600b0190565b6b2922aba0a9222faa27a5a2a760a11b8152600c0190565b6b2627a1a5afa6a0a720a3a2a960a11b8152600c0190565b6a26a0a9aa22a92fa1a422a360a91b8152600b0190565b61494d806200083c6000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806369af90b911610160578063a6f9dae1116100d8578063e1ea3dee1161008c578063f77a3fb911610071578063f77a3fb9146104d5578063f7c618c1146104e8578063fbfa77cf146104f057610277565b8063e1ea3dee146104af578063e2bbb158146104c257610277565b8063b1de8fdc116100bd578063b1de8fdc14610481578063d4614c6314610494578063deedfdbd1461049c57610277565b8063a6f9dae114610466578063acca30a21461047957610277565b806393f1a40b1161012f578063a1003b2911610114578063a1003b291461042b578063a2d9f4dc1461043e578063a519121a1461045157610277565b806393f1a40b146103f65780639a93534f1461041857610277565b806369af90b9146103b557806379f645f0146103c85780638da5cb5b146103db5780638dbb1e3a146103e357610277565b806348cd4cb1116101f35780635312ea8e116101c2578063630b5ba1116101a7578063630b5ba11461038757806364482f791461038f5780636817031b146103a257610277565b80635312ea8e1461035f578063575a86b21461037257610277565b806348cd4cb11461031e5780634cb5969814610326578063515bc3231461033957806351eb05a61461034c57610277565b806317caf6f11161024a57806329d0fa3e1161022f57806329d0fa3e146102f05780633bb82023146102f8578063441a3e701461030b57610277565b806317caf6f1146102d5578063195426ec146102dd57610277565b8063081e3eda1461027c578063083c63231461029a5780630aaf0d4c146102a25780631526fe27146102ac575b600080fd5b6102846104f8565b60405161029191906147b3565b60405180910390f35b6102846104fe565b6102aa610504565b005b6102bf6102ba366004614129565b610568565b6040516102919a999897969594939291906144d1565b6102846105fb565b6102846102eb366004614159565b610601565b610284610a96565b610284610306366004614159565b610a9c565b6102aa61031936600461422d565b610bb5565b610284610cb1565b6102aa610334366004614188565b610cb7565b6102aa610347366004614279565b611041565b6102aa61035a366004614129565b61119c565b6102aa61036d366004614129565b611253565b61037a611518565b604051610291919061439d565b6102aa611534565b6102aa61039d36600461424e565b611552565b6102aa6103b0366004613f19565b611678565b6102846103c3366004613f19565b61176a565b6102aa6103d6366004613fee565b61177c565b61037a61192a565b6102846103f136600461422d565b611946565b610409610404366004614159565b61197e565b604051610291939291906147ca565b6102aa610426366004613f60565b6119aa565b6102aa610439366004614129565b611cac565b6102aa61044c366004613f19565b611d39565b610459611e2b565b60405161029191906144c6565b6102aa610474366004613f19565b611e62565b61037a611fb2565b6102aa61048f366004614129565b611fce565b61037a61204c565b6102aa6104aa366004613f19565b612068565b6102aa6104bd366004613f19565b61215a565b6102aa6104d036600461422d565b61224c565b6102aa6104e3366004613f35565b612307565b61037a612403565b61037a61241f565b60085490565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff16331461055e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60405180910390fd5b610566612612565b565b6008818154811061057857600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff909516965092949193909263ffffffff81169261ffff64010000000083048116936601000000000000909304169160ff808216916101009004168a565b600b5481565b6000806008848154811061061157fe5b60009182526020808320878452600a8252604080852073ffffffffffffffffffffffffffffffffffffffff808a168752908452818620600790950290920180549092168552600990925292205491925090806106735760009350505050610a90565b61067b613df7565b600480546040517f1526fe2700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691631526fe27916106d0918691016147b3565b60806040518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072091906140c1565b90506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b0bcf42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561078c57600080fd5b505afa1580156107a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c49190614141565b90506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317caf6f16040518163ffffffff1660e01b815260040160206040518083038186803b15801561083057600080fd5b505afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108689190614141565b60608401518451600480546040517f70a08231000000000000000000000000000000000000000000000000000000008152949550929360009373ffffffffffffffffffffffffffffffffffffffff938416936370a08231936108cf9392909116910161439d565b60206040518083038186803b1580156108e757600080fd5b505afa1580156108fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091f9190614141565b905084604001514311801561093357508015155b15610a3a576004805460408088015190517f8dbb1e3a00000000000000000000000000000000000000000000000000000000815260009373ffffffffffffffffffffffffffffffffffffffff90931692638dbb1e3a926109979290914391016147bc565b60206040518083038186803b1580156109af57600080fd5b505afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e79190614141565b90506000610a1685610a108960200151610a0a8a8761273d90919063ffffffff16565b9061273d565b906127b0565b9050610a35610a2e84610a108464e8d4a5100061273d565b8590612588565b935050505b8654600090610a549064e8d4a5100090610a10908661273d565b90508760020154811015610a745760009950505050505050505050610a90565b6002880154610a849082906127f2565b99505050505050505050505b92915050565b60075481565b60008060088481548110610aac57fe5b60009182526020808320878452600a8252604080852073ffffffffffffffffffffffffffffffffffffffff891686529092529220600360079092029092019081015460058201546002830154929450909143118015610b0a57508015155b15610b63576000610b1f856002015443611946565b90506000610b46600b54610a108860010154610a0a6007548761273d90919063ffffffff16565b9050610b5e610a2e84610a108464e8d4a5100061273d565b935050505b8254600090610b7d9064e8d4a5100090610a10908661273d565b90508360010154811015610b9957600095505050505050610a90565b6001840154610ba99082906127f2565b98975050505050505050565b60026000541415610c2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005580610c63576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061453f565b600060088381548110610c7257fe5b60009182526020808320868452600a82526040808520338652909252922060079091029091019150610ca684848484612834565b505060016000555050565b600c5481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b8315610d1657610d16611534565b6000600c544311610d2957600c54610d2b565b435b9050600b5460001415610d4057610d40612612565b600b54610d4d908b612588565b600b8190555060086040518061014001604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001838152602001600081526020018a63ffffffff1681526020018961ffff1681526020018861ffff168152602001600081526020018515158152602001841515815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160040160046101000a81548161ffff021916908361ffff16021790555060c08201518160040160066101000a81548161ffff021916908361ffff16021790555060e082015181600501556101008201518160060160006101000a81548160ff0219169083151502179055506101208201518160060160016101000a81548160ff021916908315150217905550505060008414610f6d5773ffffffffffffffffffffffffffffffffffffffff808a166000818152600960205260409020869055600454610f6d92167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61243b565b600554610fb49073ffffffffffffffffffffffffffffffffffffffff8b811691167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61243b565b600854600b5460405173ffffffffffffffffffffffffffffffffffffffff8c16927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01917fcd9dd3b9c8ad5dc0bb8a3af1af7ead00b197d8341021a209fb64b736abe815b19161102d918f9187908b908b908b906147e0565b60405180910390a350505050505050505050565b600260005414156110b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054889081106110c857fe5b600091825260208083208a8452600a8252604080852033808752935293849020600790930201805493517fd505accf000000000000000000000000000000000000000000000000000000008152909450919273ffffffffffffffffffffffffffffffffffffffff169163d505accf9161114f9130908c908c908c908c908c906004016143ef565b600060405180830381600087803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b5050505061118d88888484612d57565b50506001600055505050505050565b6000600882815481106111ab57fe5b90600052602060002090600702019050806002015443116111cc5750611250565b6005810154806111e3575043600290910155611250565b60006111f3836002015443611946565b9050600061121a600b54610a108660010154610a0a6007548761273d90919063ffffffff16565b905061123d61123284610a108464e8d4a5100061273d565b600386015490612588565b6003850155505043600290920191909155505b50565b600260005414156112c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054839081106112da57fe5b60009182526020808320858452600a8252604080852033865290925292208054600790920290920192501561150e57815473ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205480156113c2576004805483546040517f441a3e7000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9092169263441a3e709261138f9286929091016147bc565b600060405180830381600087803b1580156113a957600080fd5b505af11580156113bd573d6000803e3d6000fd5b505050505b600683015460ff161561148257600654835483546040517fbc3e1b7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384169363bc3e1b7a9361142e93339392909116916004016143be565b602060405180830381600087803b15801561144857600080fd5b505af115801561145c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114809190614141565b505b81546005840154611492916127f2565b6005840155815483546114bf9173ffffffffffffffffffffffffffffffffffffffff9091169033906132c8565b8154604051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595916114f3916147b3565b60405180910390a35060008082556001820181905560028201555b5050600160005550565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005b6008548110156112505761154a8161119c565b600101611537565b60015473ffffffffffffffffffffffffffffffffffffffff1633146115a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b80156115b1576115b1611534565b6115ee826115e8600886815481106115c557fe5b906000526020600020906007020160010154600b546127f290919063ffffffff16565b90612588565b600b81905550827fb0a2ded49817748754bcca0474b24011f01d4574dd5c40e14197ffa2e6540fef6008858154811061162357fe5b90600052602060002090600702016001015484600b54604051611648939291906147ca565b60405180910390a2816008848154811061165e57fe5b906000526020600020906007020160010181905550505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146116c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60055460405173ffffffffffffffffffffffffffffffffffffffff8084169216906116f3906142d0565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60096020526000908152604090205481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b8151835114611808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055590614745565b60005b835181101561192457600084828151811061182257fe5b602002602001015190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30866040518363ffffffff1660e01b815260040161188892919061443d565b60206040518083038186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d89190614141565b1461191b5761191b838584815181106118ed57fe5b60200260200101518373ffffffffffffffffffffffffffffffffffffffff1661335a9092919063ffffffff16565b5060010161180b565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600080600d548311611958578261195c565b600d545b905083811161196c576000611976565b61197681856127f2565b949350505050565b600a60209081526000928352604080842090915290825290208054600182015460029092015490919083565b60015473ffffffffffffffffffffffffffffffffffffffff1633146119fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b848314611a34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061462e565b60005b85811015611c95576000878783818110611a4d57fe5b9050602002016020810190611a629190613f19565b90506000808273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611aa0919061439d565b60206040518083038186803b158015611ab857600080fd5b505afa158015611acc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af09190614141565b905060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30896040518363ffffffff1660e01b8152600401611b2f92919061443d565b60206040518083038186803b158015611b4757600080fd5b505afa158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f9190614141565b9050888886818110611b8d57fe5b9050602002013560001415611bb55780821115611bac57809250611bb0565b8192505b611c63565b888886818110611bc157fe5b90506020020135821015611c01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610555906146e8565b888886818110611c0d57fe5b90506020020135811015611c4d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061468b565b888886818110611c5957fe5b9050602002013592505b611c8573ffffffffffffffffffffffffffffffffffffffff85163089866134e8565b505060019092019150611a379050565b508015611ca457611ca4612612565b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611cfd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b6007546040518291907f946161e5739a4430df1991fae9a81c63724a1971bf00a784a024333d7a7489eb90600090a36007819055611250612612565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60045460405173ffffffffffffffffffffffffffffffffffffffff808416921690611db490614374565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000600c544310158015611e415750600d544311155b8015611e4f57506000600b54115b611e5a576000611e5d565b60015b905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314611eb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b73ffffffffffffffffffffffffffffffffffffffff811615801590611eee575073ffffffffffffffffffffffffffffffffffffffff81163014155b611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055590614574565b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f2748503f8f31d8071821d1d5144384ba6a465036cda17fa1629a8a2509ccee0e90600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461201f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b6002546120449073ffffffffffffffffffffffffffffffffffffffff163330846134e8565b611250612612565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1633146120b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60065460405173ffffffffffffffffffffffffffffffffffffffff8084169216906120e39061434b565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1633146121ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216906121d5906142f9565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600260005414156122be57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054849081106122d357fe5b60009182526020808320868452600a82526040808520338652909252922060079091029091019150610ca684848484612d57565b60015473ffffffffffffffffffffffffffffffffffffffff163314612358576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60025460405173ffffffffffffffffffffffffffffffffffffffff80851692169061238290614322565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560078190556123ff612612565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60006124f8828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156124c657600080fd5b505afa1580156124da573d6000803e3d6000fd5b505050506040513d60208110156124f057600080fd5b505190612588565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052909150611924908590613579565b6000828201838110156125fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60606119768484600085613651565b60075415610566576000600c5443101561262e57600c54612630565b435b6007546002546040517f70a082310000000000000000000000000000000000000000000000000000000081529293506000926126f0926126e992909173ffffffffffffffffffffffffffffffffffffffff909116906370a082319061269990309060040161439d565b60206040518083038186803b1580156126b157600080fd5b505afa1580156126c5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a109190614141565b8390612588565b905081811180156127035750600d548114155b156123ff57600d546040518291907f55672025ea9236922cf8eb88fd9e344bd872c4c1289101e4c9a2bc0f0b1655f190600090a3600d5550565b60008261274c57506000610a90565b8282028284828161275957fe5b04146125fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148976021913960400191505060405180910390fd5b60006125fc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061380c565b60006125fc83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506138c8565b805483111561286f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610555906145d1565b6128788461119c565b815473ffffffffffffffffffffffffffffffffffffffff166000908152600960205260409020548015612b6357600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a6916128fa918591016147b3565b600060405180830381600087803b15801561291457600080fd5b505af1158015612928573d6000803e3d6000fd5b505050506002820154600480546040517f1526fe270000000000000000000000000000000000000000000000000000000081526000936129fe9390926129f89264e8d4a5100092610a109273ffffffffffffffffffffffffffffffffffffffff1691631526fe279161299c918b91016147b3565b60806040518083038186803b1580156129b457600080fd5b505afa1580156129c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ec91906140c1565b6060015188549061273d565b906127f2565b600480546040517f441a3e7000000000000000000000000000000000000000000000000000000000815292935073ffffffffffffffffffffffffffffffffffffffff169163441a3e7091612a569186918a91016147bc565b600060405180830381600087803b158015612a7057600080fd5b505af1158015612a84573d6000803e3d6000fd5b5050600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152612b4c945064e8d4a510009350610a109273ffffffffffffffffffffffffffffffffffffffff90921691631526fe2791612aec918991016147b3565b60806040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3c91906140c1565b606001518654610a0a908a6127f2565b60028401558015612b6157612b61338261393c565b505b6000612b9183600101546129f864e8d4a51000610a108860030154886000015461273d90919063ffffffff16565b8354909150612ba090866127f2565b8084556003850154612bbd9164e8d4a5100091610a10919061273d565b60018401558015612c0a5760048401546006850154612c0a913391849163ffffffff81169161ffff640100000000830481169266010000000000009004169060ff61010090910416613a3a565b600684015460ff1615612cc95760065484546040517fbc3e1b7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263bc3e1b7a92612c75923392909116908a906004016143be565b602060405180830381600087803b158015612c8f57600080fd5b505af1158015612ca3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc79190614141565b505b6005840154612cd890866127f2565b60058501558354612d009073ffffffffffffffffffffffffffffffffffffffff1633876132c8565b853373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56887604051612d4791906147b3565b60405180910390a3505050505050565b612d608461119c565b815473ffffffffffffffffffffffffffffffffffffffff16600090815260096020526040812054825490919015612f64576000612dbf84600101546129f864e8d4a51000610a108960030154896000015461273d90919063ffffffff16565b90508015612e095760048501546006860154612e09913391849163ffffffff81169161ffff640100000000830481169266010000000000009004169060ff61010090910416613a3a565b8215612f6257600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a691612e64918791016147b3565b600060405180830381600087803b158015612e7e57600080fd5b505af1158015612e92573d6000803e3d6000fd5b5050506002850154600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152612f5f94506129f89264e8d4a5100092610a109273ffffffffffffffffffffffffffffffffffffffff90911691631526fe2791612f03918c91016147b3565b60806040518083038186803b158015612f1b57600080fd5b505afa158015612f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f5391906140c1565b6060015189549061273d565b91505b505b8354612f889073ffffffffffffffffffffffffffffffffffffffff163330886134e8565b6005840154612f979086612588565b60058501558254612fa89086612588565b8084556003850154612fc59164e8d4a5100091610a10919061273d565b600184015581156131a657600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a691613025918691016147b3565b600060405180830381600087803b15801561303f57600080fd5b505af1158015613053573d6000803e3d6000fd5b5050600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152613117945064e8d4a510009350610a109273ffffffffffffffffffffffffffffffffffffffff90921691631526fe27916130bb918991016147b3565b60806040518083038186803b1580156130d357600080fd5b505afa1580156130e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310b91906140c1565b6060015186549061273d565b6002840155600480546040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169163e2bbb158916131739186918a91016147bc565b600060405180830381600087803b15801561318d57600080fd5b505af11580156131a1573d6000803e3d6000fd5b505050505b6000851180156131ba5750600684015460ff165b156132715760065484546040517fbc61256e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263bc61256e9261321d923392909116908a906004016143be565b602060405180830381600087803b15801561323757600080fd5b505af115801561324b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061326f9190614141565b505b801561328157613281338261393c565b853373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1587604051612d4791906147b3565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613355908490613579565b505050565b8015806134065750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156133d857600080fd5b505afa1580156133ec573d6000803e3d6000fd5b505050506040513d602081101561340257600080fd5b5051155b61345b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806148e26036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052613355908490613579565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119249085905b60606135db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126039092919063ffffffff16565b805190915015613355578080602001905160208110156135fa57600080fd5b5051613355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806148b8602a913960400191505060405180910390fd5b6060824710156136ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806148716026913960400191505060405180910390fd5b6136b585613c74565b61372057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061378a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161374d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146137ec576040519150601f19603f3d011682016040523d82523d6000602084013e6137f1565b606091505b5091509150613801828286613c7e565b979650505050505050565b600081836138b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561387757818101518382015260200161385f565b50505050905090810190601f1680156138a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138be57fe5b0495945050505050565b60008184841115613934576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561387757818101518382015260200161385f565b505050900390565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061399390309060040161439d565b60206040518083038186803b1580156139ab57600080fd5b505afa1580156139bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139e39190614141565b905080821115613a1657600354613a119073ffffffffffffffffffffffffffffffffffffffff1684836132c8565b613355565b6003546133559073ffffffffffffffffffffffffffffffffffffffff1684846132c8565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190613a9190309060040161439d565b60206040518083038186803b158015613aa957600080fd5b505afa158015613abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae19190614141565b8611613aed5785613b93565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190613b4390309060040161439d565b60206040518083038186803b158015613b5b57600080fd5b505afa158015613b6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b939190614141565b90506000613bb1620f4240610a108463ffffffff808b169061273d16565b6005546002546040517f19ac0d9000000000000000000000000000000000000000000000000000000000815292935073ffffffffffffffffffffffffffffffffffffffff918216926319ac0d9092613c1c92169030908d9060009088908d908d908d90600401614464565b600060405180830381600087803b158015613c3657600080fd5b505af1158015613c4a573d6000803e3d6000fd5b50505050613c6a33613c6583856127f290919063ffffffff16565b613cfe565b5050505050505050565b803b15155b919050565b60608315613c8d5750816125fc565b825115613c9d5782518084602001fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815284516024840152845185939192839260440191908501908083836000831561387757818101518382015260200161385f565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190613d5590309060040161439d565b60206040518083038186803b158015613d6d57600080fd5b505afa158015613d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da59190614141565b905080821115613dd357600254613a119073ffffffffffffffffffffffffffffffffffffffff1684836132c8565b6002546133559073ffffffffffffffffffffffffffffffffffffffff1684846132c8565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b8035613c798161484e565b60008083601f840112613e51578182fd5b50813567ffffffffffffffff811115613e68578182fd5b6020830191508360208083028501011115613e8257600080fd5b9250929050565b600082601f830112613e99578081fd5b8135613eac613ea782614830565b61480c565b818152915060208083019084810181840286018201871015613ecd57600080fd5b60005b84811015613eec57813584529282019290820190600101613ed0565b505050505092915050565b80358015158114613c7957600080fd5b803561ffff81168114613c7957600080fd5b600060208284031215613f2a578081fd5b81356125fc8161484e565b60008060408385031215613f47578081fd5b8235613f528161484e565b946020939093013593505050565b60008060008060008060808789031215613f78578182fd5b863567ffffffffffffffff80821115613f8f578384fd5b613f9b8a838b01613e40565b90985096506020890135915080821115613fb3578384fd5b50613fc089828a01613e40565b9095509350506040870135613fd48161484e565b9150613fe260608801613ef7565b90509295509295509295565b600080600060608486031215614002578283fd5b833567ffffffffffffffff80821115614019578485fd5b818601915086601f83011261402c578485fd5b813561403a613ea782614830565b80828252602080830192508086018b82838702890101111561405a57898afd5b8996505b848710156140855780356140718161484e565b84526001969096019592810192810161405e565b50909750880135935050508082111561409c578384fd5b506140a986828701613e89565b9250506140b860408501613e35565b90509250925092565b6000608082840312156140d2578081fd5b6040516080810181811067ffffffffffffffff821117156140ef57fe5b60405282516140fd8161484e565b808252506020830151602082015260408301516040820152606083015160608201528091505092915050565b60006020828403121561413a578081fd5b5035919050565b600060208284031215614152578081fd5b5051919050565b6000806040838503121561416b578182fd5b82359150602083013561417d8161484e565b809150509250929050565b60008060008060008060008060006101208a8c0312156141a6578283fd5b8935985060208a01356141b88161484e565b975060408a013563ffffffff811681146141d0578384fd5b96506141de60608b01613f07565b95506141ec60808b01613f07565b94506141fa60a08b01613ef7565b935060c08a0135925061420f60e08b01613ef7565b915061421e6101008b01613ef7565b90509295985092959850929598565b6000806040838503121561423f578182fd5b50508035926020909101359150565b600080600060608486031215614262578081fd5b83359250602084013591506140b860408501613ef7565b60008060008060008060c08789031215614291578384fd5b863595506020870135945060408701359350606087013560ff811681146142b6578283fd5b9598949750929560808101359460a0909101359350915050565b7f5641554c54000000000000000000000000000000000000000000000000000000815260050190565b7f53555348495f544f4b454e0000000000000000000000000000000000000000008152600b0190565b7f5245574152445f544f4b454e00000000000000000000000000000000000000008152600c0190565b7f4c4f434b5f4d414e4147455200000000000000000000000000000000000000008152600c0190565b7f4d41535445525f434845460000000000000000000000000000000000000000008152600b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff97881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9889168152968816602088015294909616604086015265ffffffffffff929092166060850152608084015261ffff90811660a084015290921660c082015290151560e08201526101000190565b901515815260200190565b73ffffffffffffffffffffffffffffffffffffffff9a909a168a5260208a01989098526040890196909652606088019490945263ffffffff92909216608087015261ffff90811660a08701521660c085015260e0840152151561010083015215156101208201526101400190565b6020808252818101527f524d3a3a77697468647261773a20616d6f756e74206d757374206265203e2030604082015260600190565b60208082526022908201527f524d3a3a6368616e67654f776e65723a206e6f742076616c696420616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f524d3a3a5f77697468647261773a20616d6f756e74203e20757365722062616c60408201527f616e636500000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f524d3a3a726573637565546f6b656e733a206e6f742073616d65206c656e677460408201527f6800000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f524d3a3a726573637565546f6b656e733a20696e63726561736520746f6b656e60408201527f20616c6c6f77616e636500000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f524d3a3a726573637565546f6b656e733a20636f6e74726163742062616c616e60408201527f636520746f6f206c6f7700000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f524d3a3a746f6b656e416c6c6f773a206e6f742073616d65206c656e67746800604082015260600190565b60208082526009908201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b95865260208601949094526040850192909252606084015215156080830152151560a082015260c00190565b60405181810167ffffffffffffffff8111828210171561482857fe5b604052919050565b600067ffffffffffffffff82111561484457fe5b5060209081020190565b73ffffffffffffffffffffffffffffffffffffffff8116811461125057600080fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212205cfd3814bb165de11350e4d284201f25e1075891b539f48af91eac41f5f0da9564736f6c63430007040033629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f4416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656400000000000000000000000013d5b8fc84f73fc5a0a5832aa8373044371314d3000000000000000000000000b05834034b21531f1689456b1d79fb0569e234740000000000000000000000000adb62b2e331e05c718b96184317d320548a93770000000000000000000000001f3f9d3068568f8040775be2e8c03c103c61f3af0000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2000000000000000000000000c2edad668740f1aa35e4d8f227fb8e17dca888cd0000000000000000000000000000000000000000000000000000000000b5e28000000000000000000000000000000000000000000000000022b1c8c1227a0000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102775760003560e01c806369af90b911610160578063a6f9dae1116100d8578063e1ea3dee1161008c578063f77a3fb911610071578063f77a3fb9146104d5578063f7c618c1146104e8578063fbfa77cf146104f057610277565b8063e1ea3dee146104af578063e2bbb158146104c257610277565b8063b1de8fdc116100bd578063b1de8fdc14610481578063d4614c6314610494578063deedfdbd1461049c57610277565b8063a6f9dae114610466578063acca30a21461047957610277565b806393f1a40b1161012f578063a1003b2911610114578063a1003b291461042b578063a2d9f4dc1461043e578063a519121a1461045157610277565b806393f1a40b146103f65780639a93534f1461041857610277565b806369af90b9146103b557806379f645f0146103c85780638da5cb5b146103db5780638dbb1e3a146103e357610277565b806348cd4cb1116101f35780635312ea8e116101c2578063630b5ba1116101a7578063630b5ba11461038757806364482f791461038f5780636817031b146103a257610277565b80635312ea8e1461035f578063575a86b21461037257610277565b806348cd4cb11461031e5780634cb5969814610326578063515bc3231461033957806351eb05a61461034c57610277565b806317caf6f11161024a57806329d0fa3e1161022f57806329d0fa3e146102f05780633bb82023146102f8578063441a3e701461030b57610277565b806317caf6f1146102d5578063195426ec146102dd57610277565b8063081e3eda1461027c578063083c63231461029a5780630aaf0d4c146102a25780631526fe27146102ac575b600080fd5b6102846104f8565b60405161029191906147b3565b60405180910390f35b6102846104fe565b6102aa610504565b005b6102bf6102ba366004614129565b610568565b6040516102919a999897969594939291906144d1565b6102846105fb565b6102846102eb366004614159565b610601565b610284610a96565b610284610306366004614159565b610a9c565b6102aa61031936600461422d565b610bb5565b610284610cb1565b6102aa610334366004614188565b610cb7565b6102aa610347366004614279565b611041565b6102aa61035a366004614129565b61119c565b6102aa61036d366004614129565b611253565b61037a611518565b604051610291919061439d565b6102aa611534565b6102aa61039d36600461424e565b611552565b6102aa6103b0366004613f19565b611678565b6102846103c3366004613f19565b61176a565b6102aa6103d6366004613fee565b61177c565b61037a61192a565b6102846103f136600461422d565b611946565b610409610404366004614159565b61197e565b604051610291939291906147ca565b6102aa610426366004613f60565b6119aa565b6102aa610439366004614129565b611cac565b6102aa61044c366004613f19565b611d39565b610459611e2b565b60405161029191906144c6565b6102aa610474366004613f19565b611e62565b61037a611fb2565b6102aa61048f366004614129565b611fce565b61037a61204c565b6102aa6104aa366004613f19565b612068565b6102aa6104bd366004613f19565b61215a565b6102aa6104d036600461422d565b61224c565b6102aa6104e3366004613f35565b612307565b61037a612403565b61037a61241f565b60085490565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff16331461055e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60405180910390fd5b610566612612565b565b6008818154811061057857600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff909516965092949193909263ffffffff81169261ffff64010000000083048116936601000000000000909304169160ff808216916101009004168a565b600b5481565b6000806008848154811061061157fe5b60009182526020808320878452600a8252604080852073ffffffffffffffffffffffffffffffffffffffff808a168752908452818620600790950290920180549092168552600990925292205491925090806106735760009350505050610a90565b61067b613df7565b600480546040517f1526fe2700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911691631526fe27916106d0918691016147b3565b60806040518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072091906140c1565b90506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b0bcf42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561078c57600080fd5b505afa1580156107a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c49190614141565b90506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317caf6f16040518163ffffffff1660e01b815260040160206040518083038186803b15801561083057600080fd5b505afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108689190614141565b60608401518451600480546040517f70a08231000000000000000000000000000000000000000000000000000000008152949550929360009373ffffffffffffffffffffffffffffffffffffffff938416936370a08231936108cf9392909116910161439d565b60206040518083038186803b1580156108e757600080fd5b505afa1580156108fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091f9190614141565b905084604001514311801561093357508015155b15610a3a576004805460408088015190517f8dbb1e3a00000000000000000000000000000000000000000000000000000000815260009373ffffffffffffffffffffffffffffffffffffffff90931692638dbb1e3a926109979290914391016147bc565b60206040518083038186803b1580156109af57600080fd5b505afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e79190614141565b90506000610a1685610a108960200151610a0a8a8761273d90919063ffffffff16565b9061273d565b906127b0565b9050610a35610a2e84610a108464e8d4a5100061273d565b8590612588565b935050505b8654600090610a549064e8d4a5100090610a10908661273d565b90508760020154811015610a745760009950505050505050505050610a90565b6002880154610a849082906127f2565b99505050505050505050505b92915050565b60075481565b60008060088481548110610aac57fe5b60009182526020808320878452600a8252604080852073ffffffffffffffffffffffffffffffffffffffff891686529092529220600360079092029092019081015460058201546002830154929450909143118015610b0a57508015155b15610b63576000610b1f856002015443611946565b90506000610b46600b54610a108860010154610a0a6007548761273d90919063ffffffff16565b9050610b5e610a2e84610a108464e8d4a5100061273d565b935050505b8254600090610b7d9064e8d4a5100090610a10908661273d565b90508360010154811015610b9957600095505050505050610a90565b6001840154610ba99082906127f2565b98975050505050505050565b60026000541415610c2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005580610c63576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061453f565b600060088381548110610c7257fe5b60009182526020808320868452600a82526040808520338652909252922060079091029091019150610ca684848484612834565b505060016000555050565b600c5481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b8315610d1657610d16611534565b6000600c544311610d2957600c54610d2b565b435b9050600b5460001415610d4057610d40612612565b600b54610d4d908b612588565b600b8190555060086040518061014001604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001838152602001600081526020018a63ffffffff1681526020018961ffff1681526020018861ffff168152602001600081526020018515158152602001841515815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160040160046101000a81548161ffff021916908361ffff16021790555060c08201518160040160066101000a81548161ffff021916908361ffff16021790555060e082015181600501556101008201518160060160006101000a81548160ff0219169083151502179055506101208201518160060160016101000a81548160ff021916908315150217905550505060008414610f6d5773ffffffffffffffffffffffffffffffffffffffff808a166000818152600960205260409020869055600454610f6d92167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61243b565b600554610fb49073ffffffffffffffffffffffffffffffffffffffff8b811691167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61243b565b600854600b5460405173ffffffffffffffffffffffffffffffffffffffff8c16927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01917fcd9dd3b9c8ad5dc0bb8a3af1af7ead00b197d8341021a209fb64b736abe815b19161102d918f9187908b908b908b906147e0565b60405180910390a350505050505050505050565b600260005414156110b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054889081106110c857fe5b600091825260208083208a8452600a8252604080852033808752935293849020600790930201805493517fd505accf000000000000000000000000000000000000000000000000000000008152909450919273ffffffffffffffffffffffffffffffffffffffff169163d505accf9161114f9130908c908c908c908c908c906004016143ef565b600060405180830381600087803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b5050505061118d88888484612d57565b50506001600055505050505050565b6000600882815481106111ab57fe5b90600052602060002090600702019050806002015443116111cc5750611250565b6005810154806111e3575043600290910155611250565b60006111f3836002015443611946565b9050600061121a600b54610a108660010154610a0a6007548761273d90919063ffffffff16565b905061123d61123284610a108464e8d4a5100061273d565b600386015490612588565b6003850155505043600290920191909155505b50565b600260005414156112c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054839081106112da57fe5b60009182526020808320858452600a8252604080852033865290925292208054600790920290920192501561150e57815473ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205480156113c2576004805483546040517f441a3e7000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9092169263441a3e709261138f9286929091016147bc565b600060405180830381600087803b1580156113a957600080fd5b505af11580156113bd573d6000803e3d6000fd5b505050505b600683015460ff161561148257600654835483546040517fbc3e1b7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384169363bc3e1b7a9361142e93339392909116916004016143be565b602060405180830381600087803b15801561144857600080fd5b505af115801561145c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114809190614141565b505b81546005840154611492916127f2565b6005840155815483546114bf9173ffffffffffffffffffffffffffffffffffffffff9091169033906132c8565b8154604051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595916114f3916147b3565b60405180910390a35060008082556001820181905560028201555b5050600160005550565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005b6008548110156112505761154a8161119c565b600101611537565b60015473ffffffffffffffffffffffffffffffffffffffff1633146115a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b80156115b1576115b1611534565b6115ee826115e8600886815481106115c557fe5b906000526020600020906007020160010154600b546127f290919063ffffffff16565b90612588565b600b81905550827fb0a2ded49817748754bcca0474b24011f01d4574dd5c40e14197ffa2e6540fef6008858154811061162357fe5b90600052602060002090600702016001015484600b54604051611648939291906147ca565b60405180910390a2816008848154811061165e57fe5b906000526020600020906007020160010181905550505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146116c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60055460405173ffffffffffffffffffffffffffffffffffffffff8084169216906116f3906142d0565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60096020526000908152604090205481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b8151835114611808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055590614745565b60005b835181101561192457600084828151811061182257fe5b602002602001015190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30866040518363ffffffff1660e01b815260040161188892919061443d565b60206040518083038186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d89190614141565b1461191b5761191b838584815181106118ed57fe5b60200260200101518373ffffffffffffffffffffffffffffffffffffffff1661335a9092919063ffffffff16565b5060010161180b565b50505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600080600d548311611958578261195c565b600d545b905083811161196c576000611976565b61197681856127f2565b949350505050565b600a60209081526000928352604080842090915290825290208054600182015460029092015490919083565b60015473ffffffffffffffffffffffffffffffffffffffff1633146119fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b848314611a34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061462e565b60005b85811015611c95576000878783818110611a4d57fe5b9050602002016020810190611a629190613f19565b90506000808273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611aa0919061439d565b60206040518083038186803b158015611ab857600080fd5b505afa158015611acc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af09190614141565b905060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30896040518363ffffffff1660e01b8152600401611b2f92919061443d565b60206040518083038186803b158015611b4757600080fd5b505afa158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f9190614141565b9050888886818110611b8d57fe5b9050602002013560001415611bb55780821115611bac57809250611bb0565b8192505b611c63565b888886818110611bc157fe5b90506020020135821015611c01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610555906146e8565b888886818110611c0d57fe5b90506020020135811015611c4d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061468b565b888886818110611c5957fe5b9050602002013592505b611c8573ffffffffffffffffffffffffffffffffffffffff85163089866134e8565b505060019092019150611a379050565b508015611ca457611ca4612612565b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611cfd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b6007546040518291907f946161e5739a4430df1991fae9a81c63724a1971bf00a784a024333d7a7489eb90600090a36007819055611250612612565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60045460405173ffffffffffffffffffffffffffffffffffffffff808416921690611db490614374565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000600c544310158015611e415750600d544311155b8015611e4f57506000600b54115b611e5a576000611e5d565b60015b905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314611eb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b73ffffffffffffffffffffffffffffffffffffffff811615801590611eee575073ffffffffffffffffffffffffffffffffffffffff81163014155b611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055590614574565b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f2748503f8f31d8071821d1d5144384ba6a465036cda17fa1629a8a2509ccee0e90600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461201f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b6002546120449073ffffffffffffffffffffffffffffffffffffffff163330846134e8565b611250612612565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1633146120b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60065460405173ffffffffffffffffffffffffffffffffffffffff8084169216906120e39061434b565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1633146121ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216906121d5906142f9565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600260005414156122be57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600090815560088054849081106122d357fe5b60009182526020808320868452600a82526040808520338652909252922060079091029091019150610ca684848484612d57565b60015473ffffffffffffffffffffffffffffffffffffffff163314612358576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105559061477c565b60025460405173ffffffffffffffffffffffffffffffffffffffff80851692169061238290614322565b604051908190038120907f629c91fc9de3db5e699d8bad8523995c8e14e7f52fb91b49725e6625f2ea45f490600090a4600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560078190556123ff612612565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60006124f8828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156124c657600080fd5b505afa1580156124da573d6000803e3d6000fd5b505050506040513d60208110156124f057600080fd5b505190612588565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052909150611924908590613579565b6000828201838110156125fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60606119768484600085613651565b60075415610566576000600c5443101561262e57600c54612630565b435b6007546002546040517f70a082310000000000000000000000000000000000000000000000000000000081529293506000926126f0926126e992909173ffffffffffffffffffffffffffffffffffffffff909116906370a082319061269990309060040161439d565b60206040518083038186803b1580156126b157600080fd5b505afa1580156126c5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a109190614141565b8390612588565b905081811180156127035750600d548114155b156123ff57600d546040518291907f55672025ea9236922cf8eb88fd9e344bd872c4c1289101e4c9a2bc0f0b1655f190600090a3600d5550565b60008261274c57506000610a90565b8282028284828161275957fe5b04146125fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148976021913960400191505060405180910390fd5b60006125fc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061380c565b60006125fc83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506138c8565b805483111561286f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610555906145d1565b6128788461119c565b815473ffffffffffffffffffffffffffffffffffffffff166000908152600960205260409020548015612b6357600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a6916128fa918591016147b3565b600060405180830381600087803b15801561291457600080fd5b505af1158015612928573d6000803e3d6000fd5b505050506002820154600480546040517f1526fe270000000000000000000000000000000000000000000000000000000081526000936129fe9390926129f89264e8d4a5100092610a109273ffffffffffffffffffffffffffffffffffffffff1691631526fe279161299c918b91016147b3565b60806040518083038186803b1580156129b457600080fd5b505afa1580156129c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ec91906140c1565b6060015188549061273d565b906127f2565b600480546040517f441a3e7000000000000000000000000000000000000000000000000000000000815292935073ffffffffffffffffffffffffffffffffffffffff169163441a3e7091612a569186918a91016147bc565b600060405180830381600087803b158015612a7057600080fd5b505af1158015612a84573d6000803e3d6000fd5b5050600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152612b4c945064e8d4a510009350610a109273ffffffffffffffffffffffffffffffffffffffff90921691631526fe2791612aec918991016147b3565b60806040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3c91906140c1565b606001518654610a0a908a6127f2565b60028401558015612b6157612b61338261393c565b505b6000612b9183600101546129f864e8d4a51000610a108860030154886000015461273d90919063ffffffff16565b8354909150612ba090866127f2565b8084556003850154612bbd9164e8d4a5100091610a10919061273d565b60018401558015612c0a5760048401546006850154612c0a913391849163ffffffff81169161ffff640100000000830481169266010000000000009004169060ff61010090910416613a3a565b600684015460ff1615612cc95760065484546040517fbc3e1b7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263bc3e1b7a92612c75923392909116908a906004016143be565b602060405180830381600087803b158015612c8f57600080fd5b505af1158015612ca3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc79190614141565b505b6005840154612cd890866127f2565b60058501558354612d009073ffffffffffffffffffffffffffffffffffffffff1633876132c8565b853373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56887604051612d4791906147b3565b60405180910390a3505050505050565b612d608461119c565b815473ffffffffffffffffffffffffffffffffffffffff16600090815260096020526040812054825490919015612f64576000612dbf84600101546129f864e8d4a51000610a108960030154896000015461273d90919063ffffffff16565b90508015612e095760048501546006860154612e09913391849163ffffffff81169161ffff640100000000830481169266010000000000009004169060ff61010090910416613a3a565b8215612f6257600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a691612e64918791016147b3565b600060405180830381600087803b158015612e7e57600080fd5b505af1158015612e92573d6000803e3d6000fd5b5050506002850154600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152612f5f94506129f89264e8d4a5100092610a109273ffffffffffffffffffffffffffffffffffffffff90911691631526fe2791612f03918c91016147b3565b60806040518083038186803b158015612f1b57600080fd5b505afa158015612f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f5391906140c1565b6060015189549061273d565b91505b505b8354612f889073ffffffffffffffffffffffffffffffffffffffff163330886134e8565b6005840154612f979086612588565b60058501558254612fa89086612588565b8084556003850154612fc59164e8d4a5100091610a10919061273d565b600184015581156131a657600480546040517f51eb05a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916351eb05a691613025918691016147b3565b600060405180830381600087803b15801561303f57600080fd5b505af1158015613053573d6000803e3d6000fd5b5050600480546040517f1526fe27000000000000000000000000000000000000000000000000000000008152613117945064e8d4a510009350610a109273ffffffffffffffffffffffffffffffffffffffff90921691631526fe27916130bb918991016147b3565b60806040518083038186803b1580156130d357600080fd5b505afa1580156130e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310b91906140c1565b6060015186549061273d565b6002840155600480546040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169163e2bbb158916131739186918a91016147bc565b600060405180830381600087803b15801561318d57600080fd5b505af11580156131a1573d6000803e3d6000fd5b505050505b6000851180156131ba5750600684015460ff165b156132715760065484546040517fbc61256e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263bc61256e9261321d923392909116908a906004016143be565b602060405180830381600087803b15801561323757600080fd5b505af115801561324b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061326f9190614141565b505b801561328157613281338261393c565b853373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1587604051612d4791906147b3565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613355908490613579565b505050565b8015806134065750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156133d857600080fd5b505afa1580156133ec573d6000803e3d6000fd5b505050506040513d602081101561340257600080fd5b5051155b61345b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806148e26036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052613355908490613579565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119249085905b60606135db826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166126039092919063ffffffff16565b805190915015613355578080602001905160208110156135fa57600080fd5b5051613355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806148b8602a913960400191505060405180910390fd5b6060824710156136ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806148716026913960400191505060405180910390fd5b6136b585613c74565b61372057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061378a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161374d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146137ec576040519150601f19603f3d011682016040523d82523d6000602084013e6137f1565b606091505b5091509150613801828286613c7e565b979650505050505050565b600081836138b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561387757818101518382015260200161385f565b50505050905090810190601f1680156138a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138be57fe5b0495945050505050565b60008184841115613934576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561387757818101518382015260200161385f565b505050900390565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061399390309060040161439d565b60206040518083038186803b1580156139ab57600080fd5b505afa1580156139bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139e39190614141565b905080821115613a1657600354613a119073ffffffffffffffffffffffffffffffffffffffff1684836132c8565b613355565b6003546133559073ffffffffffffffffffffffffffffffffffffffff1684846132c8565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190613a9190309060040161439d565b60206040518083038186803b158015613aa957600080fd5b505afa158015613abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae19190614141565b8611613aed5785613b93565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190613b4390309060040161439d565b60206040518083038186803b158015613b5b57600080fd5b505afa158015613b6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b939190614141565b90506000613bb1620f4240610a108463ffffffff808b169061273d16565b6005546002546040517f19ac0d9000000000000000000000000000000000000000000000000000000000815292935073ffffffffffffffffffffffffffffffffffffffff918216926319ac0d9092613c1c92169030908d9060009088908d908d908d90600401614464565b600060405180830381600087803b158015613c3657600080fd5b505af1158015613c4a573d6000803e3d6000fd5b50505050613c6a33613c6583856127f290919063ffffffff16565b613cfe565b5050505050505050565b803b15155b919050565b60608315613c8d5750816125fc565b825115613c9d5782518084602001fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815284516024840152845185939192839260440191908501908083836000831561387757818101518382015260200161385f565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190613d5590309060040161439d565b60206040518083038186803b158015613d6d57600080fd5b505afa158015613d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613da59190614141565b905080821115613dd357600254613a119073ffffffffffffffffffffffffffffffffffffffff1684836132c8565b6002546133559073ffffffffffffffffffffffffffffffffffffffff1684846132c8565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b8035613c798161484e565b60008083601f840112613e51578182fd5b50813567ffffffffffffffff811115613e68578182fd5b6020830191508360208083028501011115613e8257600080fd5b9250929050565b600082601f830112613e99578081fd5b8135613eac613ea782614830565b61480c565b818152915060208083019084810181840286018201871015613ecd57600080fd5b60005b84811015613eec57813584529282019290820190600101613ed0565b505050505092915050565b80358015158114613c7957600080fd5b803561ffff81168114613c7957600080fd5b600060208284031215613f2a578081fd5b81356125fc8161484e565b60008060408385031215613f47578081fd5b8235613f528161484e565b946020939093013593505050565b60008060008060008060808789031215613f78578182fd5b863567ffffffffffffffff80821115613f8f578384fd5b613f9b8a838b01613e40565b90985096506020890135915080821115613fb3578384fd5b50613fc089828a01613e40565b9095509350506040870135613fd48161484e565b9150613fe260608801613ef7565b90509295509295509295565b600080600060608486031215614002578283fd5b833567ffffffffffffffff80821115614019578485fd5b818601915086601f83011261402c578485fd5b813561403a613ea782614830565b80828252602080830192508086018b82838702890101111561405a57898afd5b8996505b848710156140855780356140718161484e565b84526001969096019592810192810161405e565b50909750880135935050508082111561409c578384fd5b506140a986828701613e89565b9250506140b860408501613e35565b90509250925092565b6000608082840312156140d2578081fd5b6040516080810181811067ffffffffffffffff821117156140ef57fe5b60405282516140fd8161484e565b808252506020830151602082015260408301516040820152606083015160608201528091505092915050565b60006020828403121561413a578081fd5b5035919050565b600060208284031215614152578081fd5b5051919050565b6000806040838503121561416b578182fd5b82359150602083013561417d8161484e565b809150509250929050565b60008060008060008060008060006101208a8c0312156141a6578283fd5b8935985060208a01356141b88161484e565b975060408a013563ffffffff811681146141d0578384fd5b96506141de60608b01613f07565b95506141ec60808b01613f07565b94506141fa60a08b01613ef7565b935060c08a0135925061420f60e08b01613ef7565b915061421e6101008b01613ef7565b90509295985092959850929598565b6000806040838503121561423f578182fd5b50508035926020909101359150565b600080600060608486031215614262578081fd5b83359250602084013591506140b860408501613ef7565b60008060008060008060c08789031215614291578384fd5b863595506020870135945060408701359350606087013560ff811681146142b6578283fd5b9598949750929560808101359460a0909101359350915050565b7f5641554c54000000000000000000000000000000000000000000000000000000815260050190565b7f53555348495f544f4b454e0000000000000000000000000000000000000000008152600b0190565b7f5245574152445f544f4b454e00000000000000000000000000000000000000008152600c0190565b7f4c4f434b5f4d414e4147455200000000000000000000000000000000000000008152600c0190565b7f4d41535445525f434845460000000000000000000000000000000000000000008152600b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff97881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9889168152968816602088015294909616604086015265ffffffffffff929092166060850152608084015261ffff90811660a084015290921660c082015290151560e08201526101000190565b901515815260200190565b73ffffffffffffffffffffffffffffffffffffffff9a909a168a5260208a01989098526040890196909652606088019490945263ffffffff92909216608087015261ffff90811660a08701521660c085015260e0840152151561010083015215156101208201526101400190565b6020808252818101527f524d3a3a77697468647261773a20616d6f756e74206d757374206265203e2030604082015260600190565b60208082526022908201527f524d3a3a6368616e67654f776e65723a206e6f742076616c696420616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f524d3a3a5f77697468647261773a20616d6f756e74203e20757365722062616c60408201527f616e636500000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f524d3a3a726573637565546f6b656e733a206e6f742073616d65206c656e677460408201527f6800000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f524d3a3a726573637565546f6b656e733a20696e63726561736520746f6b656e60408201527f20616c6c6f77616e636500000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f524d3a3a726573637565546f6b656e733a20636f6e74726163742062616c616e60408201527f636520746f6f206c6f7700000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f524d3a3a746f6b656e416c6c6f773a206e6f742073616d65206c656e67746800604082015260600190565b60208082526009908201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b95865260208601949094526040850192909252606084015215156080830152151560a082015260c00190565b60405181810167ffffffffffffffff8111828210171561482857fe5b604052919050565b600067ffffffffffffffff82111561484457fe5b5060209081020190565b73ffffffffffffffffffffffffffffffffffffffff8116811461125057600080fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212205cfd3814bb165de11350e4d284201f25e1075891b539f48af91eac41f5f0da9564736f6c63430007040033

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

00000000000000000000000013d5b8fc84f73fc5a0a5832aa8373044371314d3000000000000000000000000b05834034b21531f1689456b1d79fb0569e234740000000000000000000000000adb62b2e331e05c718b96184317d320548a93770000000000000000000000001f3f9d3068568f8040775be2e8c03c103c61f3af0000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2000000000000000000000000c2edad668740f1aa35e4d8f227fb8e17dca888cd0000000000000000000000000000000000000000000000000000000000b5e28000000000000000000000000000000000000000000000000022b1c8c1227a0000

-----Decoded View---------------
Arg [0] : _owner (address): 0x13d5B8Fc84F73fc5a0A5832Aa8373044371314d3
Arg [1] : _lockManager (address): 0xB05834034b21531F1689456B1D79fb0569E23474
Arg [2] : _vault (address): 0x0AdB62b2E331E05c718b96184317D320548A9377
Arg [3] : _rewardToken (address): 0x1F3f9D3068568F8040775be2e8C03C103C61f3aF
Arg [4] : _sushiToken (address): 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2
Arg [5] : _masterChef (address): 0xc2EdaD668740f1aA35E4D8f227fB8E17dcA888Cd
Arg [6] : _startBlock (uint256): 11920000
Arg [7] : _rewardTokensPerBlock (uint256): 2500000000000000000

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000013d5b8fc84f73fc5a0a5832aa8373044371314d3
Arg [1] : 000000000000000000000000b05834034b21531f1689456b1d79fb0569e23474
Arg [2] : 0000000000000000000000000adb62b2e331e05c718b96184317d320548a9377
Arg [3] : 0000000000000000000000001f3f9d3068568f8040775be2e8c03c103c61f3af
Arg [4] : 0000000000000000000000006b3595068778dd592e39a122f4f5a5cf09c90fe2
Arg [5] : 000000000000000000000000c2edad668740f1aa35e4d8f227fb8e17dca888cd
Arg [6] : 0000000000000000000000000000000000000000000000000000000000b5e280
Arg [7] : 00000000000000000000000000000000000000000000000022b1c8c1227a0000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

The Rewards Manager contract is in charge of distributing token rewards to various stakeholders in the Archer Network.

Validator Index Block Amount
View All Withdrawals

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

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