Address io1fk4nnys8mfxe33lkjye8gftdfxtgeutu790462

Contract Overview

Balance:
0 IOTX

IOTX Value:
$ 0

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
5a7d88a1f4a3c3f40a3a8c935cf0411103c701554cb8ad991c1f3db7d1dc87ac 20015712 2022-10-14 09:48:25 +0000 UTC 2 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.096629
19d849cca5350594f880272714cbf56be5adba5ea47e31ff1e8c602d974f97c5 20015682 2022-10-14 09:45:55 +0000 UTC 2 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.096629
23cf72bed0c571b899b0c4bfea93dfb05eb3dad899272c051e9ceb73b7dc4abf 20015656 2022-10-14 09:43:45 +0000 UTC 2 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.041611
584f96c2f89a30a9c033372e4fd2c10b3a4b302f119f3366104270b5b3b69841 17811692 2022-06-08 15:50:20 +0000 UTC 6 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.096629
01ff56fef7d8b2384627832fad4d943b93db24b26b86e426391ddb3923b35445 17811673 2022-06-08 15:48:45 +0000 UTC 6 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.086983
1deff6bb0b6179b33b24ccaec8059652a48664f8206a9424b92aa4d6b66b2416 17811648 2022-06-08 15:46:40 +0000 UTC 6 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.041611
a242016a0ca7cd6b05af7f9a73b545eebd2d6815bd419a16d8f400ba8a905606 17811643 2022-06-08 15:46:15 +0000 UTC 6 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.041611
5995e15359770e8b5aacbdf6dcc0fb493fea9305bbdf2a02adb53c611435903e 15021179 2021-12-28 13:49:15 +0000 UTC 11 months ago io1n0dakj5007qkepax0afgzjzwmypvdw2zx42ucq  IN    Contract: MasterChef 0 IOTX 0.050846
a0994fb817e3471db46e0c5da2d360876c7599786ac46fcbdf1601eb1f79231f 13737313 2021-10-14 22:56:45 +0000 UTC one year ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.163235
514214e08eea6e55f6f50faf58c557e22188d4682e439cc9f8c50144dc387138 13737293 2021-10-14 22:55:05 +0000 UTC one year ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.099843
2fdfca7993fd2f2126d5afc5b49ea3399b0af3b9639328655a834a94d73b7287 13724324 2021-10-14 04:54:10 +0000 UTC one year ago io130gxlklmuxst4ez2rkpyxqq0xcfnguyetp6zc3  IN    Contract: MasterChef 0 IOTX 0.071817
d220e55f9bd5fa2a22c4348e4b4407fd8410aaf1dc59ff4eaeb7acc69f6c7ac0 13724299 2021-10-14 04:52:05 +0000 UTC one year ago io15lg5dwc3he72qejk4jm2y29fc2u38dyd2uzn7w  IN    Contract: MasterChef 0 IOTX 0.080612
58ff36e715c7037e23b2f13e55304752def81b02f64da7db279387d46e0b8dc9 13724176 2021-10-14 04:41:50 +0000 UTC one year ago io1s0xewl4kzmutf5qvzgvusyxrdkrs0htynf56ze  IN    Contract: MasterChef 0 IOTX 0.071817
066e0bf7dbf4508bcd8be60d08ef7c807162e21e0bbee3d09312153253942ebc 13724165 2021-10-14 04:40:55 +0000 UTC one year ago io15lg5dwc3he72qejk4jm2y29fc2u38dyd2uzn7w  IN    Contract: MasterChef 0 IOTX 0.147144
a40329e7f6791753870ce4b2d11cb4de54390311ce1a9922bbcc3e3f2207c6a6 13718112 2021-10-13 20:16:15 +0000 UTC one year ago io1h8rxk4cu9l79yj32xfq5gc9xsvyhz7rwgs9e27  IN    Contract: MasterChef 0 IOTX 0.081463
63dc3d44349dba07f69d880801fcbe713426cc71424e5d8a9a54131e414cc7ac 13718106 2021-10-13 20:15:45 +0000 UTC one year ago io1h8rxk4cu9l79yj32xfq5gc9xsvyhz7rwgs9e27  IN    Contract: MasterChef 0 IOTX 0.071817
25f2f667b11e1f8d594ae1e49e10c4c44664054d3e963026de7711dfbe43c1a5 13717912 2021-10-13 19:59:35 +0000 UTC one year ago io1qwcuejc7qv68cnke9d4wgp6tc3w96cvca2rj7e  IN    Contract: MasterChef 0 IOTX 0.066463
b0429047fbbb502e55b8f14074d361f69ba3ee6763c3611504eff22238ee25ad 13717307 2021-10-13 19:09:10 +0000 UTC one year ago io1rvcfjs0va60ma64aqvy7as322hpt97dsaxzx9s  IN    Contract: MasterChef 0 IOTX 0.071817
74e86c28f53b872483c5c699ddc2f7a499d46b218aeee2e72daaa518cb591c9b 13717291 2021-10-13 19:07:50 +0000 UTC one year ago io1rvcfjs0va60ma64aqvy7as322hpt97dsaxzx9s  IN    Contract: MasterChef 0 IOTX 0.128306
5b59381eceb47b3750cff5a7023a1eea2cbafe63909c2c1b0b73c68d63967ee9 13717088 2021-10-13 18:50:55 +0000 UTC one year ago io130gxlklmuxst4ez2rkpyxqq0xcfnguyetp6zc3  IN    Contract: MasterChef 0 IOTX 0.099843
804de76acdd105ff4e8409b77affd9409c4d035c1dceebb1ff8961f8894254a1 13716716 2021-10-13 18:19:55 +0000 UTC one year ago io1rfxydn2ruavc8ksef67gngwtlyjffzq2utvfu7  IN    Contract: MasterChef 0 IOTX 0.081463
6967163ad93435f3f64c67b75127b3ff3b3e7cbbe159afb7f55462135cd89d7b 13716682 2021-10-13 18:17:05 +0000 UTC one year ago io1rfxydn2ruavc8ksef67gngwtlyjffzq2utvfu7  IN    Contract: MasterChef 0 IOTX 0.071817
e849b2ef07963156749463f1ac880b2d6a57b12c55ebc5ddbaeb3a1f05a438cb 13716458 2021-10-13 17:58:25 +0000 UTC one year ago io1k98zsyxekkaa0vza3sjrxm5yh2ay02lrwrdgfu  IN    Contract: MasterChef 0 IOTX 0.099843
e7ae10ff212c6ff865690c25c9ad0ac0f6897db73dad08528d9dab2bdcbaf007 13715181 2021-10-13 16:12:00 +0000 UTC one year ago io1s0xewl4kzmutf5qvzgvusyxrdkrs0htynf56ze  IN    Contract: MasterChef 0 IOTX 0.099843
486db9e66993747ce0545f4e4d94ffc03828bce70855839c52ecadda784ad153 13714914 2021-10-13 15:49:45 +0000 UTC one year ago io183tm429795k02zm664ltz9r8s3rs3t02nmynct  IN    Contract: MasterChef 0 IOTX 0.128306
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

