Contract 0x2e31ccbcd702fae4a7baf0b4b30db87e8a6da568

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa7aa0495c734d99fe6a55b037af4d9d828ecf49896ea21bd587ec7bc35568fc1Transfer Ownersh...106280062021-09-04 18:09:1749 days 14 hrs ago0x049a203ac85b2bca08dfc12841162cc4beed42d9 IN  0x2e31ccbcd702fae4a7baf0b4b30db87e8a6da5680 BNB0.000154525
0x9167254c7f2049615b7456bc2a2d9825218238deaaf9463ac38543d156210aa5Add103497572021-08-25 23:10:3159 days 9 hrs ago0x049a203ac85b2bca08dfc12841162cc4beed42d9 IN  0x2e31ccbcd702fae4a7baf0b4b30db87e8a6da5680 BNB0.000648985
0xafa515bd74212f114f913338ffc1d1fd2f618ce09b7500f9e2b4d2c9cfc3ccfdAdd103373762021-08-25 12:50:0359 days 19 hrs ago0x049a203ac85b2bca08dfc12841162cc4beed42d9 IN  0x2e31ccbcd702fae4a7baf0b4b30db87e8a6da5680 BNB0.000746305
0x8b33b3557cf837ddba9cfde7d524fe9d1ad8656ea41a1cd420a79034de5842f70x60806040101983292021-08-20 16:17:4864 days 16 hrs ago0x049a203ac85b2bca08dfc12841162cc4beed42d9 IN  Contract Creation0 BNB0.007702855
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2021-08-20
*/

pragma solidity ^0.6.0;
/**
 *Submitted for verification at BscScan.com on 2021-06-17
*/

/**
 *Submitted for verification at BscScan.com on 2021-02-18
*/

// SPDX-License-Identifier: GPL-v3.0

interface IERC20 {

    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

pragma solidity >=0.4.0;


library SafeMath {

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, 'SafeMath: addition overflow');

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, 'SafeMath: subtraction overflow');
    }

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

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {

        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, 'SafeMath: division by zero');
    }

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, 'SafeMath: modulo by zero');
    }

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

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}




pragma solidity >=0.4.0;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    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);
}



