false
true
0

Contract Address Details

0xAc6fBc06C8c0477ba8fc117adb52881c1Cc580dA

Contract Name
MasterChef
Creator
0x9030b8–cc3942 at 0x0bed50–c5e2dc
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
223,061 Transactions
Transfers
0 Transfers
Gas Used
0
Last Balance Update
26316415
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
false
Compiler version
v0.8.20+commit.a1b79de6




EVM Version
default




Verified at
2023-06-22T18:36:43.856901Z

Constructor Arguments

0x0000000000000000000000009f8182ad65c53fd78bd07648a1b3ddcb675c6772000000000000000000000000207337059cde9c8fd2f517831279a1acbfd11cde000000000000000000000000207337059cde9c8fd2f517831279a1acbfd11cde000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000000000001081554

Arg [0] (address) : 0x9f8182ad65c53fd78bd07648a1b3ddcb675c6772
Arg [1] (address) : 0x207337059cde9c8fd2f517831279a1acbfd11cde
Arg [2] (address) : 0x207337059cde9c8fd2f517831279a1acbfd11cde
Arg [3] (uint256) : 20000000000000000000
Arg [4] (uint256) : 17306964

              

contracts/MasterChef.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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



/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

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

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





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



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

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

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

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

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

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

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

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

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

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

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

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


// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}



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

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

    /**
    * @dev Returns the number of decimals used to get its user representation.
    */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

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

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

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

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

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

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

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

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

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

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

        _balances[sender] = _balances[sender].sub(amount, 'ERC20: transfer amount exceeds balance');
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

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

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

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

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

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



// ToniToken with Governance.
contract ToniToken is ERC20('Daytona.Finance', 'TONI') {
    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

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

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

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

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

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

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

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

}