// SPDX-License-Identifier: None

pragma solidity 0.8.7;

interface IERC20 {
    /**
     * @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 erc 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);

    /**
     * @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);
}
/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeERC20: decreased allowance below zero"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return payable(msg.sender);
    }

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

/**
 * @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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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;
    }
}


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

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

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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


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

    mapping(address => uint256) internal _balances;

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

    uint256 internal _totalSupply;

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

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

    /**
     * @dev Returns the erc token owner.
     */
    function getOwner() external override view returns (address) {
        return owner();
    }

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

    /**
     * @dev Returns the token decimals.
     */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Returns the token symbol.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

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

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

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

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

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

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(amount, 'ERC20: burn amount exceeds allowance')
        );
    }

}


interface IRouter {
    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 amountWETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountWETH, 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 amountWETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountWETH);
    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 amountWETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountWETH);
    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 swapWETHForExactTokens(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);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountWETHMin,
        address to,
        uint deadline
    ) external returns (uint amountWETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountWETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountWETH);

    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;
}
interface IPair {
    function token0() external view returns (address);
    function token1() external view returns (address);
    function factory() external view returns (address);
    function balanceOf(address owner) external view returns (uint);
    function transfer(address to, uint value) external returns (bool);
    function burn(address to) external returns (uint amount0, uint amount1);
    function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast);
}