library Address {

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

        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

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

    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');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

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

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

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




pragma solidity ^0.6.0;


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

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

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

    function safeApprove(
        IBEP20 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),
            'SafeBEP20: approve from non-zero to non-zero allowance'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IBEP20 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(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            'SafeBEP20: decreased allowance below zero'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function _callOptionalReturn(IBEP20 token, bytes memory data) private {

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




pragma solidity >=0.4.0;

contract Context {

    constructor() internal {}

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;
    address private _previousOwner;
    uint256 private _lockTime;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;

        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

     /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

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

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

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


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

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

contract VICE is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

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

    mapping (address => bool) private _isExcludedFromFee;

    mapping (address => bool) private _isExcluded;
    address[] private _excluded;


    uint256 private constant MAX = ~uint256(0);

    uint256 private _tTotal = 100000000 * 10**18;

    uint256 private _rTotal = (MAX - (MAX % _tTotal));
    uint256 private _tFeeTotal;

    string constant private _name = "VICEWRLD";
    string constant private _symbol = "VICE";
    uint8 constant private _decimals = 18;

    uint256 public _taxFee = 3;
    uint256 private _previousTaxFee = _taxFee;
    
    uint256 public _liquidityfee = 2;
    uint256 private _previousliquidityfee = _liquidityfee;
    
    uint256 public _burnFee = 3;
    uint256 private _previousburnFee = _burnFee;

    uint256 public _masterFee = 4;
    uint256 private _previousMasterFee = _masterFee;

    uint256 public _charityFee = 1;
    uint256 private _previousCharityFee = _charityFee;
    
    address public _masterWalletAddress;
    address public _charityWalletAddress;
    address DEAD = 0x000000000000000000000000000000000000dEaD;

    bool public deductionsEnabled = true;

    uint256 public _maxTxAmount = 2000000 * 10**18; 
    IUniswapV2Router02 public uniswapV2Router;
    address public uniswapV2Pair;
    uint256 private numTokensSellToAddToLiquidity = 100000 * 10**18;
    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = true;
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );
    
    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    constructor () internal{
        _masterWalletAddress = 0xB4031f7AEd8543d4D08474f3BC105DeB805763cc;
        _charityWalletAddress = 0xD6F021e4f4A2706fC056921ae416E52d9aD97731;
        _rOwned[msg.sender] = _rTotal;
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
         // Create a uniswap pair for this new token
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());
        uniswapV2Router = _uniswapV2Router;
        //exclude owner and this contract from fee
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _isExcluded[uniswapV2Pair] = true;


        emit Transfer(address(0), msg.sender, _tTotal); 
    }

    function name() public pure returns (string memory) {
        return _name;
    }

    function symbol() public pure returns (string memory) {
        return _symbol;
    }

    function decimals() public pure returns (uint8) {
        return _decimals;
    }

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

    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

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

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

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

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

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

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function totalFees() public view returns (uint256) {
        return _tFeeTotal;
    }

    function deliver(uint256 tAmount) public {
        address sender = _msgSender();
        require(!_isExcluded[sender], "Excluded addresses cannot call this function");
        (uint256[3] memory rValues,) =  _getValues(tAmount);
        uint256 rAmount = rValues[0];

        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        _tFeeTotal = _tFeeTotal.add(tAmount);
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256[3] memory rValues,) =  _getValues(tAmount);
            uint256 rAmount = rValues[0];

            return rAmount;
        } else {
            (uint256[3] memory rValues,) =  _getValues(tAmount);
            uint256 rTransferAmount = rValues[1];

            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate =  _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner() {
        // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Pancake router.');
        require(!_isExcluded[account], "Account is already excluded");
        if(_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }

    function includeInReward(address account) external onlyOwner() {
        require(_isExcluded[account], "Account is not excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _tOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }

    function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256[3] memory rValues, uint256[4] memory tValues) =  _getValues(tAmount);
        uint256 rAmount = rValues[0];
        uint256 rTransferAmount = rValues[1];
        uint256 rFee = rValues[2];
        uint256 tTransferAmount = tValues[0];
        uint256 tFee = tValues[1];
  
        uint256 tMaster = tValues[2];

        uint256 tCharity = tValues[3];
         

        decreaseROwned(sender, rAmount);
        decreaseTOwned(sender, tAmount);
        increaseTOwned(recipient, tTransferAmount);
        increaseROwned(recipient, rTransferAmount);
         
        (uint256 burn) = _takeMaster(tMaster);
         
        _takeCharity(tCharity);
         

        _reflectFee(rFee, tFee);
        if(burn > 0)
        emit Transfer(sender, DEAD, burn);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function excludeFromFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = true;
    }

    function includeInFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function setTaxFeePercent(uint256 taxFee) external onlyOwner() {
        //require(taxFee <= 3, "Max fee 3%");
        _taxFee = taxFee;
    }
    
    function setLiquidityFeePercent(uint256 LiquidityFee) external onlyOwner() {
        _liquidityfee = LiquidityFee;
    }
    
    function setBurnFeePercent(uint256 BurnFee) external onlyOwner() {
        _burnFee = BurnFee;
    }

    function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
        _maxTxAmount = _tTotal.mul(maxTxPercent).div(
            10**2
        );
    }

     //to receive BNB from pancakeV2Router when swapping
    receive() external payable {}

    function _reflectFee(uint256 rFee, uint256 tFee) private {

            // Reflect fee between holders as usual
            _rTotal = _rTotal.sub(rFee);
            _tFeeTotal = _tFeeTotal.add(tFee);
        
    }

    function _getValues(uint256 tAmount) private view returns (uint256[3] memory, uint256[4] memory) {
        uint256[4] memory tValues = _getTValues(tAmount);
        uint256[3] memory rValues = _getRValues(tAmount, tValues[1], tValues[2], tValues[3], _getRate());

        return (rValues, tValues);
    }

    function _getTValues(uint256 tAmount) private view returns (uint256[4] memory) {
        uint256[4] memory tValues = [0, calculateTaxFee(tAmount), calculatemasterFee(tAmount), calculatecharityFee(tAmount)];
        tValues[0] = _getTTransferAmount(tAmount, tValues);

        return tValues;
    }

    function _getRValues(uint256 tAmount, uint256 tFee,   uint256 tMaster,   uint256 tCharity  , uint256 currentRate) private pure returns (uint256[3] memory) {
        uint256 rAmount = tAmount.mul(currentRate);
        uint256 rFee = tFee.mul(currentRate);

        uint256 rMaster = tMaster.mul(currentRate);

        uint256 rCharity = tCharity.mul(currentRate);


        uint256[4] memory tempRValues = [rAmount, rFee, rMaster, rCharity];


        uint256[3] memory rValues = [rAmount, _getRTransferAmount(tempRValues), rFee];

        // return (rAmount, rTransferAmount, rFee);
        return rValues;
    }

    function _getTTransferAmount(uint256 tAmount, uint256[4] memory tValues) private pure returns(uint256) {
        // return tAmount.sub(tFee).sub(tLiquidity).sub(tMaster).sub(tBurn).sub(tCharity);
        return tAmount.sub(tValues[1]).sub(tValues[2]).sub(tValues[3]);
    }

    function _getRTransferAmount(uint256[4] memory rValues) private pure returns(uint256) {
        return rValues[0].sub(rValues[2]).sub(rValues[1]).sub(rValues[3]);
    }

    function _getRate() private view returns(uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }



    function _takeMaster(uint256 Amountt) private returns (uint256 burn){
        uint256 currentRate =  _getRate();
        uint256 total = _masterFee.add(_liquidityfee).add(_burnFee);
        uint256 Amount;
        if (Amountt > 0)
        Amount = Amountt.div(total);
        uint256 tMaster = Amount.mul(_masterFee);
        uint256 tLiquidity = Amount.mul(_liquidityfee);
        uint256 tBurn = Amount.mul(_burnFee);
        uint256 rMaster = tMaster.mul(currentRate);
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        uint256 rBurn = tBurn.mul(currentRate);
        _rOwned[_masterWalletAddress] = _rOwned[_masterWalletAddress].add(rMaster);
        _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
        _rOwned[DEAD] = _rOwned[DEAD].add(rBurn);
        if(_isExcluded[_masterWalletAddress])
            _tOwned[_masterWalletAddress] = _tOwned[_masterWalletAddress].add(tMaster);
        if(_isExcluded[address(this)])
            _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
        if(_isExcluded[DEAD])
            _tOwned[DEAD] = _tOwned[DEAD].add(tBurn);
            
        return (tBurn);
    }



    function _takeCharity(uint256 tCharity) private {
        uint256 currentRate =  _getRate();
        uint256 rCharity = tCharity.mul(currentRate);
        _rOwned[_charityWalletAddress] = _rOwned[_charityWalletAddress].add(rCharity);
        if(_isExcluded[_charityWalletAddress])
            _tOwned[_charityWalletAddress] = _tOwned[_charityWalletAddress].add(tCharity);
    }



    function calculateTaxFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_taxFee).div(
            10**2
        );
    }
    
    function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_liquidityfee).div(
            10**2
        );
    }
    
    function calculateBurnFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_burnFee).div(
            10**2
        );
    }



    function calculatemasterFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_masterFee.add(_liquidityfee).add(_burnFee)).div(
            10**2
        );
    }



    function calculatecharityFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_charityFee).div(
            10**2
        );
    }

 



    function removeAllFee() private {
        if(_taxFee == 0 && _masterFee == 0  && _charityFee == 0 && _liquidityfee == 0 && _burnFee == 0) return;

        _previousTaxFee = _taxFee;
        _previousliquidityfee = _liquidityfee;
        _previousburnFee = _burnFee;
        _previousMasterFee = _masterFee;
        _previousCharityFee = _charityFee;

        _taxFee = 0;
        _liquidityfee = 0;
        _burnFee = 0;
        _masterFee = 0;
        _charityFee = 0;
         
         
    }

    function restoreAllFee() private {
        _taxFee = _previousTaxFee;
        _liquidityfee = _previousliquidityfee;
        _burnFee = _previousburnFee;
        _masterFee = _previousMasterFee;
        _charityFee = _previousCharityFee;

    }

    function isExcludedFromFee(address account) public view returns(bool) {
        return _isExcludedFromFee[account];
    }

    function _setMasterWallet(address payable marketingWalletAddress) external onlyOwner() {
        _masterWalletAddress = marketingWalletAddress;
    }

    function _approve(address owner, address spender, uint256 amount) private {
        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 _transfer(
        address from,
        address to,
        uint256 amount
    ) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");

        if(from != owner() && to != owner()) {
            require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
        }
        uint256 contractTokenBalance = balanceOf(address(this));
        
    
        bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
        if (
            overMinTokenBalance &&
            !inSwapAndLiquify &&
            from != uniswapV2Pair &&
            swapAndLiquifyEnabled
        ) {
            contractTokenBalance = numTokensSellToAddToLiquidity;
            //add liquidity
            swapAndLiquify(contractTokenBalance);
        }


        //indicates if fee should be deducted from transfer
        bool takeFee = true;

        //if any account belongs to _isExcludedFromFee account then remove the fee
        if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
            takeFee = false;
        }

        //transfer amount, it will take tax, burn, liquidity fee
        _tokenTransfer(from,to,amount,takeFee);
    }
    
    function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
        // split the contract balance into halves
        uint256 half = contractTokenBalance.div(2);
        uint256 otherHalf = contractTokenBalance.sub(half);

        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for ETH
        swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered

        // how much ETH did we just swap into?
        uint256 newBalance = address(this).balance.sub(initialBalance);

        // add liquidity to uniswap
        addLiquidity(otherHalf, newBalance);
        
        emit SwapAndLiquify(half, newBalance, otherHalf);
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();

        _approve(address(this), address(uniswapV2Router), tokenAmount);

        // make the swap
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }

    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(uniswapV2Router), tokenAmount);

        // add the liquidity
        uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            owner(),
            block.timestamp
        );
    }



    //this method is responsible for taking all fee, if takeFee is true
    function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
        if(!takeFee || !deductionsEnabled)
            removeAllFee();

        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferFromExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _transferToExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferStandard(sender, recipient, amount);
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _transferBothExcluded(sender, recipient, amount);
        } else {
            _transferStandard(sender, recipient, amount);
        }

        if(!takeFee)
            restoreAllFee();
    }

    function _transferStandard(address sender, address recipient, uint256 tAmount) private {
        (uint256[3] memory rValues, uint256[4] memory tValues) =  _getValues(tAmount);
        uint256 rAmount = rValues[0];
        uint256 rTransferAmount = rValues[1];
        uint256 rFee = rValues[2];
        
        uint256 tTransferAmount = tValues[0];
        uint256 tFee = tValues[1];
        uint256 tMaster = tValues[2];
        uint256 tCharity = tValues[3];
           

        decreaseROwned(sender, rAmount);
        increaseROwned(recipient, rTransferAmount);
         
        (uint256 burn) = _takeMaster(tMaster);
         
        _takeCharity(tCharity);
         

        _reflectFee(rFee, tFee);
        if(burn > 0)
        emit Transfer(sender, DEAD, burn);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256[3] memory rValues, uint256[4] memory tValues) =  _getValues(tAmount);
        uint256 rAmount = rValues[0];
        uint256 rTransferAmount = rValues[1];
        uint256 rFee = rValues[2];
        uint256 tTransferAmount = tValues[0];
        uint256 tFee = tValues[1];
        uint256 tMaster = tValues[2];
        uint256 tCharity = tValues[3];
           
        decreaseROwned(sender, rAmount);
        increaseTOwned(recipient, tTransferAmount);
        increaseROwned(recipient, rTransferAmount);

         
        (uint256 burn) = _takeMaster(tMaster);
         
        _takeCharity(tCharity);
         

        _reflectFee(rFee, tFee);
        if(burn > 0)
        emit Transfer(sender, DEAD, burn);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256[3] memory rValues, uint256[4] memory tValues) =  _getValues(tAmount);
        uint256 rAmount = rValues[0];
        uint256 rTransferAmount = rValues[1];
        uint256 rFee = rValues[2];
        uint256 tTransferAmount = tValues[0];
        uint256 tFee = tValues[1];

        uint256 tMaster = tValues[2];

        uint256 tCharity = tValues[3];
           
        decreaseTOwned(sender, tAmount);
        decreaseROwned(sender, rAmount);
        increaseROwned(recipient, rTransferAmount);
         
        (uint256 burn) = _takeMaster(tMaster);
         
        _takeCharity(tCharity);
         

        _reflectFee(rFee, tFee);
        if(burn > 0)
        emit Transfer(sender, DEAD, burn);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function decreaseTOwned(address sender, uint256 tAmount) private {
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
    }

    function decreaseROwned(address sender, uint256 rAmount) private {
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
    }

    function increaseROwned(address recipient, uint256 rTransferAmount) private {
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
    }

    function increaseTOwned(address recipient, uint256 tTransferAmount) private {
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
    }

    function getMasterWalletAddress() public view returns (address) {
        return _masterWalletAddress;
    }

    function setMasterWalletAddress(address payable newAdress)  external onlyOwner() {
        _masterWalletAddress = newAdress;
    }



    function getCharityWalletAddress() public view returns (address) {
        return _charityWalletAddress;
    }

    function setCharityWalletAddress(address payable newAdress)  external onlyOwner() {
        _charityWalletAddress = newAdress;
    }

    function setMasterFeePercent(uint256 masterFee) external onlyOwner() {

        _masterFee = masterFee;
    }

    function setCharityFeePercent(uint256 charityFee) external onlyOwner() {

        _charityFee = charityFee;
    }

}