// MasterChef is the master of ToniToken. He can make ToniToken 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 TONI is sufficiently
// distributed and the community can show to govern itself.
//

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

    // Info of each user.
    struct UserInfo {
        uint256 amount;         // How many LP tokens the user has provided.
        uint256 rewardDebt;     // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of TONIs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accToniPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accToniPerShare` (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. TONIs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that TONIs distribution occurs.
        uint256 accToniPerShare;   // Accumulated TONIs per share, times 1e12. See below.
        uint16 depositFeeBP;      // Deposit fee in basis points
    }

    // The TONI TOKEN!
    ToniToken public toni;
    // Dev address.
    address public devaddr;
    // TONI tokens created per block.
    uint256 public toniPerBlock;
    // Bonus muliplier for early toni makers.
    uint256 public constant BONUS_MULTIPLIER = 1;
    // Deposit Fee address
    address public feeAddress;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint256 => mapping (address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when TONI 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(
        ToniToken _toni,
        address _devaddr,
        address _feeAddress1,
        uint256 _toniPerBlock,
        uint256 _startBlock
    ) {
        toni = _toni;
        devaddr = _devaddr;
        feeAddress = _feeAddress1;
        toniPerBlock = _toniPerBlock;
        startBlock = _startBlock;
    }

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

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

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

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

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

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 toniReward = multiplier.mul(toniPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        toni.mint(devaddr, toniReward.div(10));
        toni.mint(address(this), toniReward);
        pool.accToniPerShare = pool.accToniPerShare.add(toniReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for TONI allocation.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accToniPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                safeToniTransfer(msg.sender, pending);
            }
        }
        if(_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            if(pool.depositFeeBP > 0){
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                
                pool.lpToken.safeTransfer(feeAddress, depositFee);

                user.amount = user.amount.add(_amount).sub(depositFee);
            }else{
                user.amount = user.amount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accToniPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Deposit LP tokens to MasterChef for TONI allocation.
    function depositReferral(uint256 _pid, uint256 _amount, address referral) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accToniPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                safeToniTransfer(msg.sender, pending);
            }
        }
        if(_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            if(pool.depositFeeBP > 0){
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                uint256 feeAddress1Share = depositFee.mul(75).div(100);
                uint256 feeAddress2Share = depositFee.sub(feeAddress1Share);

                pool.lpToken.safeTransfer(feeAddress, feeAddress1Share);
                pool.lpToken.safeTransfer(referral, feeAddress2Share);

                user.amount = user.amount.add(_amount).sub(depositFee);
            }else{
                user.amount = user.amount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accToniPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accToniPerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            safeToniTransfer(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.accToniPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _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];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

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

    // Update dev address by the previous dev.
    function dev(address _devaddr) public {
        require(msg.sender == devaddr, "dev: wut?");
        devaddr = _devaddr;
    }

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

    function updateEmissionRate(uint256 _toniPerBlock) public onlyOwner {
        massUpdatePools();
        toniPerBlock = _toniPerBlock;
    }
}

        

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":200,"enabled":false},"libraries":{}}
              

Contract ABI

[{"type":"constructor","inputs":[{"type":"address","name":"_toni","internalType":"contract ToniToken"},{"type":"address","name":"_devaddr","internalType":"address"},{"type":"address","name":"_feeAddress1","internalType":"address"},{"type":"uint256","name":"_toniPerBlock","internalType":"uint256"},{"type":"uint256","name":"_startBlock","internalType":"uint256"}]},{"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":"uint16","name":"_depositFeeBP","internalType":"uint16"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"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":"depositReferral","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"referral","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"dev","inputs":[{"type":"address","name":"_devaddr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devaddr","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeAddress","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMultiplier","inputs":[{"type":"uint256","name":"_from","internalType":"uint256"},{"type":"uint256","name":"_to","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingToni","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":"accToniPerShare","internalType":"uint256"},{"type":"uint16","name":"depositFeeBP","internalType":"uint16"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeAddress1","inputs":[{"type":"address","name":"_feeAddress1","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ToniToken"}],"name":"toni","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"toniPerBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateEmissionRate","inputs":[{"type":"uint256","name":"_toniPerBlock","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"}]},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"pid","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false}]
              

Contract Creation Code

0x60806040525f60085534801562000014575f80fd5b50604051620037e7380380620037e783398181016040528101906200003a9190620002ad565b5f6200004b620001c760201b60201c565b9050805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600180819055508460025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160048190555080600981905550505050505062000331565b5f33905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620001fd82620001d2565b9050919050565b5f6200021082620001f1565b9050919050565b620002228162000204565b81146200022d575f80fd5b50565b5f81519050620002408162000217565b92915050565b6200025181620001f1565b81146200025c575f80fd5b50565b5f815190506200026f8162000246565b92915050565b5f819050919050565b620002898162000275565b811462000294575f80fd5b50565b5f81519050620002a7816200027e565b92915050565b5f805f805f60a08688031215620002c957620002c8620001ce565b5b5f620002d88882890162000230565b9550506020620002eb888289016200025f565b9450506040620002fe888289016200025f565b9350506060620003118882890162000297565b9250506080620003248882890162000297565b9150509295509295909350565b6134a8806200033f5f395ff3fe608060405234801561000f575f80fd5b506004361061018c575f3560e01c8063715018a6116100dc5780638fb23f5e11610095578063d49e77cd1161006f578063d49e77cd14610439578063d963842214610457578063e2bbb15814610473578063f2fde38b1461048f5761018c565b80638fb23f5e146103bc57806393f1a40b146103d8578063d191dfef146104095761018c565b8063715018a61461030e57806384e82a33146103185780638aa28550146103345780638d88a90e146103525780638da5cb5b1461036e5780638dbb1e3a1461038c5761018c565b8063412753581161014957806351eb05a61161012357806351eb05a6146102ae5780635312ea8e146102ca5780635b3a48bc146102e6578063630b5ba1146103045761018c565b80634127535814610256578063441a3e701461027457806348cd4cb1146102905761018c565b8063081e3eda146101905780630ba84cd2146101ae5780631526fe27146101ca57806317caf6f1146101fe5780631f4b5c261461021c5780632f3c13cb14610238575b5f80fd5b6101986104ab565b6040516101a5919061264e565b60405180910390f35b6101c860048036038101906101c39190612695565b6104b7565b005b6101e460048036038101906101df9190612695565b61055d565b6040516101f5959493929190612756565b60405180910390f35b6102066105ca565b604051610213919061264e565b60405180910390f35b610236600480360381019061023191906127e2565b6105d0565b005b610240610958565b60405161024d9190612852565b60405180910390f35b61025e61097d565b60405161026b919061287a565b60405180910390f35b61028e60048036038101906102899190612893565b6109a2565b005b610298610bd2565b6040516102a5919061264e565b60405180910390f35b6102c860048036038101906102c39190612695565b610bd8565b005b6102e460048036038101906102df9190612695565b610ec1565b005b6102ee610ffd565b6040516102fb919061264e565b60405180910390f35b61030c611003565b005b610316611034565b005b610332600480360381019061032d919061296b565b611182565b005b61033c611395565b604051610349919061264e565b60405180910390f35b61036c600480360381019061036791906129cf565b61139a565b005b61037661146c565b604051610383919061287a565b60405180910390f35b6103a660048036038101906103a19190612893565b611493565b6040516103b3919061264e565b60405180910390f35b6103d660048036038101906103d191906129cf565b6114c2565b005b6103f260048036038101906103ed91906129fa565b611594565b604051610400929190612a38565b60405180910390f35b610423600480360381019061041e91906129fa565b6115bf565b604051610430919061264e565b60405180910390f35b6104416117d2565b60405161044e919061287a565b60405180910390f35b610471600480360381019061046c9190612a5f565b6117f7565b005b61048d60048036038101906104889190612893565b61199e565b005b6104a960048036038101906104a491906129cf565b611c96565b005b5f600680549050905090565b6104bf611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461054b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054290612b1d565b60405180910390fd5b610553611003565b8060048190555050565b6006818154811061056c575f80fd5b905f5260205f2090600502015f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015490806002015490806003015490806004015f9054906101000a900461ffff16905085565b60085481565b6105d8611e5a565b5f600684815481106105ed576105ec612b3b565b5b905f5260205f20906005020190505f60075f8681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20905061065385610bd8565b5f815f015411156106bd575f6106a6826001015461069864e8d4a5100061068a8760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f8111156106bb576106ba3382611fb2565b5b505b5f8411156108c157610714333086855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661219b909392919063ffffffff16565b5f826004015f9054906101000a900461ffff1661ffff1611156108a2575f61076e612710610760856004015f9054906101000a900461ffff1661ffff1688611ea990919063ffffffff16565b611f2090919063ffffffff16565b90505f610798606461078a604b85611ea990919063ffffffff16565b611f2090919063ffffffff16565b90505f6107ae8284611f6990919063ffffffff16565b905061081e60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683875f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b61086b8682875f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b6108938361088589875f01546122aa90919063ffffffff16565b611f6990919063ffffffff16565b845f01819055505050506108c0565b6108b884825f01546122aa90919063ffffffff16565b815f01819055505b5b6108f264e8d4a510006108e48460030154845f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8160010181905550843373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1586604051610941919061264e565b60405180910390a35050610953612307565b505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109aa611e5a565b5f600683815481106109bf576109be612b3b565b5b905f5260205f20906005020190505f60075f8581526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20905082815f01541015610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5990612bb2565b60405180910390fd5b610a6b84610bd8565b5f610ab38260010154610aa564e8d4a51000610a978760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f811115610ac857610ac73382611fb2565b5b5f841115610b3b57610ae684835f0154611f6990919063ffffffff16565b825f0181905550610b3a3385855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b5b610b6c64e8d4a51000610b5e8560030154855f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8260010181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610bbb919061264e565b60405180910390a3505050610bce612307565b5050565b60095481565b5f60068281548110610bed57610bec612b3b565b5b905f5260205f209060050201905080600201544311610c0c5750610ebe565b5f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610c68919061287a565b602060405180830381865afa158015610c83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca79190612be4565b90505f811480610cba57505f8260010154145b15610ccf574382600201819055505050610ebe565b5f610cde836002015443611493565b90505f610d20600854610d128660010154610d0460045487611ea990919063ffffffff16565b611ea990919063ffffffff16565b611f2090919063ffffffff16565b905060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1960035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d95600a85611f2090919063ffffffff16565b6040518363ffffffff1660e01b8152600401610db2929190612c0f565b5f604051808303815f87803b158015610dc9575f80fd5b505af1158015610ddb573d5f803e3d5ffd5b5050505060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401610e3b929190612c0f565b5f604051808303815f87803b158015610e52575f80fd5b505af1158015610e64573d5f803e3d5ffd5b50505050610ea8610e9584610e8764e8d4a5100085611ea990919063ffffffff16565b611f2090919063ffffffff16565b85600301546122aa90919063ffffffff16565b8460030181905550438460020181905550505050505b50565b610ec9611e5a565b5f60068281548110610ede57610edd612b3b565b5b905f5260205f20906005020190505f60075f8481526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f815f015490505f825f01819055505f8260010181905550610fa03382855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b833373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051610fe7919061264e565b60405180910390a3505050610ffa612307565b50565b60045481565b5f60068054905090505f5b818110156110305761101f81610bd8565b8061102990612c63565b905061100e565b5050565b61103c611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf90612b1d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35f805f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61118a611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120d90612b1d565b60405180910390fd5b6127108261ffff16111561125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125690612d1a565b60405180910390fd5b801561126e5761126d611003565b5b5f600954431161128057600954611282565b435b9050611299856008546122aa90919063ffffffff16565b60088190555060066040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018381526020015f81526020018561ffff16815250908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015f6101000a81548161ffff021916908361ffff16021790555050505050505050565b600181565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142090612d82565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f6114ba60016114ac8585611f6990919063ffffffff16565b611ea990919063ffffffff16565b905092915050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154890612dea565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6007602052815f5260405f20602052805f5260405f205f9150915050805f0154908060010154905082565b5f80600684815481106115d5576115d4612b3b565b5b905f5260205f20906005020190505f60075f8681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f826003015490505f835f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611696919061287a565b602060405180830381865afa1580156116b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116d59190612be4565b90508360020154431180156116ea57505f8114155b15611783575f6116fe856002015443611493565b90505f611740600854611732886001015461172460045487611ea990919063ffffffff16565b611ea990919063ffffffff16565b611f2090919063ffffffff16565b905061177e61176f8461176164e8d4a5100085611ea990919063ffffffff16565b611f2090919063ffffffff16565b856122aa90919063ffffffff16565b935050505b6117c683600101546117b864e8d4a510006117aa86885f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b94505050505092915050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117ff611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461188b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188290612b1d565b60405180910390fd5b6127108261ffff1611156118d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cb90612e78565b60405180910390fd5b80156118e3576118e2611003565b5b61192d8361191f600687815481106118fe576118fd612b3b565b5b905f5260205f20906005020160010154600854611f6990919063ffffffff16565b6122aa90919063ffffffff16565b600881905550826006858154811061194857611947612b3b565b5b905f5260205f2090600502016001018190555081600685815481106119705761196f612b3b565b5b905f5260205f2090600502016004015f6101000a81548161ffff021916908361ffff16021790555050505050565b6119a6611e5a565b5f600683815481106119bb576119ba612b3b565b5b905f5260205f20906005020190505f60075f8581526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f209050611a2184610bd8565b5f815f01541115611a8b575f611a748260010154611a6664e8d4a51000611a588760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f811115611a8957611a883382611fb2565b5b505b5f831115611c0057611ae2333085855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661219b909392919063ffffffff16565b5f826004015f9054906101000a900461ffff1661ffff161115611be1575f611b3c612710611b2e856004015f9054906101000a900461ffff1661ffff1687611ea990919063ffffffff16565b611f2090919063ffffffff16565b9050611bac60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b611bd481611bc686855f01546122aa90919063ffffffff16565b611f6990919063ffffffff16565b825f018190555050611bff565b611bf783825f01546122aa90919063ffffffff16565b815f01819055505b5b611c3164e8d4a51000611c238460030154845f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8160010181905550833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1585604051611c80919061264e565b60405180910390a35050611c92612307565b5050565b611c9e611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2190612b1d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8f90612f06565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f33905090565b600260015403611e9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9690612f6e565b60405180910390fd5b6002600181905550565b5f808303611eb9575f9050611f1a565b5f8284611ec69190612f8c565b9050828482611ed59190612ffa565b14611f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0c9061309a565b60405180910390fd5b809150505b92915050565b5f611f6183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612310565b905092915050565b5f611faa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612371565b905092915050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161200d919061287a565b602060405180830381865afa158015612028573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061204c9190612be4565b9050808211156120f85760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b81526004016120b2929190612c0f565b6020604051808303815f875af11580156120ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f291906130cc565b50612196565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401612154929190612c0f565b6020604051808303815f875af1158015612170573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061219491906130cc565b505b505050565b61221e846323b872dd60e01b8585856040516024016121bc939291906130f7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123d3565b50505050565b6122a58363a9059cbb60e01b8484604051602401612243929190612c0f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123d3565b505050565b5f8082846122b8919061312c565b9050838110156122fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f4906131a9565b60405180910390fd5b8091505092915050565b60018081905550565b5f8083118290612356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234d9190613241565b60405180910390fd5b505f83856123649190612ffa565b9050809150509392505050565b5f8383111582906123b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123af9190613241565b60405180910390fd5b505f83856123c69190613261565b9050809150509392505050565b5f612434826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124989092919063ffffffff16565b90505f81511115612493578080602001905181019061245391906130cc565b612492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248990613304565b60405180910390fd5b5b505050565b60606124a684845f856124af565b90509392505050565b6060824710156124f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124eb90613392565b60405180910390fd5b6124fd856125bf565b61253c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612533906133fa565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051612564919061345c565b5f6040518083038185875af1925050503d805f811461259e576040519150601f19603f3d011682016040523d82523d5f602084013e6125a3565b606091505b50915091506125b38282866125d0565b92505050949350505050565b5f80823b90505f8111915050919050565b606083156125e05782905061262f565b5f835111156125f25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126269190613241565b60405180910390fd5b9392505050565b5f819050919050565b61264881612636565b82525050565b5f6020820190506126615f83018461263f565b92915050565b5f80fd5b61267481612636565b811461267e575f80fd5b50565b5f8135905061268f8161266b565b92915050565b5f602082840312156126aa576126a9612667565b5b5f6126b784828501612681565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6127026126fd6126f8846126c0565b6126df565b6126c0565b9050919050565b5f612713826126e8565b9050919050565b5f61272482612709565b9050919050565b6127348161271a565b82525050565b5f61ffff82169050919050565b6127508161273a565b82525050565b5f60a0820190506127695f83018861272b565b612776602083018761263f565b612783604083018661263f565b612790606083018561263f565b61279d6080830184612747565b9695505050505050565b5f6127b1826126c0565b9050919050565b6127c1816127a7565b81146127cb575f80fd5b50565b5f813590506127dc816127b8565b92915050565b5f805f606084860312156127f9576127f8612667565b5b5f61280686828701612681565b935050602061281786828701612681565b9250506040612828868287016127ce565b9150509250925092565b5f61283c82612709565b9050919050565b61284c81612832565b82525050565b5f6020820190506128655f830184612843565b92915050565b612874816127a7565b82525050565b5f60208201905061288d5f83018461286b565b92915050565b5f80604083850312156128a9576128a8612667565b5b5f6128b685828601612681565b92505060206128c785828601612681565b9150509250929050565b5f6128db826127a7565b9050919050565b6128eb816128d1565b81146128f5575f80fd5b50565b5f81359050612906816128e2565b92915050565b6129158161273a565b811461291f575f80fd5b50565b5f813590506129308161290c565b92915050565b5f8115159050919050565b61294a81612936565b8114612954575f80fd5b50565b5f8135905061296581612941565b92915050565b5f805f806080858703121561298357612982612667565b5b5f61299087828801612681565b94505060206129a1878288016128f8565b93505060406129b287828801612922565b92505060606129c387828801612957565b91505092959194509250565b5f602082840312156129e4576129e3612667565b5b5f6129f1848285016127ce565b91505092915050565b5f8060408385031215612a1057612a0f612667565b5b5f612a1d85828601612681565b9250506020612a2e858286016127ce565b9150509250929050565b5f604082019050612a4b5f83018561263f565b612a58602083018461263f565b9392505050565b5f805f8060808587031215612a7757612a76612667565b5b5f612a8487828801612681565b9450506020612a9587828801612681565b9350506040612aa687828801612922565b9250506060612ab787828801612957565b91505092959194509250565b5f82825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612b07602083612ac3565b9150612b1282612ad3565b602082019050919050565b5f6020820190508181035f830152612b3481612afb565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f77697468647261773a206e6f7420676f6f6400000000000000000000000000005f82015250565b5f612b9c601283612ac3565b9150612ba782612b68565b602082019050919050565b5f6020820190508181035f830152612bc981612b90565b9050919050565b5f81519050612bde8161266b565b92915050565b5f60208284031215612bf957612bf8612667565b5b5f612c0684828501612bd0565b91505092915050565b5f604082019050612c225f83018561286b565b612c2f602083018461263f565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612c6d82612636565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c9f57612c9e612c36565b5b600182019050919050565b7f6164643a20696e76616c6964206465706f7369742066656520626173697320705f8201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b5f612d04602583612ac3565b9150612d0f82612caa565b604082019050919050565b5f6020820190508181035f830152612d3181612cf8565b9050919050565b7f6465763a207775743f00000000000000000000000000000000000000000000005f82015250565b5f612d6c600983612ac3565b9150612d7782612d38565b602082019050919050565b5f6020820190508181035f830152612d9981612d60565b9050919050565b7f73657446656541646472657373313a20464f5242494444454e000000000000005f82015250565b5f612dd4601983612ac3565b9150612ddf82612da0565b602082019050919050565b5f6020820190508181035f830152612e0181612dc8565b9050919050565b7f7365743a20696e76616c6964206465706f7369742066656520626173697320705f8201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b5f612e62602583612ac3565b9150612e6d82612e08565b604082019050919050565b5f6020820190508181035f830152612e8f81612e56565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612ef0602683612ac3565b9150612efb82612e96565b604082019050919050565b5f6020820190508181035f830152612f1d81612ee4565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f612f58601f83612ac3565b9150612f6382612f24565b602082019050919050565b5f6020820190508181035f830152612f8581612f4c565b9050919050565b5f612f9682612636565b9150612fa183612636565b9250828202612faf81612636565b91508282048414831517612fc657612fc5612c36565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61300482612636565b915061300f83612636565b92508261301f5761301e612fcd565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f5f8201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b5f613084602183612ac3565b915061308f8261302a565b604082019050919050565b5f6020820190508181035f8301526130b181613078565b9050919050565b5f815190506130c681612941565b92915050565b5f602082840312156130e1576130e0612667565b5b5f6130ee848285016130b8565b91505092915050565b5f60608201905061310a5f83018661286b565b613117602083018561286b565b613124604083018461263f565b949350505050565b5f61313682612636565b915061314183612636565b925082820190508082111561315957613158612c36565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f7700000000005f82015250565b5f613193601b83612ac3565b915061319e8261315f565b602082019050919050565b5f6020820190508181035f8301526131c081613187565b9050919050565b5f81519050919050565b5f5b838110156131ee5780820151818401526020810190506131d3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f613213826131c7565b61321d8185612ac3565b935061322d8185602086016131d1565b613236816131f9565b840191505092915050565b5f6020820190508181035f8301526132598184613209565b905092915050565b5f61326b82612636565b915061327683612636565b925082820390508181111561328e5761328d612c36565b5b92915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e5f8201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b5f6132ee602a83612ac3565b91506132f982613294565b604082019050919050565b5f6020820190508181035f83015261331b816132e2565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f5f8201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b5f61337c602683612ac3565b915061338782613322565b604082019050919050565b5f6020820190508181035f8301526133a981613370565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000005f82015250565b5f6133e4601d83612ac3565b91506133ef826133b0565b602082019050919050565b5f6020820190508181035f830152613411816133d8565b9050919050565b5f81519050919050565b5f81905092915050565b5f61343682613418565b6134408185613422565b93506134508185602086016131d1565b80840191505092915050565b5f613467828461342c565b91508190509291505056fea26469706673582212208a623d364138689cc6616147c4d96f545ba1dda030fee8e63e9c9dbbf178ea2a64736f6c634300081400330000000000000000000000009f8182ad65c53fd78bd07648a1b3ddcb675c6772000000000000000000000000207337059cde9c8fd2f517831279a1acbfd11cde000000000000000000000000207337059cde9c8fd2f517831279a1acbfd11cde000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000000000001081554

Deployed ByteCode

0x608060405234801561000f575f80fd5b506004361061018c575f3560e01c8063715018a6116100dc5780638fb23f5e11610095578063d49e77cd1161006f578063d49e77cd14610439578063d963842214610457578063e2bbb15814610473578063f2fde38b1461048f5761018c565b80638fb23f5e146103bc57806393f1a40b146103d8578063d191dfef146104095761018c565b8063715018a61461030e57806384e82a33146103185780638aa28550146103345780638d88a90e146103525780638da5cb5b1461036e5780638dbb1e3a1461038c5761018c565b8063412753581161014957806351eb05a61161012357806351eb05a6146102ae5780635312ea8e146102ca5780635b3a48bc146102e6578063630b5ba1146103045761018c565b80634127535814610256578063441a3e701461027457806348cd4cb1146102905761018c565b8063081e3eda146101905780630ba84cd2146101ae5780631526fe27146101ca57806317caf6f1146101fe5780631f4b5c261461021c5780632f3c13cb14610238575b5f80fd5b6101986104ab565b6040516101a5919061264e565b60405180910390f35b6101c860048036038101906101c39190612695565b6104b7565b005b6101e460048036038101906101df9190612695565b61055d565b6040516101f5959493929190612756565b60405180910390f35b6102066105ca565b604051610213919061264e565b60405180910390f35b610236600480360381019061023191906127e2565b6105d0565b005b610240610958565b60405161024d9190612852565b60405180910390f35b61025e61097d565b60405161026b919061287a565b60405180910390f35b61028e60048036038101906102899190612893565b6109a2565b005b610298610bd2565b6040516102a5919061264e565b60405180910390f35b6102c860048036038101906102c39190612695565b610bd8565b005b6102e460048036038101906102df9190612695565b610ec1565b005b6102ee610ffd565b6040516102fb919061264e565b60405180910390f35b61030c611003565b005b610316611034565b005b610332600480360381019061032d919061296b565b611182565b005b61033c611395565b604051610349919061264e565b60405180910390f35b61036c600480360381019061036791906129cf565b61139a565b005b61037661146c565b604051610383919061287a565b60405180910390f35b6103a660048036038101906103a19190612893565b611493565b6040516103b3919061264e565b60405180910390f35b6103d660048036038101906103d191906129cf565b6114c2565b005b6103f260048036038101906103ed91906129fa565b611594565b604051610400929190612a38565b60405180910390f35b610423600480360381019061041e91906129fa565b6115bf565b604051610430919061264e565b60405180910390f35b6104416117d2565b60405161044e919061287a565b60405180910390f35b610471600480360381019061046c9190612a5f565b6117f7565b005b61048d60048036038101906104889190612893565b61199e565b005b6104a960048036038101906104a491906129cf565b611c96565b005b5f600680549050905090565b6104bf611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461054b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054290612b1d565b60405180910390fd5b610553611003565b8060048190555050565b6006818154811061056c575f80fd5b905f5260205f2090600502015f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015490806002015490806003015490806004015f9054906101000a900461ffff16905085565b60085481565b6105d8611e5a565b5f600684815481106105ed576105ec612b3b565b5b905f5260205f20906005020190505f60075f8681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20905061065385610bd8565b5f815f015411156106bd575f6106a6826001015461069864e8d4a5100061068a8760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f8111156106bb576106ba3382611fb2565b5b505b5f8411156108c157610714333086855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661219b909392919063ffffffff16565b5f826004015f9054906101000a900461ffff1661ffff1611156108a2575f61076e612710610760856004015f9054906101000a900461ffff1661ffff1688611ea990919063ffffffff16565b611f2090919063ffffffff16565b90505f610798606461078a604b85611ea990919063ffffffff16565b611f2090919063ffffffff16565b90505f6107ae8284611f6990919063ffffffff16565b905061081e60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683875f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b61086b8682875f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b6108938361088589875f01546122aa90919063ffffffff16565b611f6990919063ffffffff16565b845f01819055505050506108c0565b6108b884825f01546122aa90919063ffffffff16565b815f01819055505b5b6108f264e8d4a510006108e48460030154845f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8160010181905550843373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1586604051610941919061264e565b60405180910390a35050610953612307565b505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109aa611e5a565b5f600683815481106109bf576109be612b3b565b5b905f5260205f20906005020190505f60075f8581526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20905082815f01541015610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5990612bb2565b60405180910390fd5b610a6b84610bd8565b5f610ab38260010154610aa564e8d4a51000610a978760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f811115610ac857610ac73382611fb2565b5b5f841115610b3b57610ae684835f0154611f6990919063ffffffff16565b825f0181905550610b3a3385855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b5b610b6c64e8d4a51000610b5e8560030154855f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8260010181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56886604051610bbb919061264e565b60405180910390a3505050610bce612307565b5050565b60095481565b5f60068281548110610bed57610bec612b3b565b5b905f5260205f209060050201905080600201544311610c0c5750610ebe565b5f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610c68919061287a565b602060405180830381865afa158015610c83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca79190612be4565b90505f811480610cba57505f8260010154145b15610ccf574382600201819055505050610ebe565b5f610cde836002015443611493565b90505f610d20600854610d128660010154610d0460045487611ea990919063ffffffff16565b611ea990919063ffffffff16565b611f2090919063ffffffff16565b905060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1960035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d95600a85611f2090919063ffffffff16565b6040518363ffffffff1660e01b8152600401610db2929190612c0f565b5f604051808303815f87803b158015610dc9575f80fd5b505af1158015610ddb573d5f803e3d5ffd5b5050505060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401610e3b929190612c0f565b5f604051808303815f87803b158015610e52575f80fd5b505af1158015610e64573d5f803e3d5ffd5b50505050610ea8610e9584610e8764e8d4a5100085611ea990919063ffffffff16565b611f2090919063ffffffff16565b85600301546122aa90919063ffffffff16565b8460030181905550438460020181905550505050505b50565b610ec9611e5a565b5f60068281548110610ede57610edd612b3b565b5b905f5260205f20906005020190505f60075f8481526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f815f015490505f825f01819055505f8260010181905550610fa03382855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b833373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051610fe7919061264e565b60405180910390a3505050610ffa612307565b50565b60045481565b5f60068054905090505f5b818110156110305761101f81610bd8565b8061102990612c63565b905061100e565b5050565b61103c611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf90612b1d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35f805f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61118a611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120d90612b1d565b60405180910390fd5b6127108261ffff16111561125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125690612d1a565b60405180910390fd5b801561126e5761126d611003565b5b5f600954431161128057600954611282565b435b9050611299856008546122aa90919063ffffffff16565b60088190555060066040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018381526020015f81526020018561ffff16815250908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015f6101000a81548161ffff021916908361ffff16021790555050505050505050565b600181565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142090612d82565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f6114ba60016114ac8585611f6990919063ffffffff16565b611ea990919063ffffffff16565b905092915050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154890612dea565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6007602052815f5260405f20602052805f5260405f205f9150915050805f0154908060010154905082565b5f80600684815481106115d5576115d4612b3b565b5b905f5260205f20906005020190505f60075f8681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f826003015490505f835f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611696919061287a565b602060405180830381865afa1580156116b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116d59190612be4565b90508360020154431180156116ea57505f8114155b15611783575f6116fe856002015443611493565b90505f611740600854611732886001015461172460045487611ea990919063ffffffff16565b611ea990919063ffffffff16565b611f2090919063ffffffff16565b905061177e61176f8461176164e8d4a5100085611ea990919063ffffffff16565b611f2090919063ffffffff16565b856122aa90919063ffffffff16565b935050505b6117c683600101546117b864e8d4a510006117aa86885f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b94505050505092915050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117ff611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461188b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188290612b1d565b60405180910390fd5b6127108261ffff1611156118d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cb90612e78565b60405180910390fd5b80156118e3576118e2611003565b5b61192d8361191f600687815481106118fe576118fd612b3b565b5b905f5260205f20906005020160010154600854611f6990919063ffffffff16565b6122aa90919063ffffffff16565b600881905550826006858154811061194857611947612b3b565b5b905f5260205f2090600502016001018190555081600685815481106119705761196f612b3b565b5b905f5260205f2090600502016004015f6101000a81548161ffff021916908361ffff16021790555050505050565b6119a6611e5a565b5f600683815481106119bb576119ba612b3b565b5b905f5260205f20906005020190505f60075f8581526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f209050611a2184610bd8565b5f815f01541115611a8b575f611a748260010154611a6664e8d4a51000611a588760030154875f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b611f6990919063ffffffff16565b90505f811115611a8957611a883382611fb2565b5b505b5f831115611c0057611ae2333085855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661219b909392919063ffffffff16565b5f826004015f9054906101000a900461ffff1661ffff161115611be1575f611b3c612710611b2e856004015f9054906101000a900461ffff1661ffff1687611ea990919063ffffffff16565b611f2090919063ffffffff16565b9050611bac60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682855f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122249092919063ffffffff16565b611bd481611bc686855f01546122aa90919063ffffffff16565b611f6990919063ffffffff16565b825f018190555050611bff565b611bf783825f01546122aa90919063ffffffff16565b815f01819055505b5b611c3164e8d4a51000611c238460030154845f0154611ea990919063ffffffff16565b611f2090919063ffffffff16565b8160010181905550833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1585604051611c80919061264e565b60405180910390a35050611c92612307565b5050565b611c9e611e53565b73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2190612b1d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8f90612f06565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f33905090565b600260015403611e9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9690612f6e565b60405180910390fd5b6002600181905550565b5f808303611eb9575f9050611f1a565b5f8284611ec69190612f8c565b9050828482611ed59190612ffa565b14611f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0c9061309a565b60405180910390fd5b809150505b92915050565b5f611f6183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612310565b905092915050565b5f611faa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612371565b905092915050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161200d919061287a565b602060405180830381865afa158015612028573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061204c9190612be4565b9050808211156120f85760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b81526004016120b2929190612c0f565b6020604051808303815f875af11580156120ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f291906130cc565b50612196565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401612154929190612c0f565b6020604051808303815f875af1158015612170573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061219491906130cc565b505b505050565b61221e846323b872dd60e01b8585856040516024016121bc939291906130f7565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123d3565b50505050565b6122a58363a9059cbb60e01b8484604051602401612243929190612c0f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123d3565b505050565b5f8082846122b8919061312c565b9050838110156122fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f4906131a9565b60405180910390fd5b8091505092915050565b60018081905550565b5f8083118290612356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234d9190613241565b60405180910390fd5b505f83856123649190612ffa565b9050809150509392505050565b5f8383111582906123b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123af9190613241565b60405180910390fd5b505f83856123c69190613261565b9050809150509392505050565b5f612434826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124989092919063ffffffff16565b90505f81511115612493578080602001905181019061245391906130cc565b612492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248990613304565b60405180910390fd5b5b505050565b60606124a684845f856124af565b90509392505050565b6060824710156124f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124eb90613392565b60405180910390fd5b6124fd856125bf565b61253c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612533906133fa565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051612564919061345c565b5f6040518083038185875af1925050503d805f811461259e576040519150601f19603f3d011682016040523d82523d5f602084013e6125a3565b606091505b50915091506125b38282866125d0565b92505050949350505050565b5f80823b90505f8111915050919050565b606083156125e05782905061262f565b5f835111156125f25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126269190613241565b60405180910390fd5b9392505050565b5f819050919050565b61264881612636565b82525050565b5f6020820190506126615f83018461263f565b92915050565b5f80fd5b61267481612636565b811461267e575f80fd5b50565b5f8135905061268f8161266b565b92915050565b5f602082840312156126aa576126a9612667565b5b5f6126b784828501612681565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6127026126fd6126f8846126c0565b6126df565b6126c0565b9050919050565b5f612713826126e8565b9050919050565b5f61272482612709565b9050919050565b6127348161271a565b82525050565b5f61ffff82169050919050565b6127508161273a565b82525050565b5f60a0820190506127695f83018861272b565b612776602083018761263f565b612783604083018661263f565b612790606083018561263f565b61279d6080830184612747565b9695505050505050565b5f6127b1826126c0565b9050919050565b6127c1816127a7565b81146127cb575f80fd5b50565b5f813590506127dc816127b8565b92915050565b5f805f606084860312156127f9576127f8612667565b5b5f61280686828701612681565b935050602061281786828701612681565b9250506040612828868287016127ce565b9150509250925092565b5f61283c82612709565b9050919050565b61284c81612832565b82525050565b5f6020820190506128655f830184612843565b92915050565b612874816127a7565b82525050565b5f60208201905061288d5f83018461286b565b92915050565b5f80604083850312156128a9576128a8612667565b5b5f6128b685828601612681565b92505060206128c785828601612681565b9150509250929050565b5f6128db826127a7565b9050919050565b6128eb816128d1565b81146128f5575f80fd5b50565b5f81359050612906816128e2565b92915050565b6129158161273a565b811461291f575f80fd5b50565b5f813590506129308161290c565b92915050565b5f8115159050919050565b61294a81612936565b8114612954575f80fd5b50565b5f8135905061296581612941565b92915050565b5f805f806080858703121561298357612982612667565b5b5f61299087828801612681565b94505060206129a1878288016128f8565b93505060406129b287828801612922565b92505060606129c387828801612957565b91505092959194509250565b5f602082840312156129e4576129e3612667565b5b5f6129f1848285016127ce565b91505092915050565b5f8060408385031215612a1057612a0f612667565b5b5f612a1d85828601612681565b9250506020612a2e858286016127ce565b9150509250929050565b5f604082019050612a4b5f83018561263f565b612a58602083018461263f565b9392505050565b5f805f8060808587031215612a7757612a76612667565b5b5f612a8487828801612681565b9450506020612a9587828801612681565b9350506040612aa687828801612922565b9250506060612ab787828801612957565b91505092959194509250565b5f82825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612b07602083612ac3565b9150612b1282612ad3565b602082019050919050565b5f6020820190508181035f830152612b3481612afb565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f77697468647261773a206e6f7420676f6f6400000000000000000000000000005f82015250565b5f612b9c601283612ac3565b9150612ba782612b68565b602082019050919050565b5f6020820190508181035f830152612bc981612b90565b9050919050565b5f81519050612bde8161266b565b92915050565b5f60208284031215612bf957612bf8612667565b5b5f612c0684828501612bd0565b91505092915050565b5f604082019050612c225f83018561286b565b612c2f602083018461263f565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612c6d82612636565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c9f57612c9e612c36565b5b600182019050919050565b7f6164643a20696e76616c6964206465706f7369742066656520626173697320705f8201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b5f612d04602583612ac3565b9150612d0f82612caa565b604082019050919050565b5f6020820190508181035f830152612d3181612cf8565b9050919050565b7f6465763a207775743f00000000000000000000000000000000000000000000005f82015250565b5f612d6c600983612ac3565b9150612d7782612d38565b602082019050919050565b5f6020820190508181035f830152612d9981612d60565b9050919050565b7f73657446656541646472657373313a20464f5242494444454e000000000000005f82015250565b5f612dd4601983612ac3565b9150612ddf82612da0565b602082019050919050565b5f6020820190508181035f830152612e0181612dc8565b9050919050565b7f7365743a20696e76616c6964206465706f7369742066656520626173697320705f8201527f6f696e7473000000000000000000000000000000000000000000000000000000602082015250565b5f612e62602583612ac3565b9150612e6d82612e08565b604082019050919050565b5f6020820190508181035f830152612e8f81612e56565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612ef0602683612ac3565b9150612efb82612e96565b604082019050919050565b5f6020820190508181035f830152612f1d81612ee4565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f612f58601f83612ac3565b9150612f6382612f24565b602082019050919050565b5f6020820190508181035f830152612f8581612f4c565b9050919050565b5f612f9682612636565b9150612fa183612636565b9250828202612faf81612636565b91508282048414831517612fc657612fc5612c36565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61300482612636565b915061300f83612636565b92508261301f5761301e612fcd565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f5f8201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b5f613084602183612ac3565b915061308f8261302a565b604082019050919050565b5f6020820190508181035f8301526130b181613078565b9050919050565b5f815190506130c681612941565b92915050565b5f602082840312156130e1576130e0612667565b5b5f6130ee848285016130b8565b91505092915050565b5f60608201905061310a5f83018661286b565b613117602083018561286b565b613124604083018461263f565b949350505050565b5f61313682612636565b915061314183612636565b925082820190508082111561315957613158612c36565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f7700000000005f82015250565b5f613193601b83612ac3565b915061319e8261315f565b602082019050919050565b5f6020820190508181035f8301526131c081613187565b9050919050565b5f81519050919050565b5f5b838110156131ee5780820151818401526020810190506131d3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f613213826131c7565b61321d8185612ac3565b935061322d8185602086016131d1565b613236816131f9565b840191505092915050565b5f6020820190508181035f8301526132598184613209565b905092915050565b5f61326b82612636565b915061327683612636565b925082820390508181111561328e5761328d612c36565b5b92915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e5f8201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b5f6132ee602a83612ac3565b91506132f982613294565b604082019050919050565b5f6020820190508181035f83015261331b816132e2565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f5f8201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b5f61337c602683612ac3565b915061338782613322565b604082019050919050565b5f6020820190508181035f8301526133a981613370565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000005f82015250565b5f6133e4601d83612ac3565b91506133ef826133b0565b602082019050919050565b5f6020820190508181035f830152613411816133d8565b9050919050565b5f81519050919050565b5f81905092915050565b5f61343682613418565b6134408185613422565b93506134508185602086016131d1565b80840191505092915050565b5f613467828461342c565b91508190509291505056fea26469706673582212208a623d364138689cc6616147c4d96f545ba1dda030fee8e63e9c9dbbf178ea2a64736f6c63430008140033