Address io14rfld5w759e6ychhmkm559wptpvvkqgntr60mu

Txn Hash
Block
From
To
Value [Txn Fee]
182cee5f01822d3c9a8c396bf5b500b914b5b3078f576942039508398e42a27a 16977246 2022-04-21 05:38:45 +0000 UTC 8 months ago io15exqd09pq34u6dv3l90cjwvqcuslf7j54xhk5h  IN    Contract: MasterChef 0 IOTX 0.089496
5c1a369f645411186e0eeea9211e9b0a7a798684d37eaef45e5f0bddbb8672ce 16977239 2022-04-21 05:38:10 +0000 UTC 8 months ago io15exqd09pq34u6dv3l90cjwvqcuslf7j54xhk5h  IN    Contract: MasterChef 0 IOTX 0.094439
afc02d9415b718791cd7336a58cd664c19bd2be63d864e41efa91312ba4cb9fb 16774515 2022-04-09 11:46:45 +0000 UTC 8 months ago io1577w9nd7jt0n0mh55le8r0vdkr4flg5nr4qy35  IN    Contract: MasterChef 0 IOTX 0.043923
d9bae22acaaa6bbbfee107b435146351a2a65a85781e6e4ee886a95ccd0583eb 16774514 2022-04-09 11:46:40 +0000 UTC 8 months ago io1577w9nd7jt0n0mh55le8r0vdkr4flg5nr4qy35  IN    Contract: MasterChef 0 IOTX 0.079418
7e613c2b9d4e51620a8665070d5ef7fdaa8657c3b7388c0bebc225b6cfe9e5da 16774506 2022-04-09 11:46:00 +0000 UTC 8 months ago io1577w9nd7jt0n0mh55le8r0vdkr4flg5nr4qy35  IN    Contract: MasterChef 0 IOTX 0.079836
ba03f66cd8e7ea7671af7963dfa0a23ab5073256f7f01043d49fb483df7c3d40 16755399 2022-04-08 09:11:35 +0000 UTC 8 months ago io1p7e4sem46zp0g2u2u75x0d9k7n29yfjksmaagz  IN    Contract: MasterChef 0 IOTX 0.068195
3af5bb512449790c9359050d3b25be134537a1ec5e69f3ccddf64906664c5f58 16754172 2022-04-08 07:29:10 +0000 UTC 8 months ago io1t67euhszzdu2jagdz0dtwf6wmtntgkh5ya2r6z  IN    Contract: MasterChef 0 IOTX 0.058923
5594462be976752e0855a83b2e67302fb4c7fd21d79f4fd64ba1fead395263e7 16754135 2022-04-08 07:26:05 +0000 UTC 8 months ago io1t67euhszzdu2jagdz0dtwf6wmtntgkh5ya2r6z  IN    Contract: MasterChef 0 IOTX 0.098062
e38faff298d199176ebfb50acf75982aae9e9c07dd56fad3af2f3e5557cc7107 16398321 2022-03-18 14:06:25 +0000 UTC 9 months ago io1m5mqcd6wlf4d05wqxxcvd3v6e24eaprel3gcrr  IN    Contract: MasterChef 0 IOTX 0.068195
bfad4692f14d3a87aad484cfeb81c8452099dd66758db05c3ee3e69d34884b39 16349238 2022-03-15 16:41:00 +0000 UTC 9 months ago io1qwcuejc7qv68cnke9d4wgp6tc3w96cvca2rj7e  IN    Contract: MasterChef 0 IOTX 0.043923
c3072252f0104f8ff430310bbb8544b5bde8bb13f854dd6583bbddd14064042d 16349232 2022-03-15 16:40:30 +0000 UTC 9 months ago io1qwcuejc7qv68cnke9d4wgp6tc3w96cvca2rj7e  IN    Contract: MasterChef 0 IOTX 0.079836
aee9d10aaa5ac1f9b58b03f1fa435e08179f24e95ca24f1c4e54f97faa36606e 16159398 2022-03-04 15:28:05 +0000 UTC 9 months ago io18x0r83ahl5euf0k5shfnt7wwy3t8p0myc2wlhh  IN    Contract: MasterChef 0 IOTX 0.079482
4a5f1b9b7d3072b2225e247b0e6716fb9fe429ab1c3c3fe7954c036ce6283ab7 16091265 2022-02-28 16:16:30 +0000 UTC 9 months ago io1kmhr3uz26zcp2fwglt5nrt2rpxj9uhza79z93v  IN    Contract: MasterChef 0 IOTX 0.107169
8ebaf98e4a0111f595654ed948add3057801ca14f457aeea893697438a8d8499 16035840 2022-02-25 10:53:15 +0000 UTC 10 months ago io18x0r83ahl5euf0k5shfnt7wwy3t8p0myc2wlhh  IN    Contract: MasterChef 0 IOTX 0.043923
a95b69312fb5d042804bcfaef06c85a042d366097252afa3d837fd83953eb893 16035838 2022-02-25 10:53:05 +0000 UTC 10 months ago io18x0r83ahl5euf0k5shfnt7wwy3t8p0myc2wlhh  IN    Contract: MasterChef 0 IOTX 0.079836
77ad4357ff470799ebdf59f9a4a44b7f3efb6256cfad7aa88509f4cc0eeed6e0 15986804 2022-02-22 14:45:40 +0000 UTC 10 months ago io16n93mtsvallrqwvg5stshuqdrd90k27630ygpu  IN    Contract: MasterChef 0 IOTX 0.079836
33d125e721cb93de1223344fefe7878cee41646eae24026101a16181ac1738fb 15962047 2022-02-21 04:21:15 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.089997
15a711d1bdc2cc60250f4f8b2c59768a929d33e133efc280977007da4183fab1 15962045 2022-02-21 04:21:05 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.057325
f1f94881f88971e838410513fe88c6add79c62f30466dc97fa4b7321575ca910 15962039 2022-02-21 04:20:35 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.079418
5b050e146aa4ec6206061aca0449dcde189a1b0e48650a6808461076e532f593 15962035 2022-02-21 04:20:15 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.082981
0c051611b732e62d3d3e43b5a9beff6b94f9da937d68cf5211dc673976b79277 15962033 2022-02-21 04:20:05 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.074562
f682dc6260e970f0b7cb9ffc291576df460dfe1bd32ead9463152b7eaa414dba 15962029 2022-02-21 04:19:45 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.068195
0381abe8a97e889179a45cf7deb26092a35d574187bbb3ecadf843940ee7f0b0 15962013 2022-02-21 04:18:25 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.079482
e538b3b9da08a5ffa83d33dfe52a2b50dfd42fa76741c3bf45c96680736bea3b 15962010 2022-02-21 04:18:10 +0000 UTC 10 months ago io12h7rqc2u2zxl4h2rltgna20dczd4putw43laud  IN    Contract: MasterChef 0 IOTX 0.094505
fd6ce7ab5f180b525dc38ec10d67ead0cf24871d51aac525747013da179cfff0 15920918 2022-02-18 19:07:20 +0000 UTC 10 months ago io17suc9uxzvzs0j8t9dw7sw2ntfhzmj29x798wva  IN    Contract: MasterChef 0 IOTX 0.107169
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

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



pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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



pragma solidity ^0.8.0;

/**
 * @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 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) {
        return msg.sender;
    }

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

// File: @openzeppelin/contracts/access/Ownable.sol



pragma solidity ^0.8.0;


/**
 * @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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

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

// File: libs/IMerdReferral.sol


pragma solidity >=0.4.22 <0.9.0;
interface IMerdReferral {
    /**
     * @dev Record referral.
     */
    function recordReferral(address user, address referrer) external;

    /**
     * @dev Record referral commission.
     */
    function recordReferralCommission(address referrer, uint256 commission) external;

    /**
     * @dev Get the referrer address that referred the user.
     */
    function getReferrer(address user) external view returns (address);
}

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



pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

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

// File: libs/IBEP20.sol



pragma solidity >=0.4.22 <0.9.0;


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

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

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

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

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

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

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

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

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

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

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

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

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



pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            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) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

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

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// File: libs/BEP20.sol



pragma solidity >=0.4.22 <0.9.0;






/**
 * @dev Implementation of the {IBEP20} 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 {BEP20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-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 BEP20 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 {IBEP20-approve}.
 */
contract BEP20 is Context, IBEP20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

    /**
     * @dev Returns the bep 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 {BEP20-totalSupply}.
     */
    function totalSupply() public override view returns (uint256) {
        return _totalSupply;
    }

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

    /**
     * @dev See {BEP20-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 {BEP20-allowance}.
     */
    function allowance(address owner, address spender) public override view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {BEP20-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 {BEP20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {BEP20};
     *
     * 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, "BEP20: 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 {BEP20-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 {BEP20-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, "BEP20: 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), "BEP20: transfer from the zero address");
        require(recipient != address(0), "BEP20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount, "BEP20: 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), "BEP20: mint to the zero address");

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

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

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This 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), "BEP20: approve from the zero address");
        require(spender != address(0), "BEP20: 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, "BEP20: burn amount exceeds allowance")
        );
    }
}

// File: Mermaid.sol



pragma solidity >=0.8.0;



contract Mermaid is BEP20 {
    using SafeMath for uint256;
    using SafeMath for uint16;
    using SafeMath for uint256;

    // The operator can only update the transfer tax rate
    address private _operator;

    // burn wallet
    address public burnWallet = 0x2D110aba362AA34e3595244Dd03fDF2Db455b31d;
    
    // initial mint wallet
    address public initialMintWallet = 0x1780688d4f3fbE13206Cf6349EFA1873e90f5ae0;
     
     // max mint amount
    uint256 public constant MAX_SUPPLY = 90000 ether;

    // Events
    event OperatorTransferred(
        address indexed previousOperator,
        address indexed newOperator
    );
    event TransferTaxRateUpdated(
        address indexed operator,
        uint256 previousRate,
        uint256 newRate
    );



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

    /**
     * @notice Constructs the MerdToken contract.
     */
    constructor() public BEP20("Mermaid", "MERD") {
        mint(initialMintWallet, 10600 ether);
        mint(burnWallet, 400 ether);
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);

    }

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        require(
            totalSupply() + (_amount) <= MAX_SUPPLY,
            "total supply exceeds max supply"
        );

        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    /**
     * @dev Destroys `amount` tokens from burnWallet, reducing the
     * total supply.
     */
    function burn(uint256 _amount) public {
        require(msg.sender==burnWallet, "Not authorized to burn tokens");
        _burn(msg.sender, _amount);
    }

    /// @dev overrides transfer function to meet tokenomics of MERD
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    )
        internal
        virtual
        override
    {
        require(sender != address(0), "BEP20: transfer from the zero address");
        require(recipient != address(0), "BEP20: transfer to the zero address");
        require(amount > 0, "Insufficient transfer amount");
        super._transfer(sender, recipient, amount);
    }

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

    /**
     * @dev Transfers operator of the contract to a new account (`newOperator`).
     * Can only be called by the current operator.
     */
    function transferOperator(address newOperator) public onlyOperator {
        require(
            newOperator != address(0),
            "MERD::transferOperator: new operator is the zero address"
        );
        emit OperatorTransferred(_operator, newOperator);
        _operator = newOperator;
    }

    /// @dev A record of each accounts delegate
    mapping(address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256(
            "EIP712Domain(string name,uint256 chainId,address verifyingContract)"
        );

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH =
        keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(
        address indexed delegator,
        address indexed fromDelegate,
        address indexed toDelegate
    );

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(
        address indexed delegate,
        uint256 previousBalance,
        uint256 newBalance
    );

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator) external view returns (address) {
        return _delegates[delegator];
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)
        );

        bytes32 digest = keccak256(
            abi.encodePacked("\x19\x01", domainSeparator, structHash)
        );

        address signatory = ecrecover(digest, v, r, s);
        require(
            nonce == nonces[signatory]++,
            "MERD::delegateBySig: invalid nonce"
        );
        require(
            block.timestamp <= expiry,
            "MERD::delegateBySig: signature expired"
        );
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint256) {
        uint32 nCheckpoints = numCheckpoints[account];
        return
            nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber)
        external
        view
        returns (uint256)
    {
        require(
            blockNumber < block.number,
            "MERD::getPriorVotes: not yet determined"
        );

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying MERDs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint256 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0
                    ? checkpoints[srcRep][srcRepNum - 1].votes
                    : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0
                    ? checkpoints[dstRep][dstRepNum - 1].votes
                    : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            "MERD::_writeCheckpoint: block number exceeds 32 bits"
        );

        if (
            nCheckpoints > 0 &&
            checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber
        ) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(
                blockNumber,
                newVotes
            );
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage)
        internal
        pure
        returns (uint32)
    {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal view returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    } 
}