// File: contracts/SmartChef.sol

pragma solidity 0.6.12;




// MasterChef is the master of Vice. He can make Vice and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VICE is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterChef is Ownable {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

    // 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 VICEs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accVicePerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accVicePerShare` (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 {
        IBEP20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. VICEs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that VICEs distribution occurs.
        uint256 accVicePerShare;   // Accumulated VICEs per share, times 1e12. See below.
        uint16 depositFeeBP;      // Deposit fee in basis points
    }

    // The VICE TOKEN!
    VICE public vice;
    
    // VICE tokens created per block.
    uint256 public vicePerBlock;
    // Bonus muliplier for early vice makers.
    uint256 public constant BONUS_MULTIPLIER = 1;
    // Deposit Fee address
    address public feeAddress;

    // 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 VICE mining starts.
    uint256 public startBlock;

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

    constructor(
        VICE _vice,
        address _feeAddress,
        uint256 _vicePerBlock,
        uint256 _startBlock
    ) public {
        vice = _vice;
        feeAddress = _feeAddress;
        vicePerBlock = _vicePerBlock;
        startBlock = _startBlock;
    }

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

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(uint256 _allocPoint, IBEP20 _lpToken, uint16 _depositFeeBP, bool _withUpdate) public onlyOwner {
        require(_depositFeeBP <= 10000, "add: invalid deposit fee basis points");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accVicePerShare: 0,
            depositFeeBP: _depositFeeBP
        }));
    }

    // Update the given pool's VICE allocation point and deposit fee. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, bool _withUpdate) public onlyOwner {
        require(_depositFeeBP <= 10000, "set: invalid deposit fee basis points");
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)  public pure returns (uint256) {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

    // View function to see pending VICEs on frontend.
    function pendingVice(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accVicePerShare = pool.accVicePerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 viceReward = multiplier.mul(vicePerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accVicePerShare = accVicePerShare.add(viceReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accVicePerShare).div(1e12).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;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 viceReward = multiplier.mul(vicePerBlock).mul(pool.allocPoint).div(totalAllocPoint);

        pool.accVicePerShare = pool.accVicePerShare.add(viceReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for VICE allocation.
    function deposit(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accVicePerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                safeViceTransfer(msg.sender, pending);
            }
        }
        if(_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            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);
            }else{
                user.amount = user.amount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accVicePerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public {
        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.accVicePerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            safeViceTransfer(msg.sender, pending);
        }
        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accVicePerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }
    // Safe vice transfer function, just in case if rounding error causes pool to not have enough VICEs.
    function safeViceTransfer(address _to, uint256 _amount) internal {
        uint256 viceBal = vice.balanceOf(address(this));
        if (_amount > viceBal) {
            vice.transfer(_to, viceBal);
        } else {
            vice.transfer(_to, _amount);
        }
    }


    function setFeeAddress(address _feeAddress) public{
        require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN");
        feeAddress = _feeAddress;
    }

    //Pancake has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all.
    function updateEmissionRate(uint256 _vicePerBlock) public onlyOwner {
        massUpdatePools();
        vicePerBlock = _vicePerBlock;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract VICE","name":"_vice","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","name":"_vicePerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","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"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"pure","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","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":"_user","type":"address"}],"name":"pendingVice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accVicePerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vicePerBlock","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","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":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vice","outputs":[{"internalType":"contract VICE","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vicePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060085534801561001557600080fd5b506040516119e03803806119e08339818101604052608081101561003857600080fd5b508051602082015160408301516060909301519192909160006100596100e1565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b039586166001600160a01b03199182161790915560058054949095169316929092179092556004919091556009556100e5565b3390565b6118ec806100f46000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063630b5ba1116100c35780638dbb1e3a1161007c5780638dbb1e3a1461030657806393f1a40b14610329578063a1e18e911461036e578063d96384221461039a578063e2bbb158146103cf578063f2fde38b146103f25761014d565b8063630b5ba114610282578063715018a61461028a57806384e82a33146102925780638705fcd4146102d05780638aa28550146102f65780638da5cb5b146102fe5761014d565b80632d61a355116101155780632d61a355146101f15780634127535814610215578063441a3e701461021d57806348cd4cb11461024057806351eb05a6146102485780635312ea8e146102655761014d565b8063081e3eda146101525780630ba84cd21461016c5780631526fe271461018b57806317caf6f1146101e15780632223ce32146101e9575b600080fd5b61015a610418565b60408051918252519081900360200190f35b6101896004803603602081101561018257600080fd5b503561041e565b005b6101a8600480360360208110156101a157600080fd5b5035610483565b604080516001600160a01b039096168652602086019490945284840192909252606084015261ffff166080830152519081900360a00190f35b61015a6104cf565b61015a6104d5565b6101f96104db565b604080516001600160a01b039092168252519081900360200190f35b6101f96104ea565b6101896004803603604081101561023357600080fd5b50803590602001356104f9565b61015a610658565b6101896004803603602081101561025e57600080fd5b503561065e565b6101896004803603602081101561027b57600080fd5b503561079d565b610189610839565b61018961085c565b610189600480360360808110156102a857600080fd5b508035906001600160a01b036020820135169061ffff604082013516906060013515156108fe565b610189600480360360208110156102e657600080fd5b50356001600160a01b0316610b02565b61015a610b83565b6101f9610b88565b61015a6004803603604081101561031c57600080fd5b5080359060200135610b97565b6103556004803603604081101561033f57600080fd5b50803590602001356001600160a01b0316610bb1565b6040805192835260208301919091528051918290030190f35b61015a6004803603604081101561038457600080fd5b50803590602001356001600160a01b0316610bd5565b610189600480360360808110156103b057600080fd5b5080359060208101359061ffff60408201351690606001351515610d33565b610189600480360360408110156103e557600080fd5b5080359060200135610e83565b6101896004803603602081101561040857600080fd5b50356001600160a01b0316610ffb565b60065490565b6104266110f3565b6000546001600160a01b03908116911614610476576040805162461bcd60e51b81526020600482018190526024820152600080516020611897833981519152604482015290519081900360640190fd5b61047e610839565b600455565b6006818154811061049057fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909161ffff1685565b60085481565b60045481565b6003546001600160a01b031681565b6005546001600160a01b031681565b60006006838154811061050857fe5b60009182526020808320868452600782526040808520338652909252922080546005909202909201925083111561057b576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6105848461065e565b60006105be82600101546105b864e8d4a510006105b2876003015487600001546110f790919063ffffffff16565b90611150565b90611192565b905080156105d0576105d033826111d4565b83156105fa5781546105e29085611192565b825582546105fa906001600160a01b03163386611365565b600383015482546106159164e8d4a51000916105b2916110f7565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60095481565b60006006828154811061066d57fe5b906000526020600020906005020190508060020154431161068e575061079a565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156106d857600080fd5b505afa1580156106ec573d6000803e3d6000fd5b505050506040513d602081101561070257600080fd5b5051905080158061071557506001820154155b1561072757504360029091015561079a565b6000610737836002015443610b97565b905060006107646008546105b2866001015461075e600454876110f790919063ffffffff16565b906110f7565b905061078761077c846105b28464e8d4a510006110f7565b6003860154906113b7565b6003850155505043600290920191909155505b50565b6000600682815481106107ac57fe5b6000918252602080832085845260078252604080852033808752935284208054858255600182019590955560059093020180549094509192916107fc916001600160a01b03919091169083611365565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60065460005b81811015610858576108508161065e565b60010161083f565b5050565b6108646110f3565b6000546001600160a01b039081169116146108b4576040805162461bcd60e51b81526020600482018190526024820152600080516020611897833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6109066110f3565b6000546001600160a01b03908116911614610956576040805162461bcd60e51b81526020600482018190526024820152600080516020611897833981519152604482015290519081900360640190fd5b6127108261ffff16111561099b5760405162461bcd60e51b81526004018080602001828103825260258152602001806117dc6025913960400191505060405180910390fd5b80156109a9576109a9610839565b600060095443116109bc576009546109be565b435b6008549091506109ce90866113b7565b6008556040805160a0810182526001600160a01b0395861681526020810196875290810191825260006060820181815261ffff9586166080840190815260068054600181018255935292517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600590930292830180546001600160a01b031916919098161790965595517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4087015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4186015592517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d428501555090517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d43909201805461ffff191692909116919091179055565b6005546001600160a01b03163314610b61576040805162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600181565b6000546001600160a01b031690565b6000610ba8600161075e8486611192565b90505b92915050565b60076020908152600092835260408084209091529082529020805460019091015482565b60008060068481548110610be557fe5b600091825260208083208784526007825260408085206001600160a01b0389811687529084528186206005959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b158015610c5f57600080fd5b505afa158015610c73573d6000803e3d6000fd5b505050506040513d6020811015610c8957600080fd5b5051600285015490915043118015610ca057508015155b15610d00576000610cb5856002015443610b97565b90506000610cdc6008546105b2886001015461075e600454876110f790919063ffffffff16565b9050610cfb610cf4846105b28464e8d4a510006110f7565b85906113b7565b935050505b610d2883600101546105b864e8d4a510006105b28688600001546110f790919063ffffffff16565b979650505050505050565b610d3b6110f3565b6000546001600160a01b03908116911614610d8b576040805162461bcd60e51b81526020600482018190526024820152600080516020611897833981519152604482015290519081900360640190fd5b6127108261ffff161115610dd05760405162461bcd60e51b81526004018080602001828103825260258152602001806118726025913960400191505060405180910390fd5b8015610dde57610dde610839565b610e1b83610e1560068781548110610df257fe5b90600052602060002090600502016001015460085461119290919063ffffffff16565b906113b7565b6008819055508260068581548110610e2f57fe5b9060005260206000209060050201600101819055508160068581548110610e5257fe5b906000526020600020906005020160040160006101000a81548161ffff021916908361ffff16021790555050505050565b600060068381548110610e9257fe5b60009182526020808320868452600782526040808520338652909252922060059091029091019150610ec38461065e565b805415610f0c576000610ef882600101546105b864e8d4a510006105b2876003015487600001546110f790919063ffffffff16565b90508015610f0a57610f0a33826111d4565b505b8215610f9e578154610f29906001600160a01b0316333086611411565b600482015461ffff1615610f8f576004820154600090610f5690612710906105b290879061ffff166110f7565b6005548454919250610f75916001600160a01b03908116911683611365565b8154610f879082906105b890876113b7565b825550610f9e565b8054610f9b90846113b7565b81555b60038201548154610fb99164e8d4a51000916105b2916110f7565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6110036110f3565b6000546001600160a01b03908116911614611053576040805162461bcd60e51b81526020600482018190526024820152600080516020611897833981519152604482015290519081900360640190fd5b6001600160a01b0381166110985760405162461bcd60e51b815260040180806020018281038252602681526020018061182b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60008261110657506000610bab565b8282028284828161111357fe5b0414610ba85760405162461bcd60e51b81526004018080602001828103825260218152602001806118516021913960400191505060405180910390fd5b6000610ba883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611471565b6000610ba883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611513565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d602081101561124957600080fd5b50519050808211156112dd576003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156112ab57600080fd5b505af11580156112bf573d6000803e3d6000fd5b505050506040513d60208110156112d557600080fd5b506113609050565b6003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561133357600080fd5b505af1158015611347573d6000803e3d6000fd5b505050506040513d602081101561135d57600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261136090849061156d565b600082820183811015610ba8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261146b90859061156d565b50505050565b600081836114fd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114c25781810151838201526020016114aa565b50505050905090810190601f1680156114ef5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161150957fe5b0495945050505050565b600081848411156115655760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114c25781810151838201526020016114aa565b505050900390565b60606115c2826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661161e9092919063ffffffff16565b805190915015611360578080602001905160208110156115e157600080fd5b50516113605760405162461bcd60e51b815260040180806020018281038252602a815260200180611801602a913960400191505060405180910390fd5b606061162d8484600085611635565b949350505050565b6060611640856117a2565b611691576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116d05780518252601f1990920191602091820191016116b1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611732576040519150601f19603f3d011682016040523d82523d6000602084013e611737565b606091505b5091509150811561174b57915061162d9050565b80511561175b5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156114c25781810151838201526020016114aa565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061162d57505015159291505056fe6164643a20696e76616c6964206465706f7369742066656520626173697320706f696e74735361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220b1b1f6e6e35759a3f4c7ae28b885e7901e4f3ed6ee87d3c586ff277977b6cbe764736f6c634300060c003300000000000000000000000001761702a8942ea8105cdf14cde82f71b7d95f23000000000000000000000000049a203ac85b2bca08dfc12841162cc4beed42d90000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000009b9be5

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

00000000000000000000000001761702a8942ea8105cdf14cde82f71b7d95f23000000000000000000000000049a203ac85b2bca08dfc12841162cc4beed42d90000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000009b9be5

-----Decoded View---------------
Arg [0] : _vice (address): 0x01761702a8942ea8105cdf14cde82f71b7d95f23
Arg [1] : _feeAddress (address): 0x049a203ac85b2bca08dfc12841162cc4beed42d9
Arg [2] : _vicePerBlock (uint256): 10000000000000000000
Arg [3] : _startBlock (uint256): 10197989

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000001761702a8942ea8105cdf14cde82f71b7d95f23
Arg [1] : 000000000000000000000000049a203ac85b2bca08dfc12841162cc4beed42d9
Arg [2] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [3] : 00000000000000000000000000000000000000000000000000000000009b9be5


Deployed ByteCode Sourcemap

47048:9457:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49701:95;;;:::i;:::-;;;;;;;;;;;;;;;;56359:143;;;;;;;;;;;;;;;;-1:-1:-1;56359:143:0;;:::i;:::-;;48796:26;;;;;;;;;;;;;;;;-1:-1:-1;48796:26:0;;:::i;:::-;;;;-1:-1:-1;;;;;48796:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49039:34;;;:::i;48575:27::-;;;:::i;48507:16::-;;;:::i;:::-;;;;-1:-1:-1;;;;;48507:16:0;;;;;;;;;;;;;;48735:25;;;:::i;54467:740::-;;;;;;;;;;;;;;;;-1:-1:-1;54467:740:0;;;;;;;:::i;49130:25::-;;;:::i;52582:711::-;;;;;;;;;;;;;;;;-1:-1:-1;52582:711:0;;:::i;55278:385::-;;;;;;;;;;;;;;;;-1:-1:-1;55278:385:0;;:::i;52326:180::-;;;:::i;13933:148::-;;;:::i;49965:660::-;;;;;;;;;;;;;;;;-1:-1:-1;49965:660:0;;;-1:-1:-1;;;;;49965:660:0;;;;;;;;;;;;;;;;;;;:::i;56063:165::-;;;;;;;;;;;;;;;;-1:-1:-1;56063:165:0;-1:-1:-1;;;;;56063:165:0;;:::i;48656:44::-;;;:::i;13290:79::-;;;:::i;51276:144::-;;;;;;;;;;;;;;;;-1:-1:-1;51276:144:0;;;;;;;:::i;48878:66::-;;;;;;;;;;;;;;;;-1:-1:-1;48878:66:0;;;;;;-1:-1:-1;;;;;48878:66:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;51484:759;;;;;;;;;;;;;;;;-1:-1:-1;51484:759:0;;;;;;-1:-1:-1;;;;;51484:759:0;;:::i;50737:463::-;;;;;;;;;;;;;;;;-1:-1:-1;50737:463:0;;;;;;;;;;;;;;;;;;;;;:::i;53362:1053::-;;;;;;;;;;;;;;;;-1:-1:-1;53362:1053:0;;;;;;;:::i;14236:244::-;;;;;;;;;;;;;;;;-1:-1:-1;14236:244:0;-1:-1:-1;;;;;14236:244:0;;:::i;49701:95::-;49773:8;:15;49701:95;:::o;56359:143::-;13512:12;:10;:12::i;:::-;13502:6;;-1:-1:-1;;;;;13502:6:0;;;:22;;;13494:67;;;;;-1:-1:-1;;;13494:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13494:67:0;;;;;;;;;;;;;;;56438:17:::1;:15;:17::i;:::-;56466:12;:28:::0;56359:143::o;48796:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;48796:26:0;;;;-1:-1:-1;48796:26:0;;;;;;;:::o;49039:34::-;;;;:::o;48575:27::-;;;;:::o;48507:16::-;;;-1:-1:-1;;;;;48507:16:0;;:::o;48735:25::-;;;-1:-1:-1;;;;;48735:25:0;;:::o;54467:740::-;54534:21;54558:8;54567:4;54558:14;;;;;;;;;;;;;;;;54607;;;:8;:14;;;;;;54622:10;54607:26;;;;;;;54652:11;;54558:14;;;;;;;;-1:-1:-1;54652:22:0;-1:-1:-1;54652:22:0;54644:53;;;;;-1:-1:-1;;;54644:53:0;;;;;;;;;;;;-1:-1:-1;;;54644:53:0;;;;;;;;;;;;;;;54708:16;54719:4;54708:10;:16::i;:::-;54735:15;54753:68;54805:4;:15;;;54753:47;54795:4;54753:37;54769:4;:20;;;54753:4;:11;;;:15;;:37;;;;:::i;:::-;:41;;:47::i;:::-;:51;;:68::i;:::-;54735:86;-1:-1:-1;54835:11:0;;54832:80;;54863:37;54880:10;54892:7;54863:16;:37::i;:::-;54925:11;;54922:151;;54967:11;;:24;;54983:7;54967:15;:24::i;:::-;54953:38;;55006:12;;:55;;-1:-1:-1;;;;;55006:12:0;55040:10;55053:7;55006:25;:55::i;:::-;55117:20;;;;55101:11;;:47;;55143:4;;55101:37;;:15;:37::i;:47::-;55083:15;;;:65;55164:35;;;;;;;;55185:4;;55173:10;;55164:35;;;;;;;;;54467:740;;;;;:::o;49130:25::-;;;;:::o;52582:711::-;52634:21;52658:8;52667:4;52658:14;;;;;;;;;;;;;;;;;;52634:38;;52703:4;:20;;;52687:12;:36;52683:75;;52740:7;;;52683:75;52787:12;;:37;;;-1:-1:-1;;;52787:37:0;;52818:4;52787:37;;;;;;52768:16;;-1:-1:-1;;;;;52787:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;52787:37:0;;-1:-1:-1;52839:13:0;;;:37;;-1:-1:-1;52856:15:0;;;;:20;52839:37;52835:126;;;-1:-1:-1;52916:12:0;52893:20;;;;:35;52943:7;;52835:126;52971:18;52992:49;53006:4;:20;;;53028:12;52992:13;:49::i;:::-;52971:70;;53052:18;53073:70;53127:15;;53073:49;53106:4;:15;;;53073:28;53088:12;;53073:10;:14;;:28;;;;:::i;:::-;:32;;:49::i;:70::-;53052:91;-1:-1:-1;53179:60:0;53204:34;53229:8;53204:20;53052:91;53219:4;53204:14;:20::i;:34::-;53179:20;;;;;:24;:60::i;:::-;53156:20;;;:83;-1:-1:-1;;53273:12:0;53250:20;;;;:35;;;;-1:-1:-1;52582:711:0;;:::o;55278:385::-;55337:21;55361:8;55370:4;55361:14;;;;;;;;;;;;;;;;55410;;;:8;:14;;;;;;55425:10;55410:26;;;;;;;55464:11;;55486:15;;;-1:-1:-1;55512:15:0;;:19;;;;55361:14;;;;;55542:12;;55361:14;;-1:-1:-1;55410:26:0;;55464:11;55542:54;;-1:-1:-1;;;;;55542:12:0;;;;;55464:11;55542:25;:54::i;:::-;55612:43;;;;;;;;55642:4;;55630:10;;55612:43;;;;;;;;;55278:385;;;;:::o;52326:180::-;52388:8;:15;52371:14;52414:85;52442:6;52436:3;:12;52414:85;;;52472:15;52483:3;52472:10;:15::i;:::-;52450:5;;52414:85;;;;52326:180;:::o;13933:148::-;13512:12;:10;:12::i;:::-;13502:6;;-1:-1:-1;;;;;13502:6:0;;;:22;;;13494:67;;;;;-1:-1:-1;;;13494:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13494:67:0;;;;;;;;;;;;;;;14040:1:::1;14024:6:::0;;14003:40:::1;::::0;-1:-1:-1;;;;;14024:6:0;;::::1;::::0;14003:40:::1;::::0;14040:1;;14003:40:::1;14071:1;14054:19:::0;;-1:-1:-1;;;;;;14054:19:0::1;::::0;;13933:148::o;49965:660::-;13512:12;:10;:12::i;:::-;13502:6;;-1:-1:-1;;;;;13502:6:0;;;:22;;;13494:67;;;;;-1:-1:-1;;;13494:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13494:67:0;;;;;;;;;;;;;;;50109:5:::1;50092:13;:22;;;;50084:72;;;;-1:-1:-1::0;;;50084:72:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50171:11;50167:61;;;50199:17;:15;:17::i;:::-;50238:23;50279:10;;50264:12;:25;:53;;50307:10;;50264:53;;;50292:12;50264:53;50346:15;::::0;50238:79;;-1:-1:-1;50346:32:0::1;::::0;50366:11;50346:19:::1;:32::i;:::-;50328:15;:50:::0;50403:213:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;50403:213:0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;50403:213:0;;;;;;::::1;::::0;;::::1;::::0;;;;;;50389:8:::1;:228:::0;;::::1;::::0;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;50389:228:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50389:228:0;;;;;;;;-1:-1:-1;;50389:228:0::1;::::0;;;::::1;::::0;;;::::1;::::0;;49965:660::o;56063:165::-;56146:10;;-1:-1:-1;;;;;56146:10:0;56132;:24;56124:61;;;;;-1:-1:-1;;;56124:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;56196:10;:24;;-1:-1:-1;;;;;;56196:24:0;-1:-1:-1;;;;;56196:24:0;;;;;;;;;;56063:165::o;48656:44::-;48699:1;48656:44;:::o;13290:79::-;13328:7;13355:6;-1:-1:-1;;;;;13355:6:0;13290:79;:::o;51276:144::-;51349:7;51376:36;48699:1;51376:14;:3;51384:5;51376:7;:14::i;:36::-;51369:43;;51276:144;;;;;:::o;48878:66::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;51484:759::-;51557:7;51577:21;51601:8;51610:4;51601:14;;;;;;;;;;;;;;;;51650;;;:8;:14;;;;;;-1:-1:-1;;;;;51650:21:0;;;;;;;;;;;51601:14;;;;;;;;51708:20;;;;51758:12;;:37;;-1:-1:-1;;;51758:37:0;;51789:4;51758:37;;;;;;51601:14;;-1:-1:-1;51650:21:0;;51708:20;;51601:14;;51758:12;;;:22;;:37;;;;;;;;;;;:12;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;51758:37:0;51825:20;;;;51758:37;;-1:-1:-1;51810:12:0;:35;:52;;;;-1:-1:-1;51849:13:0;;;51810:52;51806:349;;;51879:18;51900:49;51914:4;:20;;;51936:12;51900:13;:49::i;:::-;51879:70;;51964:18;51985:70;52039:15;;51985:49;52018:4;:15;;;51985:28;52000:12;;51985:10;:14;;:28;;;;:::i;:70::-;51964:91;-1:-1:-1;52088:55:0;52108:34;52133:8;52108:20;51964:91;52123:4;52108:14;:20::i;:34::-;52088:15;;:19;:55::i;:::-;52070:73;;51806:349;;;52172:63;52219:4;:15;;;52172:42;52209:4;52172:32;52188:15;52172:4;:11;;;:15;;:32;;;;:::i;:63::-;52165:70;51484:759;-1:-1:-1;;;;;;;51484:759:0:o;50737:463::-;13512:12;:10;:12::i;:::-;13502:6;;-1:-1:-1;;;;;13502:6:0;;;:22;;;13494:67;;;;;-1:-1:-1;;;13494:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13494:67:0;;;;;;;;;;;;;;;50878:5:::1;50861:13;:22;;;;50853:72;;;;-1:-1:-1::0;;;50853:72:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50940:11;50936:61;;;50968:17;:15;:17::i;:::-;51025:63;51076:11;51025:46;51045:8;51054:4;51045:14;;;;;;;;;;;;;;;;;;:25;;;51025:15;;:19;;:46;;;;:::i;:::-;:50:::0;::::1;:63::i;:::-;51007:15;:81;;;;51127:11;51099:8;51108:4;51099:14;;;;;;;;;;;;;;;;;;:25;;:39;;;;51179:13;51149:8;51158:4;51149:14;;;;;;;;;;;;;;;;;;:27;;;:43;;;;;;;;;;;;;;;;;;50737:463:::0;;;;:::o;53362:1053::-;53428:21;53452:8;53461:4;53452:14;;;;;;;;;;;;;;;;53501;;;:8;:14;;;;;;53516:10;53501:26;;;;;;;53452:14;;;;;;;;-1:-1:-1;53538:16:0;53510:4;53538:10;:16::i;:::-;53569:11;;:15;53565:236;;53601:15;53619:68;53671:4;:15;;;53619:47;53661:4;53619:37;53635:4;:20;;;53619:4;:11;;;:15;;:37;;;;:::i;:68::-;53601:86;-1:-1:-1;53705:11:0;;53702:88;;53737:37;53754:10;53766:7;53737:16;:37::i;:::-;53565:236;;53814:11;;53811:471;;53842:12;;:74;;-1:-1:-1;;;;;53842:12:0;53880:10;53901:4;53908:7;53842:29;:74::i;:::-;53934:17;;;;;;:21;53931:340;;54008:17;;;;53975:18;;53996:41;;54031:5;;53996:30;;:7;;54008:17;;53996:11;:30::i;:41::-;54082:10;;54056:12;;53975:62;;-1:-1:-1;54056:49:0;;-1:-1:-1;;;;;54056:12:0;;;;54082:10;53975:62;54056:25;:49::i;:::-;54138:11;;:40;;54167:10;;54138:24;;54154:7;54138:15;:24::i;:40::-;54124:54;;-1:-1:-1;53931:340:0;;;54231:11;;:24;;54247:7;54231:15;:24::i;:::-;54217:38;;53931:340;54326:20;;;;54310:11;;:47;;54352:4;;54310:37;;:15;:37::i;:47::-;54292:15;;;:65;54373:34;;;;;;;;54393:4;;54381:10;;54373:34;;;;;;;;;53362:1053;;;;:::o;14236:244::-;13512:12;:10;:12::i;:::-;13502:6;;-1:-1:-1;;;;;13502:6:0;;;:22;;;13494:67;;;;;-1:-1:-1;;;13494:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13494:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;14325:22:0;::::1;14317:73;;;;-1:-1:-1::0;;;14317:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14427:6;::::0;;14406:38:::1;::::0;-1:-1:-1;;;;;14406:38:0;;::::1;::::0;14427:6;::::1;::::0;14406:38:::1;::::0;::::1;14455:6;:17:::0;;-1:-1:-1;;;;;;14455:17:0::1;-1:-1:-1::0;;;;;14455:17:0;;;::::1;::::0;;;::::1;::::0;;14236:244::o;11864:98::-;11944:10;11864:98;:::o;3395:252::-;3453:7;3479:6;3475:47;;-1:-1:-1;3509:1:0;3502:8;;3475:47;3546:5;;;3550:1;3546;:5;:1;3570:5;;;;;:10;3562:56;;;;-1:-1:-1;;;3562:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:132;3713:7;3740:39;3744:1;3747;3740:39;;;;;;;;;;;;;;;;;:3;:39::i;3017:136::-;3075:7;3102:43;3106:1;3109;3102:43;;;;;;;;;;;;;;;;;:3;:43::i;55775:278::-;55869:4;;:29;;;-1:-1:-1;;;55869:29:0;;55892:4;55869:29;;;;;;55851:15;;-1:-1:-1;;;;;55869:4:0;;:14;;:29;;;;;;;;;;;;;;:4;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;55869:29:0;;-1:-1:-1;55913:17:0;;;55909:137;;;55947:4;;:27;;;-1:-1:-1;;;55947:27:0;;-1:-1:-1;;;;;55947:27:0;;;;;;;;;;;;;;;:4;;;;;:13;;:27;;;;;;;;;;;;;;:4;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;55909:137:0;;-1:-1:-1;55909:137:0;;56007:4;;:27;;;-1:-1:-1;;;56007:27:0;;-1:-1:-1;;;;;56007:27:0;;;;;;;;;;;;;;;:4;;;;;:13;;:27;;;;;;;;;;;;;;:4;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;55909:137:0;55775:278;;;:::o;9440:211::-;9584:58;;;-1:-1:-1;;;;;9584:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9584:58:0;-1:-1:-1;;;9584:58:0;;;9557:86;;9577:5;;9557:19;:86::i;2828:181::-;2886:7;2918:5;;;2942:6;;;;2934:46;;;;;-1:-1:-1;;;2934:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;9659:248;9830:68;;;-1:-1:-1;;;;;9830:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9830:68:0;-1:-1:-1;;;9830:68:0;;;9803:96;;9823:5;;9803:19;:96::i;:::-;9659:248;;;;:::o;3795:312::-;3915:7;3950:12;3943:5;3935:28;;;;-1:-1:-1;;;3935:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3974:9;3990:1;3986;:5;;;;;;;3795:312;-1:-1:-1;;;;;3795:312:0:o;3161:226::-;3281:7;3317:12;3309:6;;;;3301:29;;;;-1:-1:-1;;;3301:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3353:5:0;;;3161:226::o;11331:433::-;11414:23;11440:69;11468:4;11440:69;;;;;;;;;;;;;;;;;11448:5;-1:-1:-1;;;;;11440:27:0;;;:69;;;;;:::i;:::-;11524:17;;11414:95;;-1:-1:-1;11524:21:0;11520:237;;11679:10;11668:30;;;;;;;;;;;;;;;-1:-1:-1;11668:30:0;11660:85;;;;-1:-1:-1;;;11660:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7413:230;7550:12;7582:53;7605:6;7613:4;7619:1;7622:12;7582:22;:53::i;:::-;7575:60;7413:230;-1:-1:-1;;;;7413:230:0:o;8286:1020::-;8459:12;8492:18;8503:6;8492:10;:18::i;:::-;8484:60;;;;;-1:-1:-1;;;8484:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8618:12;8632:23;8659:6;-1:-1:-1;;;;;8659:11:0;8678:8;8688:4;8659:34;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8659:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8617:76;;;;8708:7;8704:595;;;8739:10;-1:-1:-1;8732:17:0;;-1:-1:-1;8732:17:0;8704:595;8853:17;;:21;8849:439;;9116:10;9110:17;9177:15;9164:10;9160:2;9156:19;9149:44;9064:148;9252:20;;-1:-1:-1;;;9252:20:0;;;;;;;;;;;;;;;;;9259:12;;9252:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6421:398;6481:4;6719:20;;6549:66;6768:23;;;;;;:42;;-1:-1:-1;;6795:15:0;;;6760:51;-1:-1:-1;;6421:398:0:o

Swarm Source

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