false
true
0

Contract Address Details

0x0048EACeA84FeE06AF547c5D9665A2D4545C5D5f

Contract Name
EmitFarmStrategy
Creator
0xd00d56–87ac3c at 0xd468ef–5c2e5f
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
167 Transactions
Transfers
0 Transfers
Gas Used
0
Last Balance Update
26330813
Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB 0x7c0439374f192140e1543aebcc78f4af42b8beae.
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
Verify & Publish
Contract name:
EmitFarmStrategy




Optimization enabled
true
Compiler version
v0.8.19+commit.7dd6d404




Optimization runs
1000
Verified at
2025-08-18T12:44:03.880851Z

Contract source code

// Sources flattened with hardhat v2.16.1 https://hardhat.org

// File @openzeppelin/contracts/utils/Context.sol@v4.9.2

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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


// File @openzeppelin/contracts/access/Ownable.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}


// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

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

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


// File @openzeppelin/contracts/interfaces/IERC20.sol@v4.9.2


// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;


// File @openzeppelin/contracts/security/Pausable.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}


// File @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol@v4.9.2


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

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


// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;



/**
 * @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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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 {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + 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 {IERC20-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 virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This 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 virtual {
        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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}


// File @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}


// File @openzeppelin/contracts/utils/Address.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}


// File @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol@v4.9.2


// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;



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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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'
        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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}


// File @openzeppelin/contracts/security/ReentrancyGuard.sol@v4.9.2


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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and 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;
    }
}


// File contracts/interfaces/IEMISSIONS.sol


pragma solidity 0.8.19;

interface IEMISSIONS {
    function deposit(uint256 pid, uint256 amount, address referrer) external;
    function depositOnBehalfOf(uint256 pid, uint256 amount, address referrer, address staker) external;
    function withdraw(uint256 pid, uint256 amount) external;
    function emergencyWithdraw(uint256 pid) external;
    function pendingShare(uint256 pid, address user) external view returns (uint256);
    function poolLength() external view returns (uint256);
    function getUserView(uint256 pid, address account) external view returns (
        UserView memory
    );
    function getUserViews(address account) external view returns (UserView[] memory);
    function getPoolView(uint256 pid) external view returns (PoolView memory);
    function getAllPoolViews() external view returns (PoolView[] memory);
    
    // Structs needed for the view functions
    struct UserView {
        uint256 pid;
        uint256 stakedAmount;
        uint256 unclaimedRewards;
        uint256 lpBalance;
        uint256 allowance;
    }
    
    struct PoolView {
        uint256 pid;
        address token;
        uint256 allocPoint;
        uint256 lastRewardTime;
        uint16 depositFeeBP;
        uint16 withdrawFeeBP;
        uint256 accTokensPerShare;
        bool isStarted;
        uint8 externalProtocol;
        address externalFarm;
        uint256 lpBalance;
        uint256 rewardsPerSecond;
    }
}


// File contracts/interfaces/IPair.sol



pragma solidity ^0.8.19;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}


// File contracts/interfaces/IProtocolAddresses.sol



pragma solidity ^0.8.19;

interface IProtocolAddresses {
    function HarvestProcessor() external returns (address);
    function Distributor() external view returns (address);
}


// File contracts/interfaces/IRouter.sol



pragma solidity ^0.8.19;

interface IRouter {
    function addLiquidity(address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountToken, uint amountETH);
    function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountETH);
    function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts);
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] memory path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] memory path) external view returns (uint[] memory amounts);
}


// File contracts/interfaces/IStrategyVariables.sol



pragma solidity ^0.8.19;

interface IStrategyVariables {
    function harvestFeeBasisPoints() external returns (uint256);
    function callFeeBasisPoints() external view returns (uint256);
}


// File contracts/vaults/strategies/EmitFarmStrategy.sol



pragma solidity ^0.8.19;











/**
 * @title MasterChef strategy for EMIT.farm
 * @dev EMIT rewards
 */
