Contract Address Details

0xDDbE2FDBf16B076ca8a0a3cf4981AAA4Ae1555dC

Contract Name
MasterChef
Creator
0x43ca0c–cda31c at 0xbdc627–1500f4
Balance
0 CRO ( )
Tokens
Fetching tokens...
Transactions
2 Transactions
Transfers
0 Transfers
Gas Used
282,162
Last Balance Update
13657951
Contract name:
MasterChef




Optimization enabled
false
Compiler version
v0.8.10+commit.fc410830




EVM Version
default




Verified at
2021-12-21T15:36:49.220874Z

Constructor Arguments

000000000000000000000000fe5cf456d201a0e1a97a75817aaf163d5a0e41d300000000000000000000000000000000000000000000000000000000000d949000000000000000000000000043ca0c802374170080b94b866bfa69ea49cda31c

Arg [0] (address) : 0xfe5cf456d201a0e1a97a75817aaf163d5a0e41d3
Arg [1] (uint256) : 890000
Arg [2] (address) : 0x43ca0c802374170080b94b866bfa69ea49cda31c

              

Contract source code

// SPDX-License-Identifier: MIT

//⚡️⚡️⚡⚡️ https://zeusfinance.app ⚡️⚡️⚡️⚡️

/*
$$$$$$$$\ $$$$$$$$\ $$\   $$\    $$\          $$$$$$$$\ $$$$$$\ $$\   $$\  $$$$$$\  $$\   $$\  $$$$$$\  $$$$$$$$\ 
\____$$  |$$  _____|$$ |  $$ | $$$$$$\        $$  _____|\_$$  _|$$$\  $$ |$$  __$$\ $$$\  $$ |$$  __$$\ $$  _____|
    $$  / $$ |      $$ |  $$ |$$  __$$\       $$ |        $$ |  $$$$\ $$ |$$ /  $$ |$$$$\ $$ |$$ /  \__|$$ |      
   $$  /  $$$$$\    $$ |  $$ |$$ /  \__|      $$$$$\      $$ |  $$ $$\$$ |$$$$$$$$ |$$ $$\$$ |$$ |      $$$$$\    
  $$  /   $$  __|   $$ |  $$ |\$$$$$$\        $$  __|     $$ |  $$ \$$$$ |$$  __$$ |$$ \$$$$ |$$ |      $$  __|   
 $$  /    $$ |      $$ |  $$ | \___ $$\       $$ |        $$ |  $$ |\$$$ |$$ |  $$ |$$ |\$$$ |$$ |  $$\ $$ |      
$$$$$$$$\ $$$$$$$$\ \$$$$$$  |$$\  \$$ |      $$ |      $$$$$$\ $$ | \$$ |$$ |  $$ |$$ | \$$ |\$$$$$$  |$$$$$$$$\ 
\________|\________| \______/ \$$$$$$  |      \__|      \______|\__|  \__|\__|  \__|\__|  \__| \______/ \________|
                               \_$$  _/                                                                           
                                 \ _/ 
 */
pragma solidity ^0.8.0;