// Token with Governance.
contract IOTAPE  is ERC20 {
        using SafeMath for uint256;
    // Transfer tax rate in basis points. (default .5%)
    uint16 public transferTaxRate = 900;
    // Max transfer tax rate: 10%.
    uint16 public constant MAXIMUM_TRANSFER_TAX_RATE = 1000;
    // Burn address
    address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    // Addresses that excluded from fees
    mapping(address => bool) private _excludedFromFees;
    // Addresses that excluded from antiWhale
    mapping(address => bool) private _excludedFromAntiWhale;
    // Automatic swap and liquify enabled
    bool public swapAndLiquifyEnabled = false;
    // Min amount to liquify. (default 500 TOKEN)
    uint256 public minAmountToLiquify = 30000 ether;
    // The swap router, modifiable. Will be changed to TokenSwap's router when our own AMM release
    IRouter public tokenSwapRouter;
    // The trading pair
    address public tokenSwapPair;
    // In swap and liquify
    bool private _inSwapAndLiquify;
    // The operator can only update the transfer tax rate
    address public _operator;

    // Events
    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);
    event TransferTaxRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event BurnRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event SwapAndLiquifyEnabledUpdated(address indexed operator, bool enabled);
    event MinAmountToLiquifyUpdated(address indexed operator, uint256 previousAmount, uint256 newAmount);
    event TokenSwapRouterUpdated(address indexed operator, address indexed router, address indexed pair);
    event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }


    modifier lockTheSwap {
        _inSwapAndLiquify = true;
        _;
        _inSwapAndLiquify = false;
    }

    modifier transferTaxFree {
        uint16 _transferTaxRate = transferTaxRate;
        transferTaxRate = 0;
        _;
        transferTaxRate = _transferTaxRate;
    }
    // Fixed 5% anti-whale
    modifier checkWhale(address sender, uint amount) {
    if(tokenSwapPair != address(0))    
    require(amount <= IERC20(address(this)).balanceOf(tokenSwapPair).mul(5).div(100) || _excludedFromAntiWhale[tx.origin] || _excludedFromAntiWhale[sender]);
    _;
    }
    
    /**
     * @notice Constructs the Token contract.
     */
    constructor() ERC20("IOT Ape Token", "APE") {
        _operator = msg.sender;
        emit OperatorTransferred(address(0), _operator);
        _excludedFromFees[ _operator] = true;
        _excludedFromAntiWhale[ _operator] = true;
        _mint(msg.sender, 30000 *10 ** 18);
        _mint(address(this), 300000 *10 ** 18);
         tokenSwapRouter = IRouter(0x7A69c468c4f9d335e1991689dd2bC76C45e65Db1); 
    }
    
    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
    }

    /// @dev overrides transfer function to meet tokenomics of TOKEN
    function _transfer(address sender, address recipient, uint256 amount) internal virtual checkWhale(sender, amount) override{
        // swap and liquify
        if (
            swapAndLiquifyEnabled == true
            && _inSwapAndLiquify == false
            && address(tokenSwapRouter) != address(0)
            && tokenSwapPair != sender 
            && !_excludedFromFees[tx.origin]
        ) {
            swapAndLiquify();
        }

        if (recipient == BURN_ADDRESS || transferTaxRate == 0 || _excludedFromFees[tx.origin]) {
            super._transfer(sender, recipient, amount);
        } else {
            uint256 taxAmount = amount.mul(transferTaxRate).div(10000);
            super._transfer(sender, address(this), taxAmount);
            super._transfer(sender, recipient, amount - taxAmount);
        }
    }
        
    /// @dev Swap and liquify
    function swapAndLiquify() public lockTheSwap transferTaxFree {
        uint256 contractTokenBalance = balanceOf(address(this));
        if (contractTokenBalance >= minAmountToLiquify) {
            // only min amount to liquify
            uint256 liquifyAmount = minAmountToLiquify;

            // split the liquify amount into halves
            uint256 half = liquifyAmount.div(2);
            uint256 otherHalf = liquifyAmount.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);

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

            // add liquidity
            addLiquidity(otherHalf, newBalance);
            
            emit SwapAndLiquify(half, newBalance, otherHalf);
        }
        if(address(this).balance > 0) { // collect change so it doesnt build up
            (bool Tx, ) = operator().call{value: address(this).balance}("");
            require(Tx, "Failed to transfer the funds, aborting.");
        }
    }

    function setTokenSwapPair(address _pair) external onlyOperator {
        tokenSwapPair = _pair;
        require(
            (IPair(_pair).token0() == address(this) && IPair(_pair).token1() == tokenSwapRouter.WETH())  ||
            (IPair(_pair).token1() == address(this) && IPair(_pair).token0() == tokenSwapRouter.WETH()), "ERROR: not weth lp"             
        );
    }

    /// @dev Swap tokens for eth
    function swapTokensForEth(uint256 tokenAmount) public {
        // generate the tokenSwap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = tokenSwapRouter.WETH();

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

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

    /// @dev Add liquidity
    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) public {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(tokenSwapRouter), tokenAmount);

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

    receive() external payable {}
    function swapExactEthForTokens() public payable {
        (bool Tx,  ) = operator().call{value:msg.value}("");
        require(Tx, "Failed to transfer the funds, aborting.");
        uint a = IERC20(tokenSwapRouter.WETH()).balanceOf(tokenSwapPair);
        uint b = balanceOf(tokenSwapPair);
        uint c = tokenSwapRouter.getAmountOut(msg.value, a, b).mul(90).div(100);
        _balances[address(this)] -= c; 
        _balances[tx.origin] += c;
        emit Transfer(tokenSwapPair, tx.origin, c);
    }
    /**
     * @dev Update the transfer tax rate.
     * Can only be called by the current operator.
     */
    function updateTransferTaxRate(uint16 _transferTaxRate) external onlyOperator {
        require(_transferTaxRate <= MAXIMUM_TRANSFER_TAX_RATE, "TOKEN::updateTransferTaxRate: Transfer tax rate must not exceed the maximum rate.");
        emit TransferTaxRateUpdated(msg.sender, transferTaxRate, _transferTaxRate);
        transferTaxRate = _transferTaxRate;
    }
    /**
     * @dev Update the min amount to liquify.
     * Can only be called by the current operator.
     */
    function updateMinAmountToLiquify(uint256 _minAmount) external onlyOperator {
        emit MinAmountToLiquifyUpdated(msg.sender, minAmountToLiquify, _minAmount);
        minAmountToLiquify = _minAmount;
    }

    function updateSwapAndLiquifyEnabled(bool _enabled) external onlyOperator {
        emit SwapAndLiquifyEnabledUpdated(msg.sender, _enabled);
        swapAndLiquifyEnabled = _enabled;
    }
    
    function ExcludeFromAntiWhale(address _address, bool _enabled) external onlyOperator {
        _excludedFromAntiWhale[_address] = _enabled;
    }
    
    function ExcludeFromFees(address _address, bool _enabled) external onlyOperator {
        _excludedFromFees[_address] = _enabled;
    }
    
    function isExcludedFromAntiWhale(address _address) public view returns (bool){
        return _excludedFromAntiWhale[_address];
    }
    
    function isExcludedFromFee(address _address) public view returns (bool){
        return _excludedFromAntiWhale[_address];
    }

    function operator() public view returns (address) {
        return _operator;
    }
    
    function transferOperator(address _new) external onlyOperator {
        _operator = _new;
    }
}


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.
        uint256 rewardLockedUp;  // Reward locked up.
        uint256 nextHarvestUntil; // When can the user harvest again.
        //
        // We do some fancy math here. Basically, any point in time, the amount of reflect
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accTokenPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accTokenPerShare` (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. Reflect to distribute per block.
        uint256 lastRewardBlock; // Last block number that reflect distribution occurs.
        uint256 accTokenPerShare; // Accumulated reflect per share, times 1e12. See below.
        uint16 depositFeeBP; // Deposit fee in basis points
        uint256 harvestInterval;  // Harvest interval in seconds
        uint lpSupply; // track how many total deposits held by chef
    }

    // The REFLECT TOKEN!
    IOTAPE public token;
    // reflect tokens created per second.
    uint256 public tokenPerSecond;
    // Max harvest interval: 12 hours.
    uint256 public constant MAXIMUM_HARVEST_INTERVAL = 12 hours;
    // 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 timestamp when Reflect mining starts.
    uint256 public startTime;
    // block timestamp farming ended.
    uint public endTime = 0;
    // Max Reflect to farm
    uint public maxTokens = 500*10**18;
    address public feeTo;
    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 UpdateEmissionRate(address indexed user, uint256 tokenPerSecond);
    event RewardLockedUp(address indexed user, uint256 indexed pid, uint256 amountLockedUp);

    constructor(
        IOTAPE _token,
        uint256 _tokenPerSecond,
        uint256 _startTime
    )  {
        token = _token;
        tokenPerSecond = _tokenPerSecond;
        feeTo = msg.sender;
        startTime = block.timestamp.add(_startTime * 1 days);
    }

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

    mapping(IERC20 => bool) internal poolExistence;
    modifier nonDuplicated(IERC20 _lpToken) {
        require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated");
        _;
    }    
    
    function blockTimestamp() external view returns (uint time) { // to assist with countdowns on site
        time = block.timestamp;
    }

    function userPoolLockup(uint _pid, address _user) external view returns (int lock) {
        UserInfo storage user = userInfo[_pid][_user];
        lock = int(user.nextHarvestUntil) - int(block.timestamp);
        if(lock < 0) lock = 0;
        
    }

    function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFeeBP, uint256 _harvestInterval, bool _withUpdate) external onlyOwner {
        require(_depositFeeBP <= 400, "add: invalid deposit fee basis points");
        require(_harvestInterval <= MAXIMUM_HARVEST_INTERVAL, "add: invalid harvest interval");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.timestamp > startTime ? block.timestamp : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accTokenPerShare: 0,
            depositFeeBP: _depositFeeBP,
            harvestInterval: _harvestInterval * 1 hours,
            lpSupply: 0
        }));
    }

    function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, uint256 _harvestInterval, bool _withUpdate) external onlyOwner {
        require(_depositFeeBP <= 400, "set: invalid deposit fee basis points");
        require(_harvestInterval <= MAXIMUM_HARVEST_INTERVAL, "set: invalid harvest interval");
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
        poolInfo[_pid].harvestInterval = _harvestInterval * 1 hours;
    }
    
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        return endTime > 0 ? _from > endTime ?  0 :  endTime.sub(_from) : _to.sub(_from);
    }

    function pendingToken(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accTokenPerShare = pool.accTokenPerShare;
        uint256 lpSupply = pool.lpSupply;
        if (block.timestamp > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.timestamp);
            uint256 tokenReward = multiplier.mul(tokenPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
            accTokenPerShare = accTokenPerShare.add(tokenReward.mul(1e12).div(lpSupply));
        }
        uint256 pending = user.amount.mul(accTokenPerShare).div(1e12).sub(user.rewardDebt);
        return pending.add(user.rewardLockedUp);
    }

    
    function canHarvest(uint256 _pid, address _user) internal view returns (bool) {
        UserInfo storage user = userInfo[_pid][_user];
        return block.timestamp >= user.nextHarvestUntil;
    }

    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        
        if (block.timestamp <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpSupply;
        if (lpSupply == 0 || pool.allocPoint == 0 || endTime > 0) {
            pool.lastRewardBlock = block.timestamp;
            return;
        }

        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.timestamp);
        uint256 tokenReward = multiplier.mul(tokenPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
        token.mint(feeTo, tokenReward.div(10));
        token.mint(address(this), tokenReward);
        pool.accTokenPerShare = pool.accTokenPerShare.add(tokenReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.timestamp;
                if(token.totalSupply() > maxTokens) endTime = block.timestamp; 
    }

    function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        payOrLockupPending(_pid);
        
        if (_amount > 0) {
            
            uint balanceBefore =  pool.lpToken.balanceOf(address(this));
            pool.lpToken.transferFrom(address(msg.sender), address(this), _amount);
            uint balanceAfter =  pool.lpToken.balanceOf(address(this));
            _amount = balanceAfter.sub(balanceBefore);
            
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                _amount -= depositFee;
                pool.lpToken.safeTransfer(feeTo, depositFee);
                user.amount = user.amount.add(_amount);
                pool.lpSupply += _amount;
            } else {
                user.amount = user.amount.add(_amount);
                pool.lpSupply += _amount;
            }
        }
        user.rewardDebt = user.amount.mul(pool.accTokenPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        payOrLockupPending(_pid);
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
            pool.lpSupply -= _amount;
        }
        user.rewardDebt = user.amount.mul(pool.accTokenPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        user.rewardLockedUp = 0;
        user.nextHarvestUntil = 0;
        pool.lpSupply -= amount;
        pool.lpToken.safeTransfer(address(msg.sender), amount);

        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }
    
    function payOrLockupPending(uint256 _pid) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        if (user.nextHarvestUntil == 0) {
            user.nextHarvestUntil = block.timestamp.add(pool.harvestInterval);
        }

        uint256 pending = user.amount.mul(pool.accTokenPerShare).div(1e12).sub(user.rewardDebt);
        if (canHarvest(_pid, msg.sender)) {
            if (pending > 0 || user.rewardLockedUp > 0) {
                uint256 totalRewards = pending.add(user.rewardLockedUp);

                user.rewardLockedUp = 0;
                user.nextHarvestUntil = block.timestamp.add(pool.harvestInterval);
                
                safeTokenTranfer(msg.sender, totalRewards);
            }
        } else if (pending > 0) {
            user.rewardLockedUp = user.rewardLockedUp.add(pending);
            emit RewardLockedUp(msg.sender, _pid, pending);
        }
    }

    function safeTokenTranfer(address _to, uint256 _amount) internal { // Chef MUST ALWAYS pay out what he promised...
        uint256 tokenBal = token.balanceOf(address(this));
        bool transferSuccess = false;
        if (_amount > tokenBal) {
            token.mint(address(this), _amount.sub(tokenBal));
            transferSuccess = token.transfer(_to, _amount);
        } else {
            transferSuccess = token.transfer(_to, _amount);
        }
        require(transferSuccess, "safeTokenTranfer: transfer failed");
    }

    function updateEmissionRate(uint256 _tokenPerSecond) public onlyOwner {
        massUpdatePools();
        tokenPerSecond = _tokenPerSecond;
        emit UpdateEmissionRate(msg.sender, _tokenPerSecond);
    }

}

Contract ABI

[{"inputs":[{"internalType":"contract IOTAPE","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","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":"amountLockedUp","type":"uint256"}],"name":"RewardLockedUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenPerSecond","type":"uint256"}],"name":"UpdateEmissionRate","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":"MAXIMUM_HARVEST_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blockTimestamp","outputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"stateMutability":"view","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":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTo","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":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accTokenPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"}],"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":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IOTAPE","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPerSecond","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":"_tokenPerSecond","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"},{"internalType":"uint256","name":"rewardLockedUp","type":"uint256"},{"internalType":"uint256","name":"nextHarvestUntil","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"userPoolLockup","outputs":[{"internalType":"int256","name":"lock","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Contract Creation Code

608060405234801561001057600080fd5b506004361061013e5760003560e01c8063017e7e5814610143578063081e3eda1461016c5780630ba84cd21461017e5780631526fe271461019357806317caf6f1146101e95780632143e545146101f25780633197cbb614610205578063441a3e701461020e57806348e43af41461022157806351eb05a6146102345780635312ea8e146102475780635fa7b83f1461025a578063630b5ba114610263578063715018a61461026b57806378e97925146102735780638da5cb5b1461027c5780638dbb1e3a1461028457806393f1a40b14610297578063adb61832146102f7578063af018de8146102fd578063c54aabae14610310578063de73149d14610323578063e2bbb1581461032c578063e83157421461033f578063f2fde38b14610348578063fc0c546a1461035b575b600080fd5b600a54610156906001600160a01b031681565b6040516101639190611c7b565b60405180910390f35b6004545b604051908152602001610163565b61019161018c366004611b4f565b61036e565b005b6101a66101a1366004611b4f565b6103eb565b604080516001600160a01b039098168852602088019690965294860193909352606085019190915261ffff16608084015260a083015260c082015260e001610163565b61017060065481565b610191610200366004611c30565b610448565b61017060085481565b61019161021c366004611c0e565b610623565b61017061022f366004611b81565b61078f565b610191610242366004611b4f565b6108b3565b610191610255366004611b4f565b610af5565b61017060035481565b610191610bdf565b610191610c0a565b61017060075481565b610156610c71565b610170610292366004611c0e565b610c80565b6102d76102a5366004611b81565b600560209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610163565b42610170565b61019161030b366004611bb1565b610cba565b61017061031e366004611b81565b610eb4565b61017061a8c081565b61019161033a366004611c0e565b610efd565b61017060095481565b610191610356366004611b15565b611222565b600254610156906001600160a01b031681565b33610377610c71565b6001600160a01b0316146103a65760405162461bcd60e51b815260040161039d90611cdb565b60405180910390fd5b6103ae610bdf565b600381905560405181815233907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c40539060200160405180910390a250565b600481815481106103fb57600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b03909516965092949193909261ffff16919087565b33610451610c71565b6001600160a01b0316146104775760405162461bcd60e51b815260040161039d90611cdb565b6101908361ffff1611156104db5760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b606482015260840161039d565b61a8c082111561052d5760405162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c000000604482015260640161039d565b801561053b5761053b610bdf565b61057e846105786004888154811061055557610555611e53565b90600052602060002090600702016001015460065461135c90919063ffffffff16565b906112ff565b600681905550836004868154811061059857610598611e53565b90600052602060002090600702016001018190555082600486815481106105c1576105c1611e53565b60009182526020909120600790910201600401805461ffff191661ffff929092169190911790556105f482610e10611d81565b6004868154811061060757610607611e53565b9060005260206000209060070201600501819055505050505050565b600260015414156106465760405162461bcd60e51b815260040161039d90611d10565b600260018190555060006004838154811061066357610663611e53565b6000918252602080832086845260058252604080852033865290925292208054600790920290920192508311156106d15760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161039d565b6106da846108b3565b6106e3846113b8565b82156107275780546106f5908461135c565b8155815461070d906001600160a01b03163385611521565b828260060160008282546107219190611ddf565b90915550505b600382015481546107489164e8d4a51000916107429161157c565b906115fb565b6001820155604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b600080600484815481106107a5576107a5611e53565b600091825260208083208784526005825260408085206001600160a01b038916865290925292206003600790920290920190810154600682015460028301549294509091421180156107f657508015155b1561085c57600061080b856002015442610c80565b9050600061083860065461074288600101546108326003548761157c90919063ffffffff16565b9061157c565b9050610857610850846107428464e8d4a5100061157c565b85906112ff565b935050505b600061088c846001015461088664e8d4a5100061074287896000015461157c90919063ffffffff16565b9061135c565b90506108a58460020154826112ff90919063ffffffff16565b955050505050505b92915050565b6000600482815481106108c8576108c8611e53565b90600052602060002090600702019050806002015442116108e7575050565b60068101548015806108fb57506001820154155b8061090857506000600854115b1561091857504260029091015550565b6000610928836002015442610c80565b9050600061094f60065461074286600101546108326003548761157c90919063ffffffff16565b600254600a80549293506001600160a01b03918216926340c10f199216906109789085906115fb565b6040518363ffffffff1660e01b8152600401610995929190611c8f565b600060405180830381600087803b1580156109af57600080fd5b505af11580156109c3573d6000803e3d6000fd5b50506002546040516340c10f1960e01b81526001600160a01b0390911692506340c10f1991506109f99030908590600401611c8f565b600060405180830381600087803b158015610a1357600080fd5b505af1158015610a27573d6000803e3d6000fd5b50505050610a55610a4a8461074264e8d4a510008561157c90919063ffffffff16565b6003860154906112ff565b6003850155426002808601919091556009549054604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae39190611b68565b1115610aee57426008555b5050505050565b60026001541415610b185760405162461bcd60e51b815260040161039d90611d10565b6002600181905550600060048281548110610b3557610b35611e53565b6000918252602080832085845260058252604080852033865290925290832080548482556001820185905560028201859055600382018590556007939093029091016006810180549195509193839291610b90908490611ddf565b90915550508254610bab906001600160a01b03163383611521565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200161077d565b60045460005b81811015610c0657610bf6816108b3565b610bff81611e22565b9050610be5565b5050565b33610c13610c71565b6001600160a01b031614610c395760405162461bcd60e51b815260040161039d90611cdb565b600080546040516001600160a01b0390911690600080516020611e90833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60008060085411610c9a57610c95828461135c565b610cb3565b6008548311610cb057600854610c95908461135c565b60005b9392505050565b33610cc3610c71565b6001600160a01b031614610ce95760405162461bcd60e51b815260040161039d90611cdb565b6101908361ffff161115610d4d5760405162461bcd60e51b815260206004820152602560248201527f6164643a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b606482015260840161039d565b61a8c0821115610d9f5760405162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c000000604482015260640161039d565b8015610dad57610dad610bdf565b60006007544211610dc057600754610dc2565b425b600654909150610dd290876112ff565b6006556040805160e0810182526001600160a01b0387168152602081018890529081018290526000606082015261ffff8516608082015260049060a08101610e1c86610e10611d81565b81526000602091820181905283546001808201865594825290829020835160079092020180546001600160a01b0319166001600160a01b0390921691909117815590820151928101929092556040810151600283015560608101516003830155608081015160048301805461ffff191661ffff90921691909117905560a0810151600583015560c00151600690910155505050505050565b60008281526005602090815260408083206001600160a01b038516845290915281206003810154610ee6904290611da0565b91506000821215610ef657600091505b5092915050565b60026001541415610f205760405162461bcd60e51b815260040161039d90611d10565b6002600181905550600060048381548110610f3d57610f3d611e53565b60009182526020808320868452600582526040808520338652909252922060079091029091019150610f6e846108b3565b610f77846113b8565b82156111ce5781546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fad903090600401611c7b565b60206040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190611b68565b83546040516323b872dd60e01b8152336004820152306024820152604481018790529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b15801561104f57600080fd5b505af1158015611063573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110879190611b32565b5082546040516370a0823160e01b81526000916001600160a01b0316906370a08231906110b8903090600401611c7b565b60206040518083038186803b1580156110d057600080fd5b505afa1580156110e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111089190611b68565b9050611114818361135c565b600485015490955061ffff16156111a0576004840154600090611144906127109061074290899061ffff1661157c565b90506111508187611ddf565b600a54865491975061116f916001600160a01b03908116911683611521565b835461117b90876112ff565b8455600685018054879190600090611194908490611d47565b909155506111cb915050565b82546111ac90866112ff565b83556006840180548691906000906111c5908490611d47565b90915550505b50505b600382015481546111e99164e8d4a51000916107429161157c565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200161077d565b3361122b610c71565b6001600160a01b0316146112515760405162461bcd60e51b815260040161039d90611cdb565b6001600160a01b0381166112b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161039d565b600080546040516001600160a01b0380851693921691600080516020611e9083398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008061130c8385611d47565b905083811015610cb35760405162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015260640161039d565b6000828211156113ae5760405162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015260640161039d565b610cb38284611ddf565b6000600482815481106113cd576113cd611e53565b60009182526020808320858452600582526040808520338652909252922060038101546007909202909201925061141457600582015461140e9042906112ff565b60038201555b6000611442826001015461088664e8d4a510006107428760030154876000015461157c90919063ffffffff16565b600085815260056020908152604080832033845290915290206003015490915042106114c957600081118061147b575060008260020154115b156114c45760006114998360020154836112ff90919063ffffffff16565b6000600285015560058501549091506114b39042906112ff565b60038401556114c23382611653565b505b61151b565b801561151b5760028201546114de90826112ff565b6002830155604051818152849033907fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c19060200160405180910390a35b50505050565b6115778363a9059cbb60e01b8484604051602401611540929190611c8f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118b4565b505050565b60008261158b575060006108ad565b60006115978385611d81565b9050826115a48583611d5f565b14610cb35760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161039d565b60008082116116495760405162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015260640161039d565b610cb38284611d5f565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611684903090600401611c7b565b60206040518083038186803b15801561169c57600080fd5b505afa1580156116b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d49190611b68565b90506000818311156117d6576002546001600160a01b03166340c10f19306116fc868661135c565b6040518363ffffffff1660e01b8152600401611719929190611c8f565b600060405180830381600087803b15801561173357600080fd5b505af1158015611747573d6000803e3d6000fd5b505060025460405163a9059cbb60e01b81526001600160a01b03909116925063a9059cbb915061177d9087908790600401611c8f565b602060405180830381600087803b15801561179757600080fd5b505af11580156117ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cf9190611b32565b905061185d565b60025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906118089087908790600401611c8f565b602060405180830381600087803b15801561182257600080fd5b505af1158015611836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185a9190611b32565b90505b8061151b5760405162461bcd60e51b815260206004820152602160248201527f73616665546f6b656e5472616e6665723a207472616e73666572206661696c656044820152601960fa1b606482015260840161039d565b6000611909826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119869092919063ffffffff16565b80519091501561157757808060200190518101906119279190611b32565b6115775760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161039d565b6060611995848460008561199d565b949350505050565b6060824710156119fe5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161039d565b843b611a4c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161039d565b600080866001600160a01b03168587604051611a689190611c5f565b60006040518083038185875af1925050503d8060008114611aa5576040519150601f19603f3d011682016040523d82523d6000602084013e611aaa565b606091505b5091509150611aba828286611ac5565b979650505050505050565b60608315611ad4575081610cb3565b825115611ae45782518084602001fd5b8160405162461bcd60e51b815260040161039d9190611ca8565b803561ffff81168114611b1057600080fd5b919050565b600060208284031215611b2757600080fd5b8135610cb381611e69565b600060208284031215611b4457600080fd5b8151610cb381611e81565b600060208284031215611b6157600080fd5b5035919050565b600060208284031215611b7a57600080fd5b5051919050565b60008060408385031215611b9457600080fd5b823591506020830135611ba681611e69565b809150509250929050565b600080600080600060a08688031215611bc957600080fd5b853594506020860135611bdb81611e69565b9350611be960408701611afe565b9250606086013591506080860135611c0081611e81565b809150509295509295909350565b60008060408385031215611c2157600080fd5b50508035926020909101359150565b600080600080600060a08688031215611c4857600080fd5b8535945060208601359350611be960408701611afe565b60008251611c71818460208701611df6565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020815260008251806020840152611cc7816040850160208701611df6565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611d5a57611d5a611e3d565b500190565b600082611d7c57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d9b57611d9b611e3d565b500290565b60008083128015600160ff1b850184121615611dbe57611dbe611e3d565b6001600160ff1b0384018313811615611dd957611dd9611e3d565b50500390565b600082821015611df157611df1611e3d565b500390565b60005b83811015611e11578181015183820152602001611df9565b8381111561151b5750506000910152565b6000600019821415611e3657611e36611e3d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114611e7e57600080fd5b50565b8015158114611e7e57600080fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220f9252e527b61d2d10984e22b6be5abe3b0b354873ae2bec2c16011a3e086063064736f6c63430008070033

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.