false
false

Contract Address Details

0x25C6d6A65C3ae5d41599Ba2211629B24604Fea4F

Contract Name
MasterChef
Creator
0xd4d730–cd9daf at 0x67c4f6–1e19a9
Balance
0 KCS
Tokens
Fetching tokens...
Transactions
359,191 Transactions
Transfers
2,410,024 Transfers
Gas Used
34,732,790,499
Last Balance Update
30762214
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
MasterChef




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
EVM Version
default




Verified at
2021-10-28T22:23:12.528063Z

Constructor Arguments

0000000000000000000000002ca48b4eea5a731c2b54e7c3944dbdb87c0cfb6f00000000000000000000000000000000000000000000000029a2241af62c00000000000000000000000000000000000000000000000000000000000000415b84

Arg [0] (address) : 0x2ca48b4eea5a731c2b54e7c3944dbdb87c0cfb6f
Arg [1] (uint256) : 3000000000000000000
Arg [2] (uint256) : 4283268

              

Contract source code

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

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



pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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



pragma solidity >=0.6.2 <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;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol



pragma solidity >=0.6.0 <0.8.0;




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

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

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

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

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

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

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

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

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



pragma solidity >=0.6.0 <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 () internal {
        _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: contracts/interfaces/IMigratorChef.sol



pragma solidity =0.6.12;


interface IMigratorChef {
    // Perform LP token migration from legacy OtherSwap to MojitoSwap.
    // Take the current LP token address and return the new LP token address.
    // Migrator should have full access to the caller's LP token.
    // Return the new LP token address.
    //
    // XXX Migrator must have allowance access to OtherSwap LP tokens.
    // MojitoSwap must mint EXACTLY the same amount of MojitoSwap LP tokens or
    // else something bad will happen. Traditional OtherSwap does not
    // do that so be careful!
    function migrate(IERC20 token) external returns (IERC20);
}

// File: contracts/interfaces/IMojitoToken.sol



pragma solidity =0.6.12;


interface IMojitoToken is IERC20 {
    /**
     * @notice Mint new tokens
     * @param dst The address of the destination account
     * @param amount The number of tokens to be minted
     */
    function mint(address dst, uint256 amount) external;
}

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



pragma solidity >=0.6.0 <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 GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

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



pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

// File: contracts/Schedule.sol



pragma solidity =0.6.12;



contract Schedule is Ownable {
    using SafeMath for uint256;

    uint256 public mintPeriodDuration = 5184000; //day 180
    uint256 public decayRateNumerator = 20;      //20%
    uint256 public decayRateDenominator = 100;   //
    uint256 public epochStartBlock = 0;          //the block number when mojito starts
    uint256 public mojitoPerBlock = 0;           //mojito tokens created per block

    event MintPeriodDurationTransferred(uint256 indexed previousMintPeriodDuration, uint256 indexed newMintPeriodDuration);
    event DecayRateNumeratorTransferred(uint256 indexed previousDecayRateNumerator, uint256 indexed newDecayRateNumerator);
    event EpochStartBlockTransferred(uint256 indexed previousEpochStartBlock, uint256 indexed newEpochStartBlock);
    event MojitoPerBlockTransferred(uint256 indexed previousMojitoPerBlock, uint256 indexed newMojitoPerBlock);

    constructor(uint256 _mojitoPerBlock) public {
        emit MojitoPerBlockTransferred(mojitoPerBlock, _mojitoPerBlock);
        mojitoPerBlock = _mojitoPerBlock;
    }

    function setMintPeriodDuration(uint256 _mintPeriodDuration) public onlyOwner {
        emit MintPeriodDurationTransferred(mintPeriodDuration, _mintPeriodDuration);
        mintPeriodDuration = _mintPeriodDuration;
    }

    function setDecayRateNumerator(uint256 _decayRateNumerator) public onlyOwner {
        require(_decayRateNumerator < decayRateDenominator, "Schedule::setDecayRateNumerator: _decayRateNumerator overflow");
        emit DecayRateNumeratorTransferred(decayRateNumerator, _decayRateNumerator);
        decayRateNumerator = _decayRateNumerator;
    }

    function setEpochStartBlock(uint256 _epochStartBlock) public onlyOwner {
        emit EpochStartBlockTransferred(epochStartBlock, _epochStartBlock);
        epochStartBlock = _epochStartBlock;
    }

    function setMojitoPerBlock(uint256 _mojitoPerBlock) public virtual onlyOwner {
        emit MojitoPerBlockTransferred(mojitoPerBlock, _mojitoPerBlock);
        mojitoPerBlock = _mojitoPerBlock;
    }

    function epoch(uint256 blockNumber) public view returns (uint256) {
        if (mintPeriodDuration == 0) {
            return 0;
        }
        if (blockNumber > epochStartBlock) {
            return (blockNumber.sub(epochStartBlock).sub(1)).div(mintPeriodDuration);
        }

        return 0;
    }

    function reward(uint256 blockNumber) public view returns (uint256) {
        uint256 currentEpoch = epoch(blockNumber);
        uint256 numerator = pow(decayRateDenominator.sub(decayRateNumerator), currentEpoch);
        uint256 denominator = pow(decayRateDenominator, currentEpoch);
        return mojitoPerBlock.mul(numerator).div(denominator);
    }

    function mintable(uint256 blockNumber) public view returns (uint256) {
        require(blockNumber <= block.number, "Schedule::mintable: blockNumber overflow");

        uint256 _mintable = 0;
        uint256 lastMintableBlock = blockNumber;
        uint256 n = epoch(lastMintableBlock);
        uint256 m = epoch(block.number);

        while (n < m) {
            n++;
            uint256 r = n.mul(mintPeriodDuration).add(epochStartBlock);
            _mintable = _mintable.add((r.sub(lastMintableBlock)).mul(reward(r)));
            lastMintableBlock = r;
        }
        _mintable = _mintable.add((block.number.sub(lastMintableBlock)).mul(reward(block.number)));

        return _mintable;
    }

    // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/
    function pow(uint256 x, uint256 n) internal pure returns (uint256) {
        uint256 result = 1;
        while (n > 0) {
            if (n % 2 != 0) {
                result = result.mul(x);
            }
            x = x.mul(x);
            n /= 2;
        }
        return result;
    }
}

// File: contracts/MasterChef.sol



pragma solidity =0.6.12;







// MasterChef is the master of Mojito. He can make Mojito 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 Mojito 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 Schedule, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

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

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;             // Address of LP token contract.
        uint256 allocPoint;         // How many allocation points assigned to this pool. MJTs to distribute per block.
        uint256 lastRewardBlock;    // Last block number that MJTs distribution occurs.
        uint256 accMojitoPerShare;  // Accumulated MJTs per share, times 1e12. See below.
    }

    // The Mojito token
    IMojitoToken public mojito;
    // Bonus muliplier for early mojito makers.
    uint256 public BONUS_MULTIPLIER = 1;
    // The migrator contract. It has a lot of power. Can only be set through governance (owner).
    IMigratorChef public migrator;

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

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        IMojitoToken _mojito,
        uint256 _mojitoPerBlock,
        uint256 _startBlock
    ) public Schedule(_mojitoPerBlock) {
        mojito = _mojito;
        startBlock = _startBlock;

        // staking pool
        poolInfo.push(PoolInfo({
        lpToken : _mojito,
        allocPoint : 1000,
        lastRewardBlock : startBlock,
        accMojitoPerShare : 0
        }));

        totalAllocPoint = 1000;

    }

    function updateMultiplier(uint256 multiplierNumber) public onlyOwner {
        BONUS_MULTIPLIER = multiplierNumber;
    }

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

    // DO NOT add the same LP token more than once
    function checkPoolDuplicate(IERC20 _lpToken) internal view {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            require(poolInfo[pid].lpToken != _lpToken, "MasterChef::add: existing pool");
        }
    }

    // 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, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
        checkPoolDuplicate(_lpToken);

        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
        lpToken : _lpToken,
        allocPoint : _allocPoint,
        lastRewardBlock : lastRewardBlock,
        accMojitoPerShare : 0
        }));
        updateStakingPool();
    }

    // Update the given pool's Mojito allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint) public onlyOwner {
        massUpdatePools();
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        uint256 prevAllocPoint = poolInfo[_pid].allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
        if (prevAllocPoint != _allocPoint) {
            updateStakingPool();
        }
    }

    function updateStakingPool() internal {
        uint256 length = poolInfo.length;
        uint256 points = 0;
        for (uint256 pid = 1; pid < length; ++pid) {
            points = points.add(poolInfo[pid].allocPoint);
        }
        if (points != 0) {
            points = points.div(3);
            totalAllocPoint = totalAllocPoint.sub(poolInfo[0].allocPoint).add(points);
            poolInfo[0].allocPoint = points;
        }
    }

    // Set the migrator contract. Can only be called by the owner.
    function setMigrator(IMigratorChef _migrator) public onlyOwner {
        migrator = _migrator;
    }

    function setMojitoPerBlock(uint256 _mojitoPerBlock) public virtual override onlyOwner {
        massUpdatePools();
        super.setMojitoPerBlock(_mojitoPerBlock);
    }

    // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
    function migrate(uint256 _pid) public {
        require(address(migrator) != address(0), "MasterChef::migrate: no migrator");
        PoolInfo storage pool = poolInfo[_pid];
        IERC20 lpToken = pool.lpToken;
        uint256 bal = lpToken.balanceOf(address(this));
        lpToken.safeApprove(address(migrator), bal);
        IERC20 newLpToken = migrator.migrate(lpToken);
        require(bal == newLpToken.balanceOf(address(this)), "MasterChef::migrate: bal bad");
        pool.lpToken = newLpToken;
    }

    // View function to see pending MJTs on frontend.
    function pendingMojito(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accMojitoPerShare = pool.accMojitoPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 blockReward = mintable(pool.lastRewardBlock);
            uint256 mojitoReward = blockReward.mul(pool.allocPoint).div(totalAllocPoint);
            accMojitoPerShare = accMojitoPerShare.add(mojitoReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accMojitoPerShare).div(1e12).sub(user.rewardDebt);
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 blockReward = mintable(pool.lastRewardBlock);
        uint256 mojitoReward = blockReward.mul(pool.allocPoint).div(totalAllocPoint);
        mojito.mint(address(this), mojitoReward);
        pool.accMojitoPerShare = pool.accMojitoPerShare.add(mojitoReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        require(_pid != 0, "MasterChef::deposit: _pid can only be farm pool");

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accMojitoPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeMojitoTransfer(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.accMojitoPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        require(_pid != 0, "MasterChef::withdraw: _pid can only be farm pool");

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

    // Stake MJT tokens to MasterChef
    function enterStaking(uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[0][msg.sender];
        updatePool(0);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accMojitoPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeMojitoTransfer(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.accMojitoPerShare).div(1e12);

        emit Deposit(msg.sender, 0, _amount);
    }

    // Withdraw MJT tokens from MasterChef.
    function leaveStaking(uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[0][msg.sender];
        require(user.amount >= _amount, "MasterChef::leaveStaking: _amount not good");
        updatePool(0);
        uint256 pending = user.amount.mul(pool.accMojitoPerShare).div(1e12).sub(user.rewardDebt);
        if (pending > 0) {
            safeMojitoTransfer(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accMojitoPerShare).div(1e12);

        emit Withdraw(msg.sender, 0, _amount);
    }

    // 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];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
    }

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

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_mojito","internalType":"contract IMojitoToken"},{"type":"uint256","name":"_mojitoPerBlock","internalType":"uint256"},{"type":"uint256","name":"_startBlock","internalType":"uint256"}]},{"type":"event","name":"DecayRateNumeratorTransferred","inputs":[{"type":"uint256","name":"previousDecayRateNumerator","internalType":"uint256","indexed":true},{"type":"uint256","name":"newDecayRateNumerator","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EpochStartBlockTransferred","inputs":[{"type":"uint256","name":"previousEpochStartBlock","internalType":"uint256","indexed":true},{"type":"uint256","name":"newEpochStartBlock","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"MintPeriodDurationTransferred","inputs":[{"type":"uint256","name":"previousMintPeriodDuration","internalType":"uint256","indexed":true},{"type":"uint256","name":"newMintPeriodDuration","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"MojitoPerBlockTransferred","inputs":[{"type":"uint256","name":"previousMojitoPerBlock","internalType":"uint256","indexed":true},{"type":"uint256","name":"newMojitoPerBlock","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BONUS_MULTIPLIER","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"decayRateDenominator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"decayRateNumerator","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enterStaking","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"epoch","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"epochStartBlock","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"leaveStaking","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrate","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMigratorChef"}],"name":"migrator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintPeriodDuration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintable","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMojitoToken"}],"name":"mojito","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mojitoPerBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingMojito","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"},{"type":"uint256","name":"accMojitoPerShare","internalType":"uint256"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reward","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDecayRateNumerator","inputs":[{"type":"uint256","name":"_decayRateNumerator","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEpochStartBlock","inputs":[{"type":"uint256","name":"_epochStartBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMigrator","inputs":[{"type":"address","name":"_migrator","internalType":"contract IMigratorChef"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMintPeriodDuration","inputs":[{"type":"uint256","name":"_mintPeriodDuration","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMojitoPerBlock","inputs":[{"type":"uint256","name":"_mojitoPerBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMultiplier","inputs":[{"type":"uint256","name":"multiplierNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

0x6080604052624f1a00600155601460025560646003556000600455600060055560016008556000600c5534801561003557600080fd5b5060405162002b2338038062002b238339818101604052606081101561005a57600080fd5b5080516020820151604090920151909190816000610076610205565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506005546040518291907f3a001379932b03e39ab44ee007da68f4e6c68330334748446fb35df170bb0ee790600090a360055560016006819055600780546001600160a01b03199081166001600160a01b03968716908117909255600d849055604080516080810182529283526103e860208401818152918401958652600060608501818152600a8054978801815590915293517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a860049096029586018054909416981697909717909155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a983015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa82015590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab9091015550600c55610209565b3390565b61290a80620002196000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80635312ea8e116101255780638f3a7a49116100ad578063ab410f421161007c578063ab410f4214610556578063c40987041461055e578063e2bbb1581461057b578063f2fde38b1461059e578063f9926412146105c45761021c565b80638f3a7a49146104cf57806393f1a40b146104d7578063a8be5d7c1461051c578063a9fb763c146105395761021c565b8063630b5ba1116100f4578063630b5ba1146104a7578063715018a6146104af5780637cd07e47146104b75780638aa28550146104bf5780638da5cb5b146104c75761021c565b80635312ea8e146104485780635487c577146104655780635ffe61461461048257806362bcdd6a1461049f5761021c565b80632519442c116101a8578063441a3e7011610177578063441a3e70146103bf578063454b0608146103e257806348cd4cb1146103ff57806351eb05a61461040757806352d9f48c146104245761021c565b80632519442c146103755780633ed55b7b1461037d57806341441d3b1461038557806342f62bc6146103a25761021c565b80631526fe27116101ef5780631526fe27146102a357806317caf6f1146102f05780631ab06ee5146102f85780631eaaa0451461031b57806323cf31181461034f5761021c565b8063081e3eda146102215780630b01497f1461023b5780630f784943146102675780631058d28114610284575b600080fd5b6102296105e1565b60408051918252519081900360200190f35b6102296004803603604081101561025157600080fd5b50803590602001356001600160a01b03166105e7565b6102296004803603602081101561027d57600080fd5b5035610750565b6102a16004803603602081101561029a57600080fd5b503561082e565b005b6102c0600480360360208110156102b957600080fd5b50356109e3565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b610229610a24565b6102a16004803603604081101561030e57600080fd5b5080359060200135610a2a565b6102a16004803603606081101561033157600080fd5b508035906001600160a01b0360208201351690604001351515610b2b565b6102a16004803603602081101561036557600080fd5b50356001600160a01b0316610cc4565b610229610d48565b610229610d4e565b6102a16004803603602081101561039b57600080fd5b5035610d54565b6102a1600480360360208110156103b857600080fd5b5035610ed0565b6102a1600480360360408110156103d557600080fd5b5080359060200135610f66565b6102a1600480360360208110156103f857600080fd5b503561113a565b6102296113b0565b6102a16004803603602081101561041d57600080fd5b50356113b6565b61042c61154e565b604080516001600160a01b039092168252519081900360200190f35b6102a16004803603602081101561045e57600080fd5b503561155d565b6102296004803603602081101561047b57600080fd5b5035611649565b6102a16004803603602081101561049857600080fd5b5035611697565b6102296116fe565b6102a1611704565b6102a1611727565b61042c6117d3565b6102296117e2565b61042c6117e8565b6102296117f7565b610503600480360360408110156104ed57600080fd5b50803590602001356001600160a01b03166117fd565b6040805192835260208301919091528051918290030190f35b6102a16004803603602081101561053257600080fd5b5035611821565b6102296004803603602081101561054f57600080fd5b5035611894565b6102296118f8565b6102a16004803603602081101561057457600080fd5b50356118fe565b6102a16004803603604081101561059157600080fd5b50803590602001356119d4565b6102a1600480360360208110156105b457600080fd5b50356001600160a01b0316611b72565b6102a1600480360360208110156105da57600080fd5b5035611c74565b600a5490565b600080600a84815481106105f757fe5b60009182526020808320878452600b825260408085206001600160a01b03898116875290845281862060049586029093016003810154815484516370a0823160e01b81523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561067557600080fd5b505afa158015610689573d6000803e3d6000fd5b505050506040513d602081101561069f57600080fd5b50516002850154909150431180156106b657508015155b156107155760006106ca8560020154610750565b905060006106f1600c546106eb886001015485611d0a90919063ffffffff16565b90611d6a565b9050610710610709846106eb8464e8d4a51000611d0a565b8590611dd1565b935050505b610743836001015461073d64e8d4a510006106eb868860000154611d0a90919063ffffffff16565b90611e2b565b9450505050505b92915050565b6000438211156107915760405162461bcd60e51b81526004018080602001828103825260288152602001806127d46028913960400191505060405180910390fd5b6000828161079e82611649565b905060006107ab43611649565b90505b8082101561080957600454600180549301926000916107d8916107d2908690611d0a565b90611dd1565b90506108006107f96107e983611894565b6107f38488611e2b565b90611d0a565b8690611dd1565b945092506107ae565b61082261070961081843611894565b6107f34387611e2b565b9450505050505b919050565b60026006541415610874576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a60008154811061088c57fe5b600091825260208083203384527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f76909152604090922080546004909202909201925083111561090c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061284b602a913960400191505060405180910390fd5b61091660006113b6565b6000610944826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015610956576109563382611e88565b83156109805781546109689085611e2b565b82558254610980906001600160a01b03163386612018565b6003830154825461099b9164e8d4a51000916106eb91611d0a565b600183015560408051858152905160009133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505060016006555050565b600a81815481106109f057fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b600c5481565b610a3261206a565b6001600160a01b0316610a436117e8565b6001600160a01b031614610a8c576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b610a94611704565b610acb816107d2600a8581548110610aa857fe5b906000526020600020906004020160010154600c54611e2b90919063ffffffff16565b600c819055506000600a8381548110610ae057fe5b906000526020600020906004020160010154905081600a8481548110610b0257fe5b906000526020600020906004020160010181905550818114610b2657610b2661206e565b505050565b610b3361206a565b6001600160a01b0316610b446117e8565b6001600160a01b031614610b8d576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b610b9682612110565b8015610ba457610ba4611704565b6000600d544311610bb757600d54610bb9565b435b600c54909150610bc99085611dd1565b600c55604080516080810182526001600160a01b03858116825260208201878152928201848152600060608401818152600a8054600181018255925293517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600490920291820180546001600160a01b031916919094161790925592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a982015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa830155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab90910155610cbe61206e565b50505050565b610ccc61206a565b6001600160a01b0316610cdd6117e8565b6001600160a01b031614610d26576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b60045481565b60026006541415610d9a576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a600081548110610db257fe5b600091825260208083203384527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7690915260408320600490920201925090610df9906113b6565b805415610e42576000610e2e826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015610e4057610e403382611e88565b505b8215610e6e578154610e5f906001600160a01b03163330866121aa565b8054610e6b9084611dd1565b81555b60038201548154610e899164e8d4a51000916106eb91611d0a565b600182015560408051848152905160009133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050600160065550565b610ed861206a565b6001600160a01b0316610ee96117e8565b6001600160a01b031614610f32576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6004546040518291907f9215e4bc65bb3bef4c30f5fb914aac965dfe9eec525c0959be32a533b1b37afa90600090a3600455565b60026006541415610fac576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b600260065581610fed5760405162461bcd60e51b81526004018080602001828103825260308152602001806127836030913960400191505060405180910390fd5b6000600a8381548110610ffc57fe5b60009182526020808320868452600b8252604080852033865290925292208054600490920290920192508311156110645760405162461bcd60e51b81526004018080602001828103825260268152602001806126fa6026913960400191505060405180910390fd5b61106d846113b6565b600061109b826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b905080156110ad576110ad3382611e88565b83156110d75781546110bf9085611e2b565b825582546110d7906001600160a01b03163386612018565b600383015482546110f29164e8d4a51000916106eb91611d0a565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350506001600655505050565b6009546001600160a01b0316611197576040805162461bcd60e51b815260206004820181905260248201527f4d6173746572436865663a3a6d6967726174653a206e6f206d69677261746f72604482015290519081900360640190fd5b6000600a82815481106111a657fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b1580156111ff57600080fd5b505afa158015611213573d6000803e3d6000fd5b505050506040513d602081101561122957600080fd5b5051600954909150611248906001600160a01b03848116911683612204565b6009546040805163ce5494bb60e01b81526001600160a01b0385811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561129a57600080fd5b505af11580156112ae573d6000803e3d6000fd5b505050506040513d60208110156112c457600080fd5b5051604080516370a0823160e01b815230600482015290519192506001600160a01b038316916370a0823191602480820192602092909190829003018186803b15801561131057600080fd5b505afa158015611324573d6000803e3d6000fd5b505050506040513d602081101561133a57600080fd5b5051821461138f576040805162461bcd60e51b815260206004820152601c60248201527f4d6173746572436865663a3a6d6967726174653a2062616c2062616400000000604482015290519081900360640190fd5b83546001600160a01b0319166001600160a01b039190911617909255505050565b600d5481565b6000600a82815481106113c557fe5b90600052602060002090600402019050806002015443116113e6575061154b565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561143057600080fd5b505afa158015611444573d6000803e3d6000fd5b505050506040513d602081101561145a57600080fd5b505190508061147057504360029091015561154b565b600061147f8360020154610750565b905060006114a0600c546106eb866001015485611d0a90919063ffffffff16565b600754604080516340c10f1960e01b81523060048201526024810184905290519293506001600160a01b03909116916340c10f199160448082019260009290919082900301818387803b1580156114f657600080fd5b505af115801561150a573d6000803e3d6000fd5b5050505061153861152d846106eb64e8d4a5100085611d0a90919063ffffffff16565b600386015490611dd1565b6003850155505043600290920191909155505b50565b6007546001600160a01b031681565b600260065414156115a3576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a82815481106115ba57fe5b60009182526020808320858452600b825260408085203380875293529093208054600490930290930180549094506115ff926001600160a01b03919091169190612018565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001918201556006555050565b60006001546000141561165e57506000610829565b60045482111561168f576116886001546106eb600161073d60045487611e2b90919063ffffffff16565b9050610829565b506000919050565b61169f61206a565b6001600160a01b03166116b06117e8565b6001600160a01b0316146116f9576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600855565b60035481565b600a5460005b818110156117235761171b816113b6565b60010161170a565b5050565b61172f61206a565b6001600160a01b03166117406117e8565b6001600160a01b031614611789576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b031681565b60085481565b6000546001600160a01b031690565b60015481565b600b6020908152600092835260408084209091529082529020805460019091015482565b61182961206a565b6001600160a01b031661183a6117e8565b6001600160a01b031614611883576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b61188b611704565b61154b81612317565b6000806118a083611649565b905060006118c46118be600254600354611e2b90919063ffffffff16565b836123ad565b905060006118d4600354846123ad565b90506118ef816106eb84600554611d0a90919063ffffffff16565b95945050505050565b60025481565b61190661206a565b6001600160a01b03166119176117e8565b6001600160a01b031614611960576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b60035481106119a05760405162461bcd60e51b815260040180806020018281038252603d815260200180612746603d913960400191505060405180910390fd5b6002546040518291907f19d581e9a84078f50c42ec7ed0491727560c65ac4005acee12802e4ed328779690600090a3600255565b60026006541415611a1a576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b600260065581611a5b5760405162461bcd60e51b815260040180806020018281038252602f81526020018061281c602f913960400191505060405180910390fd5b6000600a8381548110611a6a57fe5b60009182526020808320868452600b82526040808520338652909252922060049091029091019150611a9b846113b6565b805415611ae4576000611ad0826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015611ae257611ae23382611e88565b505b8215611b10578154611b01906001600160a01b03163330866121aa565b8054611b0d9084611dd1565b81555b60038201548154611b2b9164e8d4a51000916106eb91611d0a565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505060016006555050565b611b7a61206a565b6001600160a01b0316611b8b6117e8565b6001600160a01b031614611bd4576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6001600160a01b038116611c195760405162461bcd60e51b81526004018080602001828103825260268152602001806126d46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611c7c61206a565b6001600160a01b0316611c8d6117e8565b6001600160a01b031614611cd6576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6001546040518291907fe371fc8c6b0c4a0d57450919fe6dbb06e5094421af69d673fd7fc28f7a60d97790600090a3600155565b600082611d195750600061074a565b82820282848281611d2657fe5b0414611d635760405162461bcd60e51b81526004018080602001828103825260218152602001806127b36021913960400191505060405180910390fd5b9392505050565b6000808211611dc0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611dc957fe5b049392505050565b600082820183811015611d63576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115611e82576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ed357600080fd5b505afa158015611ee7573d6000803e3d6000fd5b505050506040513d6020811015611efd57600080fd5b5051905080821115611f91576007546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b50610b269050565b6007546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611fe757600080fd5b505af1158015611ffb573d6000803e3d6000fd5b505050506040513d602081101561201157600080fd5b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b269084906123e5565b3390565b600a54600060015b828110156120b9576120af600a828154811061208e57fe5b90600052602060002090600402016001015483611dd190919063ffffffff16565b9150600101612076565b508015611723576120cb816003611d6a565b90506120e2816107d2600a600081548110610aa857fe5b600c8190555080600a6000815481106120f757fe5b9060005260206000209060040201600101819055505050565b600a5460005b81811015610b2657826001600160a01b0316600a828154811061213557fe5b60009182526020909120600490910201546001600160a01b031614156121a2576040805162461bcd60e51b815260206004820152601e60248201527f4d6173746572436865663a3a6164643a206578697374696e6720706f6f6c0000604482015290519081900360640190fd5b600101612116565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cbe9085906123e5565b80158061228a575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561225c57600080fd5b505afa158015612270573d6000803e3d6000fd5b505050506040513d602081101561228657600080fd5b5051155b6122c55760405162461bcd60e51b815260040180806020018281038252603681526020018061289f6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610b269084906123e5565b61231f61206a565b6001600160a01b03166123306117e8565b6001600160a01b031614612379576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6005546040518291907f3a001379932b03e39ab44ee007da68f4e6c68330334748446fb35df170bb0ee790600090a3600555565b600060015b8215611d635760028306156123ce576123cb8185611d0a565b90505b6123d88480611d0a565b93506002830492506123b2565b606061243a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124969092919063ffffffff16565b805190915015610b265780806020019051602081101561245957600080fd5b5051610b265760405162461bcd60e51b815260040180806020018281038252602a815260200180612875602a913960400191505060405180910390fd5b60606124a584846000856124ad565b949350505050565b6060824710156124ee5760405162461bcd60e51b81526004018080602001828103825260268152602001806127206026913960400191505060405180910390fd5b6124f785612609565b612548576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125875780518252601f199092019160209182019101612568565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146125e9576040519150601f19603f3d011682016040523d82523d6000602084013e6125ee565b606091505b50915091506125fe82828661260f565b979650505050505050565b3b151590565b6060831561261e575081611d63565b82511561262e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612678578181015183820152602001612660565b50505050905090810190601f1680156126a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d6173746572436865663a3a77697468647261773a205f616d6f756e74206e6f7420676f6f64416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5363686564756c653a3a7365744465636179526174654e756d657261746f723a205f6465636179526174654e756d657261746f72206f766572666c6f774d6173746572436865663a3a77697468647261773a205f7069642063616e206f6e6c79206265206661726d20706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775363686564756c653a3a6d696e7461626c653a20626c6f636b4e756d626572206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d6173746572436865663a3a6465706f7369743a205f7069642063616e206f6e6c79206265206661726d20706f6f6c4d6173746572436865663a3a6c656176655374616b696e673a205f616d6f756e74206e6f7420676f6f645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212202ba071a5914a43c481b32fe30a80b50cd7b38b8dee6cbd5a3bca9c37549f8b2964736f6c634300060c00330000000000000000000000002ca48b4eea5a731c2b54e7c3944dbdb87c0cfb6f00000000000000000000000000000000000000000000000029a2241af62c00000000000000000000000000000000000000000000000000000000000000415b84

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80635312ea8e116101255780638f3a7a49116100ad578063ab410f421161007c578063ab410f4214610556578063c40987041461055e578063e2bbb1581461057b578063f2fde38b1461059e578063f9926412146105c45761021c565b80638f3a7a49146104cf57806393f1a40b146104d7578063a8be5d7c1461051c578063a9fb763c146105395761021c565b8063630b5ba1116100f4578063630b5ba1146104a7578063715018a6146104af5780637cd07e47146104b75780638aa28550146104bf5780638da5cb5b146104c75761021c565b80635312ea8e146104485780635487c577146104655780635ffe61461461048257806362bcdd6a1461049f5761021c565b80632519442c116101a8578063441a3e7011610177578063441a3e70146103bf578063454b0608146103e257806348cd4cb1146103ff57806351eb05a61461040757806352d9f48c146104245761021c565b80632519442c146103755780633ed55b7b1461037d57806341441d3b1461038557806342f62bc6146103a25761021c565b80631526fe27116101ef5780631526fe27146102a357806317caf6f1146102f05780631ab06ee5146102f85780631eaaa0451461031b57806323cf31181461034f5761021c565b8063081e3eda146102215780630b01497f1461023b5780630f784943146102675780631058d28114610284575b600080fd5b6102296105e1565b60408051918252519081900360200190f35b6102296004803603604081101561025157600080fd5b50803590602001356001600160a01b03166105e7565b6102296004803603602081101561027d57600080fd5b5035610750565b6102a16004803603602081101561029a57600080fd5b503561082e565b005b6102c0600480360360208110156102b957600080fd5b50356109e3565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b610229610a24565b6102a16004803603604081101561030e57600080fd5b5080359060200135610a2a565b6102a16004803603606081101561033157600080fd5b508035906001600160a01b0360208201351690604001351515610b2b565b6102a16004803603602081101561036557600080fd5b50356001600160a01b0316610cc4565b610229610d48565b610229610d4e565b6102a16004803603602081101561039b57600080fd5b5035610d54565b6102a1600480360360208110156103b857600080fd5b5035610ed0565b6102a1600480360360408110156103d557600080fd5b5080359060200135610f66565b6102a1600480360360208110156103f857600080fd5b503561113a565b6102296113b0565b6102a16004803603602081101561041d57600080fd5b50356113b6565b61042c61154e565b604080516001600160a01b039092168252519081900360200190f35b6102a16004803603602081101561045e57600080fd5b503561155d565b6102296004803603602081101561047b57600080fd5b5035611649565b6102a16004803603602081101561049857600080fd5b5035611697565b6102296116fe565b6102a1611704565b6102a1611727565b61042c6117d3565b6102296117e2565b61042c6117e8565b6102296117f7565b610503600480360360408110156104ed57600080fd5b50803590602001356001600160a01b03166117fd565b6040805192835260208301919091528051918290030190f35b6102a16004803603602081101561053257600080fd5b5035611821565b6102296004803603602081101561054f57600080fd5b5035611894565b6102296118f8565b6102a16004803603602081101561057457600080fd5b50356118fe565b6102a16004803603604081101561059157600080fd5b50803590602001356119d4565b6102a1600480360360208110156105b457600080fd5b50356001600160a01b0316611b72565b6102a1600480360360208110156105da57600080fd5b5035611c74565b600a5490565b600080600a84815481106105f757fe5b60009182526020808320878452600b825260408085206001600160a01b03898116875290845281862060049586029093016003810154815484516370a0823160e01b81523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561067557600080fd5b505afa158015610689573d6000803e3d6000fd5b505050506040513d602081101561069f57600080fd5b50516002850154909150431180156106b657508015155b156107155760006106ca8560020154610750565b905060006106f1600c546106eb886001015485611d0a90919063ffffffff16565b90611d6a565b9050610710610709846106eb8464e8d4a51000611d0a565b8590611dd1565b935050505b610743836001015461073d64e8d4a510006106eb868860000154611d0a90919063ffffffff16565b90611e2b565b9450505050505b92915050565b6000438211156107915760405162461bcd60e51b81526004018080602001828103825260288152602001806127d46028913960400191505060405180910390fd5b6000828161079e82611649565b905060006107ab43611649565b90505b8082101561080957600454600180549301926000916107d8916107d2908690611d0a565b90611dd1565b90506108006107f96107e983611894565b6107f38488611e2b565b90611d0a565b8690611dd1565b945092506107ae565b61082261070961081843611894565b6107f34387611e2b565b9450505050505b919050565b60026006541415610874576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a60008154811061088c57fe5b600091825260208083203384527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f76909152604090922080546004909202909201925083111561090c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061284b602a913960400191505060405180910390fd5b61091660006113b6565b6000610944826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015610956576109563382611e88565b83156109805781546109689085611e2b565b82558254610980906001600160a01b03163386612018565b6003830154825461099b9164e8d4a51000916106eb91611d0a565b600183015560408051858152905160009133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505060016006555050565b600a81815481106109f057fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b600c5481565b610a3261206a565b6001600160a01b0316610a436117e8565b6001600160a01b031614610a8c576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b610a94611704565b610acb816107d2600a8581548110610aa857fe5b906000526020600020906004020160010154600c54611e2b90919063ffffffff16565b600c819055506000600a8381548110610ae057fe5b906000526020600020906004020160010154905081600a8481548110610b0257fe5b906000526020600020906004020160010181905550818114610b2657610b2661206e565b505050565b610b3361206a565b6001600160a01b0316610b446117e8565b6001600160a01b031614610b8d576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b610b9682612110565b8015610ba457610ba4611704565b6000600d544311610bb757600d54610bb9565b435b600c54909150610bc99085611dd1565b600c55604080516080810182526001600160a01b03858116825260208201878152928201848152600060608401818152600a8054600181018255925293517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600490920291820180546001600160a01b031916919094161790925592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a982015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa830155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab90910155610cbe61206e565b50505050565b610ccc61206a565b6001600160a01b0316610cdd6117e8565b6001600160a01b031614610d26576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b60045481565b60026006541415610d9a576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a600081548110610db257fe5b600091825260208083203384527fdf7de25b7f1fd6d0b5205f0e18f1f35bd7b8d84cce336588d184533ce43a6f7690915260408320600490920201925090610df9906113b6565b805415610e42576000610e2e826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015610e4057610e403382611e88565b505b8215610e6e578154610e5f906001600160a01b03163330866121aa565b8054610e6b9084611dd1565b81555b60038201548154610e899164e8d4a51000916106eb91611d0a565b600182015560408051848152905160009133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050600160065550565b610ed861206a565b6001600160a01b0316610ee96117e8565b6001600160a01b031614610f32576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6004546040518291907f9215e4bc65bb3bef4c30f5fb914aac965dfe9eec525c0959be32a533b1b37afa90600090a3600455565b60026006541415610fac576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b600260065581610fed5760405162461bcd60e51b81526004018080602001828103825260308152602001806127836030913960400191505060405180910390fd5b6000600a8381548110610ffc57fe5b60009182526020808320868452600b8252604080852033865290925292208054600490920290920192508311156110645760405162461bcd60e51b81526004018080602001828103825260268152602001806126fa6026913960400191505060405180910390fd5b61106d846113b6565b600061109b826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b905080156110ad576110ad3382611e88565b83156110d75781546110bf9085611e2b565b825582546110d7906001600160a01b03163386612018565b600383015482546110f29164e8d4a51000916106eb91611d0a565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350506001600655505050565b6009546001600160a01b0316611197576040805162461bcd60e51b815260206004820181905260248201527f4d6173746572436865663a3a6d6967726174653a206e6f206d69677261746f72604482015290519081900360640190fd5b6000600a82815481106111a657fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b1580156111ff57600080fd5b505afa158015611213573d6000803e3d6000fd5b505050506040513d602081101561122957600080fd5b5051600954909150611248906001600160a01b03848116911683612204565b6009546040805163ce5494bb60e01b81526001600160a01b0385811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561129a57600080fd5b505af11580156112ae573d6000803e3d6000fd5b505050506040513d60208110156112c457600080fd5b5051604080516370a0823160e01b815230600482015290519192506001600160a01b038316916370a0823191602480820192602092909190829003018186803b15801561131057600080fd5b505afa158015611324573d6000803e3d6000fd5b505050506040513d602081101561133a57600080fd5b5051821461138f576040805162461bcd60e51b815260206004820152601c60248201527f4d6173746572436865663a3a6d6967726174653a2062616c2062616400000000604482015290519081900360640190fd5b83546001600160a01b0319166001600160a01b039190911617909255505050565b600d5481565b6000600a82815481106113c557fe5b90600052602060002090600402019050806002015443116113e6575061154b565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561143057600080fd5b505afa158015611444573d6000803e3d6000fd5b505050506040513d602081101561145a57600080fd5b505190508061147057504360029091015561154b565b600061147f8360020154610750565b905060006114a0600c546106eb866001015485611d0a90919063ffffffff16565b600754604080516340c10f1960e01b81523060048201526024810184905290519293506001600160a01b03909116916340c10f199160448082019260009290919082900301818387803b1580156114f657600080fd5b505af115801561150a573d6000803e3d6000fd5b5050505061153861152d846106eb64e8d4a5100085611d0a90919063ffffffff16565b600386015490611dd1565b6003850155505043600290920191909155505b50565b6007546001600160a01b031681565b600260065414156115a3576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b60026006819055506000600a82815481106115ba57fe5b60009182526020808320858452600b825260408085203380875293529093208054600490930290930180549094506115ff926001600160a01b03919091169190612018565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001918201556006555050565b60006001546000141561165e57506000610829565b60045482111561168f576116886001546106eb600161073d60045487611e2b90919063ffffffff16565b9050610829565b506000919050565b61169f61206a565b6001600160a01b03166116b06117e8565b6001600160a01b0316146116f9576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600855565b60035481565b600a5460005b818110156117235761171b816113b6565b60010161170a565b5050565b61172f61206a565b6001600160a01b03166117406117e8565b6001600160a01b031614611789576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b031681565b60085481565b6000546001600160a01b031690565b60015481565b600b6020908152600092835260408084209091529082529020805460019091015482565b61182961206a565b6001600160a01b031661183a6117e8565b6001600160a01b031614611883576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b61188b611704565b61154b81612317565b6000806118a083611649565b905060006118c46118be600254600354611e2b90919063ffffffff16565b836123ad565b905060006118d4600354846123ad565b90506118ef816106eb84600554611d0a90919063ffffffff16565b95945050505050565b60025481565b61190661206a565b6001600160a01b03166119176117e8565b6001600160a01b031614611960576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b60035481106119a05760405162461bcd60e51b815260040180806020018281038252603d815260200180612746603d913960400191505060405180910390fd5b6002546040518291907f19d581e9a84078f50c42ec7ed0491727560c65ac4005acee12802e4ed328779690600090a3600255565b60026006541415611a1a576040805162461bcd60e51b815260206004820152601f60248201526000805160206126b4833981519152604482015290519081900360640190fd5b600260065581611a5b5760405162461bcd60e51b815260040180806020018281038252602f81526020018061281c602f913960400191505060405180910390fd5b6000600a8381548110611a6a57fe5b60009182526020808320868452600b82526040808520338652909252922060049091029091019150611a9b846113b6565b805415611ae4576000611ad0826001015461073d64e8d4a510006106eb87600301548760000154611d0a90919063ffffffff16565b90508015611ae257611ae23382611e88565b505b8215611b10578154611b01906001600160a01b03163330866121aa565b8054611b0d9084611dd1565b81555b60038201548154611b2b9164e8d4a51000916106eb91611d0a565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505060016006555050565b611b7a61206a565b6001600160a01b0316611b8b6117e8565b6001600160a01b031614611bd4576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6001600160a01b038116611c195760405162461bcd60e51b81526004018080602001828103825260268152602001806126d46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611c7c61206a565b6001600160a01b0316611c8d6117e8565b6001600160a01b031614611cd6576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6001546040518291907fe371fc8c6b0c4a0d57450919fe6dbb06e5094421af69d673fd7fc28f7a60d97790600090a3600155565b600082611d195750600061074a565b82820282848281611d2657fe5b0414611d635760405162461bcd60e51b81526004018080602001828103825260218152602001806127b36021913960400191505060405180910390fd5b9392505050565b6000808211611dc0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611dc957fe5b049392505050565b600082820183811015611d63576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115611e82576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ed357600080fd5b505afa158015611ee7573d6000803e3d6000fd5b505050506040513d6020811015611efd57600080fd5b5051905080821115611f91576007546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611f5f57600080fd5b505af1158015611f73573d6000803e3d6000fd5b505050506040513d6020811015611f8957600080fd5b50610b269050565b6007546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611fe757600080fd5b505af1158015611ffb573d6000803e3d6000fd5b505050506040513d602081101561201157600080fd5b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b269084906123e5565b3390565b600a54600060015b828110156120b9576120af600a828154811061208e57fe5b90600052602060002090600402016001015483611dd190919063ffffffff16565b9150600101612076565b508015611723576120cb816003611d6a565b90506120e2816107d2600a600081548110610aa857fe5b600c8190555080600a6000815481106120f757fe5b9060005260206000209060040201600101819055505050565b600a5460005b81811015610b2657826001600160a01b0316600a828154811061213557fe5b60009182526020909120600490910201546001600160a01b031614156121a2576040805162461bcd60e51b815260206004820152601e60248201527f4d6173746572436865663a3a6164643a206578697374696e6720706f6f6c0000604482015290519081900360640190fd5b600101612116565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cbe9085906123e5565b80158061228a575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561225c57600080fd5b505afa158015612270573d6000803e3d6000fd5b505050506040513d602081101561228657600080fd5b5051155b6122c55760405162461bcd60e51b815260040180806020018281038252603681526020018061289f6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610b269084906123e5565b61231f61206a565b6001600160a01b03166123306117e8565b6001600160a01b031614612379576040805162461bcd60e51b815260206004820181905260248201526000805160206127fc833981519152604482015290519081900360640190fd5b6005546040518291907f3a001379932b03e39ab44ee007da68f4e6c68330334748446fb35df170bb0ee790600090a3600555565b600060015b8215611d635760028306156123ce576123cb8185611d0a565b90505b6123d88480611d0a565b93506002830492506123b2565b606061243a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124969092919063ffffffff16565b805190915015610b265780806020019051602081101561245957600080fd5b5051610b265760405162461bcd60e51b815260040180806020018281038252602a815260200180612875602a913960400191505060405180910390fd5b60606124a584846000856124ad565b949350505050565b6060824710156124ee5760405162461bcd60e51b81526004018080602001828103825260268152602001806127206026913960400191505060405180910390fd5b6124f785612609565b612548576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125875780518252601f199092019160209182019101612568565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146125e9576040519150601f19603f3d011682016040523d82523d6000602084013e6125ee565b606091505b50915091506125fe82828661260f565b979650505050505050565b3b151590565b6060831561261e575081611d63565b82511561262e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612678578181015183820152602001612660565b50505050905090810190601f1680156126a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d6173746572436865663a3a77697468647261773a205f616d6f756e74206e6f7420676f6f64416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5363686564756c653a3a7365744465636179526174654e756d657261746f723a205f6465636179526174654e756d657261746f72206f766572666c6f774d6173746572436865663a3a77697468647261773a205f7069642063616e206f6e6c79206265206661726d20706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775363686564756c653a3a6d696e7461626c653a20626c6f636b4e756d626572206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d6173746572436865663a3a6465706f7369743a205f7069642063616e206f6e6c79206265206661726d20706f6f6c4d6173746572436865663a3a6c656176655374616b696e673a205f616d6f756e74206e6f7420676f6f645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212202ba071a5914a43c481b32fe30a80b50cd7b38b8dee6cbd5a3bca9c37549f8b2964736f6c634300060c0033