contract EmitFarmStrategy is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    
    address public constant WPLS = address(0xA1077a294dDE1B09bB078844df40758a5D0f9a27);
    address public constant EMIT = address(0x32fB5663619A657839A80133994E45c5e5cDf427);
    address public refer = address(0x686E454480B6c817F011C7FDb1fe62aEEa866E64);

    address public PulseXV2Router = address(0x165C3410fC91EF562C50559f7d2289fEbed552d9);

    address public Router;
    address public MasterChef;
    address public RewardToken;
    address public Vault;
    address public LPtoken;
    address public Token0;
    address public Token1;
    uint8 public poolID;

    address public ProtocolAddresses;
    address public StrategyVariables;

    address[] public RewardTokenToWPLSpath;
    address[] public WPLStoToken0path;
    address[] public WPLStoToken1path;

    uint256 public constant BASIS_POINT_DIVISOR = 10000;

    event ProtocolAddressesUpdated(address ProtocolAddresses);
    event Deposit(uint256 amount);
    event Withdraw(uint256 amount);
    event HarvestRun(address indexed caller, uint256 amount);
    event HarvestFeeProcessed(uint256 amount);
    event CallFeeProcessed(uint256 amount);

    uint256 MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    constructor(
        address _LPtoken,
        uint8 _poolID,
        address _Vault,
        address _StrategyVariables,
        address _MasterChef
    ) {
        LPtoken = _LPtoken;
        Token0 = IPair(LPtoken).token0();
        Token1 = IPair(LPtoken).token1();
        poolID = _poolID;
        Vault = _Vault;
        StrategyVariables = _StrategyVariables;
        MasterChef = _MasterChef;

        RewardToken = EMIT;

        RewardTokenToWPLSpath = [RewardToken, WPLS];
        WPLStoToken0path = [WPLS, Token0];
        WPLStoToken1path = [WPLS, Token1];


        IERC20(WPLS).safeApprove(PulseXV2Router, 0);
        IERC20(WPLS).safeApprove(PulseXV2Router, MAX_INT);
        IERC20(RewardToken).safeApprove(PulseXV2Router, 0);
        IERC20(RewardToken).safeApprove(PulseXV2Router, MAX_INT);
        IERC20(LPtoken).safeApprove(PulseXV2Router, 0);
        IERC20(LPtoken).safeApprove(PulseXV2Router, MAX_INT);
        IERC20(Token0).safeApprove(PulseXV2Router, 0);
        IERC20(Token0).safeApprove(PulseXV2Router, MAX_INT);
        IERC20(Token1).safeApprove(PulseXV2Router, 0);
        IERC20(Token1).safeApprove(PulseXV2Router, MAX_INT);
    }

    receive() external payable {}

    modifier onlyVault() {
        require(msg.sender == Vault, "EMITfarmStrategy: Caller is not the Vault");
        _;
    }

    function setProtocolAddresses(address _ProtocolAddresses) external onlyOwner {
        ProtocolAddresses = _ProtocolAddresses;
        emit ProtocolAddressesUpdated(ProtocolAddresses);
    }

    function balanceLP() public view returns (uint256) {
        return IERC20(LPtoken).balanceOf(address(this));
    }

    function masterChefBalanceLP() public view returns (uint256 amount) {
        IEMISSIONS.UserView memory userView = IEMISSIONS(MasterChef).getUserView(poolID, address(this));
        return userView.stakedAmount;
    }

    function balanceLPinStrategy() external view returns (uint256) {
        return balanceLP() + masterChefBalanceLP();
    }

    function balanceRewardToken() public view returns (uint256) {
        return IERC20(RewardToken).balanceOf(address(this));
    }

    // Withdraws from MasterChef claim pending rewards, so better to show pending + balance
    function getRewardsEarned() external view returns (uint256) {
        uint256 pendingRewards = IEMISSIONS(MasterChef).pendingShare(poolID, address(this));
        return pendingRewards + balanceRewardToken();
    }

    /**
     * @dev Deposits will be paused when strategy has been decommissioned
     */
    function deposit() public whenNotPaused {
        uint256 balance = balanceLP();
        require(balance > 0, "EMITfarmStrategy: Deposit called with 0 balance");
        IERC20(LPtoken).safeIncreaseAllowance(MasterChef, balance);
        IEMISSIONS(MasterChef).deposit(poolID, balance, refer);
        emit Deposit(balance);
    }

    /**
     * @dev Uses available balance in strategy, withdrawing from Masterchef to make up difference
     */
    function withdraw(uint256 amount) external onlyVault {
        uint256 balance = balanceLP();

        if (balance < amount) {
            IEMISSIONS(MasterChef).withdraw(poolID, amount - balance);
            balance = balanceLP();
        }

        if (balance > amount) {
            balance = amount;
        }

        IERC20(LPtoken).safeTransfer(Vault, balance);
        emit Withdraw(amount);
    }

    function harvest() external whenNotPaused nonReentrant {
        require(!Address.isContract(msg.sender), "EMITfarmStrategy: Caller is not an EOA");
        IEMISSIONS(MasterChef).deposit(poolID, 0, refer);
        uint256 harvestAmount = balanceRewardToken();
        _processFees(harvestAmount);
        _addLiquidity();
        deposit();
        emit HarvestRun(msg.sender, harvestAmount);
    }

    /**
     * @dev Harvest fee and Call fee processed together
     */
    function _processFees(uint256 harvestAmount) internal {
        uint256 harvestFeeBasisPoints = IStrategyVariables(StrategyVariables).harvestFeeBasisPoints();
        uint256 callFeeBasisPoints = IStrategyVariables(StrategyVariables).callFeeBasisPoints();
        uint256 totalFeeBasisPoints = harvestFeeBasisPoints + callFeeBasisPoints;

        uint256 harvestAmountFee = harvestAmount * totalFeeBasisPoints / BASIS_POINT_DIVISOR;

        IRouter(PulseXV2Router).swapExactTokensForTokensSupportingFeeOnTransferTokens(harvestAmountFee, 0, RewardTokenToWPLSpath, address(this), block.timestamp + 120);

        uint256 balanceWPLS = IERC20(WPLS).balanceOf(address(this));

        uint256 WPLSforProcessor = balanceWPLS * harvestFeeBasisPoints / totalFeeBasisPoints;
        uint256 WPLSforCaller = balanceWPLS - (WPLSforProcessor);

        address HarvestProcessor = IProtocolAddresses(ProtocolAddresses).HarvestProcessor();
        IERC20(WPLS).safeTransfer(HarvestProcessor, WPLSforProcessor);
        emit HarvestFeeProcessed(WPLSforProcessor);

        IERC20(WPLS).safeTransfer(msg.sender, WPLSforCaller);
        emit CallFeeProcessed(WPLSforCaller);
    }

    function _addLiquidity() internal {
       uint256 balanceOfRewardToken = balanceRewardToken();

        IRouter(PulseXV2Router).swapExactTokensForTokensSupportingFeeOnTransferTokens(balanceOfRewardToken, 0, RewardTokenToWPLSpath, address(this), block.timestamp + 120);

        uint256 balanceWPLS = IERC20(WPLS).balanceOf(address(this));

        uint256 halfWPLS = balanceWPLS / 2;

        if (Token0 != WPLS) {
            IRouter(PulseXV2Router).swapExactTokensForTokensSupportingFeeOnTransferTokens(halfWPLS, 0, WPLStoToken0path, address(this), block.timestamp + 120);
        }

        if (Token1 != WPLS) {
            IRouter(PulseXV2Router).swapExactTokensForTokensSupportingFeeOnTransferTokens(halfWPLS, 0, WPLStoToken1path, address(this), block.timestamp + 120);
        }
    
        uint256 balanceToken0 = IERC20(Token0).balanceOf(address(this));
        uint256 balanceToken1 = IERC20(Token1).balanceOf(address(this));

        IRouter(PulseXV2Router).addLiquidity(Token0, Token1, balanceToken0, balanceToken1, 0, 0, address(this), block.timestamp + 120);
    }

    /**
     * @dev This will be called once when the Vault/Strategy is being decommissioned
     * Remaining rewards will be sent to the HarvestProcessor
     * All LP tokens will be sent back to the vault and can be withdrawn from there
     * Deposits will be paused
     *
     * WARNING: The strategy will not be able to restart
     */
    function decommissionStrategy() external onlyVault {
        IEMISSIONS(MasterChef).deposit(poolID, 0, refer);
        uint256 receivedRewardToken = balanceRewardToken();
        if (receivedRewardToken > 0) {
            _processFees(receivedRewardToken);
        }

        IEMISSIONS(MasterChef).emergencyWithdraw(poolID);

        uint256 balance = balanceLP();
        IERC20(LPtoken).safeTransfer(Vault, balance);

        _pause();
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_LPtoken","internalType":"address"},{"type":"uint8","name":"_poolID","internalType":"uint8"},{"type":"address","name":"_Vault","internalType":"address"},{"type":"address","name":"_StrategyVariables","internalType":"address"},{"type":"address","name":"_MasterChef","internalType":"address"}]},{"type":"event","name":"CallFeeProcessed","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"HarvestFeeProcessed","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"HarvestRun","inputs":[{"type":"address","name":"caller","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"ProtocolAddressesUpdated","inputs":[{"type":"address","name":"ProtocolAddresses","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BASIS_POINT_DIVISOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"EMIT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"LPtoken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"MasterChef","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ProtocolAddresses","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"PulseXV2Router","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"RewardToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"RewardTokenToWPLSpath","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Router","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"StrategyVariables","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Token0","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Token1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Vault","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WPLS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WPLStoToken0path","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WPLStoToken1path","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceLP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceLPinStrategy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceRewardToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"decommissionStrategy","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRewardsEarned","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"masterChefBalanceLP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"poolID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"refer","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setProtocolAddresses","inputs":[{"type":"address","name":"_ProtocolAddresses","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x6080604052600280546001600160a01b031990811673686e454480b6c817f011c7fdb1fe62aeea866e64179091556003805490911673165c3410fc91ef562c50559f7d2289febed552d91790556000196010553480156200005f57600080fd5b5060405162002a4538038062002a458339810160408190526200008291620008f5565b6200008d336200043c565b6000805460ff60a01b1916905560018055600880546001600160a01b0319166001600160a01b03871690811790915560408051630dfe168160e01b81529051630dfe1681916004808201926020929091908290030181865afa158015620000f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011e91906200096c565b600980546001600160a01b0319166001600160a01b039283161790556008546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa1580156200017d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a391906200096c565b600a80546001600160a01b039283166001600160a81b031990911617600160a01b60ff881602179055600780546001600160a01b031990811686841617909155600c8054821685841617905560058054821692841692909217909155600680547332fb5663619a657839a80133994e45c5e5cdf4279216821790556040805180820190915290815260008051602062002a2583398151915260208201526200025090600d90600262000857565b506040805180820190915260008051602062002a2583398151915281526009546001600160a01b031660208201526200028e90600e90600262000857565b506040805180820190915260008051602062002a258339815191528152600a546001600160a01b03166020820152620002cc90600f90600262000857565b50600354620002f79060008051602062002a25833981519152906001600160a01b031660006200048c565b600354601054620003259160008051602062002a25833981519152916001600160a01b03909116906200048c565b60035460065462000345916001600160a01b03918216911660006200048c565b60035460105460065462000368926001600160a01b03918216929116906200048c565b60035460085462000388916001600160a01b03918216911660006200048c565b600354601054600854620003ab926001600160a01b03918216929116906200048c565b600354600954620003cb916001600160a01b03918216911660006200048c565b600354601054600954620003ee926001600160a01b03918216929116906200048c565b600354600a546200040e916001600160a01b03918216911660006200048c565b600354601054600a5462000431926001600160a01b03918216929116906200048c565b505050505062000a48565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806200050a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015620004e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000508919062000991565b155b620005825760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620005da918591620005df16565b505050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908201526000906200062e906001600160a01b038516908490620006b3565b905080516000148062000652575080806020019051810190620006529190620009ab565b620005da5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000579565b6060620006c48484600085620006cc565b949350505050565b6060824710156200072f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000579565b600080866001600160a01b031685876040516200074d9190620009f5565b60006040518083038185875af1925050503d80600081146200078c576040519150601f19603f3d011682016040523d82523d6000602084013e62000791565b606091505b509092509050620007a587838387620007b0565b979650505050505050565b60608315620008245782516000036200081c576001600160a01b0385163b6200081c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000579565b5081620006c4565b620006c483838151156200083b5781518083602001fd5b8060405162461bcd60e51b815260040162000579919062000a13565b828054828255906000526020600020908101928215620008af579160200282015b82811115620008af57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000878565b50620008bd929150620008c1565b5090565b5b80821115620008bd5760008155600101620008c2565b80516001600160a01b0381168114620008f057600080fd5b919050565b600080600080600060a086880312156200090e57600080fd5b6200091986620008d8565b9450602086015160ff811681146200093057600080fd5b93506200094060408701620008d8565b92506200095060608701620008d8565b91506200096060808701620008d8565b90509295509295909350565b6000602082840312156200097f57600080fd5b6200098a82620008d8565b9392505050565b600060208284031215620009a457600080fd5b5051919050565b600060208284031215620009be57600080fd5b815180151581146200098a57600080fd5b60005b83811015620009ec578181015183820152602001620009d2565b50506000910152565b6000825162000a09818460208701620009cf565b9190910192915050565b602081526000825180602084015262000a34816040850160208701620009cf565b601f01601f19169190910160400192915050565b611fcd8062000a586000396000f3fe6080604052600436106101e75760003560e01c8063949938d411610102578063d0e30db011610095578063f0fe082a11610064578063f0fe082a1461055e578063f1e9f1e51461057e578063f2fde38b1461059e578063f6d7eade146105be57600080fd5b8063d0e30db0146104e1578063d3da0eb3146104f6578063e9ea46c714610516578063ef8ef56f1461053657600080fd5b8063aacbf88b116100d1578063aacbf88b1461046c578063c14cba3e1461048c578063c9f801c7146104ac578063cc85d60b146104cc57600080fd5b8063949938d4146103ef57806396a8797e146104175780639a3f190b14610437578063a6cfd6ad1461044c57600080fd5b80635c975abb1161017a57806369d463d51161014957806369d463d514610369578063715018a6146103895780638d9344851461039e5780638da5cb5b146103d157600080fd5b80635c975abb146102e95780635ccf4366146103135780635e53672f14610333578063670213331461035357600080fd5b80632f390dc3116101b65780632f390dc3146102875780633fd59465146102aa5780634641257d146102bf5780634fed3148146102d457600080fd5b80630e907e52146101f35780630ef1d6c81461020a5780632d2c44f21461022a5780632e1a7d4d1461026757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b506102086105de565b005b34801561021657600080fd5b50610208610225366004611cf2565b61079f565b34801561023657600080fd5b5060075461024a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027357600080fd5b50610208610282366004611d16565b610809565b34801561029357600080fd5b5061029c61098f565b60405190815260200161025e565b3480156102b657600080fd5b5061029c610a46565b3480156102cb57600080fd5b50610208610ab9565b3480156102e057600080fd5b5061029c610c20565b3480156102f557600080fd5b50600054600160a01b900460ff16604051901515815260200161025e565b34801561031f57600080fd5b5060035461024a906001600160a01b031681565b34801561033f57600080fd5b5061024a61034e366004611d16565b610cc7565b34801561035f57600080fd5b5061029c61271081565b34801561037557600080fd5b50600c5461024a906001600160a01b031681565b34801561039557600080fd5b50610208610cf1565b3480156103aa57600080fd5b50600a546103bf90600160a01b900460ff1681565b60405160ff909116815260200161025e565b3480156103dd57600080fd5b506000546001600160a01b031661024a565b3480156103fb57600080fd5b5061024a7332fb5663619a657839a80133994e45c5e5cdf42781565b34801561042357600080fd5b50600a5461024a906001600160a01b031681565b34801561044357600080fd5b5061029c610d03565b34801561045857600080fd5b5061024a610467366004611d16565b610d34565b34801561047857600080fd5b5060025461024a906001600160a01b031681565b34801561049857600080fd5b5060085461024a906001600160a01b031681565b3480156104b857600080fd5b50600b5461024a906001600160a01b031681565b3480156104d857600080fd5b5061029c610d44565b3480156104ed57600080fd5b50610208610d60565b34801561050257600080fd5b5061024a610511366004611d16565b610eb4565b34801561052257600080fd5b5060055461024a906001600160a01b031681565b34801561054257600080fd5b5061024a73a1077a294dde1b09bb078844df40758a5d0f9a2781565b34801561056a57600080fd5b5060095461024a906001600160a01b031681565b34801561058a57600080fd5b5060065461024a906001600160a01b031681565b3480156105aa57600080fd5b506102086105b9366004611cf2565b610ec4565b3480156105ca57600080fd5b5060045461024a906001600160a01b031681565b6007546001600160a01b0316331461064f5760405162461bcd60e51b815260206004820152602960248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f74206044820152681d1a194815985d5b1d60ba1b60648201526084015b60405180910390fd5b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152600060248301526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b1580156106b357600080fd5b505af11580156106c7573d6000803e3d6000fd5b5050505060006106d5610d03565b905080156106e6576106e681610f54565b600554600a546040517f5312ea8e000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff1660048201526001600160a01b0390911690635312ea8e90602401600060405180830381600087803b15801561075157600080fd5b505af1158015610765573d6000803e3d6000fd5b505050506000610773610a46565b600754600854919250610793916001600160a01b039081169116836112c2565b61079b611370565b5050565b6107a76113eb565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd8ef77a7d69a6b79f131ecd9aa37060ba0853bbd37cb175ec1abd05738ce27cb906020015b60405180910390a150565b6007546001600160a01b031633146108755760405162461bcd60e51b815260206004820152602960248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f74206044820152681d1a194815985d5b1d60ba1b6064820152608401610646565b600061087f610a46565b90508181101561093057600554600a546001600160a01b039091169063441a3e7090600160a01b900460ff166108b58486611d45565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260ff90921660048301526024820152604401600060405180830381600087803b15801561090d57600080fd5b505af1158015610921573d6000803e3d6000fd5b5050505061092d610a46565b90505b8181111561093b5750805b600754600854610958916001600160a01b039182169116836112c2565b6040518281527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a15050565b600554600a546040517fcf4b55cb000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff16600482015230602482015260009182916001600160a01b039091169063cf4b55cb90604401602060405180830381865afa158015610a08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2c9190611d5e565b9050610a36610d03565b610a409082611d77565b91505090565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b602060405180830381865afa158015610a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab49190611d5e565b905090565b610ac1611445565b610ac961149f565b333b15610b3e5760405162461bcd60e51b815260206004820152602660248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f742060448201527f616e20454f4100000000000000000000000000000000000000000000000000006064820152608401610646565b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152600060248301526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b158015610ba257600080fd5b505af1158015610bb6573d6000803e3d6000fd5b505050506000610bc4610d03565b9050610bcf81610f54565b610bd76114f8565b610bdf610d60565b60405181815233907f4a7c76b60b192b31b3302115b0acccc775c3a02f2dd660062eb4e34f92e725259060200160405180910390a250610c1e60018055565b565b600554600a546040517f900ea587000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff16600482015230602482015260009182916001600160a01b039091169063900ea5879060440160a060405180830381865afa158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190611d8a565b6020015192915050565b600f8181548110610cd757600080fd5b6000918252602090912001546001600160a01b0316905081565b610cf96113eb565b610c1e600061190c565b6006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610a73565b600e8181548110610cd757600080fd5b6000610d4e610c20565b610d56610a46565b610ab49190611d77565b610d68611445565b6000610d72610a46565b905060008111610dea5760405162461bcd60e51b815260206004820152602f60248201527f454d49546661726d53747261746567793a204465706f7369742063616c6c656460448201527f207769746820302062616c616e636500000000000000000000000000000000006064820152608401610646565b600554600854610e07916001600160a01b03918216911683611969565b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152602482018490526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b158015610e6b57600080fd5b505af1158015610e7f573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426816040516107fe91815260200190565b600d8181548110610cd757600080fd5b610ecc6113eb565b6001600160a01b038116610f485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610646565b610f518161190c565b50565b600c54604080517f9297c53000000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691639297c530916004808301926020929190829003018187875af1158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc9190611d5e565b90506000600c60009054906101000a90046001600160a01b03166001600160a01b031663ecc6f5b66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110579190611d5e565b905060006110658284611d77565b905060006127106110768387611e08565b6110809190611e1f565b6003549091506001600160a01b0316635c11d795826000600d306110a5426078611d77565b6040518663ffffffff1660e01b81526004016110c5959493929190611e41565b600060405180830381600087803b1580156110df57600080fd5b505af11580156110f3573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073a1077a294dde1b09bb078844df40758a5d0f9a2791506370a0823190602401602060405180830381865afa158015611149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116d9190611d5e565b905060008361117c8784611e08565b6111869190611e1f565b905060006111948284611d45565b90506000600b60009054906101000a90046001600160a01b03166001600160a01b031663e2af71776040518163ffffffff1660e01b81526004016020604051808303816000875af11580156111ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112119190611eb7565b905061123273a1077a294dde1b09bb078844df40758a5d0f9a2782856112c2565b6040518381527fec0dee9b44856d8dbe0a460ac7625bf3abe9a042867df1f8d3e7834f12ba3d179060200160405180910390a161128473a1077a294dde1b09bb078844df40758a5d0f9a2733846112c2565b6040518281527f1777ed524564847c8fd7dbde1df9966e80c5cc0a0df3c23b6812b5e60cfeb4029060200160405180910390a1505050505050505050565b6040516001600160a01b03831660248201526044810182905261136b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a4e565b505050565b611378611445565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113ce3390565b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b03163314610c1e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610646565b600054600160a01b900460ff1615610c1e5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610646565b6002600154036114f15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610646565b6002600155565b6000611502610d03565b6003549091506001600160a01b0316635c11d795826000600d30611527426078611d77565b6040518663ffffffff1660e01b8152600401611547959493929190611e41565b600060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073a1077a294dde1b09bb078844df40758a5d0f9a2791506370a0823190602401602060405180830381865afa1580156115cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ef9190611d5e565b905060006115fe600283611e1f565b6009549091506001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a271461169c576003546001600160a01b0316635c11d795826000600e30611649426078611d77565b6040518663ffffffff1660e01b8152600401611669959493929190611e41565b600060405180830381600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050505b600a546001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a2714611737576003546001600160a01b0316635c11d795826000600f306116e4426078611d77565b6040518663ffffffff1660e01b8152600401611704959493929190611e41565b600060405180830381600087803b15801561171e57600080fd5b505af1158015611732573d6000803e3d6000fd5b505050505b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a49190611d5e565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156117f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118169190611d5e565b600354600954600a549293506001600160a01b039182169263e8e3370092918216911685856000803061184a426078611d77565b60405160e08a901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039889166004820152968816602488015260448701959095526064860193909352608485019190915260a484015290921660c482015260e4810191909152610104016060604051808303816000875af11580156118de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119029190611ed4565b5050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190611d5e565b9050611a48847f095ea7b30000000000000000000000000000000000000000000000000000000085611a288686611d77565b6040516001600160a01b0390921660248301526044820152606401611307565b50505050565b6000611aa3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b369092919063ffffffff16565b9050805160001480611ac4575080806020019051810190611ac49190611f02565b61136b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610646565b6060611b458484600085611b4d565b949350505050565b606082471015611bc55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610646565b600080866001600160a01b03168587604051611be19190611f48565b60006040518083038185875af1925050503d8060008114611c1e576040519150601f19603f3d011682016040523d82523d6000602084013e611c23565b606091505b5091509150611c3487838387611c3f565b979650505050505050565b60608315611cae578251600003611ca7576001600160a01b0385163b611ca75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610646565b5081611b45565b611b458383815115611cc35781518083602001fd5b8060405162461bcd60e51b81526004016106469190611f64565b6001600160a01b0381168114610f5157600080fd5b600060208284031215611d0457600080fd5b8135611d0f81611cdd565b9392505050565b600060208284031215611d2857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611d5857611d58611d2f565b92915050565b600060208284031215611d7057600080fd5b5051919050565b80820180821115611d5857611d58611d2f565b600060a08284031215611d9c57600080fd5b60405160a0810181811067ffffffffffffffff82111715611dcd57634e487b7160e01b600052604160045260246000fd5b806040525082518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b8082028115828204841417611d5857611d58611d2f565b600082611e3c57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875480845260c0860191508860005282600020935060005b81811015611e965784546001600160a01b031683526001948501949284019201611e71565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208284031215611ec957600080fd5b8151611d0f81611cdd565b600080600060608486031215611ee957600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611f1457600080fd5b81518015158114611d0f57600080fd5b60005b83811015611f3f578181015183820152602001611f27565b50506000910152565b60008251611f5a818460208701611f24565b9190910192915050565b6020815260008251806020840152611f83816040850160208701611f24565b601f01601f1916919091016040019291505056fea2646970667358221220cd1f3e1ee1d6d61033bbfcf74d3e5df1435084fb24d17b281cf8aba1a5b0bc3264736f6c63430008130033000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a27000000000000000000000000bd9d627253d2376cfc98b9f4b9a31d8b1c806a9b0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000610e30927d865d7d4ea314b22f674f7bffad9018000000000000000000000000a2d62ea24b20af80e2f968761e3f909a8c448f110000000000000000000000007cc0a0ca2f9346aceadd5110cfa15c4fa12f9251

Deployed ByteCode

0x6080604052600436106101e75760003560e01c8063949938d411610102578063d0e30db011610095578063f0fe082a11610064578063f0fe082a1461055e578063f1e9f1e51461057e578063f2fde38b1461059e578063f6d7eade146105be57600080fd5b8063d0e30db0146104e1578063d3da0eb3146104f6578063e9ea46c714610516578063ef8ef56f1461053657600080fd5b8063aacbf88b116100d1578063aacbf88b1461046c578063c14cba3e1461048c578063c9f801c7146104ac578063cc85d60b146104cc57600080fd5b8063949938d4146103ef57806396a8797e146104175780639a3f190b14610437578063a6cfd6ad1461044c57600080fd5b80635c975abb1161017a57806369d463d51161014957806369d463d514610369578063715018a6146103895780638d9344851461039e5780638da5cb5b146103d157600080fd5b80635c975abb146102e95780635ccf4366146103135780635e53672f14610333578063670213331461035357600080fd5b80632f390dc3116101b65780632f390dc3146102875780633fd59465146102aa5780634641257d146102bf5780634fed3148146102d457600080fd5b80630e907e52146101f35780630ef1d6c81461020a5780632d2c44f21461022a5780632e1a7d4d1461026757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b506102086105de565b005b34801561021657600080fd5b50610208610225366004611cf2565b61079f565b34801561023657600080fd5b5060075461024a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027357600080fd5b50610208610282366004611d16565b610809565b34801561029357600080fd5b5061029c61098f565b60405190815260200161025e565b3480156102b657600080fd5b5061029c610a46565b3480156102cb57600080fd5b50610208610ab9565b3480156102e057600080fd5b5061029c610c20565b3480156102f557600080fd5b50600054600160a01b900460ff16604051901515815260200161025e565b34801561031f57600080fd5b5060035461024a906001600160a01b031681565b34801561033f57600080fd5b5061024a61034e366004611d16565b610cc7565b34801561035f57600080fd5b5061029c61271081565b34801561037557600080fd5b50600c5461024a906001600160a01b031681565b34801561039557600080fd5b50610208610cf1565b3480156103aa57600080fd5b50600a546103bf90600160a01b900460ff1681565b60405160ff909116815260200161025e565b3480156103dd57600080fd5b506000546001600160a01b031661024a565b3480156103fb57600080fd5b5061024a7332fb5663619a657839a80133994e45c5e5cdf42781565b34801561042357600080fd5b50600a5461024a906001600160a01b031681565b34801561044357600080fd5b5061029c610d03565b34801561045857600080fd5b5061024a610467366004611d16565b610d34565b34801561047857600080fd5b5060025461024a906001600160a01b031681565b34801561049857600080fd5b5060085461024a906001600160a01b031681565b3480156104b857600080fd5b50600b5461024a906001600160a01b031681565b3480156104d857600080fd5b5061029c610d44565b3480156104ed57600080fd5b50610208610d60565b34801561050257600080fd5b5061024a610511366004611d16565b610eb4565b34801561052257600080fd5b5060055461024a906001600160a01b031681565b34801561054257600080fd5b5061024a73a1077a294dde1b09bb078844df40758a5d0f9a2781565b34801561056a57600080fd5b5060095461024a906001600160a01b031681565b34801561058a57600080fd5b5060065461024a906001600160a01b031681565b3480156105aa57600080fd5b506102086105b9366004611cf2565b610ec4565b3480156105ca57600080fd5b5060045461024a906001600160a01b031681565b6007546001600160a01b0316331461064f5760405162461bcd60e51b815260206004820152602960248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f74206044820152681d1a194815985d5b1d60ba1b60648201526084015b60405180910390fd5b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152600060248301526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b1580156106b357600080fd5b505af11580156106c7573d6000803e3d6000fd5b5050505060006106d5610d03565b905080156106e6576106e681610f54565b600554600a546040517f5312ea8e000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff1660048201526001600160a01b0390911690635312ea8e90602401600060405180830381600087803b15801561075157600080fd5b505af1158015610765573d6000803e3d6000fd5b505050506000610773610a46565b600754600854919250610793916001600160a01b039081169116836112c2565b61079b611370565b5050565b6107a76113eb565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd8ef77a7d69a6b79f131ecd9aa37060ba0853bbd37cb175ec1abd05738ce27cb906020015b60405180910390a150565b6007546001600160a01b031633146108755760405162461bcd60e51b815260206004820152602960248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f74206044820152681d1a194815985d5b1d60ba1b6064820152608401610646565b600061087f610a46565b90508181101561093057600554600a546001600160a01b039091169063441a3e7090600160a01b900460ff166108b58486611d45565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260ff90921660048301526024820152604401600060405180830381600087803b15801561090d57600080fd5b505af1158015610921573d6000803e3d6000fd5b5050505061092d610a46565b90505b8181111561093b5750805b600754600854610958916001600160a01b039182169116836112c2565b6040518281527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a15050565b600554600a546040517fcf4b55cb000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff16600482015230602482015260009182916001600160a01b039091169063cf4b55cb90604401602060405180830381865afa158015610a08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2c9190611d5e565b9050610a36610d03565b610a409082611d77565b91505090565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024015b602060405180830381865afa158015610a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab49190611d5e565b905090565b610ac1611445565b610ac961149f565b333b15610b3e5760405162461bcd60e51b815260206004820152602660248201527f454d49546661726d53747261746567793a2043616c6c6572206973206e6f742060448201527f616e20454f4100000000000000000000000000000000000000000000000000006064820152608401610646565b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152600060248301526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b158015610ba257600080fd5b505af1158015610bb6573d6000803e3d6000fd5b505050506000610bc4610d03565b9050610bcf81610f54565b610bd76114f8565b610bdf610d60565b60405181815233907f4a7c76b60b192b31b3302115b0acccc775c3a02f2dd660062eb4e34f92e725259060200160405180910390a250610c1e60018055565b565b600554600a546040517f900ea587000000000000000000000000000000000000000000000000000000008152600160a01b90910460ff16600482015230602482015260009182916001600160a01b039091169063900ea5879060440160a060405180830381865afa158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190611d8a565b6020015192915050565b600f8181548110610cd757600080fd5b6000918252602090912001546001600160a01b0316905081565b610cf96113eb565b610c1e600061190c565b6006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610a73565b600e8181548110610cd757600080fd5b6000610d4e610c20565b610d56610a46565b610ab49190611d77565b610d68611445565b6000610d72610a46565b905060008111610dea5760405162461bcd60e51b815260206004820152602f60248201527f454d49546661726d53747261746567793a204465706f7369742063616c6c656460448201527f207769746820302062616c616e636500000000000000000000000000000000006064820152608401610646565b600554600854610e07916001600160a01b03918216911683611969565b600554600a54600254604051638dbdbe6d60e01b8152600160a01b90920460ff166004830152602482018490526001600160a01b03908116604483015290911690638dbdbe6d90606401600060405180830381600087803b158015610e6b57600080fd5b505af1158015610e7f573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426816040516107fe91815260200190565b600d8181548110610cd757600080fd5b610ecc6113eb565b6001600160a01b038116610f485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610646565b610f518161190c565b50565b600c54604080517f9297c53000000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691639297c530916004808301926020929190829003018187875af1158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc9190611d5e565b90506000600c60009054906101000a90046001600160a01b03166001600160a01b031663ecc6f5b66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110579190611d5e565b905060006110658284611d77565b905060006127106110768387611e08565b6110809190611e1f565b6003549091506001600160a01b0316635c11d795826000600d306110a5426078611d77565b6040518663ffffffff1660e01b81526004016110c5959493929190611e41565b600060405180830381600087803b1580156110df57600080fd5b505af11580156110f3573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073a1077a294dde1b09bb078844df40758a5d0f9a2791506370a0823190602401602060405180830381865afa158015611149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116d9190611d5e565b905060008361117c8784611e08565b6111869190611e1f565b905060006111948284611d45565b90506000600b60009054906101000a90046001600160a01b03166001600160a01b031663e2af71776040518163ffffffff1660e01b81526004016020604051808303816000875af11580156111ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112119190611eb7565b905061123273a1077a294dde1b09bb078844df40758a5d0f9a2782856112c2565b6040518381527fec0dee9b44856d8dbe0a460ac7625bf3abe9a042867df1f8d3e7834f12ba3d179060200160405180910390a161128473a1077a294dde1b09bb078844df40758a5d0f9a2733846112c2565b6040518281527f1777ed524564847c8fd7dbde1df9966e80c5cc0a0df3c23b6812b5e60cfeb4029060200160405180910390a1505050505050505050565b6040516001600160a01b03831660248201526044810182905261136b9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a4e565b505050565b611378611445565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113ce3390565b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b03163314610c1e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610646565b600054600160a01b900460ff1615610c1e5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610646565b6002600154036114f15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610646565b6002600155565b6000611502610d03565b6003549091506001600160a01b0316635c11d795826000600d30611527426078611d77565b6040518663ffffffff1660e01b8152600401611547959493929190611e41565b600060405180830381600087803b15801561156157600080fd5b505af1158015611575573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073a1077a294dde1b09bb078844df40758a5d0f9a2791506370a0823190602401602060405180830381865afa1580156115cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ef9190611d5e565b905060006115fe600283611e1f565b6009549091506001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a271461169c576003546001600160a01b0316635c11d795826000600e30611649426078611d77565b6040518663ffffffff1660e01b8152600401611669959493929190611e41565b600060405180830381600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050505b600a546001600160a01b031673a1077a294dde1b09bb078844df40758a5d0f9a2714611737576003546001600160a01b0316635c11d795826000600f306116e4426078611d77565b6040518663ffffffff1660e01b8152600401611704959493929190611e41565b600060405180830381600087803b15801561171e57600080fd5b505af1158015611732573d6000803e3d6000fd5b505050505b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a49190611d5e565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156117f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118169190611d5e565b600354600954600a549293506001600160a01b039182169263e8e3370092918216911685856000803061184a426078611d77565b60405160e08a901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039889166004820152968816602488015260448701959095526064860193909352608485019190915260a484015290921660c482015260e4810191909152610104016060604051808303816000875af11580156118de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119029190611ed4565b5050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190611d5e565b9050611a48847f095ea7b30000000000000000000000000000000000000000000000000000000085611a288686611d77565b6040516001600160a01b0390921660248301526044820152606401611307565b50505050565b6000611aa3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b369092919063ffffffff16565b9050805160001480611ac4575080806020019051810190611ac49190611f02565b61136b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610646565b6060611b458484600085611b4d565b949350505050565b606082471015611bc55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610646565b600080866001600160a01b03168587604051611be19190611f48565b60006040518083038185875af1925050503d8060008114611c1e576040519150601f19603f3d011682016040523d82523d6000602084013e611c23565b606091505b5091509150611c3487838387611c3f565b979650505050505050565b60608315611cae578251600003611ca7576001600160a01b0385163b611ca75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610646565b5081611b45565b611b458383815115611cc35781518083602001fd5b8060405162461bcd60e51b81526004016106469190611f64565b6001600160a01b0381168114610f5157600080fd5b600060208284031215611d0457600080fd5b8135611d0f81611cdd565b9392505050565b600060208284031215611d2857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611d5857611d58611d2f565b92915050565b600060208284031215611d7057600080fd5b5051919050565b80820180821115611d5857611d58611d2f565b600060a08284031215611d9c57600080fd5b60405160a0810181811067ffffffffffffffff82111715611dcd57634e487b7160e01b600052604160045260246000fd5b806040525082518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b8082028115828204841417611d5857611d58611d2f565b600082611e3c57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875480845260c0860191508860005282600020935060005b81811015611e965784546001600160a01b031683526001948501949284019201611e71565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208284031215611ec957600080fd5b8151611d0f81611cdd565b600080600060608486031215611ee957600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611f1457600080fd5b81518015158114611d0f57600080fd5b60005b83811015611f3f578181015183820152602001611f27565b50506000910152565b60008251611f5a818460208701611f24565b9190910192915050565b6020815260008251806020840152611f83816040850160208701611f24565b601f01601f1916919091016040019291505056fea2646970667358221220cd1f3e1ee1d6d61033bbfcf74d3e5df1435084fb24d17b281cf8aba1a5b0bc3264736f6c63430008130033