// File: libs/SafeBEP20.sol



pragma solidity >=0.4.22 <0.9.0;




/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 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 SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

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

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

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

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

    /**
     * @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(IBEP20 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, "SafeBEP20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeBEP20: BEP20 operation did not succeed");
        }
    }
}

// File: Masterchef.sol



pragma solidity >=0.4.22 <0.9.0;









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

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

    // Info of each pool.
    struct PoolInfo {
        IBEP20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. MERDs to distribute per block.
        uint256 lastRewardBlock; // Last block number that MERDs distribution occurs.
        uint256 accMerdPerShare; // Accumulated MERDs per share, times 1e12. See below.
        uint16 withdrawFeeBP; // Withdraw fee in basis points
    }

    // The MERD TOKEN!
    Mermaid public merd;
    // Dev address.
    address public devAddress = 0xa4eb523d38De6E18198C5ba6C11D4A7EFE615aba;
    // Withdraw Fee address
    address public feeAddress = 0x4083F74df59551EdC368c8Ac0385D9cF20b1076d;
    // burn address
    address public burnAddress = 0x2D110aba362AA34e3595244Dd03fDF2Db455b31d;
    
    // MERD tokens created per block.
    uint256 public merdPerBlock;
    // Initial emission rate: 0.5 MERD per block.
    uint256 public constant INITIAL_EMISSION_RATE = 0.5 ether;
    // Reduce emission every 600 blocks ~ 30 min.
    uint256 public constant EMISSION_REDUCTION_PERIOD_BLOCKS = 600;
    // Emission reduction rate per period in basis points: 5%.
    uint256 public constant EMISSION_REDUCTION_RATE_PER_PERIOD = 500;
    // Last reduction period index
    uint256 public lastReductionPeriodIndex = 0;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when MERD mining starts.
    uint256 public startBlock;
    
    // Merd referral contract address.
    IMerdReferral public merdReferral;
    // Referral commission rate in basis points.
    uint16 public referralCommissionRate = 200;
    // Max referral commission rate: 2%.
    uint16 public constant MAXIMUM_REFERRAL_COMMISSION_RATE = 200;

    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 EmissionRateUpdated(
        address indexed caller,
        uint256 previousAmount,
        uint256 newAmount
    );
    event ReferralCommissionPaid(
        address indexed user,
        address indexed referrer,
        uint256 commissionAmount
    );
    event RewardLockedUp(
        address indexed user,
        uint256 indexed pid,
        uint256 amountLockedUp
    );

    event addEvent(uint256 _allocPoint,
        IBEP20 _lpToken,
        uint16 _withdrawFeeBP,
        bool _withUpdate);

    event setEvent( uint256 _pid,
        uint256 _allocPoint,
        uint16 _withdrawFeeBP,
        bool _withUpdate);
    event massUpdatePoolEvent();
    event setDevAddressEvent(address _newDevAddress);
    event setFeeAddressEvent(address _feeAddress);
    event setReferralAddressEvent(IMerdReferral _newAddress);
    event setReferralCommissionRateEvent(uint256 _newRate);

    constructor(Mermaid _merd,  IMerdReferral _merdReferral, uint256 _startBlock) public {
        merd = _merd;
        startBlock = _startBlock;
        merdPerBlock = INITIAL_EMISSION_RATE;
        if (block.number > startBlock) {
            uint256 currentIndex = block.number.sub(startBlock).div(
                EMISSION_REDUCTION_PERIOD_BLOCKS
            );
            lastReductionPeriodIndex = currentIndex;
        }
        merdReferral = _merdReferral;
    }

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

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

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

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

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

    // View function to see pending MERDS on frontend.
    function pendingMerd(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accMerdPerShare = pool.accMerdPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(
                pool.lastRewardBlock,
                block.number
            );
            uint256 merdReward = multiplier
                .mul(merdPerBlock)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            accMerdPerShare = accMerdPerShare.add(
                merdReward.mul(1e12).div(lpSupply)
            );
        }
        uint256 pending = user.amount.mul(accMerdPerShare).div(1e12).sub(
            user.rewardDebt
        );
        return pending.add(user.rewardLockedUp);
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 merdReward = multiplier
            .mul(merdPerBlock)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);
            //9% dev and 1% burn address
        
        merd.mint(devAddress, merdReward.mul(9).div(100));
        merd.mint(burnAddress, merdReward.div(100));
        merd.mint(address(this), merdReward);
        pool.accMerdPerShare = pool.accMerdPerShare.add(
            merdReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for MERD allocation.
    function deposit(
        uint256 _pid,
        uint256 _amount,
        address _referrer
    ) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        
        if (
            _amount > 0 &&
            address(merdReferral) != address(0) &&
            _referrer != address(0) &&
            _referrer != msg.sender
        ) {
            merdReferral.recordReferral(msg.sender, _referrer);
        }

       

        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accMerdPerShare)
                .div(1e12)
                .sub(user.rewardDebt);
            if (pending > 0) {
                uint256 refIncome = pending.mul(referralCommissionRate).div(10000);
                safeMerdTransfer(msg.sender, pending.sub(refIncome));
                payReferralCommission(msg.sender, pending);
            }
        }

        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
            
        }
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accMerdPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
        updateEmissionRate();
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accMerdPerShare).div(1e12).sub(
            user.rewardDebt
        );
        if (pending > 0) {
            uint256 refIncome = pending.mul(referralCommissionRate).div(10000);
            safeMerdTransfer(msg.sender, pending.sub(refIncome));
            payReferralCommission(msg.sender, pending);
        }
        if (_amount > 0) {

            if (pool.withdrawFeeBP > 0) {
                uint256 withdrawFee = _amount.mul(pool.withdrawFeeBP).div(10000);
                pool.lpToken.safeTransfer(feeAddress, withdrawFee);
                pool.lpToken.safeTransfer(address(msg.sender), _amount.sub(withdrawFee));
            } 
            else{
                pool.lpToken.safeTransfer(address(msg.sender), _amount);
            }
            user.amount = user.amount.sub(_amount);
            
        }
        user.rewardDebt = user.amount.mul(pool.accMerdPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
        updateEmissionRate();
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    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;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Safe merd transfer function, just in case if rounding error causes pool to not have enough MERDs.
    function safeMerdTransfer(address _to, uint256 _amount) internal {
        uint256 merdBal = merd.balanceOf(address(this));
        if (_amount > merdBal) {
            merd.transfer(_to, merdBal);
        } else {
            merd.transfer(_to, _amount);
        }
    }

    // Update dev address by the previous dev.
    function setDevAddress(address _devAddress) public {
        require(msg.sender == devAddress, "setDevAddress: FORBIDDEN");
        require(_devAddress != address(0), "setDevAddress: ZERO");
        devAddress = _devAddress;
        emit setDevAddressEvent(_devAddress);
    }

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

    // Update the merd referral contract address by the owner
    function setMerdReferral(IMerdReferral _merdReferral) public onlyOwner {
        merdReferral = _merdReferral;
        emit setReferralAddressEvent(_merdReferral);
    }

    // Update the burn wallet
    function setBurnWallet(address _burnWallet) public onlyOwner {
        burnAddress = _burnWallet;
    }

    // Update referral commission rate by the owner
    function setReferralCommissionRate(uint16 _referralCommissionRate)
        public
        onlyOwner
    {
        require(
            _referralCommissionRate <= MAXIMUM_REFERRAL_COMMISSION_RATE,
            "setReferralCommissionRate: invalid referral commission rate basis points"
        );
        referralCommissionRate = _referralCommissionRate;
        emit setReferralCommissionRateEvent(_referralCommissionRate);
    }

    // Pay referral commission to the referrer who referred this user.
    function payReferralCommission(address _user, uint256 _pending) internal {
        if (address(merdReferral) != address(0) && referralCommissionRate > 0) {
            address referrer = merdReferral.getReferrer(_user);
            uint256 commissionAmount = _pending.mul(referralCommissionRate).div(
                10000
            );

            if (referrer != address(0) && commissionAmount > 0) {
                safeMerdTransfer(referrer, commissionAmount);
                merdReferral.recordReferralCommission(
                    referrer,
                    commissionAmount
                );
                emit ReferralCommissionPaid(_user, referrer, commissionAmount);
            }
        }
    }

    // Reduce emission rate by 5% every 600 blocks ~ 30 min. This function can be called publicly.
    function updateEmissionRate() public {
        if(merdPerBlock<=0.05 ether){
            return;
        }
        if (block.number > startBlock) {
            uint256 currentIndex = block.number.sub(startBlock).div(
                EMISSION_REDUCTION_PERIOD_BLOCKS
            );
            uint256 newEmissionRate = merdPerBlock;

            if (currentIndex > lastReductionPeriodIndex) {
                for (
                    uint256 index = lastReductionPeriodIndex;
                    index < currentIndex;
                    ++index
                ) {
                    newEmissionRate = newEmissionRate
                        .mul(1e4 - EMISSION_REDUCTION_RATE_PER_PERIOD)
                        .div(1e4);
                }
                if (newEmissionRate < merdPerBlock) {
                    massUpdatePools();
                    lastReductionPeriodIndex = currentIndex;
                    uint256 previousEmissionRate = merdPerBlock;
                    merdPerBlock = newEmissionRate;
                    if(merdPerBlock <= 0.05 ether){
                        merdPerBlock = 0.05 ether;
                    }
                    emit EmissionRateUpdated(
                        msg.sender,
                        previousEmissionRate,
                        newEmissionRate
                    );
                }
            }
        }
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract Mermaid","name":"_merd","type":"address"},{"internalType":"contract IMerdReferral","name":"_merdReferral","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"EmissionRateUpdated","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":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"commissionAmount","type":"uint256"}],"name":"ReferralCommissionPaid","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"indexed":false,"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"indexed":false,"internalType":"uint16","name":"_withdrawFeeBP","type":"uint16"},{"indexed":false,"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"addEvent","type":"event"},{"anonymous":false,"inputs":[],"name":"massUpdatePoolEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newDevAddress","type":"address"}],"name":"setDevAddressEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"_withdrawFeeBP","type":"uint16"},{"indexed":false,"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"setEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddressEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IMerdReferral","name":"_newAddress","type":"address"}],"name":"setReferralAddressEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newRate","type":"uint256"}],"name":"setReferralCommissionRateEvent","type":"event"},{"inputs":[],"name":"EMISSION_REDUCTION_PERIOD_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EMISSION_REDUCTION_RATE_PER_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_EMISSION_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_REFERRAL_COMMISSION_RATE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_withdrawFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lastReductionPeriodIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merd","outputs":[{"internalType":"contract Mermaid","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merdPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merdReferral","outputs":[{"internalType":"contract IMerdReferral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingMerd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accMerdPerShare","type":"uint256"},{"internalType":"uint16","name":"withdrawFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralCommissionRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"_withdrawFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burnWallet","type":"address"}],"name":"setBurnWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devAddress","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMerdReferral","name":"_merdReferral","type":"address"}],"name":"setMerdReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_referralCommissionRate","type":"uint16"}],"name":"setReferralCommissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"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"}],"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

608060405234801561001057600080fd5b506004361061021c5760003560e01c806385277eb711610125578063b59ec7f3116100ad578063d0d41fe11161007c578063d0d41fe1146105d5578063d30ef61b146105f1578063d4adafdf1461060f578063d96384221461062d578063f2fde38b146106495761021c565b8063b59ec7f31461053b578063b7eee1f11461056b578063c60a8d6514610589578063cbd258b5146105a55761021c565b80638dbdbe6d116100f45780638dbdbe6d146104a757806391bb809c146104c357806393f1a40b146104e15780639d677ec114610513578063b02eebc61461051d5761021c565b806385277eb71461041f5780638705fcd41461043d5780638da5cb5b146104595780638dbb1e3a146104775761021c565b806351eb05a6116101a8578063630b5ba111610177578063630b5ba1146103b35780636a9a7660146103bd57806370d5ae05146103db578063715018a6146103f957806384e82a33146104035761021c565b806351eb05a6146103415780635312ea8e1461035d57806355dbc82614610379578063586fe359146103955761021c565b80633ad10ef6116101ef5780633ad10ef6146102ad57806341275358146102cb578063441a3e70146102e957806348b22bfb1461030557806348cd4cb1146103235761021c565b8063081e3eda146102215780631526fe271461023f57806317caf6f1146102735780631c4ba3ed14610291575b600080fd5b610229610665565b6040516102369190613e07565b60405180910390f35b610259600480360381019061025491906132e5565b610672565b60405161026a959493929190613b46565b60405180910390f35b61027b6106e6565b6040516102889190613e07565b60405180910390f35b6102ab60048036038101906102a691906131ef565b6106ec565b005b6102b56107ac565b6040516102c29190613a87565b60405180910390f35b6102d36107d2565b6040516102e09190613a87565b60405180910390f35b61030360048036038101906102fe91906133d6565b6107f8565b005b61030d610c42565b60405161031a9190613dd1565b60405180910390f35b61032b610c47565b6040516103389190613e07565b60405180910390f35b61035b600480360381019061035691906132e5565b610c4d565b005b610377600480360381019061037291906132e5565b61105b565b005b610393600480360381019061038e91906132bc565b611211565b005b61039d611330565b6040516103aa9190613e07565b60405180910390f35b6103bb611336565b005b6103c5611395565b6040516103d29190613e07565b60405180910390f35b6103e361139b565b6040516103f09190613a87565b60405180910390f35b6104016113c1565b005b61041d60048036038101906104189190613373565b611449565b005b610427611777565b6040516104349190613bb4565b60405180910390f35b610457600480360381019061045291906131ef565b61179d565b005b610461611918565b60405161046e9190613a87565b60405180910390f35b610491600480360381019061048c91906133d6565b611941565b60405161049e9190613e07565b60405180910390f35b6104c160048036038101906104bc9190613412565b61195e565b005b6104cb611d9e565b6040516104d89190613e07565b60405180910390f35b6104fb60048036038101906104f69190613337565b611daa565b60405161050a93929190613ed5565b60405180910390f35b61051b611de1565b005b610525611f37565b6040516105329190613b99565b60405180910390f35b61055560048036038101906105509190613337565b611f5d565b6040516105629190613e07565b60405180910390f35b6105736121d3565b6040516105809190613e07565b60405180910390f35b6105a3600480360381019061059e9190613293565b6121d9565b005b6105bf60048036038101906105ba919061326a565b6122d0565b6040516105cc9190613b2b565b60405180910390f35b6105ef60048036038101906105ea91906131ef565b6122f0565b005b6105f961246b565b6040516106069190613dd1565b60405180910390f35b61061761247f565b6040516106249190613e07565b60405180910390f35b61064760048036038101906106429190613461565b612485565b005b610663600480360381019061065e91906131ef565b6126ca565b005b6000600880549050905090565b6008818154811061068257600080fd5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040160009054906101000a900461ffff16905085565b600a5481565b6106f46127ee565b73ffffffffffffffffffffffffffffffffffffffff16610712611918565b73ffffffffffffffffffffffffffffffffffffffff1614610768576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075f90613cf1565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002600154141561083e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083590613db1565b60405180910390fd5b6002600181905550600060088381548110610882577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006009600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050828160000154101561092d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092490613d51565b60405180910390fd5b61093684610c4d565b6000610980826001015461097264e8d4a51000610964876003015487600001546127f690919063ffffffff16565b6127d890919063ffffffff16565b6127c290919063ffffffff16565b905060008111156109f25760006109c86127106109ba600c60149054906101000a900461ffff1661ffff16856127f690919063ffffffff16565b6127d890919063ffffffff16565b90506109e6336109e183856127c290919063ffffffff16565b61280c565b6109f03383612a2e565b505b6000841115610ba35760008360040160009054906101000a900461ffff1661ffff161115610b33576000610a59612710610a4b8660040160009054906101000a900461ffff1661ffff16886127f690919063ffffffff16565b6127d890919063ffffffff16565b9050610acc600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612cdc9092919063ffffffff16565b610b2d33610ae383886127c290919063ffffffff16565b8660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612cdc9092919063ffffffff16565b50610b83565b610b8233858560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612cdc9092919063ffffffff16565b5b610b9a8483600001546127c290919063ffffffff16565b82600001819055505b610bd564e8d4a51000610bc7856003015485600001546127f690919063ffffffff16565b6127d890919063ffffffff16565b8260010181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610c249190613e07565b60405180910390a3610c34611de1565b505050600180819055505050565b60c881565b600b5481565b600060088281548110610c89577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905080600201544311610caa5750611058565b60008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d099190613a87565b60206040518083038186803b158015610d2157600080fd5b505afa158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d59919061330e565b90506000811480610d6e575060008260010154145b15610d83574382600201819055505050611058565b6000610d93836002015443611941565b90506000610dd6600a54610dc88660010154610dba600654876127f690919063ffffffff16565b6127f690919063ffffffff16565b6127d890919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e606064610e526009876127f690919063ffffffff16565b6127d890919063ffffffff16565b6040518363ffffffff1660e01b8152600401610e7d929190613b02565b600060405180830381600087803b158015610e9757600080fd5b505af1158015610eab573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f246064856127d890919063ffffffff16565b6040518363ffffffff1660e01b8152600401610f41929190613b02565b600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401610fd0929190613b02565b600060405180830381600087803b158015610fea57600080fd5b505af1158015610ffe573d6000803e3d6000fd5b5050505061104261102f8461102164e8d4a51000856127f690919063ffffffff16565b6127d890919063ffffffff16565b8560030154612d6290919063ffffffff16565b8460030181905550438460020181905550505050505b50565b600260015414156110a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109890613db1565b60405180910390fd5b60026001819055506000600882815481106110e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006009600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905060008260000181905550600082600101819055506111b533828560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612cdc9092919063ffffffff16565b833373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595836040516111fc9190613e07565b60405180910390a35050506001808190555050565b6112196127ee565b73ffffffffffffffffffffffffffffffffffffffff16611237611918565b73ffffffffffffffffffffffffffffffffffffffff161461128d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128490613cf1565b60405180910390fd5b60c861ffff168161ffff1611156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d090613bf1565b60405180910390fd5b80600c60146101000a81548161ffff021916908361ffff1602179055507feeda8843fe5d830cb7193ed1005a56e941ea25c344deccb446dbeafff3d513c1816040516113259190613dec565b60405180910390a150565b60065481565b6000600880549050905060005b818110156113655761135481610c4d565b8061135e9061417e565b9050611343565b507fc3d2e2f5ce2fe9ca5e69bf001526d41adf176dce59c19d88d7113e417b61e80b60405160405180910390a150565b60075481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113c96127ee565b73ffffffffffffffffffffffffffffffffffffffff166113e7611918565b73ffffffffffffffffffffffffffffffffffffffff161461143d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143490613cf1565b60405180910390fd5b6114476000612d78565b565b6114516127ee565b73ffffffffffffffffffffffffffffffffffffffff1661146f611918565b73ffffffffffffffffffffffffffffffffffffffff16146114c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114bc90613cf1565b60405180910390fd5b8260001515600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155090613d71565b60405180910390fd5b6101908361ffff1611156115a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159990613cd1565b60405180910390fd5b81156115b1576115b0611336565b5b6000600b5443116115c457600b546115c6565b435b90506115dd86600a54612d6290919063ffffffff16565b600a8190555060086040518060a001604052808773ffffffffffffffffffffffffffffffffffffffff168152602001888152602001838152602001600081526020018661ffff16815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548161ffff021916908361ffff16021790555050506001600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fa51ffff36840142ee054e56a3ae58543d1a8feed20cad2cd866d71f945b77924868686866040516117679493929190613e22565b60405180910390a1505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461182d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182490613d91565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561189d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189490613c91565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f1ed496a484fb389ee25c741e1a12fee4912535c7481063b3556310cfe3b1a0ba8160405161190d9190613a87565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061195683836127c290919063ffffffff16565b905092915050565b600260015414156119a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199b90613db1565b60405180910390fd5b60026001819055506000600884815481106119e8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006009600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611a5585610c4d565b600084118015611ab45750600073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611aed5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b2557503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611bba57600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c7f7b6b33856040518363ffffffff1660e01b8152600401611b87929190613aa2565b600060405180830381600087803b158015611ba157600080fd5b505af1158015611bb5573d6000803e3d6000fd5b505050505b600081600001541115611c85576000611c118260010154611c0364e8d4a51000611bf5876003015487600001546127f690919063ffffffff16565b6127d890919063ffffffff16565b6127c290919063ffffffff16565b90506000811115611c83576000611c59612710611c4b600c60149054906101000a900461ffff1661ffff16856127f690919063ffffffff16565b6127d890919063ffffffff16565b9050611c7733611c7283856127c290919063ffffffff16565b61280c565b611c813383612a2e565b505b505b6000841115611ce057611cdf3330868560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612e3c909392919063ffffffff16565b5b611cf7848260000154612d6290919063ffffffff16565b8160000181905550611d3164e8d4a51000611d23846003015484600001546127f690919063ffffffff16565b6127d890919063ffffffff16565b8160010181905550843373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1586604051611d809190613e07565b60405180910390a3611d90611de1565b505060018081905550505050565b6706f05b59d3b2000081565b6009602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020154905083565b66b1a2bc2ec5000060065411611df657611f35565b600b54431115611f34576000611e2b610258611e1d600b54436127c290919063ffffffff16565b6127d890919063ffffffff16565b905060006006549050600754821115611f3157600060075490505b82811015611e9757611e84612710611e766101f4612710611e67919061401f565b856127f690919063ffffffff16565b6127d890919063ffffffff16565b915080611e909061417e565b9050611e46565b50600654811015611f3057611eaa611336565b81600781905550600060065490508160068190555066b1a2bc2ec5000060065411611ede5766b1a2bc2ec500006006819055505b3373ffffffffffffffffffffffffffffffffffffffff167feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d95118284604051611f26929190613e67565b60405180910390a2505b5b50505b5b565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060088481548110611f9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060006009600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008260030154905060008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016120669190613a87565b60206040518083038186803b15801561207e57600080fd5b505afa158015612092573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b6919061330e565b90508360020154431180156120cc575060008114155b156121675760006120e1856002015443611941565b90506000612124600a546121168860010154612108600654876127f690919063ffffffff16565b6127f690919063ffffffff16565b6127d890919063ffffffff16565b90506121626121538461214564e8d4a51000856127f690919063ffffffff16565b6127d890919063ffffffff16565b85612d6290919063ffffffff16565b935050505b60006121ad846001015461219f64e8d4a510006121918789600001546127f690919063ffffffff16565b6127d890919063ffffffff16565b6127c290919063ffffffff16565b90506121c6846002015482612d6290919063ffffffff16565b9550505050505092915050565b6101f481565b6121e16127ee565b73ffffffffffffffffffffffffffffffffffffffff166121ff611918565b73ffffffffffffffffffffffffffffffffffffffff1614612255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224c90613cf1565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc70cdedb509c2afc0492181e04d97fd791bdbf691283437ea8d01046b3427d98816040516122c59190613b99565b60405180910390a150565b600d6020528060005260406000206000915054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612380576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237790613c11565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156123f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e790613c71565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5b2768da93f62a3301a099a7c83a746c1fa2423617a6bdb9b8b4490dbaa4ce52816040516124609190613a87565b60405180910390a150565b600c60149054906101000a900461ffff1681565b61025881565b61248d6127ee565b73ffffffffffffffffffffffffffffffffffffffff166124ab611918565b73ffffffffffffffffffffffffffffffffffffffff1614612501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f890613cf1565b60405180910390fd5b6101908261ffff16111561254a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254190613d11565b60405180910390fd5b801561255957612558611336565b5b6125cb836125bd6008878154811061259a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020160010154600a546127c290919063ffffffff16565b612d6290919063ffffffff16565b600a81905550826008858154811061260c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020160010181905550816008858154811061265c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020160040160006101000a81548161ffff021916908361ffff1602179055507fd5ed35a35459534f0f560a6811cf6935ed0432249829c08ef738bf73d0fbab37848484846040516126bc9493929190613e90565b60405180910390a150505050565b6126d26127ee565b73ffffffffffffffffffffffffffffffffffffffff166126f0611918565b73ffffffffffffffffffffffffffffffffffffffff1614612746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273d90613cf1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127ad90613c51565b60405180910390fd5b6127bf81612d78565b50565b600081836127d0919061401f565b905092915050565b600081836127e69190613f94565b905092915050565b600033905090565b600081836128049190613fc5565b905092915050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016128699190613a87565b60206040518083038186803b15801561288157600080fd5b505afa158015612895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b9919061330e565b90508082111561297857600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b8152600401612920929190613b02565b602060405180830381600087803b15801561293a57600080fd5b505af115801561294e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129729190613241565b50612a29565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b81526004016129d5929190613b02565b602060405180830381600087803b1580156129ef57600080fd5b505af1158015612a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a279190613241565b505b505050565b600073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015612aa157506000600c60149054906101000a900461ffff1661ffff16115b15612cd8576000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a9fefc7846040518263ffffffff1660e01b8152600401612b039190613a87565b60206040518083038186803b158015612b1b57600080fd5b505afa158015612b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b539190613218565b90506000612b92612710612b84600c60149054906101000a900461ffff1661ffff16866127f690919063ffffffff16565b6127d890919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015612bd15750600081115b15612cd557612be0828261280c565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc1694b883836040518363ffffffff1660e01b8152600401612c3d929190613b02565b600060405180830381600087803b158015612c5757600080fd5b505af1158015612c6b573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b83604051612ccc9190613e07565b60405180910390a35b50505b5050565b612d5d8363a9059cbb60e01b8484604051602401612cfb929190613b02565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612ec5565b505050565b60008183612d709190613f3e565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612ebf846323b872dd60e01b858585604051602401612e5d93929190613acb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612ec5565b50505050565b6000612f27826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f8c9092919063ffffffff16565b9050600081511115612f875780806020019051810190612f479190613241565b612f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7d90613c31565b60405180910390fd5b5b505050565b6060612f9b8484600085612fa4565b90509392505050565b606082471015612fe9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fe090613cb1565b60405180910390fd5b612ff2856130b8565b613031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161302890613d31565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161305a9190613a70565b60006040518083038185875af1925050503d8060008114613097576040519150601f19603f3d011682016040523d82523d6000602084013e61309c565b606091505b50915091506130ac8282866130cb565b92505050949350505050565b600080823b905060008111915050919050565b606083156130db5782905061312b565b6000835111156130ee5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131229190613bcf565b60405180910390fd5b9392505050565b60008135905061314181614236565b92915050565b60008151905061315681614236565b92915050565b60008135905061316b8161424d565b92915050565b6000815190506131808161424d565b92915050565b60008135905061319581614264565b92915050565b6000813590506131aa8161427b565b92915050565b6000813590506131bf81614292565b92915050565b6000813590506131d4816142a9565b92915050565b6000815190506131e9816142a9565b92915050565b60006020828403121561320157600080fd5b600061320f84828501613132565b91505092915050565b60006020828403121561322a57600080fd5b600061323884828501613147565b91505092915050565b60006020828403121561325357600080fd5b600061326184828501613171565b91505092915050565b60006020828403121561327c57600080fd5b600061328a84828501613186565b91505092915050565b6000602082840312156132a557600080fd5b60006132b38482850161319b565b91505092915050565b6000602082840312156132ce57600080fd5b60006132dc848285016131b0565b91505092915050565b6000602082840312156132f757600080fd5b6000613305848285016131c5565b91505092915050565b60006020828403121561332057600080fd5b600061332e848285016131da565b91505092915050565b6000806040838503121561334a57600080fd5b6000613358858286016131c5565b925050602061336985828601613132565b9150509250929050565b6000806000806080858703121561338957600080fd5b6000613397878288016131c5565b94505060206133a887828801613186565b93505060406133b9878288016131b0565b92505060606133ca8782880161315c565b91505092959194509250565b600080604083850312156133e957600080fd5b60006133f7858286016131c5565b9250506020613408858286016131c5565b9150509250929050565b60008060006060848603121561342757600080fd5b6000613435868287016131c5565b9350506020613446868287016131c5565b925050604061345786828701613132565b9150509250925092565b6000806000806080858703121561347757600080fd5b6000613485878288016131c5565b9450506020613496878288016131c5565b93505060406134a7878288016131b0565b92505060606134b88782880161315c565b91505092959194509250565b6134cd81614053565b82525050565b6134dc81614065565b82525050565b60006134ed82613f0c565b6134f78185613f22565b935061350781856020860161414b565b80840191505092915050565b61351c816140cd565b82525050565b61352b816140f1565b82525050565b61353a81614115565b82525050565b600061354b82613f17565b6135558185613f2d565b935061356581856020860161414b565b61356e81614225565b840191505092915050565b6000613586604883613f2d565b91507f736574526566657272616c436f6d6d697373696f6e526174653a20696e76616c60008301527f696420726566657272616c20636f6d6d697373696f6e2072617465206261736960208301527f7320706f696e74730000000000000000000000000000000000000000000000006040830152606082019050919050565b6000613612601883613f2d565b91507f736574446576416464726573733a20464f5242494444454e00000000000000006000830152602082019050919050565b6000613652602a83613f2d565b91507f5361666542455032303a204245503230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b60006136b8602683613f2d565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061371e601383613f2d565b91507f736574446576416464726573733a205a45524f000000000000000000000000006000830152602082019050919050565b600061375e601383613f2d565b91507f736574466565416464726573733a205a45524f000000000000000000000000006000830152602082019050919050565b600061379e602683613f2d565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613804602683613f2d565b91507f6164643a20696e76616c6964207769746864726177206665652062617369732060008301527f706f696e747300000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061386a602083613f2d565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b60006138aa602683613f2d565b91507f7365743a20696e76616c6964207769746864726177206665652062617369732060008301527f706f696e747300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613910601d83613f2d565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b6000613950601283613f2d565b91507f77697468647261773a206e6f7420676f6f6400000000000000000000000000006000830152602082019050919050565b6000613990601983613f2d565b91507f6e6f6e4475706c6963617465643a206475706c696361746564000000000000006000830152602082019050919050565b60006139d0601883613f2d565b91507f736574466565416464726573733a20464f5242494444454e00000000000000006000830152602082019050919050565b6000613a10601f83613f2d565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b613a4c81614095565b82525050565b613a5b81614139565b82525050565b613a6a816140c3565b82525050565b6000613a7c82846134e2565b915081905092915050565b6000602082019050613a9c60008301846134c4565b92915050565b6000604082019050613ab760008301856134c4565b613ac460208301846134c4565b9392505050565b6000606082019050613ae060008301866134c4565b613aed60208301856134c4565b613afa6040830184613a61565b949350505050565b6000604082019050613b1760008301856134c4565b613b246020830184613a61565b9392505050565b6000602082019050613b4060008301846134d3565b92915050565b600060a082019050613b5b6000830188613513565b613b686020830187613a61565b613b756040830186613a61565b613b826060830185613a61565b613b8f6080830184613a43565b9695505050505050565b6000602082019050613bae6000830184613522565b92915050565b6000602082019050613bc96000830184613531565b92915050565b60006020820190508181036000830152613be98184613540565b905092915050565b60006020820190508181036000830152613c0a81613579565b9050919050565b60006020820190508181036000830152613c2a81613605565b9050919050565b60006020820190508181036000830152613c4a81613645565b9050919050565b60006020820190508181036000830152613c6a816136ab565b9050919050565b60006020820190508181036000830152613c8a81613711565b9050919050565b60006020820190508181036000830152613caa81613751565b9050919050565b60006020820190508181036000830152613cca81613791565b9050919050565b60006020820190508181036000830152613cea816137f7565b9050919050565b60006020820190508181036000830152613d0a8161385d565b9050919050565b60006020820190508181036000830152613d2a8161389d565b9050919050565b60006020820190508181036000830152613d4a81613903565b9050919050565b60006020820190508181036000830152613d6a81613943565b9050919050565b60006020820190508181036000830152613d8a81613983565b9050919050565b60006020820190508181036000830152613daa816139c3565b9050919050565b60006020820190508181036000830152613dca81613a03565b9050919050565b6000602082019050613de66000830184613a43565b92915050565b6000602082019050613e016000830184613a52565b92915050565b6000602082019050613e1c6000830184613a61565b92915050565b6000608082019050613e376000830187613a61565b613e446020830186613513565b613e516040830185613a43565b613e5e60608301846134d3565b95945050505050565b6000604082019050613e7c6000830185613a61565b613e896020830184613a61565b9392505050565b6000608082019050613ea56000830187613a61565b613eb26020830186613a61565b613ebf6040830185613a43565b613ecc60608301846134d3565b95945050505050565b6000606082019050613eea6000830186613a61565b613ef76020830185613a61565b613f046040830184613a61565b949350505050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000613f49826140c3565b9150613f54836140c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f8957613f886141c7565b5b828201905092915050565b6000613f9f826140c3565b9150613faa836140c3565b925082613fba57613fb96141f6565b5b828204905092915050565b6000613fd0826140c3565b9150613fdb836140c3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614014576140136141c7565b5b828202905092915050565b600061402a826140c3565b9150614035836140c3565b925082821015614048576140476141c7565b5b828203905092915050565b600061405e826140a3565b9050919050565b60008115159050919050565b600061407c82614053565b9050919050565b600061408e82614053565b9050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006140d8826140df565b9050919050565b60006140ea826140a3565b9050919050565b60006140fc82614103565b9050919050565b600061410e826140a3565b9050919050565b600061412082614127565b9050919050565b6000614132826140a3565b9050919050565b600061414482614095565b9050919050565b60005b8381101561416957808201518184015260208101905061414e565b83811115614178576000848401525b50505050565b6000614189826140c3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156141bc576141bb6141c7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b61423f81614053565b811461424a57600080fd5b50565b61425681614065565b811461426157600080fd5b50565b61426d81614071565b811461427857600080fd5b50565b61428481614083565b811461428f57600080fd5b50565b61429b81614095565b81146142a657600080fd5b50565b6142b2816140c3565b81146142bd57600080fd5b5056fea2646970667358221220c90df622d631bde91b8adfd460f1d1529e0ae73d07d88f4dfc4686aeebaf3a0664736f6c63430008000033

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.