library SafeMath {
 
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

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

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

pragma solidity ^0.8.0;

abstract contract ReentrancyGuard {

    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    modifier nonReentrant() {
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        _status = _ENTERED;

        _;

        _status = _NOT_ENTERED;
    }
}

pragma solidity ^0.8.0;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

pragma solidity ^0.8.0;

abstract contract Ownable is Context {
    address private _owner;

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

    constructor() {
        _setOwner(_msgSender());
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}


pragma solidity ^0.8.0;

interface IERC20 {
   
    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);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

pragma solidity ^0.8.0;

interface IERC20Metadata is IERC20 {
   
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);
}

pragma solidity ^0.8.0;

contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    function name() public view virtual override returns (string memory) {
        return _name;
    }

    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

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

    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

pragma solidity ^0.8.0;

library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

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

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

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
  
        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));
    }

    function _callOptionalReturn(IERC20 token, bytes memory data) private {
     
        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { 
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


pragma solidity ^0.8.0;

library Address {
    
    function isContract(address account) internal view returns (bool) {

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    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");
    }

    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");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            if (returndata.length > 0) {

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

pragma solidity 0.8.10;


contract AthenaToken is ERC20("Zeu$Finance", "ATH"), Ownable {
    using SafeMath for uint256;
    
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
    }

}

pragma solidity 0.8.10;

// MasterChef is the master of ATH. He can make ATH and he is a fair god.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once ATH is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free.
// May the gods protect us

contract MasterChef is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;         // How many LP tokens the user has provided.
        uint256 rewardDebt;     // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of ZEU$
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accATHPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accATHPerShare` (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.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. ZEU$es to distribute per block.
        uint256 lastRewardBlock;  // Last block number that ATHes distribution occurs.
        uint256 accATHPerShare;   // Accumulated ATHes per share, times 1e18. See below.
        uint16 depositFeeBP;      // Deposit fee in basis points
	uint256 lpSupply; 
    }

    // The ATH TOKEN!
    AthenaToken public ATH;
    address public devAddress;
    address public feeAddress = 0x43CA0c802374170080B94b866Bfa69Ea49cDA31C;
    uint256 constant max_ATH_supply = 100000000 ether;

    // ATH tokens created per block.
    uint256 public ATHPerBlock = 100 ether;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when ATH mining starts.
    uint256 public startBlock;
    uint256 public constant MAXIMUM_EMISSION_RATE = 100 ether;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event SetDevAddress(address indexed user, address indexed newAddress);
    event UpdateEmissionRate(address indexed user, uint256 ATHPerBlock);
    event PoolAdd(address indexed user, IERC20 lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint16 depositFeeBP);
    event PoolSet(address indexed user, IERC20 lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint16 depositFeeBP);
    event UpdateStartBlock(address indexed user, uint256 startBlock);
    constructor(
        AthenaToken _ATH,
        uint256 _startBlock,
        address _devAddress
        
    ) {
        ATH = _ATH;
        startBlock = _startBlock;
        devAddress = _devAddress;
     }

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

    mapping(IERC20 => bool) public poolExistence;
    modifier nonDuplicated(IERC20 _lpToken) {
        require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated");
        _;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFeeBP) external onlyOwner nonDuplicated(_lpToken) {
	_lpToken.balanceOf(address(this));
        require(_depositFeeBP <= 500, "add: invalid deposit fee basis points");
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolExistence[_lpToken] = true;
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accATHPerShare: 0,
            depositFeeBP: _depositFeeBP,
	    lpSupply: 0
        }));
	emit PoolAdd(msg.sender, _lpToken, _allocPoint,lastRewardBlock,_depositFeeBP);
    }

    // Update the given pool's ATH allocation point and deposit fee. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP) external onlyOwner {
        require(_depositFeeBP <= 500, "set: invalid deposit fee basis points");
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
	emit PoolSet(msg.sender, poolInfo[_pid].lpToken, _allocPoint,poolInfo[_pid].lastRewardBlock,_depositFeeBP);
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        if (ATH.totalSupply() >= max_ATH_supply) return 0;
 
        return _to.sub(_from);
    }

    // View function to see pending ATHes on frontend.
    function pendingATH(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accATHPerShare = pool.accATHPerShare;
        if (block.number > pool.lastRewardBlock && pool.lpSupply != 0 && totalAllocPoint > 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 ATHReward = multiplier.mul(ATHPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accATHPerShare = accATHPerShare.add(ATHReward.mul(1e18).div(pool.lpSupply));
        }
        return user.amount.mul(accATHPerShare).div(1e18).sub(user.rewardDebt);
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        if (pool.lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 ATHReward = multiplier.mul(ATHPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
	if(ATH.totalSupply().add(ATHReward.mul(105).div(100)) <= max_ATH_supply){
	  ATH.mint(devAddress, ATHReward.div(20));
	  ATH.mint(address(this), ATHReward);
	}else if(ATH.totalSupply() < max_ATH_supply){
	  ATH.mint(address(this), max_ATH_supply.sub(ATH.totalSupply()));
	}
        pool.accATHPerShare = pool.accATHPerShare.add(ATHReward.mul(1e18).div(pool.lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for ATH allocation.
    function deposit(uint256 _pid, uint256 _amount) nonReentrant external {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accATHPerShare).div(1e18).sub(user.rewardDebt);
            if (pending > 0) {
                safeATHTransfer(msg.sender, pending);
            }
        }
        if (_amount > 0) {
	    uint256 balanceBefore = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
	    _amount = pool.lpToken.balanceOf(address(this)).sub(balanceBefore);
	    require(_amount > 0, "we dont accept deposits of 0");
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                pool.lpToken.safeTransfer(feeAddress, depositFee);
                user.amount = user.amount.add(_amount).sub(depositFee);
		pool.lpSupply = pool.lpSupply.add(_amount).sub(depositFee);
            } else {
                user.amount = user.amount.add(_amount);
		pool.lpSupply = pool.lpSupply.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accATHPerShare).div(1e18);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) nonReentrant external {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accATHPerShare).div(1e18).sub(user.rewardDebt);
        if (pending > 0) {
            safeATHTransfer(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
	    pool.lpSupply = pool.lpSupply.sub(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accATHPerShare).div(1e18);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) nonReentrant external{
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
	pool.lpSupply = pool.lpSupply.sub(user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Safe ATH transfer function, just in case if rounding error causes pool to not have enough ATH.
    function safeATHTransfer(address _to, uint256 _amount) internal {
        uint256 ATHBal = ATH.balanceOf(address(this));
        bool transferSuccess = false;
        if (_amount > ATHBal) {
            transferSuccess = ATH.transfer(_to, ATHBal);
        } else {
            transferSuccess = ATH.transfer(_to, _amount);
        }
        require(transferSuccess, "safeATHTransfer: Transfer failed");
    }

    // Update dev address by the previous dev.
    function setDevAddress(address _devAddress) external onlyOwner {
	require(_devAddress != address(0), "!nonzero");
        devAddress = _devAddress;
        emit SetDevAddress(msg.sender, _devAddress);
    }
    

    function updateEmissionRate(uint256 _ATHPerBlock) external onlyOwner {
        require(_ATHPerBlock <= MAXIMUM_EMISSION_RATE, "Too High");
        massUpdatePools();
        ATHPerBlock = _ATHPerBlock;
        emit UpdateEmissionRate(msg.sender, _ATHPerBlock);
    }

     function exponentialReduction() external onlyOwner {
        require(ATHPerBlock > 1 ether, "Already at the minimum amount");
        massUpdatePools();
        ATHPerBlock = (ATHPerBlock.div(100)).mul(75);
        emit UpdateEmissionRate(msg.sender, ATHPerBlock);
    }

    // Only update before start of farm
    function updateStartBlock(uint256 _startBlock) onlyOwner external{
	require(startBlock > block.number, "Farm already started");
	uint256 length = poolInfo.length;
	for(uint256 pid = 0; pid < length; ++pid){
		PoolInfo storage pool = poolInfo[pid];
		pool.lastRewardBlock = _startBlock;
	}
        startBlock = _startBlock;
	emit UpdateStartBlock(msg.sender, _startBlock);
    }
    
    
}

        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_ATH","internalType":"contract AthenaToken"},{"type":"uint256","name":"_startBlock","internalType":"uint256"},{"type":"address","name":"_devAddress","internalType":"address"}]},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"PoolAdd","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"lpToken","internalType":"contract IERC20","indexed":false},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256","indexed":false},{"type":"uint16","name":"depositFeeBP","internalType":"uint16","indexed":false}],"anonymous":false},{"type":"event","name":"PoolSet","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"lpToken","internalType":"contract IERC20","indexed":false},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256","indexed":false},{"type":"uint16","name":"depositFeeBP","internalType":"uint16","indexed":false}],"anonymous":false},{"type":"event","name":"SetDevAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateEmissionRate","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"ATHPerBlock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateStartBlock","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"startBlock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract AthenaToken"}],"name":"ATH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ATHPerBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAXIMUM_EMISSION_RATE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"exponentialReduction","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMultiplier","inputs":[{"type":"uint256","name":"_from","internalType":"uint256"},{"type":"uint256","name":"_to","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingATH","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"poolExistence","inputs":[{"type":"address","name":"","internalType":"contract IERC20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"accATHPerShare","internalType":"uint256"},{"type":"uint16","name":"depositFeeBP","internalType":"uint16"},{"type":"uint256","name":"lpSupply","internalType":"uint256"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDevAddress","inputs":[{"type":"address","name":"_devAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateEmissionRate","inputs":[{"type":"uint256","name":"_ATHPerBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateStartBlock","inputs":[{"type":"uint256","name":"_startBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c806355ea5bf5116100f957806393f1a40b11610097578063d0d41fe111610071578063d0d41fe114610478578063e2bbb15814610494578063f2fde38b146104b0578063fac2b9ba146104cc576101a9565b806393f1a40b146103e7578063a5d7adef14610418578063cbd258b514610448576101a9565b80636eed6a2c116100d35780636eed6a2c14610371578063715018a61461038f5780638da5cb5b146103995780638dbb1e3a146103b7576101a9565b806355ea5bf51461032b578063630b5ba11461034957806369b3312614610353576101a9565b80633205a79311610166578063441a3e7011610140578063441a3e70146102b957806348cd4cb1146102d557806351eb05a6146102f35780635312ea8e1461030f576101a9565b80633205a793146102735780633ad10ef61461027d578063412753581461029b576101a9565b806306539275146101ae578063081e3eda146101ca5780630ba84cd2146101e85780631526fe271461020457806317caf6f11461023957806324bcb38c14610257575b600080fd5b6101c860048036038101906101c39190612c9a565b6104e8565b005b6101d26108a9565b6040516101df9190612cfc565b60405180910390f35b61020260048036038101906101fd9190612d17565b6108b6565b005b61021e60048036038101906102199190612d17565b6109de565b60405161023096959493929190612db2565b60405180910390f35b610241610a58565b60405161024e9190612cfc565b60405180910390f35b610271600480360381019061026c9190612e13565b610a5e565b005b61027b610ca2565b005b610285610df3565b6040516102929190612e75565b60405180910390f35b6102a3610e19565b6040516102b09190612e75565b60405180910390f35b6102d360048036038101906102ce9190612e90565b610e3f565b005b6102dd6110eb565b6040516102ea9190612cfc565b60405180910390f35b61030d60048036038101906103089190612d17565b6110f1565b005b61032960048036038101906103249190612d17565b61161a565b005b6103336117cd565b6040516103409190612cfc565b60405180910390f35b6103516117d3565b005b61035b611806565b6040516103689190612ef1565b60405180910390f35b61037961182c565b6040516103869190612cfc565b60405180910390f35b610397611839565b005b6103a16118c1565b6040516103ae9190612e75565b60405180910390f35b6103d160048036038101906103cc9190612e90565b6118ea565b6040516103de9190612cfc565b60405180910390f35b61040160048036038101906103fc9190612f38565b6119b3565b60405161040f929190612f78565b60405180910390f35b610432600480360381019061042d9190612f38565b6119e4565b60405161043f9190612cfc565b60405180910390f35b610462600480360381019061045d9190612fa1565b611b82565b60405161046f9190612fe9565b60405180910390f35b610492600480360381019061048d9190613004565b611ba2565b005b6104ae60048036038101906104a99190612e90565b611d2c565b005b6104ca60048036038101906104c59190613004565b612273565b005b6104e660048036038101906104e19190612d17565b61236b565b005b6104f06124db565b73ffffffffffffffffffffffffffffffffffffffff1661050e6118c1565b73ffffffffffffffffffffffffffffffffffffffff1614610564576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055b9061308e565b60405180910390fd5b8160001515600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146105f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ef906130fa565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106319190612e75565b602060405180830381865afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610672919061312f565b506101f48261ffff1611156106bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b3906131ce565b60405180910390fd5b600060095443116106cf576009546106d1565b435b90506106e8856008546124e390919063ffffffff16565b6008819055506001600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060066040518060c001604052808673ffffffffffffffffffffffffffffffffffffffff168152602001878152602001838152602001600081526020018561ffff1681526020016000815250908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548161ffff021916908361ffff16021790555060a0820151816005015550503373ffffffffffffffffffffffffffffffffffffffff167fa2c51573880fb2ac3b22bb2584e1c8972b7baf3928d9abbf230c500de25e84fa8587848760405161089a94939291906131ee565b60405180910390a25050505050565b6000600680549050905090565b6108be6124db565b73ffffffffffffffffffffffffffffffffffffffff166108dc6118c1565b73ffffffffffffffffffffffffffffffffffffffff1614610932576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109299061308e565b60405180910390fd5b68056bc75e2d6310000081111561097e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109759061327f565b60405180910390fd5b6109866117d3565b806005819055503373ffffffffffffffffffffffffffffffffffffffff167fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053826040516109d39190612cfc565b60405180910390a250565b600681815481106109ee57600080fd5b90600052602060002090600602016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040160009054906101000a900461ffff16908060050154905086565b60085481565b610a666124db565b73ffffffffffffffffffffffffffffffffffffffff16610a846118c1565b73ffffffffffffffffffffffffffffffffffffffff1614610ada576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad19061308e565b60405180910390fd5b6101f48161ffff161115610b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1a90613311565b60405180910390fd5b610b6f82610b6160068681548110610b3e57610b3d613331565b5b9060005260206000209060060201600101546008546124f990919063ffffffff16565b6124e390919063ffffffff16565b6008819055508160068481548110610b8a57610b89613331565b5b9060005260206000209060060201600101819055508060068481548110610bb457610bb3613331565b5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f6b15d9ccfec36c187bb7ca9613a8be7a7367d3fc401d1efdea721d6c4567395e60068581548110610c2b57610c2a613331565b5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460068781548110610c7257610c71613331565b5b90600052602060002090600602016002015485604051610c9594939291906131ee565b60405180910390a2505050565b610caa6124db565b73ffffffffffffffffffffffffffffffffffffffff16610cc86118c1565b73ffffffffffffffffffffffffffffffffffffffff1614610d1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d159061308e565b60405180910390fd5b670de0b6b3a764000060055411610d6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d61906133ac565b60405180910390fd5b610d726117d3565b610d9b604b610d8d606460055461250f90919063ffffffff16565b61252590919063ffffffff16565b6005819055503373ffffffffffffffffffffffffffffffffffffffff167fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053600554604051610de99190612cfc565b60405180910390a2565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026001541415610e85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7c90613418565b60405180910390fd5b6002600181905550600060068381548110610ea357610ea2613331565b5b9060005260206000209060060201905060006007600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508281600001541015610f4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4590613484565b60405180910390fd5b610f57846110f1565b6000610fa48260010154610f96670de0b6b3a7640000610f888760030154876000015461252590919063ffffffff16565b61250f90919063ffffffff16565b6124f990919063ffffffff16565b90506000811115610fba57610fb9338261253b565b5b600084111561105157610fda8483600001546124f990919063ffffffff16565b826000018190555061103133858560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127759092919063ffffffff16565b6110488484600501546124f990919063ffffffff16565b83600501819055505b611086670de0b6b3a76400006110788560030154856000015461252590919063ffffffff16565b61250f90919063ffffffff16565b8260010181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516110d59190612cfc565b60405180910390a3505050600180819055505050565b60095481565b60006006828154811061110757611106613331565b5b90600052602060002090600602019050806002015443116111285750611617565b60008160050154148061113f575060008160010154145b156111535743816002018190555050611617565b60006111638260020154436118ea565b905060006111a6600854611198856001015461118a6005548761252590919063ffffffff16565b61252590919063ffffffff16565b61250f90919063ffffffff16565b90506a52b7d2dcc80cd2e400000061127d6111de60646111d060698661252590919063ffffffff16565b61250f90919063ffffffff16565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561124b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126f919061312f565b6124e390919063ffffffff16565b116113da57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166112f760148561250f90919063ffffffff16565b6040518363ffffffff1660e01b81526004016113149291906134a4565b600060405180830381600087803b15801561132e57600080fd5b505af1158015611342573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b81526004016113a39291906134a4565b600060405180830381600087803b1580156113bd57600080fd5b505af11580156113d1573d6000803e3d6000fd5b505050506115bb565b6a52b7d2dcc80cd2e4000000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611453573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611477919061312f565b10156115ba57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f193061156a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561152c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611550919061312f565b6a52b7d2dcc80cd2e40000006124f990919063ffffffff16565b6040518363ffffffff1660e01b81526004016115879291906134a4565b600060405180830381600087803b1580156115a157600080fd5b505af11580156115b5573d6000803e3d6000fd5b505050505b5b6116026115ef84600501546115e1670de0b6b3a76400008561252590919063ffffffff16565b61250f90919063ffffffff16565b84600301546124e390919063ffffffff16565b83600301819055504383600201819055505050505b50565b60026001541415611660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165790613418565b60405180910390fd5b600260018190555060006006828154811061167e5761167d613331565b5b9060005260206000209060060201905060006007600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600081600001549050611706826000015484600501546124f990919063ffffffff16565b8360050181905550600082600001819055506000826001018190555061177133828560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127759092919063ffffffff16565b833373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595836040516117b89190612cfc565b60405180910390a35050506001808190555050565b60055481565b6000600680549050905060005b81811015611802576117f1816110f1565b806117fb906134fc565b90506117e0565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b68056bc75e2d6310000081565b6118416124db565b73ffffffffffffffffffffffffffffffffffffffff1661185f6118c1565b73ffffffffffffffffffffffffffffffffffffffff16146118b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ac9061308e565b60405180910390fd5b6118bf60006127fb565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006a52b7d2dcc80cd2e4000000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611965573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611989919061312f565b1061199757600090506119ad565b6119aa83836124f990919063ffffffff16565b90505b92915050565b6007602052816000526040600020602052806000526040600020600091509150508060000154908060010154905082565b600080600684815481106119fb576119fa613331565b5b9060005260206000209060060201905060006007600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600082600301549050826002015443118015611a8057506000836005015414155b8015611a8e57506000600854115b15611b30576000611aa38460020154436118ea565b90506000611ae6600854611ad88760010154611aca6005548761252590919063ffffffff16565b61252590919063ffffffff16565b61250f90919063ffffffff16565b9050611b2b611b1c8660050154611b0e670de0b6b3a76400008561252590919063ffffffff16565b61250f90919063ffffffff16565b846124e390919063ffffffff16565b925050505b611b778260010154611b69670de0b6b3a7640000611b5b85876000015461252590919063ffffffff16565b61250f90919063ffffffff16565b6124f990919063ffffffff16565b935050505092915050565b600a6020528060005260406000206000915054906101000a900460ff1681565b611baa6124db565b73ffffffffffffffffffffffffffffffffffffffff16611bc86118c1565b73ffffffffffffffffffffffffffffffffffffffff1614611c1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c159061308e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8590613591565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e760405160405180910390a350565b60026001541415611d72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6990613418565b60405180910390fd5b6002600181905550600060068381548110611d9057611d8f613331565b5b9060005260206000209060060201905060006007600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611dfd846110f1565b600081600001541115611e6f576000611e578260010154611e49670de0b6b3a7640000611e3b8760030154876000015461252590919063ffffffff16565b61250f90919063ffffffff16565b6124f990919063ffffffff16565b90506000811115611e6d57611e6c338261253b565b5b505b60008311156121da5760008260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611ed79190612e75565b602060405180830381865afa158015611ef4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f18919061312f565b9050611f6b3330868660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166128bf909392919063ffffffff16565b61201b818460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611fcc9190612e75565b602060405180830381865afa158015611fe9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200d919061312f565b6124f990919063ffffffff16565b935060008411612060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612057906135fd565b60405180910390fd5b60008360040160009054906101000a900461ffff1661ffff1611156121995760006120be6127106120b08660040160009054906101000a900461ffff1661ffff168861252590919063ffffffff16565b61250f90919063ffffffff16565b9050612131600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127759092919063ffffffff16565b61215a8161214c8786600001546124e390919063ffffffff16565b6124f990919063ffffffff16565b836000018190555061218b8161217d8787600501546124e390919063ffffffff16565b6124f990919063ffffffff16565b8460050181905550506121d8565b6121b08483600001546124e390919063ffffffff16565b82600001819055506121cf8484600501546124e390919063ffffffff16565b83600501819055505b505b61220f670de0b6b3a76400006122018460030154846000015461252590919063ffffffff16565b61250f90919063ffffffff16565b8160010181905550833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158560405161225e9190612cfc565b60405180910390a35050600180819055505050565b61227b6124db565b73ffffffffffffffffffffffffffffffffffffffff166122996118c1565b73ffffffffffffffffffffffffffffffffffffffff16146122ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e69061308e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561235f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123569061368f565b60405180910390fd5b612368816127fb565b50565b6123736124db565b73ffffffffffffffffffffffffffffffffffffffff166123916118c1565b73ffffffffffffffffffffffffffffffffffffffff16146123e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123de9061308e565b60405180910390fd5b436009541161242b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612422906136fb565b60405180910390fd5b6000600680549050905060005b818110156124815760006006828154811061245657612455613331565b5b90600052602060002090600602019050838160020181905550508061247a906134fc565b9050612438565b50816009819055503373ffffffffffffffffffffffffffffffffffffffff167f3eb4ecd5fe1c1fb419227f1ed2015b7c67d3867f237683c50a2192b6ceabe016836040516124cf9190612cfc565b60405180910390a25050565b600033905090565b600081836124f1919061371b565b905092915050565b600081836125079190613771565b905092915050565b6000818361251d91906137d4565b905092915050565b600081836125339190613805565b905092915050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016125989190612e75565b602060405180830381865afa1580156125b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d9919061312f565b905060008183111561268c57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85846040518363ffffffff1660e01b81526004016126429291906134a4565b6020604051808303816000875af1158015612661573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612685919061388b565b905061272f565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016126e99291906134a4565b6020604051808303816000875af1158015612708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272c919061388b565b90505b8061276f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161276690613904565b60405180910390fd5b50505050565b6127f68363a9059cbb60e01b84846040516024016127949291906134a4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612948565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612942846323b872dd60e01b8585856040516024016128e093929190613924565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612948565b50505050565b60006129aa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612a0f9092919063ffffffff16565b9050600081511115612a0a57808060200190518101906129ca919061388b565b612a09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a00906139cd565b60405180910390fd5b5b505050565b6060612a1e8484600085612a27565b90509392505050565b606082471015612a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6390613a5f565b60405180910390fd5b612a7585612b3b565b612ab4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aab90613acb565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612add9190613b65565b60006040518083038185875af1925050503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b5091509150612b2f828286612b4e565b92505050949350505050565b600080823b905060008111915050919050565b60608315612b5e57829050612bae565b600083511115612b715782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ba59190613bd1565b60405180910390fd5b9392505050565b600080fd5b6000819050919050565b612bcd81612bba565b8114612bd857600080fd5b50565b600081359050612bea81612bc4565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c1b82612bf0565b9050919050565b6000612c2d82612c10565b9050919050565b612c3d81612c22565b8114612c4857600080fd5b50565b600081359050612c5a81612c34565b92915050565b600061ffff82169050919050565b612c7781612c60565b8114612c8257600080fd5b50565b600081359050612c9481612c6e565b92915050565b600080600060608486031215612cb357612cb2612bb5565b5b6000612cc186828701612bdb565b9350506020612cd286828701612c4b565b9250506040612ce386828701612c85565b9150509250925092565b612cf681612bba565b82525050565b6000602082019050612d116000830184612ced565b92915050565b600060208284031215612d2d57612d2c612bb5565b5b6000612d3b84828501612bdb565b91505092915050565b6000819050919050565b6000612d69612d64612d5f84612bf0565b612d44565b612bf0565b9050919050565b6000612d7b82612d4e565b9050919050565b6000612d8d82612d70565b9050919050565b612d9d81612d82565b82525050565b612dac81612c60565b82525050565b600060c082019050612dc76000830189612d94565b612dd46020830188612ced565b612de16040830187612ced565b612dee6060830186612ced565b612dfb6080830185612da3565b612e0860a0830184612ced565b979650505050505050565b600080600060608486031215612e2c57612e2b612bb5565b5b6000612e3a86828701612bdb565b9350506020612e4b86828701612bdb565b9250506040612e5c86828701612c85565b9150509250925092565b612e6f81612c10565b82525050565b6000602082019050612e8a6000830184612e66565b92915050565b60008060408385031215612ea757612ea6612bb5565b5b6000612eb585828601612bdb565b9250506020612ec685828601612bdb565b9150509250929050565b6000612edb82612d70565b9050919050565b612eeb81612ed0565b82525050565b6000602082019050612f066000830184612ee2565b92915050565b612f1581612c10565b8114612f2057600080fd5b50565b600081359050612f3281612f0c565b92915050565b60008060408385031215612f4f57612f4e612bb5565b5b6000612f5d85828601612bdb565b9250506020612f6e85828601612f23565b9150509250929050565b6000604082019050612f8d6000830185612ced565b612f9a6020830184612ced565b9392505050565b600060208284031215612fb757612fb6612bb5565b5b6000612fc584828501612c4b565b91505092915050565b60008115159050919050565b612fe381612fce565b82525050565b6000602082019050612ffe6000830184612fda565b92915050565b60006020828403121561301a57613019612bb5565b5b600061302884828501612f23565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613078602083613031565b915061308382613042565b602082019050919050565b600060208201905081810360008301526130a78161306b565b9050919050565b7f6e6f6e4475706c6963617465643a206475706c69636174656400000000000000600082015250565b60006130e4601983613031565b91506130ef826130ae565b602082019050919050565b60006020820190508181036000830152613113816130d7565b9050919050565b60008151905061312981612bc4565b92915050565b60006020828403121561314557613144612bb5565b5b60006131538482850161311a565b91505092915050565b7f6164643a20696e76616c6964206465706f73697420666565206261736973207060008201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b60006131b8602583613031565b91506131c38261315c565b604082019050919050565b600060208201905081810360008301526131e7816131ab565b9050919050565b60006080820190506132036000830187612d94565b6132106020830186612ced565b61321d6040830185612ced565b61322a6060830184612da3565b95945050505050565b7f546f6f2048696768000000000000000000000000000000000000000000000000600082015250565b6000613269600883613031565b915061327482613233565b602082019050919050565b600060208201905081810360008301526132988161325c565b9050919050565b7f7365743a20696e76616c6964206465706f73697420666565206261736973207060008201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b60006132fb602583613031565b91506133068261329f565b604082019050919050565b6000602082019050818103600083015261332a816132ee565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f416c726561647920617420746865206d696e696d756d20616d6f756e74000000600082015250565b6000613396601d83613031565b91506133a182613360565b602082019050919050565b600060208201905081810360008301526133c581613389565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613402601f83613031565b915061340d826133cc565b602082019050919050565b60006020820190508181036000830152613431816133f5565b9050919050565b7f77697468647261773a206e6f7420676f6f640000000000000000000000000000600082015250565b600061346e601283613031565b915061347982613438565b602082019050919050565b6000602082019050818103600083015261349d81613461565b9050919050565b60006040820190506134b96000830185612e66565b6134c66020830184612ced565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061350782612bba565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561353a576135396134cd565b5b600182019050919050565b7f216e6f6e7a65726f000000000000000000000000000000000000000000000000600082015250565b600061357b600883613031565b915061358682613545565b602082019050919050565b600060208201905081810360008301526135aa8161356e565b9050919050565b7f776520646f6e7420616363657074206465706f73697473206f66203000000000600082015250565b60006135e7601c83613031565b91506135f2826135b1565b602082019050919050565b60006020820190508181036000830152613616816135da565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613679602683613031565b91506136848261361d565b604082019050919050565b600060208201905081810360008301526136a88161366c565b9050919050565b7f4661726d20616c72656164792073746172746564000000000000000000000000600082015250565b60006136e5601483613031565b91506136f0826136af565b602082019050919050565b60006020820190508181036000830152613714816136d8565b9050919050565b600061372682612bba565b915061373183612bba565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613766576137656134cd565b5b828201905092915050565b600061377c82612bba565b915061378783612bba565b92508282101561379a576137996134cd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006137df82612bba565b91506137ea83612bba565b9250826137fa576137f96137a5565b5b828204905092915050565b600061381082612bba565b915061381b83612bba565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613854576138536134cd565b5b828202905092915050565b61386881612fce565b811461387357600080fd5b50565b6000815190506138858161385f565b92915050565b6000602082840312156138a1576138a0612bb5565b5b60006138af84828501613876565b91505092915050565b7f736166654154485472616e736665723a205472616e73666572206661696c6564600082015250565b60006138ee602083613031565b91506138f9826138b8565b602082019050919050565b6000602082019050818103600083015261391d816138e1565b9050919050565b60006060820190506139396000830186612e66565b6139466020830185612e66565b6139536040830184612ced565b949350505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006139b7602a83613031565b91506139c28261395b565b604082019050919050565b600060208201905081810360008301526139e6816139aa565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000613a49602683613031565b9150613a54826139ed565b604082019050919050565b60006020820190508181036000830152613a7881613a3c565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613ab5601d83613031565b9150613ac082613a7f565b602082019050919050565b60006020820190508181036000830152613ae481613aa8565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015613b1f578082015181840152602081019050613b04565b83811115613b2e576000848401525b50505050565b6000613b3f82613aeb565b613b498185613af6565b9350613b59818560208601613b01565b80840191505092915050565b6000613b718284613b34565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b6000613ba382613b7c565b613bad8185613031565b9350613bbd818560208601613b01565b613bc681613b87565b840191505092915050565b60006020820190508181036000830152613beb8184613b98565b90509291505056fea26469706673582212208ee59e08ffbe8903292f094d58929576c00da1606576d41c8d8eb1e124c66b7164736f6c634300080a0033